twenty 2.51.1 → 2.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/README.md +4 -5
  2. package/dist/app-template/AGENTS.md +8 -18
  3. package/dist/app-template/README.md +1 -1
  4. package/dist/app-template/SETUP.md +18 -38
  5. package/dist/app-template/github/workflows/cd.yml +2 -0
  6. package/dist/app-template/github/workflows/publish.yml +4 -1
  7. package/dist/app-template/package.json +2 -2
  8. package/dist/app-template/src/__tests__/global-setup.ts +11 -14
  9. package/dist/app-template/src/__tests__/run-twenty.ts +12 -8
  10. package/dist/app-template/src/default-role.ts +2 -0
  11. package/dist/app-template/yarn.lock +111 -1478
  12. package/dist/app-worker.cjs +1 -1
  13. package/dist/chunks/AppLocales-CcZVcJIa-BjjIbbsZ.cjs +1 -0
  14. package/dist/chunks/api-url-protocols.constant-EEmR3Pmg.cjs +1 -0
  15. package/dist/chunks/application-BxIKWsoy.cjs +5 -0
  16. package/dist/chunks/assert-pull-paths-TFGZvzZO.cjs +1 -0
  17. package/dist/chunks/build--4zYt4wd.cjs +1 -0
  18. package/dist/chunks/{build-source-manifest-BmZlsY97.cjs → build-source-manifest-BIq-ByiX.cjs} +1 -1
  19. package/dist/chunks/{build-source-snapshot-BWbLS2F3.cjs → build-source-snapshot-d23K-Ikr.cjs} +16 -16
  20. package/dist/chunks/capitalize-DFPVt1IM-CF4z3TZK.cjs +1 -0
  21. package/dist/chunks/check-node-requirement-CnwHKQBp.cjs +1 -0
  22. package/dist/chunks/cli-error-CrUD8uMp.cjs +1 -0
  23. package/dist/chunks/cli-node-version-range.constant-D3XrqV07.cjs +1 -0
  24. package/dist/chunks/cli-version.constant-YNWQ9cC0.cjs +1 -0
  25. package/dist/chunks/collect-translatable-strings-rQ3M474u.cjs +1 -0
  26. package/dist/chunks/collect-watch-inputs-Dn6g1cNu.cjs +1 -0
  27. package/dist/chunks/compile-application-translations-Q8K18JOI.cjs +1 -0
  28. package/dist/chunks/{confirm-in-terminal-BxEM5lxE.cjs → confirm-in-terminal-D2e1lKUY.cjs} +1 -1
  29. package/dist/chunks/constants-Bod2d_GP-CQVvzM4m.cjs +55 -0
  30. package/dist/chunks/convert-to-label-CbLHl7Lv.cjs +1 -0
  31. package/dist/chunks/{create-app-not-installed-error-DY-iuPPx.cjs → create-app-not-installed-error-sN4TzjlV.cjs} +1 -1
  32. package/dist/chunks/{create-cancelled-error-DgrNfOv2.cjs → create-cancelled-error-BBhAY8fS.cjs} +1 -1
  33. package/dist/chunks/create-http-status-error-BMaFl1lt.cjs +1 -0
  34. package/dist/chunks/create-metadata-client-C_ezBBSL.cjs +6 -0
  35. package/dist/chunks/create-pull-base-write-CyAWuU4_.cjs +1 -0
  36. package/dist/chunks/{create-rest-client-PU2Uyfnb.cjs → create-rest-client-Cqmhix9V.cjs} +1 -1
  37. package/dist/chunks/{create-tooling-failure-B2FmNwR2.cjs → create-tooling-failure-0Foyei1R.cjs} +1 -1
  38. package/dist/chunks/extract-manifest-from-file-CiZT_2AN.cjs +1 -0
  39. package/dist/chunks/extract-source-translations-BqDJ4wJe.cjs +1 -0
  40. package/dist/chunks/{fetch-metadata-inspection-CeqzcB_x.cjs → fetch-metadata-inspection-FViKeZE2.cjs} +1 -1
  41. package/dist/chunks/fetch-signed-in-identity-DetIg3mY.cjs +1 -0
  42. package/dist/chunks/{fetch-workspace-id-CsvJDu8b.cjs → fetch-workspace-id-BjsaXgwT.cjs} +1 -1
  43. package/dist/chunks/{find-remote-D48r20g0.cjs → find-remote-TcvVyJpy.cjs} +1 -1
  44. package/dist/chunks/format-body-C7fmVDAZ.cjs +1 -0
  45. package/dist/chunks/format-data-value-CSmt_osQ.cjs +1 -0
  46. package/dist/chunks/{format-display-path-gEepVJDg.cjs → format-display-path-CZLIKwPT.cjs} +1 -1
  47. package/dist/chunks/format-metadata-fields-CIlW-vcz.cjs +2 -0
  48. package/dist/chunks/format-metadata-owner-boZrxwKt.cjs +1 -0
  49. package/dist/chunks/format-progress-line-Cj65-DU5.cjs +1 -0
  50. package/dist/chunks/fs-utils-DoSmCBu8.cjs +2 -0
  51. package/dist/chunks/generate-application-client-CApCs5PX.cjs +1 -0
  52. package/dist/chunks/get-client-generation-skip-reason-D9u3PsGX.cjs +1 -0
  53. package/dist/chunks/{get-credential-kind-JI9heHe2.cjs → get-credential-kind-qxy7oLdW.cjs} +1 -1
  54. package/dist/chunks/get-function-input-schema-GNk3NRLJ-DscBUsKy.cjs +1 -0
  55. package/dist/chunks/get-system-view-universal-identifier.util-C6XI2VGC-Dy2DReV-.cjs +1 -0
  56. package/dist/chunks/get-tooling-error-context-CZKTM7Q6.cjs +1 -0
  57. package/dist/chunks/global-flags.constant-DzvO9WzG.cjs +1 -0
  58. package/dist/chunks/has-error-code-DsJeqbZq.cjs +1 -0
  59. package/dist/chunks/is-access-token-expiring-hGgVV9T8.cjs +1 -0
  60. package/dist/chunks/{is-application-not-found-error-Cja7iQrL.cjs → is-application-not-found-error-DH5B4tzI.cjs} +1 -1
  61. package/dist/chunks/is-exported-manifest-CoOxJ1Ku.cjs +1 -0
  62. package/dist/chunks/{is-inside-directory-DHVCQE5C.cjs → is-inside-directory-CymDrDJC.cjs} +1 -1
  63. package/dist/chunks/{is-interaction-allowed-CF-ko1KI.cjs → is-interaction-allowed-BQLOG8RG.cjs} +1 -1
  64. package/dist/chunks/is-locale-catalog-D0wFrW8f.cjs +1 -0
  65. package/dist/chunks/{is-same-universal-identifier-BCBib3RP.cjs → is-same-universal-identifier-Bm_wb6Ez.cjs} +1 -1
  66. package/dist/chunks/is-supported-locale-C33Of85N.cjs +1 -0
  67. package/dist/chunks/isDefined-Dtu5EYqP-CJctgvfE.cjs +1 -0
  68. package/dist/chunks/locale-catalog-format-Dbn6JD4p.cjs +20 -0
  69. package/dist/chunks/metadata-BWVl-AS0.cjs +1 -0
  70. package/dist/chunks/{metadata-page.constant-CxWuBtP5.cjs → metadata-page.constant-7kxmFenL.cjs} +1 -1
  71. package/dist/chunks/parse-api-url-jHzjLWX1.cjs +1 -0
  72. package/dist/chunks/{parse-app-export-DFV_KqHM.cjs → parse-app-export-Ci1VgDGB.cjs} +1 -1
  73. package/dist/chunks/parse-extraction-locale-h0bmy8hf.cjs +1 -0
  74. package/dist/chunks/parse-graphql-response-8IMbTRp8.cjs +1 -0
  75. package/dist/chunks/{parse-json-input-CO-KP4XZ.cjs → parse-json-input-CJEnFJw_.cjs} +1 -1
  76. package/dist/chunks/{print-typescript-value-D5kLR9wo.cjs → print-typescript-value-ChOUZ7Mm.cjs} +1 -1
  77. package/dist/chunks/pull-minimum-sdk-version.constant-B-1PY5i8.cjs +5 -0
  78. package/dist/chunks/pull-source-DcvqGJro.cjs +1 -0
  79. package/dist/chunks/{read-app-identity-dWB3NG6p.cjs → read-app-identity-BbNKSUV5.cjs} +1 -1
  80. package/dist/chunks/read-application-identifier-BxzrxUSf.cjs +1 -0
  81. package/dist/chunks/read-application-identity-uq1DePso.cjs +1 -0
  82. package/dist/chunks/{read-command-values-uSJqBG_E.cjs → read-command-values-rGaU2qHz.cjs} +1 -1
  83. package/dist/chunks/read-config-BinH4NbQ.cjs +1 -0
  84. package/dist/chunks/read-infer-deletion-option-BFdfPWCc.cjs +8 -0
  85. package/dist/chunks/{read-input-value-Cxgh_r2g.cjs → read-input-value-CzJsE62r.cjs} +1 -1
  86. package/dist/chunks/read-json-object-ht56HC80.cjs +1 -0
  87. package/dist/chunks/read-snapshot-file-Dgc3WCDM.cjs +1 -0
  88. package/dist/chunks/{read-source-identity-BM-MsOjA.cjs → read-source-identity-DmwOw5xO.cjs} +1 -1
  89. package/dist/chunks/record-pull-base-lUZgKmne.cjs +1 -0
  90. package/dist/chunks/{record-typecheck-config-inputs-CmF0bbqm.cjs → record-typecheck-config-inputs-BxgLBZ_x.cjs} +1 -1
  91. package/dist/chunks/request-oauth-tokens-DCmkyPd1.cjs +1 -0
  92. package/dist/chunks/request-timeout-milliseconds.constant-BkZTOtpY.cjs +1 -0
  93. package/dist/chunks/{require-approval-D0FfoHhF.cjs → require-approval-BIgPOy_r.cjs} +1 -1
  94. package/dist/chunks/resolve-app-project-CMuYw_Z4.cjs +1 -0
  95. package/dist/chunks/resolve-command-target-BFHhx0DC.cjs +1 -0
  96. package/dist/chunks/resolve-inside-sdk-Ca2uRzQW.cjs +1 -0
  97. package/dist/chunks/{resolve-metadata-object-BSDYVuzQ.cjs → resolve-metadata-object-C3sDavWu.cjs} +1 -1
  98. package/dist/chunks/{resolve-project-typescript-vMtmufcP.cjs → resolve-project-typescript-D66veK53.cjs} +1 -1
  99. package/dist/chunks/resolve-request-url-BwELN2oQ.cjs +1 -0
  100. package/dist/chunks/resolve-source-sdk-Cfn4KCbU.cjs +1 -0
  101. package/dist/chunks/result-item-limit.constant-QX3teiuy.cjs +1 -0
  102. package/dist/chunks/rolldown-runtime-mLOUI7ql.cjs +1 -0
  103. package/dist/chunks/run-api-graphql-command-Byg29Kwt.cjs +1 -0
  104. package/dist/chunks/run-api-rest-command-BVxjuvu0.cjs +1 -0
  105. package/dist/chunks/run-app-add-command-BzKv_KQW.cjs +163 -0
  106. package/dist/chunks/run-app-apply-command-DwhPVSBM.cjs +2 -0
  107. package/dist/chunks/{run-app-build-command-DSGpIZBT.cjs → run-app-build-command-BeUcVmMK.cjs} +1 -1
  108. package/dist/chunks/run-app-dev-command-BcdQ_GFC.cjs +2 -0
  109. package/dist/chunks/run-app-exec-command-DNbhEfkC.cjs +3 -0
  110. package/dist/chunks/run-app-generate-client-command-DxN3fEA1.cjs +2 -0
  111. package/dist/chunks/run-app-init-command-b6UCdbdu.cjs +2 -0
  112. package/dist/chunks/run-app-install-command-Btc0jUCP.cjs +1 -0
  113. package/dist/chunks/run-app-logs-command-dfLruOJn.cjs +9 -0
  114. package/dist/chunks/run-app-operation-Or8xoNyS.cjs +1 -0
  115. package/dist/chunks/run-app-plan-command-4BoAWJL8.cjs +1 -0
  116. package/dist/chunks/run-app-publish-command-BSoeN498.cjs +3 -0
  117. package/dist/chunks/run-app-pull-command-_T-gRpRM.cjs +3 -0
  118. package/dist/chunks/{run-app-translations-extract-command-Ba66GX7e.cjs → run-app-translations-extract-command-BtKIasjA.cjs} +1 -1
  119. package/dist/chunks/{run-app-typecheck-command-MAxB7Yg3.cjs → run-app-typecheck-command-CpaU-SSu.cjs} +1 -1
  120. package/dist/chunks/{run-app-uninstall-command-BzYSsL5a.cjs → run-app-uninstall-command-BxFxIq7d.cjs} +1 -1
  121. package/dist/chunks/run-auth-login-command-B2mdQ2u2.cjs +1 -0
  122. package/dist/chunks/{run-auth-logout-command-iC22soKN.cjs → run-auth-logout-command-ChQscyV4.cjs} +1 -1
  123. package/dist/chunks/run-auth-status-command-kdN443Ay.cjs +1 -0
  124. package/dist/chunks/run-cli-BYGyQans.cjs +24 -0
  125. package/dist/chunks/run-commands-command-CZnZ6zyN.cjs +2 -0
  126. package/dist/chunks/{run-data-get-command-D7czgisf.cjs → run-data-get-command--GOFyb1w.cjs} +1 -1
  127. package/dist/chunks/run-data-list-command-By_8ux8l.cjs +1 -0
  128. package/dist/chunks/run-doctor-command-BSwxxXiE.cjs +2 -0
  129. package/dist/chunks/run-metadata-field-describe-command-Dyfd4C9K.cjs +3 -0
  130. package/dist/chunks/{run-metadata-field-list-command-CpIUXOmy.cjs → run-metadata-field-list-command-Cd7YnAki.cjs} +1 -1
  131. package/dist/chunks/{run-metadata-object-describe-command--cIPFkWW.cjs → run-metadata-object-describe-command-DJUVk4c3.cjs} +1 -1
  132. package/dist/chunks/{run-metadata-object-list-command-CQ1jcSJc.cjs → run-metadata-object-list-command-CYfHKqwb.cjs} +1 -1
  133. package/dist/chunks/run-open-command-smX2pJKi.cjs +1 -0
  134. package/dist/chunks/{run-remote-list-command-DV-Ruk98.cjs → run-remote-list-command-OotTwa0W.cjs} +1 -1
  135. package/dist/chunks/{run-remote-remove-command-C1JeH5mK.cjs → run-remote-remove-command-C43pSDK9.cjs} +1 -1
  136. package/dist/chunks/{run-remote-rename-command-CCVu4hEw.cjs → run-remote-rename-command-fphQG7fM.cjs} +1 -1
  137. package/dist/chunks/{run-remote-use-command-BvqWgEsP.cjs → run-remote-use-command-CpgiMu-K.cjs} +1 -1
  138. package/dist/chunks/{run-version-command-DdKb9JL0.cjs → run-version-command-BugTbUa0.cjs} +1 -1
  139. package/dist/chunks/select-target-CgDTzZ8p.cjs +1 -0
  140. package/dist/chunks/sign-in-to-remote-again-BmojAqdV.cjs +1 -0
  141. package/dist/chunks/sign-in-with-browser-1-CK0mOu.cjs +124 -0
  142. package/dist/chunks/to-cli-error-4pSpVaW9.cjs +1 -0
  143. package/dist/chunks/to-public-target-D00so1uO.cjs +1 -0
  144. package/dist/chunks/to-worker-output-diagnostics-BD6M8RST.cjs +2 -0
  145. package/dist/chunks/typecheck-application-CQG69ztM.cjs +2 -0
  146. package/dist/chunks/undici-BfHt0Tny.cjs +95 -0
  147. package/dist/chunks/{update-config-CnB7lDVC.cjs → update-config-BHs_Zv8h.cjs} +1 -1
  148. package/dist/chunks/utils-BMycM5SC-9TsAPfH8.cjs +11 -0
  149. package/dist/chunks/valid-DnUN-PQ0.cjs +1 -0
  150. package/dist/chunks/{validate-remote-name-w-qnr43w.cjs → validate-remote-name-ZWOgVe80.cjs} +1 -1
  151. package/dist/chunks/{with-phase-details-Dof8Ao9R.cjs → with-phase-details-CRqY0f3c.cjs} +1 -1
  152. package/dist/chunks/write-config-atomically-BHOlbOl_.cjs +1 -0
  153. package/dist/cli.cjs +1 -1
  154. package/docs/commands.md +13 -10
  155. package/package.json +5 -4
  156. package/src/app/manifest/README.md +10 -12
  157. package/src/app/pull/README.md +5 -1
  158. package/dist/chunks/application-DOWikeQt.cjs +0 -5
  159. package/dist/chunks/assert-pull-paths-BuQ1ZRvQ.cjs +0 -1
  160. package/dist/chunks/build-CX6FBrbu.cjs +0 -1
  161. package/dist/chunks/build-pull-entities-ShVsLh_s.cjs +0 -5
  162. package/dist/chunks/check-node-requirement-CGBKvEqH.cjs +0 -1
  163. package/dist/chunks/cli-error-CSsayo0u.cjs +0 -1
  164. package/dist/chunks/cli-node-version-range.constant-D7fE8edk.cjs +0 -1
  165. package/dist/chunks/cli-version.constant-DGQXQw_V.cjs +0 -1
  166. package/dist/chunks/collect-translatable-strings-DWRZN9zQ.cjs +0 -1
  167. package/dist/chunks/collect-watch-inputs-CS4oNP1F.cjs +0 -1
  168. package/dist/chunks/compile-application-translations-DS6jGOV4.cjs +0 -1
  169. package/dist/chunks/constants-D-caeNc5-9rDzSg5B.cjs +0 -23
  170. package/dist/chunks/convert-to-label-hx-g0Lvj.cjs +0 -1
  171. package/dist/chunks/create-http-status-error-E0DUDIUP.cjs +0 -1
  172. package/dist/chunks/create-metadata-client-9IF8ArjT.cjs +0 -6
  173. package/dist/chunks/create-pull-base-write-JW3ZTnaC.cjs +0 -1
  174. package/dist/chunks/extract-manifest-from-file-nrU-X7g7.cjs +0 -1
  175. package/dist/chunks/extract-source-translations-DeVUs6Xz.cjs +0 -1
  176. package/dist/chunks/fetch-signed-in-identity-B49Tf79K.cjs +0 -1
  177. package/dist/chunks/format-body-CyNgSGIx.cjs +0 -1
  178. package/dist/chunks/format-data-value-kug8Yjt2.cjs +0 -1
  179. package/dist/chunks/format-metadata-fields-BTukrGn9.cjs +0 -2
  180. package/dist/chunks/format-metadata-owner-CsQXOj_P.cjs +0 -1
  181. package/dist/chunks/format-progress-line-DhMnjGkz.cjs +0 -1
  182. package/dist/chunks/fs-utils-Bl1fQcaJ.cjs +0 -2
  183. package/dist/chunks/generate-application-client-B3Fen9_7.cjs +0 -1
  184. package/dist/chunks/get-app-plan-summary-C-CQdNrh.cjs +0 -8
  185. package/dist/chunks/get-client-generation-skip-reason-BVkBgZWQ.cjs +0 -1
  186. package/dist/chunks/get-function-input-schema-GNk3NRLJ-DTFC8CbW.cjs +0 -1
  187. package/dist/chunks/get-tooling-error-context-C69TBSej.cjs +0 -1
  188. package/dist/chunks/global-flags.constant-CRom3uiZ.cjs +0 -1
  189. package/dist/chunks/is-access-token-expiring-DT6D8bMy.cjs +0 -1
  190. package/dist/chunks/is-exported-manifest-DnQNK9XY.cjs +0 -1
  191. package/dist/chunks/is-locale-catalog-CUFLOiRx.cjs +0 -1
  192. package/dist/chunks/is-supported-locale-xFJcoWeE.cjs +0 -1
  193. package/dist/chunks/locale-catalog-format-CgKjHqcW.cjs +0 -20
  194. package/dist/chunks/metadata-DkXpEhJh.cjs +0 -1
  195. package/dist/chunks/parse-api-url-CFCz3xUA.cjs +0 -1
  196. package/dist/chunks/parse-extraction-locale-C7Gdd3Oa.cjs +0 -1
  197. package/dist/chunks/parse-graphql-response-BcKxw_s9.cjs +0 -1
  198. package/dist/chunks/pull-source-BKm8k5WI.cjs +0 -1
  199. package/dist/chunks/read-application-identifier-BlkRhC8j.cjs +0 -1
  200. package/dist/chunks/read-application-identity-DgEOK9zh.cjs +0 -1
  201. package/dist/chunks/read-config-Qwl4pAO8.cjs +0 -1
  202. package/dist/chunks/read-json-object-BXZs97qz.cjs +0 -1
  203. package/dist/chunks/read-snapshot-file-CxPJh0Bk.cjs +0 -1
  204. package/dist/chunks/record-pull-base-DwoMDnXm.cjs +0 -1
  205. package/dist/chunks/request-oauth-tokens-QdDt7j8i.cjs +0 -1
  206. package/dist/chunks/request-timeout-milliseconds.constant-DtyQHrll.cjs +0 -1
  207. package/dist/chunks/resolve-app-project-B0KRR-xp.cjs +0 -1
  208. package/dist/chunks/resolve-command-target-BWCnYRCn.cjs +0 -1
  209. package/dist/chunks/resolve-inside-sdk-DiEOTO12.cjs +0 -1
  210. package/dist/chunks/resolve-request-url-BvOe0vYd.cjs +0 -1
  211. package/dist/chunks/resolve-source-sdk-CU1wk4bl.cjs +0 -1
  212. package/dist/chunks/result-item-limit.constant-CDrOhiWD.cjs +0 -1
  213. package/dist/chunks/run-api-graphql-command-Df2FAGpA.cjs +0 -1
  214. package/dist/chunks/run-api-rest-command-2YvvMh8h.cjs +0 -1
  215. package/dist/chunks/run-app-add-command-wpCH-Lp9.cjs +0 -163
  216. package/dist/chunks/run-app-apply-command-CPocg1Xz.cjs +0 -2
  217. package/dist/chunks/run-app-dev-command-BOAYsAKr.cjs +0 -2
  218. package/dist/chunks/run-app-exec-command-Fwi80y3g.cjs +0 -3
  219. package/dist/chunks/run-app-generate-client-command-DidOpqNE.cjs +0 -2
  220. package/dist/chunks/run-app-init-command-DRFYqMMh.cjs +0 -2
  221. package/dist/chunks/run-app-install-command-DPt8PzUS.cjs +0 -1
  222. package/dist/chunks/run-app-logs-command-C-9ZyGau.cjs +0 -9
  223. package/dist/chunks/run-app-operation-Cw5M8v43.cjs +0 -1
  224. package/dist/chunks/run-app-plan-command-CT1SlcdX.cjs +0 -1
  225. package/dist/chunks/run-app-publish-command-DiIlqdTg.cjs +0 -3
  226. package/dist/chunks/run-app-pull-command-r_NjC_Rk.cjs +0 -3
  227. package/dist/chunks/run-auth-login-command-Cb3bITQj.cjs +0 -1
  228. package/dist/chunks/run-auth-status-command-C0rdb747.cjs +0 -1
  229. package/dist/chunks/run-cli-CuxXyb__.cjs +0 -23
  230. package/dist/chunks/run-commands-command-D0P3mHHz.cjs +0 -2
  231. package/dist/chunks/run-data-list-command-CUp_FN_I.cjs +0 -1
  232. package/dist/chunks/run-doctor-command-ClisEoI5.cjs +0 -2
  233. package/dist/chunks/run-metadata-field-describe-command-7xrRVRwr.cjs +0 -3
  234. package/dist/chunks/run-open-command-DLe3PYqB.cjs +0 -1
  235. package/dist/chunks/select-target-DZlm8j62.cjs +0 -1
  236. package/dist/chunks/sign-in-to-remote-again-WEIeFaAT.cjs +0 -1
  237. package/dist/chunks/sign-in-with-browser-BUvT_awm.cjs +0 -1
  238. package/dist/chunks/to-cli-error-BBYf_wqo.cjs +0 -1
  239. package/dist/chunks/to-public-target-bNT50le0.cjs +0 -1
  240. package/dist/chunks/to-worker-output-diagnostics-BzdY4Z2V.cjs +0 -2
  241. package/dist/chunks/typecheck-application-dVtzoMDg.cjs +0 -2
  242. package/dist/chunks/undici-D3mKdfwl.cjs +0 -95
  243. package/dist/chunks/utils-CvvLHbc4-CKDJ1YgX.cjs +0 -38
  244. package/dist/chunks/write-config-atomically-DkRUfbw0.cjs +0 -1
@@ -0,0 +1 @@
1
+ const e=require("./rolldown-runtime-mLOUI7ql.cjs"),t=require("./build--4zYt4wd.cjs"),n=require("./utils-BMycM5SC-9TsAPfH8.cjs"),r=require("./isDefined-Dtu5EYqP-CJctgvfE.cjs"),i=require("./constants-Bod2d_GP-CQVvzM4m.cjs"),a=require("./application-BxIKWsoy.cjs"),o=require("./get-system-view-universal-identifier.util-C6XI2VGC-Dy2DReV-.cjs"),s=require("./fs-utils-DoSmCBu8.cjs"),c=require("./list-application-source-files-jEau5Rie.cjs"),l=require("./extract-manifest-from-file-CiZT_2AN.cjs"),u=require("./metadata-BWVl-AS0.cjs"),d=require("./locale-catalog-format-Dbn6JD4p.cjs"),f=require("./constants-Cf5-CwMu.cjs"),p=require("./is-supported-locale-C33Of85N.cjs");let m=require("node:fs/promises"),h=require("node:path"),g=require("node:fs"),ee=require("tinyglobby"),_=require("typescript");_=e.r(_);let v=require("path");v=e.r(v);var te=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function y(e){return typeof e==`string`&&te.test(e)}function b(e){if(!y(e))throw TypeError(`Invalid UUID`);let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,t&255,(t=parseInt(e.slice(9,13),16))>>>8,t&255,(t=parseInt(e.slice(14,18),16))>>>8,t&255,(t=parseInt(e.slice(19,23),16))>>>8,t&255,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255)}var x=[];for(let e=0;e<256;++e)x.push((e+256).toString(16).slice(1));function ne(e,t=0){return(x[e[t+0]]+x[e[t+1]]+x[e[t+2]]+x[e[t+3]]+`-`+x[e[t+4]]+x[e[t+5]]+`-`+x[e[t+6]]+x[e[t+7]]+`-`+x[e[t+8]]+x[e[t+9]]+`-`+x[e[t+10]]+x[e[t+11]]+x[e[t+12]]+x[e[t+13]]+x[e[t+14]]+x[e[t+15]]).toLowerCase()}function S(e){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}var C=`6ba7b810-9dad-11d1-80b4-00c04fd430c8`,re=`6ba7b811-9dad-11d1-80b4-00c04fd430c8`;function w(e,t,n,r,i,a){let o=typeof n==`string`?S(n):n,s=typeof r==`string`?b(r):r;if(typeof r==`string`&&(r=b(r)),r?.length!==16)throw TypeError(`Namespace must be array-like (16 iterable integer values, 0-255)`);let c=new Uint8Array(16+o.length);if(c.set(s),c.set(o,s.length),c=t(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,i){if(a||=0,a<0||a+16>i.length)throw RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let e=0;e<16;++e)i[a+e]=c[e];return i}return ne(c)}function ie(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function T(e,t){return e<<t|e>>>32-t}function E(e){let t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520],r=new Uint8Array(e.length+1);r.set(e),r[e.length]=128,e=r;let i=e.length/4+2,a=Math.ceil(i/16),o=Array(a);for(let t=0;t<a;++t){let n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[t*64+r*4]<<24|e[t*64+r*4+1]<<16|e[t*64+r*4+2]<<8|e[t*64+r*4+3];o[t]=n}o[a-1][14]=(e.length-1)*8/2**32,o[a-1][14]=Math.floor(o[a-1][14]),o[a-1][15]=(e.length-1)*8&4294967295;for(let e=0;e<a;++e){let r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=o[e][t];for(let e=16;e<80;++e)r[e]=T(r[e-3]^r[e-8]^r[e-14]^r[e-16],1);let i=n[0],a=n[1],s=n[2],c=n[3],l=n[4];for(let e=0;e<80;++e){let n=Math.floor(e/20),o=T(i,5)+ie(n,a,s,c)+l+t[n]+r[e]>>>0;l=c,c=s,s=T(a,30)>>>0,a=i,i=o}n[0]=n[0]+i>>>0,n[1]=n[1]+a>>>0,n[2]=n[2]+s>>>0,n[3]=n[3]+c>>>0,n[4]=n[4]+l>>>0}return Uint8Array.of(n[0]>>24,n[0]>>16,n[0]>>8,n[0],n[1]>>24,n[1]>>16,n[1]>>8,n[1],n[2]>>24,n[2]>>16,n[2]>>8,n[2],n[3]>>24,n[3]>>16,n[3]>>8,n[3],n[4]>>24,n[4]>>16,n[4]>>8,n[4])}function D(e,t,n,r){return w(80,E,e,t,n,r)}D.DNS=C,D.URL=re;function O(e){if(!y(e))throw TypeError(`Invalid UUID`);return parseInt(e.slice(14,15),16)}var ae=`a80ff791-b940-4c47-a522-2bb478515415`,oe=e=>e.type!==i.I.SELECT&&e.type!==i.I.MULTI_SELECT||e.options===void 0||e.options===null?e:{...e,options:e.options.map(t=>({...t,id:t.id??D(`${t.label}-${e.universalIdentifier}`,ae)}))},k=({fields:e,labelIdentifierFieldMetadataUniversalIdentifier:t})=>r.t(t)&&!e.some(e=>e.universalIdentifier===t),A=`twenty:front-component-shared-dependencies`,j=({objectConfig:e,applicationUniversalIdentifier:t})=>({name:`name`,label:`Name`,description:`Name`,icon:`IconAbc`,isNullable:!0,defaultValue:null,type:i.I.TEXT,universalIdentifier:o.a({applicationUniversalIdentifier:t,objectUniversalIdentifier:e.universalIdentifier,name:`name`})}),M=({objectConfig:e,applicationUniversalIdentifier:t})=>{let n=(e.fields??[]).map(e=>e.name),r=[...e.fields??[]],i=j({objectConfig:e,applicationUniversalIdentifier:t}),a=k({fields:e.fields??[],labelIdentifierFieldMetadataUniversalIdentifier:e.labelIdentifierFieldMetadataUniversalIdentifier});return!n.includes(i.name)&&!a&&r.push(i),{objectFields:r}},se=({objectConfig:e,applicationUniversalIdentifier:t})=>{let{objectFields:n}=M({objectConfig:e,applicationUniversalIdentifier:t}),r=e.labelIdentifierFieldMetadataUniversalIdentifier??n.find(e=>e.name===`name`)?.universalIdentifier;return r?{objectManifest:{...e,fields:n.map(oe),labelIdentifierFieldMetadataUniversalIdentifier:r},errors:[]}:{objectManifest:null,errors:[`No label identifier field found for object ${e.nameSingular}. Please add a field with name "name" to your object.`]}},N=t.t(),P={type:`object`,properties:{}},F=e=>{let t={type:`unknown`};switch(e.type){case`string`:t.type=`string`;break;case`number`:case`integer`:t.type=`number`;break;case`boolean`:t.type=`boolean`;break;case`array`:t.type=`array`,e.items&&(t.items=F(e.items));break;case`object`:t.type=`object`,e.properties&&(t.properties=Object.fromEntries(Object.entries(e.properties).map(([e,t])=>[e,F(t)])));break;case`record`:t.type=`record`;break;case`records`:t.type=`records`;break;default:t.type=`unknown`}return Array.isArray(e.enum)&&(t.enum=e.enum.filter(e=>typeof e==`string`)),e.multiline===!0&&(t.multiline=!0),(0,N.isNonEmptyString)(e.label)&&(t.label=e.label),(0,N.isNonEmptyString)(e.objectUniversalIdentifier)&&(t.objectUniversalIdentifier=e.objectUniversalIdentifier),t},I=e=>[F(e)];I({type:`object`,properties:{a:{type:`string`},b:{type:`number`}}});var ce=async e=>{let{getFunctionInputSchema:t}=await Promise.resolve().then(()=>require("./get-function-input-schema-GNk3NRLJ-DscBUsKy.cjs")),n=t(e)[0];return n?.type===`object`&&r.t(n.properties)?{type:`object`,properties:n.properties}:P},le=async({logicFunctionConfig:e,sourceCode:t,sourcePath:n})=>{let{handler:r,...i}=e,a=i.toolTriggerSettings&&!i.toolTriggerSettings.inputSchema||i.workflowActionTriggerSettings&&!i.workflowActionTriggerSettings.inputSchema?await ce(t):null,o=i.toolTriggerSettings?{...i.toolTriggerSettings,inputSchema:i.toolTriggerSettings.inputSchema??a??void 0}:void 0,s=i.workflowActionTriggerSettings?{...i.workflowActionTriggerSettings,inputSchema:i.workflowActionTriggerSettings.inputSchema??(a?I(a):void 0)}:void 0;return{...i,...o?{toolTriggerSettings:o}:{},...s?{workflowActionTriggerSettings:s}:{},handlerName:`default.config.handler`,sourceHandlerPath:n,builtHandlerPath:n.replace(/\.tsx?$/,`.mjs`),builtHandlerChecksum:`[default-checksum]`}},ue=({frontComponentConfig:e,sourcePath:t})=>{let{component:n,...r}=e;return{...r,componentName:n.name,sourceComponentPath:t,builtComponentPath:t.replace(/\.tsx?$/,`.mjs`),builtComponentChecksum:``,isHeadless:r.isHeadless??!1}},de=({roleConfig:e,applicationUniversalIdentifier:t})=>({...e,objectPermissions:(e.objectPermissions??[]).map(n=>({...n,universalIdentifier:n.universalIdentifier??a.l({applicationUniversalIdentifier:t,roleUniversalIdentifier:e.universalIdentifier,objectUniversalIdentifier:n.objectUniversalIdentifier})})),fieldPermissions:(e.fieldPermissions??[]).map(n=>({...n,universalIdentifier:n.universalIdentifier??a.i({applicationUniversalIdentifier:t,roleUniversalIdentifier:e.universalIdentifier,fieldUniversalIdentifier:n.fieldUniversalIdentifier})})),rowLevelPermissionPredicateGroups:e.rowLevelPermissionPredicateGroups??[],rowLevelPermissionPredicates:e.rowLevelPermissionPredicates??[],permissionFlagUniversalIdentifiers:e.permissionFlagUniversalIdentifiers??[]}),L=e=>{let t=new Set(e);return t.has(`react`)&&t.add(`react/jsx-runtime`),[...t].sort()},R=[`twenty-client-sdk`,`twenty-sdk`],z=e=>{let t=[],n=new Set;for(let r of e){if(!(0,N.isNonEmptyString)(r)){t.push(`"frontComponentSharedDependencies" entries in package.json must be non-empty strings`);continue}if(r.startsWith(`.`)||v.default.posix.isAbsolute(r)||v.default.win32.isAbsolute(r)){t.push(`Shared dependency "${r}" must be a package specifier, not a relative or absolute path`);continue}if(r===`twenty:front-component-shared-dependencies`){t.push(`Shared dependency "${r}" is reserved and cannot be shared`);continue}if(R.some(e=>r===e||r.startsWith(`${e}/`))){t.push(`Shared dependency "${r}" is already served separately and cannot be shared`);continue}if(n.has(r)){t.push(`Shared dependency "${r}" is declared twice`);continue}n.add(r)}return t},fe=async e=>{let t=v.default.join(e,`package.json`);if(!await s.i(t))return{errors:[]};let n=(await s.o(t)).frontComponentSharedDependencies;if(n===void 0)return{errors:[]};if(!Array.isArray(n))return{errors:[`"frontComponentSharedDependencies" in package.json must be an array of package specifiers`]};if(!(0,N.isNonEmptyArray)(n))return{errors:[]};let r=z(n);return(0,N.isNonEmptyArray)(r)?{errors:r}:{sharedDependencies:{dependencies:L(n),builtPath:a.a,builtChecksum:null},errors:[]}},B=`pageType.isInSidePanel.isDashboardPageLayoutInEditMode.isLayoutCustomizationModeEnabled.favoriteRecordIds.isSelectAll.hasAnySoftDeleteFilterOnView.numberOfSelectedRecords.objectPermissions.selectedRecords.featureFlags.targetObjectReadPermissions.targetObjectWritePermissions.canImpersonate.canAccessFullAdminPanel.objectMetadataItem.objectMetadataLabel.isDefined.isNonEmptyString.includes.every.everyDefined.everyEquals.some.someDefined.someEquals.none.noneDefined.noneEquals.someNonEmptyString.includesEvery`.split(`.`),V=`conditionalAvailabilityExpression`,H=[`twenty-sdk/define`,`twenty-sdk`],U=new Set(B),W=(e,t)=>{let n=[];for(let i of e.statements){if(!_.default.isImportDeclaration(i)||!_.default.isStringLiteral(i.moduleSpecifier)||!H.includes(i.moduleSpecifier.text))continue;let a=i.importClause;if(!r.t(a)||a.phaseModifier===_.default.SyntaxKind.TypeKeyword)continue;let o=a.namedBindings;if(r.t(o)){if(_.default.isNamespaceImport(o)){let r=t.getSymbolAtLocation(o.name),i=e=>{_.default.isImportDeclaration(e)||_.default.isTypeNode(e)||(_.default.isPropertyAccessExpression(e)&&_.default.isIdentifier(e.expression)&&t.getSymbolAtLocation(e.expression)===r&&U.has(e.name.text)&&n.push({importedName:e.name.text,node:e}),_.default.forEachChild(e,i))};i(e);continue}if(_.default.isNamedImports(o))for(let i of o.elements){if(i.isTypeOnly)continue;let a=(i.propertyName??i.name).text;if(U.has(a)){let o=t.getSymbolAtLocation(i.name),s,c=e=>{if(!(r.t(s)||_.default.isImportDeclaration(e)||_.default.isTypeNode(e))){if(_.default.isIdentifier(e)){let n=_.default.isShorthandPropertyAssignment(e.parent)?t.getShorthandAssignmentValueSymbol(e.parent):t.getSymbolAtLocation(e);r.t(o)&&n===o&&(s=e)}_.default.forEachChild(e,c)}};c(e),r.t(s)&&n.push({importedName:a,node:s})}}}}return n},G=e=>{let t=!1,n=e=>{if(!t){if((_.default.isPropertyAssignment(e)||_.default.isShorthandPropertyAssignment(e))&&(_.default.isIdentifier(e.name)||_.default.isStringLiteral(e.name))&&e.name.text===V){t=!0;return}_.default.forEachChild(e,n)}};return n(e),t},pe=(e,t)=>{if(!B.some(t=>e.includes(t)))return[];let n=_.default.createSourceFile(t,e,_.default.ScriptTarget.Latest,!0,t.endsWith(`.tsx`)?_.default.ScriptKind.TSX:_.default.ScriptKind.TS);if(G(n))return[];let r={noLib:!0,noResolve:!0},i=_.default.createCompilerHost(r);return i.getSourceFile=e=>e===n.fileName?n:void 0,W(n,_.default.createProgram([n.fileName],r,i).getTypeChecker()).map(({importedName:e,node:r})=>{let{line:i,character:a}=n.getLineAndCharacterOfPosition(r.getStart(n));return`${t}:${i+1}:${a+1} - "${e}" is a conditional-availability expression variable from twenty-sdk but this file has no ${V}. These variables can only be used inside a command's ${V}, not at runtime.`})},K={canReadObjectRecords:`read`,canUpdateObjectRecords:`update`,canSoftDeleteObjectRecords:`soft-delete`,canDestroyObjectRecords:`destroy`},q=Object.fromEntries(Object.entries(i.o).map(([e,t])=>[t,e])),J=Object.fromEntries(Object.entries(u.n).map(([e,{universalIdentifier:t}])=>[t,e])),me=({grant:e,objects:t,permissionFlags:n})=>{let r=e=>t.find(t=>t.universalIdentifier===e)?.nameSingular??J[e]??e;switch(e.type){case`ALL_OBJECT_RECORDS`:return`${K[e.action]} all object records`;case`ALL_SETTINGS`:return`update all settings`;case`ALL_TOOLS`:return`access all tools`;case`PERMISSION_FLAG`:return`permission flag ${n.find(t=>t.universalIdentifier===e.permissionFlagUniversalIdentifier)?.key??q[e.permissionFlagUniversalIdentifier]??e.permissionFlagUniversalIdentifier}`;case`OBJECT_RECORDS`:return`${K[e.action]} ${r(e.objectUniversalIdentifier)} records`;case`FIELD_VALUE`:return`${e.action===`canReadFieldValue`?`read`:`update`} field ${e.fieldUniversalIdentifier} of ${r(e.objectUniversalIdentifier)}`;case`ROW_LEVEL_RESTRICTION`:return`${r(e.objectUniversalIdentifier)} records without the row-level restriction`}},Y=e=>e.map(e=>`"${e}"`).join(`, `),he=({agents:e,defaultRoleUniversalIdentifier:t})=>{let n=new Map;for(let i of e)!r.t(i.roleUniversalIdentifier)||i.roleUniversalIdentifier===t||n.set(i.roleUniversalIdentifier,[...n.get(i.roleUniversalIdentifier)??[],i.name]);return n},ge=({applicationRole:e,defaultRoleUniversalIdentifier:t})=>r.t(e)?[]:[`Application default role "${t}" is not defined by this application.`],_e=({agentNamesByRoleUniversalIdentifier:e,roles:t})=>[...e].filter(([e])=>!t.some(t=>t.universalIdentifier===e)).map(([e,t])=>`Agent ${Y(t)} references role "${e}", which is not defined by this application.`),ve=({agentNamesByRoleUniversalIdentifier:e,applicationRole:t,roles:n,objects:i,permissionFlags:o})=>{let s=o.filter(e=>(e.permissionType??`tool`)===`tool`).map(e=>e.universalIdentifier);return[...e].flatMap(([e,c])=>{let l=n.find(t=>t.universalIdentifier===e);if(!r.t(l))return[];let u=a.s({role:l,superset:t,toolPermissionFlagUniversalIdentifiers:s});if(u.length===0)return[];let d=u.map(e=>me({grant:e,objects:i,permissionFlags:o})).join(`, `);return[`Role "${l.label}" used by agent ${Y(c)} grants more than the application role "${t.label}": ${d}. The application role must cover every permission an agent role grants.`]})},ye=({agents:e,roles:t,objects:n,permissionFlags:i,defaultRoleUniversalIdentifier:a})=>{let o=t.find(e=>e.universalIdentifier===a),s=he({agents:e,defaultRoleUniversalIdentifier:a});return[...ge({applicationRole:o,defaultRoleUniversalIdentifier:a}),..._e({agentNamesByRoleUniversalIdentifier:s,roles:t}),...r.t(o)?ve({agentNamesByRoleUniversalIdentifier:s,applicationRole:o,roles:t,objects:n,permissionFlags:i}):[]]},be=({views:e,objects:t,fields:a})=>{let o=[],s=new Map;for(let e of a)s.set(e.universalIdentifier,e);for(let e of t)for(let t of e.fields)s.set(t.universalIdentifier,t);for(let t of e)for(let e of t.filters??[]){let t=s.get(e.fieldMetadataUniversalIdentifier);if(!r.t(t))continue;let a=(t.type===i.I.RELATION||t.type===i.I.MORPH_RELATION)&&r.t(e.relationTargetFieldMetadataUniversalIdentifier)?s.get(e.relationTargetFieldMetadataUniversalIdentifier)?.type??t.type:t.type;if(!(a in n.r))continue;let c=n.o({filterType:a,subFieldName:e.subFieldName});c.includes(e.operand)||o.push(`Operand "${e.operand}" is not supported on field "${t.name}" (type "${a}"). Supported operands: ${c.join(`, `)}.`)}return o},xe=e=>{try{let t=JSON.parse((0,g.readFileSync)((0,h.join)(e,`package.json`),`utf-8`)).engines?.twenty;return typeof t==`string`&&t.trim()!==``?t.trim():null}catch{return null}},Se=e=>c.t(e),Ce=async e=>(await(0,ee.glob)([`${a.p}/**/*`],{cwd:e,absolute:!0,onlyFiles:!0})).sort(),we=async e=>{try{let t=await(0,m.readFile)((0,v.join)(e,`README.md`),`utf-8`);return t.trim().length>0?t:void 0}catch{return}},Te=async e=>{let t=await Se(e),i=await we(e),a=[],o=[],s,c=[],u=[],d=[],f=[],p=[],h=[],g=[],ee=[],_=[],te=[],y=[],b=[],x=[],ne=[],S=[],C=[],re=[],w=[],ie=[],T=[],E=[],D=[],O=[],ae=[],k=[],A=[],j=[],M=[],N=[],P=[],F=[],I=[],ce=[],L=[],R=[],z=[],B=[],V=[],H=[],U=[],W=[],G=[],K=[],q=[],J=[],me=[],Y=[],he=[],ge=[],_e=[],ve=[],Te=[],Ee=[];for(let i of t){let t=await(0,m.readFile)(i,`utf-8`),d=(0,v.relative)(e,i);a.push(...pe(t,d));let g=l.r(t);if(!g)continue;let S=l.n[g];switch(S){case`application`:{let t=await l.t({appPath:e,filePath:i});s=t.config,a.push(...t.errors),o.push(...t.warnings??[]),F.push(d);break}case`objects`:{let t=await l.t({appPath:e,filePath:i});c.push(t.config),a.push(...t.errors),o.push(...t.warnings??[]),I.push(d);break}case`fields`:{let t=await l.t({appPath:e,filePath:i}),n=oe(t.config);f.push(n),a.push(...t.errors),o.push(...t.warnings??[]),ce.push(d);break}case`permissionFlags`:{let t=await l.t({appPath:e,filePath:i});h.push(t.config),a.push(...t.errors),o.push(...t.warnings??[]),R.push(d);break}case`roles`:{let t=await l.t({appPath:e,filePath:i});u.push(t.config),a.push(...t.errors),o.push(...t.warnings??[]),z.push(d),g===`defineApplicationRole`&&P.push(t.config.universalIdentifier);break}case`skills`:{let t=await l.t({appPath:e,filePath:i});ee.push(t.config),a.push(...t.errors),o.push(...t.warnings??[]),B.push(d);break}case`agents`:{let t=await l.t({appPath:e,filePath:i});_.push(t.config),a.push(...t.errors),o.push(...t.warnings??[]),V.push(d);break}case`workflows`:{let t=await l.t({appPath:e,filePath:i});te.push(t.config),a.push(...t.errors),o.push(...t.warnings??[]),H.push(d);break}case`connectionProviders`:{let t=await l.t({appPath:e,filePath:i});y.push(t.config),a.push(...t.errors),o.push(...t.warnings??[]),U.push(d);break}case`messagingProviders`:{let t=await l.t({appPath:e,filePath:i});b.push(t.config),a.push(...t.errors),o.push(...t.warnings??[]),W.push(d);break}case`logicFunctions`:{let n=await l.t({appPath:e,filePath:i});a.push(...n.errors),o.push(...n.warnings??[]),g===`definePreInstallLogicFunction`&&r.t(n.config.serverRouteTriggerSettings)&&a.push(`${d}: pre-install logic functions cannot define serverRouteTriggerSettings.`);let s=await le({logicFunctionConfig:n.config,sourceCode:t,sourcePath:d});if(x.push(s),G.push(d),g===`definePostInstallLogicFunction`){let e=n.config;k.push({universalIdentifier:n.config.universalIdentifier,shouldRunOnVersionUpgrade:e.shouldRunOnVersionUpgrade??!1,shouldRunSynchronously:e.shouldRunSynchronously??!1})}if(g===`definePreInstallLogicFunction`){let e=n.config;A.push({universalIdentifier:n.config.universalIdentifier,shouldRunOnVersionUpgrade:e.shouldRunOnVersionUpgrade??!1})}g===`defineUninstallLogicFunction`&&j.push({universalIdentifier:n.config.universalIdentifier}),g===`defineHealthCheck`&&M.push({universalIdentifier:n.config.universalIdentifier});break}case`frontComponents`:{let t=await l.t({appPath:e,filePath:i});a.push(...t.errors),o.push(...t.warnings??[]);let n=ue({frontComponentConfig:t.config,sourcePath:d});ne.push(n),K.push(d),g===`defineSettingsFrontComponent`&&N.push(t.config.universalIdentifier);break}case`views`:{let t=await l.t({appPath:e,filePath:i}),n={...t.config};C.push(n),a.push(...t.errors),o.push(...t.warnings??[]),J.push(d);break}case`viewFields`:{let t=await l.t({appPath:e,filePath:i});re.push(t.config),a.push(...t.errors),o.push(...t.warnings??[]),me.push(d);break}case`navigationMenuItems`:{let t=await l.t({appPath:e,filePath:i});w.push(t.config),a.push(...t.errors),o.push(...t.warnings??[]),Y.push(d);break}case`pageLayouts`:{let t=await l.t({appPath:e,filePath:i}),n={...t.config};ie.push(n),a.push(...t.errors),o.push(...t.warnings??[]),he.push(d);break}case`indexes`:{let t=await l.t({appPath:e,filePath:i}),n={...t.config};p.push(n),a.push(...t.errors),o.push(...t.warnings??[]),L.push(d);break}case`pageLayoutTabs`:{let t=await l.t({appPath:e,filePath:i}),n={...t.config};T.push(n),a.push(...t.errors),o.push(...t.warnings??[]),ge.push(d);break}case`pageLayoutWidgets`:{let t=await l.t({appPath:e,filePath:i});E.push(t.config),a.push(...t.errors),o.push(...t.warnings??[]),_e.push(d);break}case`commandMenuItems`:{let t=await l.t({appPath:e,filePath:i});D.push(t.config),a.push(...t.errors),o.push(...t.warnings??[]),ve.push(d);break}case`timelineActivityTypes`:{let t=await l.t({appPath:e,filePath:i});O.push(t.config),a.push(...t.errors),o.push(...t.warnings??[]),Te.push(d);break}case`settingsMenuItems`:{let t=await l.t({appPath:e,filePath:i});ae.push(t.config),a.push(...t.errors),o.push(...t.warnings??[]),Ee.push(d);break}default:n.t(S)}}let De=await Ce(e);for(let t of De){let n=(0,v.relative)(e,t);S.push({filePath:n,fileName:(0,v.basename)(t),fileType:(0,v.extname)(t).replace(/^\./,``),checksum:null}),q.push(n)}if(s||a.push(`Cannot build application, please export default defineApplication() to define an application`),s){for(let e of c){let{objectManifest:t,errors:n}=se({objectConfig:e,applicationUniversalIdentifier:s.universalIdentifier});a.push(...n),t&&d.push(t)}for(let e of u)g.push(de({roleConfig:e,applicationUniversalIdentifier:s.universalIdentifier}))}k.length>1&&a.push(`Only one post install logic function is allowed per application`),A.length>1&&a.push(`Only one pre install logic function is allowed per application`),j.length>1&&a.push(`Only one uninstall logic function is allowed per application`),M.length>1&&a.push(`Only one health check is allowed per application`),N.length>1&&a.push(`Only one settings front component is allowed per application`),P.length>1&&a.push(`Only one defineApplicationRole is allowed per application`);let{sharedDependencies:X,errors:Oe}=await fe(e);a.push(...Oe);let Z=s?.defaultRoleUniversalIdentifier??(P.length===1?P[0]:void 0);s&&!Z&&a.push("Application must declare a default role: either pass `defaultRoleUniversalIdentifier` to defineApplication() or mark a role file with defineApplicationRole()"),a.push(...be({views:C,objects:d,fields:f})),r.t(s)&&r.t(Z)&&a.push(...ye({agents:_,roles:g,objects:d,permissionFlags:h,defaultRoleUniversalIdentifier:Z}));let ke=s&&Z?(()=>{let{logoUrl:t,screenshots:n,...a}=s;return{...a,logo:s.logo,galleryImages:s.galleryImages??[],defaultRoleUniversalIdentifier:Z,aboutDescription:i,yarnLockChecksum:null,packageJsonChecksum:``,requiredServerVersionRange:xe(e),...k.length>=1?{postInstallLogicFunction:k[0]}:{},...A.length>=1?{preInstallLogicFunction:A[0]}:{},...j.length>=1?{uninstallLogicFunction:j[0]}:{},...M.length>=1?{healthCheckLogicFunction:M[0]}:{},...N.length>=1?{settingsFrontComponent:{universalIdentifier:N[0]}}:{},...r.t(X)?{frontComponentSharedDependencies:X}:{}}})():void 0,Q=(e,t)=>e.universalIdentifier.localeCompare(t.universalIdentifier);return{manifest:ke?{application:ke,objects:d.sort(Q),fields:f.sort(Q),indexes:p.sort(Q),permissionFlags:h.sort(Q),roles:g.sort(Q),skills:ee.sort(Q),agents:_.sort(Q),workflows:te.sort(Q),connectionProviders:y.sort(Q),messagingProviders:b.sort(Q),logicFunctions:x.sort(Q),frontComponents:ne.sort(Q),publicAssets:S.sort((e,t)=>e.filePath.localeCompare(t.filePath)),views:C.sort(Q),viewFields:re.sort(Q),navigationMenuItems:w.sort(Q),pageLayouts:ie.sort(Q),pageLayoutTabs:T.sort(Q),pageLayoutWidgets:E.sort(Q),commandMenuItems:D.sort(Q),timelineActivityTypes:O.sort(Q),settingsMenuItems:ae.sort(Q)}:null,filePaths:{application:F,objects:I,fields:ce,indexes:L,permissionFlags:R,roles:z,skills:B,agents:V,workflows:H,connectionProviders:U,messagingProviders:W,logicFunctions:G,frontComponents:K,publicAssets:q,views:J,viewFields:me,navigationMenuItems:Y,pageLayouts:he,pageLayoutTabs:ge,pageLayoutWidgets:_e,commandMenuItems:ve,timelineActivityTypes:Te,settingsMenuItems:Ee},errors:a,warnings:o}},Ee=[i.I.RELATION,i.I.MORPH_RELATION],De=e=>Ee.includes(e.type),X=e=>{let t=new Set,n=new Set;for(let r of e)t.has(r)?n.add(r):t.add(r);return Array.from(n)},Oe=({manifest:e,pageLayoutWidgets:t})=>{let n=new Set([e.application.settingsFrontComponent?.universalIdentifier,...e.settingsMenuItems.map(e=>e.frontComponentUniversalIdentifier),...e.commandMenuItems.map(e=>e.frontComponentUniversalIdentifier),...e.timelineActivityTypes.map(e=>e.frontComponentUniversalIdentifier),...t.map(({configuration:e})=>r.t(e)&&`frontComponentUniversalIdentifier`in e?e.frontComponentUniversalIdentifier:void 0)].filter(r.t));return e.frontComponents.filter(e=>!e.isHeadless&&!r.t(e.widgetAvailability)&&!n.has(e.universalIdentifier)).map(e=>`Front component "${e.name??e.componentName}" declares no widgetAvailability, so it is not offered in any widget picker. Set widgetAvailability to let users add it to record pages or dashboards.`)},Z=e=>{let t=[],n=[...e.pageLayouts.flatMap(({tabs:e})=>e??[]),...e.pageLayoutTabs];for(let e of n){e.layoutMode===i.R.CANVAS&&t.push(`Page layout tab "${e.title}" uses deprecated CANVAS. For a full-height widget, use VERTICAL_LIST and set the widget's heightBehavior to 'TAB_VIEWPORT'. Existing Canvas layouts remain supported and are not converted.`);for(let n of e.widgets??[])n.position?.layoutMode===i.R.VERTICAL_LIST&&t.push(`Page layout widget "${n.title}" uses a deprecated vertical-list position. Order the widgets array by position.index, remove position, and move any position.heightBehavior to heightBehavior. Existing positions remain supported and keep their indices.`),`gridPosition`in n&&r.t(n.gridPosition)&&t.push(`Page layout widget "${n.title}" uses deprecated gridPosition. If position is already set, it takes precedence; remove the ignored gridPosition. Use position with layoutMode: 'GRID' and the same row, column, rowSpan and columnSpan only when position is absent. Existing gridPosition remains supported as a fallback.`)}return t},ke=[`id`,`createdAt`,`createdBy`,`updatedAt`,`updatedBy`,`deletedAt`,`position`,`searchVector`],Q=e=>e.objects.flatMap(t=>{let n=t.labelIdentifierFieldMetadataUniversalIdentifier?.toLowerCase();return r.t(n)?[...(t.fields??[]).map(e=>e.universalIdentifier.toLowerCase()),...e.fields.filter(e=>e.objectUniversalIdentifier.toLowerCase()===t.universalIdentifier.toLowerCase()).map(e=>e.universalIdentifier.toLowerCase()),...ke.map(n=>o.a({applicationUniversalIdentifier:e.application.universalIdentifier,objectUniversalIdentifier:t.universalIdentifier,name:n}))].includes(n)?[]:[`Object "${t.nameSingular}" references label field ${n}, which is not declared in this app or a recognized generated field. Check the identifier; the server must resolve this reference before applying.`]:[]}),Ae=e=>{let t=[],o=X(e.timelineActivityTypes.map(e=>e.name)),s=new Set(e.frontComponents.map(e=>e.universalIdentifier));for(let e of o)t.push(`Timeline activity type name "${e}" is used more than once. Names must be unique within an application.`);for(let o of e.timelineActivityTypes){r.t(o.frontComponentUniversalIdentifier)&&!s.has(o.frontComponentUniversalIdentifier)&&t.push(`Timeline activity type "${o.name}" references front component "${o.frontComponentUniversalIdentifier}", which is not defined by this application.`);let c=o.emit,l=o.replacesTimelineActivityTypeUniversalIdentifier;if(!r.t(c)){r.t(l)&&t.push(`Timeline activity type "${o.name}" declares replacesTimelineActivityTypeUniversalIdentifier without an automatic emit contract.`);continue}let u=c.through,d=u?.triggerFieldUniversalIdentifiers,f=a.r(c.objectUniversalIdentifier);f||t.push(`Timeline activity type "${o.name}" references an invalid object universal identifier "${c.objectUniversalIdentifier}".`),(c.on===`linked`||c.on===`unlinked`)&&!r.t(u)&&t.push(`Timeline activity type "${o.name}" must declare emit.through for a ${c.on} event.`),r.t(d)&&(c.on!==`updated`||!n.n(d)||new Set(d).size!==d.length)&&t.push(`Timeline activity type "${o.name}" trigger fields must be a non-empty list of unique fields on an updated through event.`);let p=f?e.objects.find(e=>e.universalIdentifier===c.objectUniversalIdentifier):void 0;if(!r.t(p)){f&&!r.t(l)&&t.push(`Timeline activity type "${o.name}" targets object "${c.objectUniversalIdentifier}", which is not defined by this application. Types targeting another application's object must declare replacesTimelineActivityTypeUniversalIdentifier.`),r.t(l)&&!a.r(l)&&t.push(`Timeline activity type "${o.name}" references an invalid replacement universal identifier "${l}".`),r.t(u)&&!a.r(u.relationFieldUniversalIdentifier)&&t.push(`Timeline activity type "${o.name}" references an invalid through relation field universal identifier "${u.relationFieldUniversalIdentifier}".`);let e=d?.filter(e=>!a.r(e))??[];e.length>0&&t.push(`Timeline activity type "${o.name}" references invalid trigger field universal identifiers: ${e.join(`, `)}.`);continue}r.t(l)&&t.push(`Timeline activity type "${o.name}" targets an object defined by this application and must not replace another application's type.`);let m=[...p.fields,...e.fields.filter(e=>e.objectUniversalIdentifier===p.universalIdentifier)];if(!r.t(u))continue;let h=m.find(e=>e.universalIdentifier===u.relationFieldUniversalIdentifier);if(r.t(h)?De(h)&&r.t(h.universalSettings)&&(h.universalSettings.relationType===i.A.MANY_TO_ONE||h.universalSettings.relationType===i.A.ONE_TO_MANY&&(0,N.isNonEmptyString)(h.universalSettings.junctionTargetFieldUniversalIdentifier))||t.push(`Timeline activity type "${o.name}" must route through a MANY_TO_ONE relation or a junction-backed ONE_TO_MANY relation.`):t.push(`Timeline activity type "${o.name}" references relation field "${u.relationFieldUniversalIdentifier}", which is not defined on object "${p.nameSingular}".`),r.t(d)){let e=new Set(m.map(e=>e.universalIdentifier)),n=d.filter(t=>!e.has(t));n.length>0&&t.push(`Timeline activity type "${o.name}" references trigger fields that are not defined on object "${p.nameSingular}": ${n.join(`, `)}.`)}}return t},$=[i.A.MANY_TO_ONE,i.A.ONE_TO_MANY],je=`aggregateFieldMetadataId`,Me=e=>r.t(e)&&i.T.some(t=>t===e.configurationType),Ne=e=>{let t=[];if(!e)return[];for(let[n,r]of Object.entries(e))n===`universalIdentifier`&&typeof r==`string`&&t.push(r),!(n===`postInstallLogicFunction`||n===`preInstallLogicFunction`||n===`uninstallLogicFunction`||n===`healthCheckLogicFunction`||n===`identifyAccountLogicFunction`||n===`authorizeLogicFunction`||n===`callbackLogicFunction`||n===`onConnectLogicFunction`||n===`onDisconnectLogicFunction`||n===`sendMessageLogicFunction`||n===`connectionProvider`||n===`settingsFrontComponent`||n===`input`||n===`expectedBody`||n===`outputSchema`||n===`expectedOutputSchema`)&&typeof r==`object`&&t.push(...Ne(r));return t},Pe=e=>{let t=[];for(let n of e){if(!De(n))continue;let e=n.universalSettings;if(!e?.relationType){t.push(`Relation field "${n.name}" is missing relationType. ${n.type} fields must declare a relationType (${$.join(` or `)}) in universalSettings.`);continue}if(!$.includes(e.relationType)){t.push(`Relation field "${n.name}" has invalid relationType "${e.relationType}". Expected ${$.join(` or `)}.`);continue}e.relationType===i.A.MANY_TO_ONE&&!e.joinColumnName&&t.push(`MANY_TO_ONE relation field "${n.name}" is missing joinColumnName. MANY_TO_ONE relations must declare a joinColumnName in universalSettings.`)}return t},Fe=e=>{let t=e.pageLayouts.flatMap(e=>e.tabs?.flatMap(e=>e.widgets??[])??[]),n=e.pageLayoutTabs.flatMap(e=>e.widgets??[]);return[...t,...n,...e.pageLayoutWidgets??[]]},Ie=e=>{let t=[];for(let n of e){let e=n.configuration;if(Me(e)&&!(0,N.isNonEmptyString)(e.aggregateFieldMetadataUniversalIdentifier)){let r=je in e?` Reference the aggregate field with "aggregateFieldMetadataUniversalIdentifier" (not "${je}").`:``;t.push(`Graph widget "${n.title}" is missing aggregateFieldMetadataUniversalIdentifier.${r}`)}}return t},Le=({pageLayoutTab:e,pageLayoutType:t})=>{let n=a.o({pageLayoutTabManifest:e,pageLayoutType:t});return n.status===`fail`?n.errors:[]},Re=e=>{let t=new Map(e.pageLayouts.map(e=>[e.universalIdentifier,e.type])),n=e.pageLayouts.flatMap(e=>(e.tabs??[]).flatMap(t=>Le({pageLayoutTab:t,pageLayoutType:e.type}))),i=e.pageLayoutTabs.flatMap(e=>Le({pageLayoutTab:e,pageLayoutType:r.t(e.pageLayoutUniversalIdentifier)?t.get(e.pageLayoutUniversalIdentifier):void 0}));return[...n,...i]},ze=e=>{let t=[],n=new Set;for(let r of e){if(n.has(r))continue;if(n.add(r),!y(r)){t.push(`Universal identifier "${r}" is not a valid UUID.`);continue}let e=O(r);a.r(r)||t.push(`Universal identifier "${r}" is UUID version ${e}. Only UUID version 4 or higher is allowed.`)}return t},Be=e=>{let t=[],n=Fe(e),a=[...Z(e),...Q(e),...Oe({manifest:e,pageLayoutWidgets:n})],o=Ne(e),s=X(o.map(e=>e.toLowerCase()));s.length>0&&t.push(`Duplicate universal identifiers: ${s.join(`, `)}`);let c=ze(o);c.length>0&&t.push(`Invalid universal identifiers: ${c.join(`, `)}`);let l=[...e.fields,...e.objects.flatMap(e=>e.fields)];for(let e of l)if((e.type===i.I.SELECT||e.type===i.I.MULTI_SELECT||e.type===i.I.RATING)&&r.t(e.options)){e.options.some(({id:e})=>r.t(e)&&!(0,N.isNonEmptyString)(e))&&t.push(`Field "${e.name}" has empty option IDs. Set distinct non-empty IDs on these options.`);let n=X(e.options.map(e=>e.id).filter(r.t).map(e=>e.toLowerCase()));n.length>0&&t.push(`Field "${e.name}" has duplicate option IDs: ${n.join(`, `)}. Set distinct explicit IDs on these options.`)}return t.push(...Pe(l)),t.push(...Re(e)),t.push(...Ie(n)),t.push(...Ae(e)),{errors:t,warnings:a,isValid:t.length===0}},Ve={"twenty-sdk":`"twenty-sdk" is listed under "dependencies" in package.json. It is a build-time only tool and should be moved to "devDependencies".`,"twenty-client-sdk":`"twenty-client-sdk" is listed under "dependencies" in package.json. It is provided at runtime by Twenty's injected SDK and should be moved to "devDependencies".`},He=async e=>{let t=v.default.join(e,`package.json`);if(!await s.i(t))return[];let n=await s.o(t);return[`dependencies`,`optionalDependencies`].flatMap(e=>Object.entries(Ve).filter(([t])=>r.t(n[e]?.[t])).map(([,t])=>t.replace(`"dependencies"`,`"${e}"`)))},Ue=async e=>await s.i(e)?(await(0,m.stat)(e)).size===0?[`yarn.lock is empty. Run "yarn install" to regenerate it before building.`]:[]:[`yarn.lock not found. Run "yarn install" to generate it before building.`],We=e=>Ue(v.default.join(e,`yarn.lock`)),Ge=async e=>{let t=await Te(e);if(t.errors.length>0||!t.manifest)return{success:!1,errors:t.errors.length>0?t.errors:[`Failed to build manifest.`]};let n=Be(t.manifest);if(!n.isValid)return{success:!1,errors:n.errors};let r=await We(e);if(r.length>0)return{success:!1,errors:r};let i=await He(e);return{success:!0,manifest:t.manifest,filePaths:t.filePaths,warnings:[...t.warnings,...n.warnings,...i]}},Ke=({catalog:e,onCollision:t})=>{let n={},i=new Map;for(let{message:a,context:o,translation:s}of d.n(e)){if(s.length===0)continue;let e=r.t(o)?`${o} ${a}`:a,c=d.r(a,o),l=i.get(c);r.t(l)&&l!==e&&t?.({messageId:c,keptKey:e,droppedKey:l}),i.set(c,e),n[c]=s}return n},qe=async({filePath:e,onWarning:t})=>{let n;try{n=await s.o(e)}catch{return t(`Skipping translation file "${v.default.basename(e)}": it is not valid JSON.`),null}return!r.t(n)||typeof n!=`object`||Array.isArray(n)?(t(`Skipping translation file "${v.default.basename(e)}": expected a JSON object.`),null):n},Je=async({appPath:e,onWarning:t})=>{let n=v.default.join(e,f.t);if(!await s.i(n))return{};let r={};for(let e of(await(0,m.readdir)(n)).filter(e=>e.endsWith(`.json`))){let i=v.default.basename(e,`.json`);if(i===`en`)continue;if(!p.t(i)){t(`Skipping compiled translation file "${e}": "${i}" is not a supported locale.`);continue}let a=await qe({filePath:v.default.join(n,e),onWarning:t});if(a===null)continue;let o=Object.fromEntries(Object.entries(a).filter(e=>typeof e[1]==`string`&&e[1].length>0));Object.keys(o).length>0&&(r[i]=o)}return r},Ye=async({appPath:e,onWarning:t=e=>console.warn(e)})=>{let n=v.default.join(e,f.n);if(!await s.i(n))return;let r=(await(0,m.readdir)(n)).filter(e=>e.endsWith(`.json`)),i={};for(let e of r){let r=v.default.basename(e,`.json`);if(r===`en`)continue;if(!p.t(r)){t(`Skipping translation file "${e}": "${r}" is not a supported locale.`);continue}let a=await qe({filePath:v.default.join(n,e),onWarning:t});if(a===null)continue;let o=Ke({catalog:a,onCollision:({messageId:n,keptKey:r,droppedKey:i})=>t(`Message id collision in "${e}": "${r}" and "${i}" share id "${n}". Keeping "${r}".`)});Object.keys(o).length>0&&(i[r]=o)}for(let[n,r]of Object.entries(await Je({appPath:e,onWarning:t})))i[n]={...r,...i[n]??{}};return i};Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Ye}});
@@ -1 +1 @@
1
- const e=require("./create-cancelled-error-DgrNfOv2.cjs");let t=require("node:readline/promises");var n=async({question:n,signal:r})=>{r.throwIfAborted();let i=(0,t.createInterface)({input:process.stdin,output:process.stderr}),a=new AbortController,o=()=>a.abort();i.on(`SIGINT`,o),i.on(`close`,o);try{return await i.question(n,{signal:AbortSignal.any([r,a.signal])})}catch(t){throw r.aborted||a.signal.aborted?e.t():t}finally{i.close()}},r=/^y(es)?$/i,i=async({question:e,signal:t})=>{let i=await n({question:`${e} [y/N] `,signal:t});return r.test(i.trim())};Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
1
+ const e=require("./create-cancelled-error-BBhAY8fS.cjs");let t=require("node:readline/promises");var n=async({question:n,signal:r})=>{r.throwIfAborted();let i=(0,t.createInterface)({input:process.stdin,output:process.stderr}),a=new AbortController,o=()=>a.abort();i.on(`SIGINT`,o),i.on(`close`,o);try{return await i.question(n,{signal:AbortSignal.any([r,a.signal])})}catch(t){throw r.aborted||a.signal.aborted?e.t():t}finally{i.close()}},r=/^y(es)?$/i,i=async({question:e,signal:t})=>{let i=await n({question:`${e} [y/N] `,signal:t});return r.test(i.trim())};Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
@@ -0,0 +1,55 @@
1
+ const e=require("./build--4zYt4wd.cjs"),t=require("./isDefined-Dtu5EYqP-CJctgvfE.cjs");function n(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function r(e,t=`|`){return e.map(e=>le(e)).join(t)}function i(e,t){return typeof t==`bigint`?t.toString():t}var a=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function o(e){return new a(e)}function s(e){return e==null}function c(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function l(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var u=Symbol(`evaluating`);function d(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==u)return r===void 0&&(r=u,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function f(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function p(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function m(e){return p(e._zod.def)??e._zod.def.shape}function h(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return f(this,t,e),e},enumerable:!0,configurable:!0})}function ee(e,t,n){t in e?f(e,t,n):e[t]=n}function g(e,t,n,r){let i=m(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?h(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):ee(e,a,r?r(n.value,a):n.value))}}function te(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?h(e,n,()=>t[n]):ee(e,n,r.value))}}function _(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ne(e){return JSON.stringify(e)}function re(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ie=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function ae(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var oe=o(()=>{if(j.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function v(e){if(ae(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(ae(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function se(e){return v(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ce=new Set([`string`,`number`,`symbol`]);function y(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function b(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function x(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function le(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ue(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var de={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},fe={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function pe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return g(i,e,me(e,t)),b(e,_(n,{shape:i,checks:[]}))}function me(e,t){let n=m(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function he(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(me(e,t)),a={};return g(a,e,Reflect.ownKeys(m(e)).filter(e=>!i.has(e))),b(e,_(n,{shape:a,checks:[]}))}function ge(e,t){if(!v(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=m(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return b(e,_(e._zod.def,{shape:_e(e,t)}))}function _e(e,t){let n={};return g(n,e,Reflect.ownKeys(m(e))),te(n,t),n}function ve(e,t){if(!v(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return b(e,_(e._zod.def,{shape:_e(e,t)}))}function ye(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return g(n,e,Reflect.ownKeys(m(e))),g(n,t,Reflect.ownKeys(m(t))),b(e,_(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function be(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(me(t,n)):void 0,o={};return g(o,t,Reflect.ownKeys(m(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),b(t,_(t._zod.def,{shape:o,checks:[]}))}function xe(e,t,n){let r=n?new Set(me(t,n)):void 0,i={};return g(i,t,Reflect.ownKeys(m(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),b(t,_(t._zod.def,{shape:i}))}function S(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Se(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function C(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ce(e){return typeof e==`string`?e:e?.message}function we(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Te(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function w(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Ce(e.inst?._zod.def?.error?.(e))??Ce(a?.(e))??Ce(t?.error?.(e))??Ce(n.customError?.(e))??Ce(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t===`inst`||t===`schema`||t===`continue`||t===`input`||t===`__proto__`||(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Ee=/[\uD800-\uDBFF]/;function De(e){let t=e.length;if(!Ee.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Oe(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ke(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function T(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ae(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ne(e,n,r.value)}}function E(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function je(e,t,n){return E(e,t,n,!1)}function Me(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return E(this,n,r(this))},set(e){E(this,n,e)}})}return t}function Ne(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:E(this,t,n.bind(this))},set(e){E(this,t,e)}})}function Pe(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Fe,D=!1,Ie={configurable:!0,get(){D=!0}};function O(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Fe!==e._zod){Fe=void 0;return}Fe=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Ie);let e=D;D=!1;try{let r=n(this);return D?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),D||=e,r}catch(n){throw delete this[t],D||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Le(e,t,n,r){let i=Pe(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Re=`~constantCatch`;function ze(e){let t=()=>e;return t[Re]=!0,t}var Be,Ve=Object.freeze({status:`aborted`}),He={value:void 0,enumerable:!1},Ue=`captureStackTrace`in Error?Error:null;function We(e){let t=Ue;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Ue=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function k(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){He.value=new a(r);try{Object.defineProperty(n,"_zod",He)}finally{He.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Ae(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?We(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var A=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ge=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Be=globalThis).__zod_globalConfig??(Be.__zod_globalConfig={});var j=globalThis.__zod_globalConfig;function M(e){return e&&Object.assign(j,e),j}function Ke(){let e=this._zod;return e.message??=JSON.stringify(e.def,i,2),e.message}function qe(e){this._zod.message=e}var Je={get:Ke,set:qe,enumerable:!0,configurable:!0},Ye={value:void 0,enumerable:!1},Xe=new WeakSet([Object.prototype,Error.prototype]),Ze=(e,t)=>{e.name=`$ZodError`,Ye.value=t,Object.defineProperty(e,"issues",Ye),Ye.value=void 0,Object.defineProperty(e,"message",Je);let n=Object.getPrototypeOf(e);Xe.has(n)||(Xe.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Qe=k(`$ZodError`,Ze);k(`$ZodError`,Ze,void 0,{Parent:Error});function $e(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function et(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?$e(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function tt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function nt(e,t){return{callee:t?.callee??e,Err:t?.Err}}var rt=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new A;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>w(e,o,M())));throw ie(n,a?.callee??t),n}return s.value};return t},it=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>w(e,o,M())));throw ie(n,a?.callee??t),n}return s.value};return t},at=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new A;return a.issues.length?ot(e,a.issues,i):{success:!0,data:a.value}};function ot(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>w(e,n,M()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var st=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?ot(e,a.issues,i):{success:!0,data:a.value}},ct=Symbol.for(`zod.compile.invalid`),lt=Symbol.for(`zod.compile.fallback`),ut=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==ct)return!0;if(r.definite===!0&&n===void 0)return!1}return dt(e,t,n)});function dt(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[lt]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new A;return a.issues.length===0}var ft=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},pt=e=>{let t=rt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,nt(n,a))};return n},mt=e=>{let t=rt(e),n=(e,r,i,a)=>t(e,r,i,nt(n,a));return n},ht=e=>{let t=it(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,nt(n,a))};return n},gt=e=>{let t=it(e),n=async(e,r,i,a)=>await t(e,r,i,nt(n,a));return n},_t=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return at(e)(t,n,i)},vt=e=>(t,n,r)=>at(e)(t,n,r),yt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return st(e)(t,n,i)},bt=e=>async(t,n,r)=>st(e)(t,n,r),xt=/^[cC][0-9a-z]{6,}$/,St=/^[0-9a-z]+$/,Ct=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,wt=/^[0-9a-vA-V]{20}$/,Tt=/^[A-Za-z0-9]{27}$/,Et=/^[a-zA-Z0-9_-]{21}$/;function Dt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Ot=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,kt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,At=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,jt=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Mt=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Nt=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Pt(){return new RegExp(Nt,`u`)}var Ft=/^(?:(?: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])$/,It=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Lt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Rt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Bt=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Vt=/^https?$/,Ht=/^\+[1-9]\d{6,14}$/,Ut=`(?:(?:\\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])))`;function Wt(e){return RegExp(`^${e}$`)}var Gt=Wt(Ut);function Kt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function qt(e){return RegExp(`^${Kt(e)}$`)}function Jt(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Kt({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Kt({precision:e.precision})}`:n;return RegExp(`^${Ut}T(?:${r})$`)}var Yt=/^[\s\S]{0,}$/,Xt=/^-?\d+$/,Zt=/^-?\d+(?:\.\d+)?$/,Qt=/^(?:true|false)$/i,$t=/^null$/i,en=/^[^A-Z]*$/,tn=/^[^a-z]*$/,N=k(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),nn=e=>{let t=e.value;return!s(t)&&t.length!==void 0},rn={number:`number`,bigint:`bigint`,object:`date`},an=k(`$ZodCheckLessThan`,(e,t)=>{N.init(e,t);let n=rn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:rn[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),on=k(`$ZodCheckGreaterThan`,(e,t)=>{N.init(e,t);let n=rn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:rn[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),sn=k(`$ZodCheckMultipleOf`,(e,t)=>{N.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):l(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),cn=k(`$ZodCheckNumberFormat`,(e,t)=>{N.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=de[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ln=k(`$ZodCheckMaxLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=nn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?De(r):i)<=t.maximum)return;let a=Oe(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),un=k(`$ZodCheckMinLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=nn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?De(r):i)>=t.minimum)return;let a=Oe(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),dn=k(`$ZodCheckLengthEquals`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=nn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?De(r):i;if(a===t.length)return;let o=Oe(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),fn=k(`$ZodCheckStringFormat`,(e,t)=>{var n,r;N.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),pn=k(`$ZodCheckRegex`,(e,t)=>{fn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),mn=k(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=en,fn.init(e,t)}),hn=k(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=tn,fn.init(e,t)}),gn=k(`$ZodCheckIncludes`,(e,t)=>{N.init(e,t);let n=y(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),_n=k(`$ZodCheckStartsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`^${y(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),vn=k(`$ZodCheckEndsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`.*${y(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),yn=k(`$ZodCheckOverwrite`,(e,t)=>{N.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),bn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
2
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
3
+ `)}\n};`)(...Object.values(this.closed))}},xn={major:4,minor:6,patch:7},P=k(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=xn;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=S(t),a;for(let o of n){if(o._zod.def.when){if(Se(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new A;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Te(t.issues,n,e),i||=S(t,n))});else{if(t.issues.length===n)continue;Te(t.issues,n,e),i||=S(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(S(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new A;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new A;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return je(this,`~standard`,wn(this))},set"~standard"(e){E(this,`~standard`,e)}}),Sn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>w(e,t,M()))}:{value:e.value};async function Cn(e,t){let n={async:!0};return Sn(await e._zod.run({value:t,issues:[]},n),n)}function wn(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Sn(r,n)}catch{}return Cn(e,t)},vendor:`zod`,version:1}}var Tn=k(`$ZodString`,(e,t)=>{P.init(e,t),e._zod.pattern=t.pattern??Yt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),F=k(`$ZodStringFormat`,(e,t)=>{fn.init(e,t),Tn.init(e,t)}),En=k(`$ZodGUID`,(e,t)=>{t.pattern??=kt,F.init(e,t)}),Dn=k(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=At(e)}else t.pattern??=At();F.init(e,t)}),On=k(`$ZodEmail`,(e,t)=>{t.pattern??=jt,F.init(e,t)});function kn(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function An(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?kn(e)||2:jn(e,t)}function jn(e,t){if(!t.normalize&&t.protocol?.source===Vt.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Mn=/[\t\n\r]/g;function Nn(e){return e.replace(Mn,``)}function Pn(e,t){return t.lastIndex=0,t.test(e.hostname)}function Fn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var In=k(`$ZodURL`,(e,t)=>{F.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=An(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Nn(r);return}t.hostname&&!Pn(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Fn(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Nn(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Ln=k(`$ZodEmoji`,(e,t)=>{t.pattern??=Pt(),F.init(e,t)}),Rn=k(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Et:Dt(t.length),F.init(e,t)}),zn=k(`$ZodCUID`,(e,t)=>{t.pattern??=xt,F.init(e,t)}),Bn=k(`$ZodCUID2`,(e,t)=>{t.pattern??=St,F.init(e,t)}),Vn=k(`$ZodULID`,(e,t)=>{t.pattern??=Ct,F.init(e,t)}),Hn=k(`$ZodXID`,(e,t)=>{t.pattern??=wt,F.init(e,t)}),Un=k(`$ZodKSUID`,(e,t)=>{t.pattern??=Tt,F.init(e,t)}),Wn=k(`$ZodISODateTime`,(e,t)=>{t.pattern??=Jt(t),F.init(e,t)}),Gn=k(`$ZodISODate`,(e,t)=>{t.pattern??=Gt,F.init(e,t)}),Kn=k(`$ZodISOTime`,(e,t)=>{t.pattern??=qt(t),F.init(e,t)}),qn=k(`$ZodISODuration`,(e,t)=>{t.pattern??=Ot,F.init(e,t)}),Jn=k(`$ZodIPv4`,(e,t)=>{t.pattern??=Ft,F.init(e,t)}),Yn=/^[0-9a-fA-F:.]+$/;function Xn(e){return Yn.test(e)?kn(`http://[${e}]`):!1}var Zn=k(`$ZodIPv6`,(e,t)=>{t.pattern??=It,F.init(e,t),e._zod.check=n=>{Xn(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Qn=k(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Lt,F.init(e,t)});function $n(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Xn(n)}var er=k(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Rt,F.init(e,t),e._zod.check=n=>{$n(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function tr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var nr=/^[0-9a-zA-Z+/]*={0,2}$/,rr=k(`$ZodBase64`,(e,t)=>{t.pattern??=nr,F.init(e,t),e._zod.check=n=>{tr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),ir=/^[A-Za-z0-9_-]*$/;function ar(e){if(!ir.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return tr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var or=k(`$ZodBase64URL`,(e,t)=>{t.pattern??=ir,F.init(e,t),e._zod.check=n=>{ar(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),sr=k(`$ZodE164`,(e,t)=>{t.pattern??=Ht,F.init(e,t)});function cr(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var lr=k(`$ZodJWT`,(e,t)=>{F.init(e,t),e._zod.check=n=>{cr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ur=k(`$ZodNumber`,(e,t)=>{P.init(e,t),e._zod.pattern=Zt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),dr=k(`$ZodNumberFormat`,(e,t)=>{cn.init(e,t),ur.init(e,t)}),fr=k(`$ZodBoolean`,(e,t)=>{P.init(e,t),e._zod.pattern=Qt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),pr=k(`$ZodNull`,(e,t)=>{P.init(e,t),e._zod.pattern=$t,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),mr=k(`$ZodAny`,(e,t)=>{P.init(e,t),e._zod.parse=e=>e}),hr=k(`$ZodUnknown`,(e,t)=>{P.init(e,t),e._zod.parse=e=>e}),gr=k(`$ZodNever`,(e,t)=>{P.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function _r(e,t){let n=we(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of we(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,Te(n.issues,t,e),n}}return i(n,a)}}var vr=e=>Array.isArray(e)?e.length:-1;function yr(e,t,n){e.issues.length&&t.issues.push(...C(n,e.issues)),t.value[n]=e.value}var br=k(`$ZodArray`,(e,t)=>{P.init(e,t);let n=j.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>yr(t,r,e)));else if(yr(c,r,e),s&&c.issues.length!==0&&S(c))break}return o.length?Promise.all(o).then(()=>r):r},_r(e,vr)});function xr(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(!(!o&&s&&i===`optional`)){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...C(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var Sr=[];function Cr(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Sr,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=ue(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function wr(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(S(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>xr(e,n,i,t,d,f))):xr(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Tr=k(`$ZodObject`,(e,t)=>{P.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=o(()=>Cr(t));O(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||f(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=ae,s=t.catchall,c,l=j.memoizer;l?.attach(e),e._zod.parse=(t,n)=>{c??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=l?l.alloc(e,t,{},n):{};let o=[],u=c.shape,d=n?.abortEarly,f=t.issues.length;for(let e of c.allKeys){if(d&&t.issues.length!==f){if(S(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,s=i._zod.optout,c=i._zod.run({value:r[e],issues:[]},n);c instanceof Promise?o.push(c.then(n=>xr(n,t,e,r,a,s))):xr(c,t,e,r,a,s)}return s?wr(o,r,t,n,i.value,e,d===!0):o.length?Promise.all(o).then(()=>t):t}}),Er=k(`$ZodObjectJIT`,(e,t)=>{Tr.init(e,t);let n=e._zod.parse,r=o(()=>Cr(t)),i=j.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new bn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
4
+ let ${e}_ab = false;
5
+ for (let i = 0; i < ${e}.issues.length; i++) {
6
+ const iss = ${e}.issues[i];
7
+ iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
8
+ payload.issues.push(iss);
9
+ if (iss.continue !== true) ${e}_ab = true;
10
+ }
11
+ if (${e}_ab && ctx && ctx.abortEarly) {
12
+ payload.value = newResult;
13
+ return payload;
14
+ }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:ne(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
15
+ const ${n}_present = ${i};
16
+ if (!${n}.issues.length || ${n}_present) {
17
+ if (${n}.issues.length) {${c(n,r)}
18
+ }
19
+
20
+ if (${e}) {
21
+ newResult[${r}] = ${n}.value;
22
+ }
23
+ }
24
+
25
+ `)}else f?(o.write(`
26
+ if (${n}.issues.length) {${c(n,r)}
27
+ }
28
+ `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
29
+ if (${n}.value !== undefined || ${i}) {
30
+ newResult[${r}] = ${n}.value;
31
+ }
32
+ `)):o.write(`
33
+ const ${n}_present = ${i};
34
+ if (${n}.issues.length) {${c(n,r)}
35
+ }
36
+ if (!${n}_present && !${n}.issues.length) {
37
+ payload.issues.push({
38
+ code: "invalid_type",
39
+ expected: "nonoptional",
40
+ input: undefined,
41
+ path: [${r}]
42
+ });
43
+ if (ctx && ctx.abortEarly) {
44
+ payload.value = newResult;
45
+ return payload;
46
+ }
47
+ }
48
+
49
+ if (${n}_present) {
50
+ newResult[${r}] = ${n}.value;
51
+ }
52
+
53
+ `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},s,c=ae,l=!j.jitless,u=l&&oe.value,d=t.catchall,f;e._zod.parse=(i,o)=>{f??=r.value;let p=i.value;return c(p)?l&&u&&o?.async===!1&&o.jitless!==!0?(s||=a(t.shape),i=s(i,o),d?wr([],p,i,o,f,e,o?.abortEarly===!0):i):n(i,o):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Dr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!S(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>w(e,r,M())))}),t)}var Or=k(`$ZodUnion`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),O(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),O(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),O(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>c(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Dr(t,r,e,i)):Dr(o,r,e,i)}});function kr(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var Ar=k(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Or.init(e,t);let n=e._zod.parse;O(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||f(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=p(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=o(()=>kr(t));e._zod.parse=(i,a)=>{let o=i.value;if(!ae(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),jr=k(`$ZodIntersection`,(e,t)=>{P.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Nr(e,t,n)):Nr(e,i,a)}});function Mr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(v(e)&&v(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Mr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Mr(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Nr(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Mr(t.value,n.value);if(!c.valid){if(S(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Pr=k(`$ZodTuple`,(e,t)=>{P.init(e,t);let n=t.items,r=j.memoizer;r?.attach(e),e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=r?r.alloc(e,i,[],a):[];let s=[],c=Fr(n,`optin`),l=Fr(n,`optout`);if(!t.rest){if(o.length<c)return i.issues.push({code:`too_small`,minimum:c,inclusive:!0,input:o,inst:e,origin:`array`}),i;o.length>n.length&&i.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:o,inst:e,origin:`array`})}let u=Array(n.length),d=t.rest?a?.abortEarly:void 0,f=!1;for(let e=0;e<n.length;e++){let t=n[e]._zod.run({value:o[e],issues:[]},a);t instanceof Promise?s.push(t.then(t=>{u[e]=t})):(u[e]=t,d&&!f&&t.issues.length&&(f=S(t)))}if(t.rest&&!f){let e=n.length-1,r=o.slice(n.length),c=i.issues.length;for(let n of r){if(d&&i.issues.length!==c){if(S(i,c))break;c=i.issues.length}e++;let r=t.rest._zod.run({value:n,issues:[]},a);r instanceof Promise?s.push(r.then(t=>Ir(t,i,e))):Ir(r,i,e)}}return s.length?Promise.all(s).then(()=>Lr(u,i,n,o,l)):Lr(u,i,n,o,l)}});function Fr(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function Ir(e,t,n){e.issues.length&&t.issues.push(...C(n,e.issues)),t.value[n]=e.value}function Lr(e,t,n,r,i){for(let a=0;a<n.length;a++){let o=e[a],s=a<r.length;if(!s&&a>=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...C(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}var Rr=k(`$ZodRecord`,(e,t)=>{P.init(e,t);let n=j.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!v(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>w(e,i,M())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...C(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...C(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e))if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e);l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Zt.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>w(e,i,M())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...C(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...C(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),zr=k(`$ZodEnum`,(e,t)=>{P.init(e,t);let r=n(t.entries),i=new Set(r);e._zod.values=i,O(e,`pattern`,e=>{let t=n(e.def.entries).filter(e=>ce.has(typeof e));return RegExp(t.length?`^(${t.map(e=>y(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,n)=>{let a=t.value;return i.has(a)||t.issues.push({code:`invalid_value`,values:r,input:a,inst:e}),t}}),Br=k(`$ZodLiteral`,(e,t)=>{P.init(e,t);let n=new Set(t.values);e._zod.values=n,O(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?y(e):e?y(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Vr=k(`$ZodTransform`,(e,t)=>{P.init(e,t),e._zod.optin=`optional`,j.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ge(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new A;return n.value=i,n}});function Hr(e,t){return e.value=t.issues.length?void 0:t.value,e}var Ur=k(`$ZodOptional`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,O(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),O(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${c(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Hr(e,t)):Hr(e,r)}return t.innerType._zod.run(e,n)}}),Wr=k(`$ZodExactOptional`,(e,t)=>{Ur.init(e,t),O(e,`values`,e=>e.def.innerType._zod.values),O(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Gr=k(`$ZodNullable`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin),O(e,`optout`,e=>e.def.innerType._zod.optout),O(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${c(t.source)}|null)$`):void 0}),O(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Kr=k(`$ZodDefault`,(e,t)=>{P.init(e,t),e._zod.optin=`defaulted`,O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>qr(e,t)):qr(r,t)}});function qr(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Jr=k(`$ZodPrefault`,(e,t)=>{P.init(e,t),e._zod.optin=`defaulted`,O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Yr=k(`$ZodNonOptional`,(e,t)=>{P.init(e,t),O(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Xr(t,e)):Xr(i,e)}});function Xr(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Zr(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>w(e,r,M()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Qr=k(`$ZodCatch`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),O(e,`optout`,e=>e.def.innerType._zod.optout),O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Zr(e,r,t,n)):Zr(e,r,t,n)}}),$r=k(`$ZodPipe`,(e,t)=>{P.init(e,t),O(e,`values`,e=>e.def.in._zod.values),O(e,`optin`,e=>e.def.in._zod.optin),O(e,`optout`,e=>e.def.out._zod.optout),O(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>ei(e,t.in,n)):ei(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>ei(e,t.out,n)):ei(r,t.out,n)}});function ei(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var ti=k(`$ZodPreprocess`,(e,t)=>{$r.init(e,t)}),ni=k(`$ZodReadonly`,(e,t)=>{P.init(e,t),O(e,`propValues`,e=>e.def.innerType._zod.propValues),O(e,`values`,e=>e.def.innerType._zod.values),O(e,`optin`,e=>e.def.innerType?._zod?.optin),O(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(ri):ri(r)}});function ri(e){return e.memo||(e.value=Object.freeze(e.value)),e}var ii=k(`$ZodLazy`,(e,t)=>{P.init(e,t),d(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),O(e,`pattern`,e=>e.innerType?._zod?.pattern),O(e,`propValues`,e=>e.innerType?._zod?.propValues),O(e,`optin`,e=>e.innerType?._zod?.optin??void 0),O(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),ai=k(`$ZodCustom`,(e,t)=>{N.init(e,t),P.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>oi(t,n,r,e));oi(i,n,r,e)}});function oi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(T(e))}}var si=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},ci=`~memo`,li=[];function ui(e){return typeof e==`object`&&!!e}function di(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var fi=new WeakMap,pi=0,mi=1,hi=2;function gi(e,t,n){let r=fi.get(e);if(r!==void 0)return r?hi:pi;if(t.has(e))return hi;t.add(e);let i=pi,a=e=>{if(i!==hi&&e?._zod){let r=gi(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=pi;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?mi:o.value?._zod?gi(o.value,t,n):pi;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=p(c);s(e?o(e,!0):mi),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?gi(r,t,!1):mi);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(!(!n||typeof n!=`object`)){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),_i(e,i)}function _i(e,t){return t!==mi&&fi.set(e,t===hi),t}function vi(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var yi,bi=[],xi={alloc(e,t,n){let r=yi;if(!r)return n;yi=void 0;let i={value:n,issues:null};return r.set(t.value,i),bi.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Ci(n,e.value))throw new si;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=gi(e,new Set,!1);if(i===pi)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===hi||r?n=!0:r=!0}let l=s.value;if(!ui(l))return t(s,c);let u=c[ci];u||(u={buckets:new WeakMap,backEdges:void 0},c[ci]=u);let d;i===c?d=a:(d=vi(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...di(f.issues)):(s.memo=!0,u.backEdges??=new WeakSet,u.backEdges.add(f.value)),s;yi=d;let p=bi.length,m=t(s,c);yi=void 0;let h=bi.length>p?bi.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?di(e.issues):li),e)):(h&&(h.issues=m.issues.length?di(m.issues):li),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Si(){return xi}function Ci(e,t){let n=e[ci]?.backEdges;return n!==void 0&&ui(t)&&n.has(t)}var wi=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},i={nan:`NaN`};function a(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):i[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${a(e.expected)}, received ${a(ke(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${le(e.values[0])}`:`Invalid option: expected one of ${r(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${r(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Ti(){return{localeError:wi()}}var Ei,Di=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Oi(){return new Di}(Ei=globalThis).__zod_globalRegistry??(Ei.__zod_globalRegistry=Oi());var ki=globalThis.__zod_globalRegistry;function Ai(e){return e.checks&&=[...e.checks],e}function ji(e,t){return new e(Ai({type:`string`,...x(t)}))}function Mi(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...x(t)})}function Ni(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...x(t)})}function Pi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...x(t)})}function Fi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...x(t)})}function Ii(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...x(t)})}function Li(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...x(t)})}function Ri(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...x(t)})}function zi(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...x(t)})}function Bi(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...x(t)})}function Vi(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...x(t)})}function Hi(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...x(t)})}function Ui(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...x(t)})}function Wi(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...x(t)})}function Gi(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...x(t)})}function Ki(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...x(t)})}function qi(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...x(t)})}function Ji(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...x(t)})}function Yi(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...x(t)})}function Xi(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...x(t)})}function Zi(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...x(t)})}function Qi(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...x(t)})}function $i(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...x(t)})}function ea(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...x(t)})}function ta(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...x(t)})}function na(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...x(t)})}function ra(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...x(t)})}function ia(e,t){return new e(Ai({type:`number`,checks:[],...x(t)}))}function aa(e,t){return new e(Ai({type:`number`,coerce:!0,checks:[],...x(t)}))}function oa(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...x(t)})}function sa(e,t){return new e({type:`boolean`,...x(t)})}function ca(e,t){return new e({type:`null`,...x(t)})}function la(e){return new e({type:`any`})}function ua(e){return new e({type:`unknown`})}function da(e,t){return new e({type:`never`,...x(t)})}function fa(e,t){return new an({check:`less_than`,...x(t),value:e,inclusive:!1})}function pa(e,t){return new an({check:`less_than`,...x(t),value:e,inclusive:!0})}function ma(e,t){return new on({check:`greater_than`,...x(t),value:e,inclusive:!1})}function ha(e,t){return new on({check:`greater_than`,...x(t),value:e,inclusive:!0})}function ga(e,t){return new sn({check:`multiple_of`,...x(t),value:e})}function _a(e,t){return new ln({check:`max_length`,...x(t),maximum:e})}function va(e,t){return new un({check:`min_length`,...x(t),minimum:e})}function ya(e,t){return new dn({check:`length_equals`,...x(t),length:e})}function ba(e,t){return new pn({check:`string_format`,format:`regex`,...x(t),pattern:e})}function xa(e){return new mn({check:`string_format`,format:`lowercase`,...x(e)})}function Sa(e){return new hn({check:`string_format`,format:`uppercase`,...x(e)})}function Ca(e,t){return new gn({check:`string_format`,format:`includes`,...x(t),includes:e})}function wa(e,t){return new _n({check:`string_format`,format:`starts_with`,...x(t),prefix:e})}function Ta(e,t){return new vn({check:`string_format`,format:`ends_with`,...x(t),suffix:e})}function I(e){return new yn({check:`overwrite`,tx:e})}function Ea(e){return I(t=>t.normalize(e))}function Da(){return I(e=>e.trim())}function Oa(){return I(e=>e.toLowerCase())}function ka(){return I(e=>e.toUpperCase())}function Aa(){return I(e=>re(e))}function ja(e,t,n){return new e({type:`array`,element:t,...x(n)})}function Ma(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...x(n)})}function Na(e,t){let n=Pa(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(T(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(T(r))}},e(t.value,t)),t);return n}function Pa(e,t){let n=new N({check:`custom`,...x(t)});return n._zod.check=e,n}function L(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&f(e,t,n[t]);return e}function Fa(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??ki,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function R(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function z(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,z(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&L(o.schema,c),t.io===`input`&&B(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Ia(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function La(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${Ia(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+Ia(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
54
+
55
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Ra(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Ra(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var za=new Set([`type`,`properties`,`required`,`additionalProperties`]),Ba=[`oneOf`,`anyOf`];function Va(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Ha(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!za.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Va(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}f(n,r,e.length===1?e[0]:Ha(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Va(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Ua(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of za)if(t in e)return;let n=t.filter(e=>Ba.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Ha(t);else{let e=n[0],i=Ba.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>Ha([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,L(e,r))}function Wa(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):L(i,s),L(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Ra(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Ua(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}L(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,f(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Ka(t,`input`,e.processors),output:Ka(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function B(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return B(r.element,n);if(r.type===`set`)return B(r.valueType,n);if(r.type===`lazy`)return B(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return B(r.innerType,n);if(r.type===`intersection`)return B(r.left,n)||B(r.right,n);if(r.type===`record`||r.type===`map`)return B(r.keyType,n)||B(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:B(r.in,n)||B(r.out,n);if(r.type===`object`){for(let e in r.shape)if(B(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(B(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(B(e,n))return!0;return!!(r.rest&&B(r.rest,n))}return!1}var Ga=(e,t={})=>n=>{let r=Fa({...n,processors:t});return z(e,r),La(r,e),Wa(r,e)},Ka=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Fa({...i??{},target:a,io:t,processors:n});return z(e,o),La(o,e),Wa(o,e)},V=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},H=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},qa=(e,t)=>{V(e,`minimum`,t),H(e,`maximum`,t)},Ja=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Ya=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Xa=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Za=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Qa=(e,t)=>V(e,`minimum`,t.minimum),$a=(e,t)=>H(e,`maximum`,t.maximum),eo=e=>(t,n)=>{Za(t,n.format);let[r,i]=e[n.format];V(t,`minimum`,r),H(t,`maximum`,i)},to={greater_than:(e,t)=>V(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>H(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Ja(e,t.value),number_format:eo(de),bigint_format:eo(fe),min_length:Qa,max_length:$a,length_equals:(e,t)=>qa(e,t.length),min_size:Qa,max_size:$a,size_equals:(e,t)=>qa(e,t.size),string_format:(e,t)=>{Za(e,t.format),t.pattern&&Ya(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Xa(e,t.mime)};function U(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)to[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&V(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&V(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&H(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&H(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Ja(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Xa(t,i.mime);for(let e of i.patterns??[])Ya(t,e);return t}var no={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},ro=new Map([[nr,zt],[ir,Bt]]),io=e=>ro.get(e)??e,ao=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=U(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=no[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(io);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},oo=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=U(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):R(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},so=(e,t,n,r)=>{n.type=`boolean`},co=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},lo=(e,t,n,r)=>{n.not={}},uo=(e,t,r,i)=>{let a=e._zod.def,o=n(a.entries);if(o.length===0){r.not={};return}o.every(e=>typeof e==`number`)&&(r.type=`number`),o.every(e=>typeof e==`string`)&&(r.type=`string`),r.enum=o},fo=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(R(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(R(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},po=(e,t,n,r)=>{R(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},mo=(e,t,n,r)=>{R(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},ho=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=U(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=z(a.element,t,{...r,path:[...r.path,`items`]})};function go(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?go(t.out):t.type===`catch`?go(t.innerType):e._zod.optin}var _o=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&R(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)f(i.properties,e,z(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?go(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=z(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},vo=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>z(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},yo=(e,t,n,r)=>{let i=e._zod.def,a=z(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=z(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},bo=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>z(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?z(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?go(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=U(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function xo(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=xo(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>xo(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Zt:Xt).source),p):p}var So=new WeakMap;function Co(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of So.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=xo(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var wo=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=U(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=z(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)f(i.patternProperties,io(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=z(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=So.get(t);n||(n=[],So.set(t,n),t.deferred.push(()=>Co(t))),n.push(e)}i.additionalProperties=z(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&go(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},To=(e,t,n,r)=>{let i=e._zod.def,a=z(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Eo=(e,t,n,r)=>{let i=e._zod.def;z(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Do=Symbol();function Oo(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(R(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Do):JSON.parse(o)}var ko=(e,t,n,r)=>{let i=e._zod.def;z(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Oo(i.defaultValue,e,t,n,r);o!==Do&&(n.default=o)},Ao=(e,t,n,r)=>{let i=e._zod.def;z(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Oo(i.defaultValue,e,t,n,r);o!==Do&&(n._prefault=o)},jo=(e,t,n,r)=>{let i=e._zod.def;z(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{R(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Mo=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;z(o,t,r);let s=t.seen.get(e);s.ref=o},No=(e,t,n,r)=>{let i=e._zod.def;z(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Po=(e,t,n,r)=>{let i=e._zod.def;z(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Fo=(e,t,n,r)=>{let i=e._zod.innerType;z(i,t,r);let a=t.seen.get(e);a.ref=i},Io=new WeakSet([Object.prototype,Error.prototype]);function Lo(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var W=k(`ZodError`,(e,t)=>{Qe.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Io.has(n)||(Io.add(n),Lo(n,`format`,e=>t=>tt(e,t)),Lo(n,`flatten`,e=>t=>et(e,t)),Lo(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,i,2)}),Lo(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,i,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Ro=rt(W),zo=it(W),Bo=at(W),Vo=st(W),Ho=pt(W),Uo=mt(W),Wo=ht(W),Go=gt(W),Ko=_t(W),qo=vt(W),Jo=yt(W),Yo=bt(W);function Xo(){j.localeError||M(Ti())}function Zo(){j.memoizer||M({memoizer:Si()})}var G=k(`ZodType`,(e,t)=>(Xo(),P.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(_(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return b(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(kc(e,t))},superRefine(e,t){return this.check(Ac(e,t))},overwrite(e){return this.check(I(e))},optional(){return cc(this)},exactOptional(){return uc(this)},nullable(){return fc(this)},nullish(){return cc(fc(this))},nonoptional(e){return vc(this,e)},array(){return Bs(this)},or(e){return Ks([this,e])},and(e){return Xs(this,e)},transform(e){return Sc(this,oc(e))},default(e){return mc(this,e)},prefault(e){return gc(this,e)},catch(e){return bc(this,e)},pipe(e){return Sc(this,e)},readonly(){return Tc(this)},describe(e){let t=this.clone();return ki.add(t,{description:e}),t},meta(...e){if(e.length===0)return ki.get(this);let t=this.clone();return ki.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return je(this,`~standard`,{...wn(this),jsonSchema:{input:Ka(this,`input`),output:Ka(this,`output`)}})},set"~standard"(e){E(this,`~standard`,e)},parse:function e(t,n){return Ro(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await zo(this,t,n,{callee:e})},safeParse(e,t){return Bo(this,e,t)},async safeParseAsync(e,t){return Vo(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){E(this,`spa`,e)},validate(e,t){return ut(this,e,t)},validateAsync(e,t){return ft(this,e,t)},encode:function e(t,n){return Ho(this,t,n,{callee:e})},decode:function e(t,n){return Uo(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Wo(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Go(this,t,n,{callee:e})},safeEncode(e,t){return Ko(this,e,t)},safeDecode(e,t){return qo(this,e,t)},async safeEncodeAsync(e,t){return Jo(this,e,t)},async safeDecodeAsync(e,t){return Yo(this,e,t)},toJSONSchema(e){return Ga(this,{})(e)},get description(){return ki.get(this)?.description},get _def(){return this._zod.def}}),Qo=k(`_ZodString`,(e,t)=>{Tn.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ao(e,t,n,r)},Me({format:e=>U(e).format??null,minLength:e=>U(e).minimum??null,maxLength:e=>U(e).maximum??null},{regex(...e){return this.check(ba(...e))},includes(...e){return this.check(Ca(...e))},startsWith(...e){return this.check(wa(...e))},endsWith(...e){return this.check(Ta(...e))},min(...e){return this.check(va(...e))},max(...e){return this.check(_a(...e))},length(...e){return this.check(ya(...e))},nonempty(...e){return this.check(va(1,...e))},lowercase(e){return this.check(xa(e))},uppercase(e){return this.check(Sa(e))},trim(){return this.check(Da())},normalize(...e){return this.check(Ea(...e))},toLowerCase(){return this.check(Oa())},toUpperCase(){return this.check(ka())},slugify(){return this.check(Aa())}})),$o=k(`ZodString`,(e,t)=>{Tn.init(e,t),Qo.init(e,t)},{email(e){return this.check(Mi(as,e))},url(e){return this.check(Ri(ls,e))},jwt(e){return this.check($i(ws,e))},emoji(e){return this.check(zi(us,e))},guid(e){return this.check(Ni(ss,e))},uuid(e){return this.check(Pi(q,e))},uuidv4(e){return this.check(Fi(q,e))},uuidv6(e){return this.check(Ii(q,e))},uuidv7(e){return this.check(Li(q,e))},nanoid(e){return this.check(Bi(ds,e))},cuid(e){return this.check(Vi(fs,e))},cuid2(e){return this.check(Hi(ps,e))},ulid(e){return this.check(Ui(ms,e))},base64(e){return this.check(Xi(xs,e))},base64url(e){return this.check(Zi(Ss,e))},xid(e){return this.check(Wi(hs,e))},ksuid(e){return this.check(Gi(gs,e))},ipv4(e){return this.check(Ki(_s,e))},ipv6(e){return this.check(qi(vs,e))},cidrv4(e){return this.check(Ji(ys,e))},cidrv6(e){return this.check(Yi(bs,e))},e164(e){return this.check(Qi(Cs,e))},datetime(e){return this.check(ea(ts,e))},date(e){return this.check(ta(ns,e))},time(e){return this.check(na(rs,e))},duration(e){return this.check(ra(is,e))}});function es(e){return ji($o,e)}var K=k(`ZodStringFormat`,(e,t)=>{F.init(e,t),Qo.init(e,t)}),ts=k(`ZodISODateTime`,(e,t)=>{Wn.init(e,t),K.init(e,t)}),ns=k(`ZodISODate`,(e,t)=>{Gn.init(e,t),K.init(e,t)}),rs=k(`ZodISOTime`,(e,t)=>{Kn.init(e,t),K.init(e,t)}),is=k(`ZodISODuration`,(e,t)=>{qn.init(e,t),K.init(e,t)}),as=k(`ZodEmail`,(e,t)=>{On.init(e,t),K.init(e,t)});function os(e){return Mi(as,e)}var ss=k(`ZodGUID`,(e,t)=>{En.init(e,t),K.init(e,t)}),q=k(`ZodUUID`,(e,t)=>{Dn.init(e,t),K.init(e,t)});function cs(e){return Pi(q,e)}var ls=k(`ZodURL`,(e,t)=>{In.init(e,t),K.init(e,t)}),us=k(`ZodEmoji`,(e,t)=>{Ln.init(e,t),K.init(e,t)}),ds=k(`ZodNanoID`,(e,t)=>{Rn.init(e,t),K.init(e,t)}),fs=k(`ZodCUID`,(e,t)=>{zn.init(e,t),K.init(e,t)}),ps=k(`ZodCUID2`,(e,t)=>{Bn.init(e,t),K.init(e,t)}),ms=k(`ZodULID`,(e,t)=>{Vn.init(e,t),K.init(e,t)}),hs=k(`ZodXID`,(e,t)=>{Hn.init(e,t),K.init(e,t)}),gs=k(`ZodKSUID`,(e,t)=>{Un.init(e,t),K.init(e,t)}),_s=k(`ZodIPv4`,(e,t)=>{Jn.init(e,t),K.init(e,t)}),vs=k(`ZodIPv6`,(e,t)=>{Zn.init(e,t),K.init(e,t)}),ys=k(`ZodCIDRv4`,(e,t)=>{Qn.init(e,t),K.init(e,t)}),bs=k(`ZodCIDRv6`,(e,t)=>{er.init(e,t),K.init(e,t)}),xs=k(`ZodBase64`,(e,t)=>{rr.init(e,t),K.init(e,t)}),Ss=k(`ZodBase64URL`,(e,t)=>{or.init(e,t),K.init(e,t)}),Cs=k(`ZodE164`,(e,t)=>{sr.init(e,t),K.init(e,t)}),ws=k(`ZodJWT`,(e,t)=>{lr.init(e,t),K.init(e,t)}),Ts=k(`ZodNumber`,(e,t)=>{ur.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oo(e,t,n,r),e.isFinite=!0},Me({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=U(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=U(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=U(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>U(e).format??null},{gt(e,t){return this.check(ma(e,t))},gte(e,t){return this.check(ha(e,t))},min(e,t){return this.check(ha(e,t))},lt(e,t){return this.check(fa(e,t))},lte(e,t){return this.check(pa(e,t))},max(e,t){return this.check(pa(e,t))},int(e){return this.check(Os(e))},safe(e){return this.check(Os(e))},positive(e){return this.check(ma(0,e))},nonnegative(e){return this.check(ha(0,e))},negative(e){return this.check(fa(0,e))},nonpositive(e){return this.check(pa(0,e))},multipleOf(e,t){return this.check(ga(e,t))},step(e,t){return this.check(ga(e,t))},finite(){return this}}));function Es(e){return ia(Ts,e)}var Ds=k(`ZodNumberFormat`,(e,t)=>{dr.init(e,t),Ts.init(e,t)});function Os(e){return oa(Ds,e)}var ks=k(`ZodBoolean`,(e,t)=>{fr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>so(e,t,n,r)});function As(e){return sa(ks,e)}var js=k(`ZodNull`,(e,t)=>{pr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>co(e,t,n,r)});function Ms(e){return ca(js,e)}var Ns=k(`ZodAny`,(e,t)=>{mr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ps(){return la(Ns)}var Fs=k(`ZodUnknown`,(e,t)=>{hr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Is(){return ua(Fs)}var Ls=k(`ZodNever`,(e,t)=>{gr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lo(e,t,n,r)});function Rs(e){return da(Ls,e)}var zs=k(`ZodArray`,(e,t)=>{Zo(),br.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ho(e,t,n,r),e.element=t.element},{min(e,t){return this.check(va(e,t))},nonempty(e){return this.check(va(1,e))},max(e,t){return this.check(_a(e,t))},length(e,t){return this.check(ya(e,t))},unwrap(){return this.element}});function Bs(e,t){return ja(zs,e,t)}var Vs=k(`ZodObject`,(e,t)=>{Zo(),Er.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_o(e,t,n,r),Le(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return nc(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(_(this._zod.def,{catchall:e}))},passthrough(){return this.clone(_(this._zod.def,{catchall:Is()}))},loose(){return this.clone(_(this._zod.def,{catchall:Is()}))},strict(){return this.clone(_(this._zod.def,{catchall:Rs()}))},strip(){return this.clone(_(this._zod.def,{catchall:void 0}))},extend(e){return ge(this,e)},safeExtend(e){return ve(this,e)},merge(e){return ye(this,e)},pick(e){return pe(this,e)},omit(e){return he(this,e)},partial(...e){return be(sc,this,e[0])},exactPartial(...e){return be(lc,this,e[0],`exactPartial`)},required(...e){return xe(_c,this,e[0])}});function Hs(e,t){return new Vs({type:`object`,shape:e??{},...x(t)})}function Us(e,t){return new Vs({type:`object`,shape:e,catchall:Rs(),...x(t)})}function Ws(e,t){return new Vs({type:`object`,shape:e,catchall:Is(),...x(t)})}var Gs=k(`ZodUnion`,(e,t)=>{Or.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vo(e,t,n,r),e.options=t.options});function Ks(e,t){return new Gs({type:`union`,options:e,...x(t)})}var qs=k(`ZodDiscriminatedUnion`,(e,t)=>{Gs.init(e,t),Ar.init(e,t)});function Js(e,t,n){return new qs({type:`union`,options:t,discriminator:e,...x(n)})}var Ys=k(`ZodIntersection`,(e,t)=>{jr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yo(e,t,n,r)});function Xs(e,t){return new Ys({type:`intersection`,left:e,right:t})}var Zs=k(`ZodTuple`,(e,t)=>{Zo(),Pr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bo(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new sc({type:`optional`,innerType:e}))})}});function Qs(e,t,n){let r=t instanceof P;return new Zs({type:`tuple`,items:e,rest:r?t:null,...x(r?n:t)})}var $s=k(`ZodRecord`,(e,t)=>{Zo(),Rr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wo(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function ec(e,t,n){return!t||!t._zod?new $s({type:`record`,keyType:es(),valueType:e,...x(t)}):new $s({type:`record`,keyType:e,valueType:t,...x(n)})}var tc=k(`ZodEnum`,(e,t)=>{zr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uo(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new tc({...t,checks:[],...x(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new tc({...t,checks:[],...x(r),entries:i})}});function nc(e,t){return new tc({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...x(t)})}var rc=k(`ZodLiteral`,(e,t)=>{Br.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fo(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ic(e,t){return new rc({type:`literal`,values:Array.isArray(e)?e:[e],...x(t)})}var ac=k(`ZodTransform`,(e,t)=>{Zo(),Vr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mo(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ge(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(T(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(T(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function oc(e){return new ac({type:`transform`,transform:e})}var sc=k(`ZodOptional`,(e,t)=>{Ur.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Po(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cc(e){return new sc({type:`optional`,innerType:e})}var lc=k(`ZodExactOptional`,(e,t)=>{Wr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Po(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uc(e){return new lc({type:`optional`,innerType:e})}var dc=k(`ZodNullable`,(e,t)=>{Gr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>To(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fc(e){return new dc({type:`nullable`,innerType:e})}var pc=k(`ZodDefault`,(e,t)=>{Kr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ko(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function mc(e,t){return new pc({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():se(t)}})}var hc=k(`ZodPrefault`,(e,t)=>{Jr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ao(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gc(e,t){return new hc({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():se(t)}})}var _c=k(`ZodNonOptional`,(e,t)=>{Yr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vc(e,t){return new _c({type:`nonoptional`,innerType:e,...x(t)})}var yc=k(`ZodCatch`,(e,t)=>{Qr.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function bc(e,t){return new yc({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:ze(t)})}var xc=k(`ZodPipe`,(e,t)=>{$r.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mo(e,t,n,r),e.in=t.in,e.out=t.out});function Sc(e,t){return new xc({type:`pipe`,in:e,out:t})}var Cc=k(`ZodPreprocess`,(e,t)=>{xc.init(e,t),ti.init(e,t)}),wc=k(`ZodReadonly`,(e,t)=>{ni.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>No(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Tc(e){return new wc({type:`readonly`,innerType:e})}var Ec=k(`ZodLazy`,(e,t)=>{ii.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fo(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Dc(e){return new Ec({type:`lazy`,getter:e})}var Oc=k(`ZodCustom`,(e,t)=>{ai.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>po(e,t,n,r)});function kc(e,t={}){return Ma(Oc,e,t)}function Ac(e,t){return Na(e,t)}function jc(e,t){return new Cc({type:`pipe`,in:oc(e),out:t})}var J=[];for(let e=0;e<256;++e)J.push((e+256).toString(16).slice(1));function Mc(e,t=0){return(J[e[t+0]]+J[e[t+1]]+J[e[t+2]]+J[e[t+3]]+`-`+J[e[t+4]]+J[e[t+5]]+`-`+J[e[t+6]]+J[e[t+7]]+`-`+J[e[t+8]]+J[e[t+9]]+`-`+J[e[t+10]]+J[e[t+11]]+J[e[t+12]]+J[e[t+13]]+J[e[t+14]]+J[e[t+15]]).toLowerCase()}var Nc,Pc=new Uint8Array(16);function Fc(){if(!Nc){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);Nc=crypto.getRandomValues.bind(crypto)}return Nc(Pc)}var Ic={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Lc(e,t,n){if(Ic.randomUUID&&!t&&!e)return Ic.randomUUID();e||={};let r=e.random??e.rng?.()??Fc();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Mc(r)}var Y=function(e){return e.ACTOR=`ACTOR`,e.ADDRESS=`ADDRESS`,e.ARRAY=`ARRAY`,e.BOOLEAN=`BOOLEAN`,e.CURRENCY=`CURRENCY`,e.DATE=`DATE`,e.DATE_TIME=`DATE_TIME`,e.EMAILS=`EMAILS`,e.FILES=`FILES`,e.FULL_NAME=`FULL_NAME`,e.LINKS=`LINKS`,e.MORPH_RELATION=`MORPH_RELATION`,e.MULTI_SELECT=`MULTI_SELECT`,e.NUMBER=`NUMBER`,e.NUMERIC=`NUMERIC`,e.PHONES=`PHONES`,e.POSITION=`POSITION`,e.RATING=`RATING`,e.RAW_JSON=`RAW_JSON`,e.RELATION=`RELATION`,e.RICH_TEXT=`RICH_TEXT`,e.SELECT=`SELECT`,e.TEXT=`TEXT`,e.TS_VECTOR=`TS_VECTOR`,e.UUID=`UUID`,e}({}),Rc=function(e){return e.RECORD_INDEX=`RECORD_INDEX`,e.RECORD_PAGE=`RECORD_PAGE`,e.DASHBOARD=`DASHBOARD`,e.STANDALONE_PAGE=`STANDALONE_PAGE`,e.RECORD_FORM=`RECORD_FORM`,e}({}),zc=function(e){return e.MIN=`MIN`,e.MAX=`MAX`,e.AVG=`AVG`,e.SUM=`SUM`,e.COUNT=`COUNT`,e.COUNT_UNIQUE_VALUES=`COUNT_UNIQUE_VALUES`,e.COUNT_EMPTY=`COUNT_EMPTY`,e.COUNT_NOT_EMPTY=`COUNT_NOT_EMPTY`,e.COUNT_TRUE=`COUNT_TRUE`,e.COUNT_FALSE=`COUNT_FALSE`,e.PERCENTAGE_EMPTY=`PERCENTAGE_EMPTY`,e.PERCENTAGE_NOT_EMPTY=`PERCENTAGE_NOT_EMPTY`,e}({}),Bc=function(e){return e.EMAIL=`EMAIL`,e.CALENDAR=`CALENDAR`,e.WORKFLOW=`WORKFLOW`,e.AGENT=`AGENT`,e.API=`API`,e.IMPORT=`IMPORT`,e.MANUAL=`MANUAL`,e.SYSTEM=`SYSTEM`,e.WEBHOOK=`WEBHOOK`,e.APPLICATION=`APPLICATION`,e}({});Y.ACTOR,Y.SELECT,Object.keys(Bc).map((e,t)=>({id:Lc(),label:`${Bc[e].toLowerCase()}`,value:e,position:t})),Y.UUID,Y.TEXT,Y.RAW_JSON,Y.ADDRESS,Y.TEXT,Y.TEXT,Y.TEXT,Y.TEXT,Y.TEXT,Y.TEXT,Y.NUMERIC,Y.NUMERIC,Y.CURRENCY,Y.NUMERIC,Y.TEXT,Y.EMAILS,Y.TEXT,Y.RAW_JSON,Y.FULL_NAME,Y.TEXT,Y.TEXT,Y.LINKS,Y.TEXT,Y.TEXT,Y.RAW_JSON,Y.PHONES,Y.TEXT,Y.TEXT,Y.TEXT,Y.RAW_JSON,Y.RICH_TEXT,Y.TEXT,Y.TEXT,Y.TEXT,Hs({tiptap:es().nullable().optional(),markdown:es().nullable().optional(),blocknote:es().nullable().optional()}),Y.LINKS,Y.CURRENCY,Y.FULL_NAME,Y.ADDRESS,Y.ACTOR,Y.EMAILS,Y.PHONES,Y.RICH_TEXT;var X=function(e){return e.GOOGLE=`google`,e.MICROSOFT=`microsoft`,e.IMAP_SMTP_CALDAV=`imap_smtp_caldav`,e.OIDC=`oidc`,e.SAML=`saml`,e.EMAIL_GROUP=`email_group`,e.APP=`app`,e}({});Y.RELATION,Y.MORPH_RELATION,Y.FILES,Y.TS_VECTOR;var Vc=function(e){return e.FLOAT=`float`,e.INT=`int`,e.BIGINT=`bigint`,e}({}),Hc=function(e){return e.RELATIVE=`RELATIVE`,e.USER_SETTINGS=`USER_SETTINGS`,e.CUSTOM=`CUSTOM`,e}({}),Uc=function(e){return e.RecordExport=`record-export`,e.CorePicture=`core-picture`,e.AgentChat=`agent-chat`,e.BuiltLogicFunction=`built-logic-function`,e.BuiltFrontComponent=`built-front-component`,e.PublicAsset=`public-asset`,e.Source=`source`,e.FilesField=`files-field`,e.Dependencies=`dependencies`,e.Workflow=`workflow`,e.EmailAttachment=`email-attachment`,e.EmailImage=`email-image`,e.AppTarball=`app-tarball`,e.GeneratedSdkClient=`generated-sdk-client`,e.Dpa=`dpa`,e.WorkspaceDataExport=`workspace-data-export`,e}({}),Wc=function(e){return e.MONDAY=`MONDAY`,e.SUNDAY=`SUNDAY`,e.SATURDAY=`SATURDAY`,e}({}),Gc=function(e){return e.BTREE=`BTREE`,e.GIN=`GIN`,e}({}),Kc=function(e){return e.EMAIL=`EMAIL`,e.SMS=`SMS`,e.EMAIL_GROUP=`EMAIL_GROUP`,e.APP=`APP`,e}({}),qc=function(e){return e.OPEN=`OPEN`,e.APPLICATION=`APPLICATION`,e.SYSTEM=`SYSTEM`,e}({}),Jc=function(e){return e.VIEW=`VIEW`,e.FOLDER=`FOLDER`,e.LINK=`LINK`,e.OBJECT=`OBJECT`,e.RECORD=`RECORD`,e.PAGE_LAYOUT=`PAGE_LAYOUT`,e.AGENT_CHAT_CHANNEL=`AGENT_CHAT_CHANNEL`,e}({}),Yc=function(e){return e.SIDE_PANEL=`SIDE_PANEL`,e.RECORD_PAGE=`RECORD_PAGE`,e.USER_CHOICE=`USER_CHOICE`,e}({}),Z=function(e){return e.DAY=`DAY`,e.MONTH=`MONTH`,e.QUARTER=`QUARTER`,e.YEAR=`YEAR`,e.WEEK=`WEEK`,e.DAY_OF_THE_WEEK=`DAY_OF_THE_WEEK`,e.MONTH_OF_THE_YEAR=`MONTH_OF_THE_YEAR`,e.QUARTER_OF_THE_YEAR=`QUARTER_OF_THE_YEAR`,e.NONE=`NONE`,e}({}),Xc=[`AGGREGATE_CHART`,`PIE_CHART`,`BAR_CHART`,`LINE_CHART`],Zc=function(e){return e.GRID=`GRID`,e.VERTICAL_LIST=`VERTICAL_LIST`,e.CANVAS=`CANVAS`,e}({}),Qc=function(e){return e.FIT_CONTENT=`FIT_CONTENT`,e.TAB_VIEWPORT=`TAB_VIEWPORT`,e}({}),$c=function(e){return e.VIEW=`VIEW`,e.IFRAME=`IFRAME`,e.FIELD=`FIELD`,e.FIELDS=`FIELDS`,e.GRAPH=`GRAPH`,e.STANDALONE_RICH_TEXT=`STANDALONE_RICH_TEXT`,e.TIMELINE=`TIMELINE`,e.TASKS=`TASKS`,e.NOTES=`NOTES`,e.FILES=`FILES`,e.EMAILS=`EMAILS`,e.CALENDAR=`CALENDAR`,e.FIELD_RICH_TEXT=`FIELD_RICH_TEXT`,e.WORKFLOW=`WORKFLOW`,e.WORKFLOW_VERSION=`WORKFLOW_VERSION`,e.WORKFLOW_RUN=`WORKFLOW_RUN`,e.FRONT_COMPONENT=`FRONT_COMPONENT`,e.RECORD_TABLE=`RECORD_TABLE`,e.EMAIL_THREAD=`EMAIL_THREAD`,e.CALL_RECORDING_SUMMARY=`CALL_RECORDING_SUMMARY`,e.CALL_RECORDING_TRANSCRIPT=`CALL_RECORDING_TRANSCRIPT`,e.MESSAGE_CAMPAIGN_BODY=`MESSAGE_CAMPAIGN_BODY`,e.MESSAGE_CAMPAIGN_DETAILS=`MESSAGE_CAMPAIGN_DETAILS`,e.FORM_FIELD=`FORM_FIELD`,e.CHAT_THREADS=`CHAT_THREADS`,e.CHAT=`CHAT`,e}({}),el=function(e){return e.AND=`AND`,e.OR=`OR`,e}({}),tl=function(e){return e.CASCADE=`CASCADE`,e.RESTRICT=`RESTRICT`,e.SET_NULL=`SET_NULL`,e.NO_ACTION=`NO_ACTION`,e}({}),nl=function(e){return e.MANY_TO_ONE=`MANY_TO_ONE`,e.ONE_TO_MANY=`ONE_TO_MANY`,e}({}),rl=function(e){return e.AND=`AND`,e.OR=`OR`,e}({}),il=function(e){return e.IS=`IS`,e.IS_NOT_NULL=`IS_NOT_NULL`,e.IS_NOT=`IS_NOT`,e.LESS_THAN_OR_EQUAL=`LESS_THAN_OR_EQUAL`,e.GREATER_THAN_OR_EQUAL=`GREATER_THAN_OR_EQUAL`,e.IS_BEFORE=`IS_BEFORE`,e.IS_AFTER=`IS_AFTER`,e.CONTAINS=`CONTAINS`,e.DOES_NOT_CONTAIN=`DOES_NOT_CONTAIN`,e.IS_EMPTY=`IS_EMPTY`,e.IS_NOT_EMPTY=`IS_NOT_EMPTY`,e.IS_RELATIVE=`IS_RELATIVE`,e.IS_IN_PAST=`IS_IN_PAST`,e.IS_IN_FUTURE=`IS_IN_FUTURE`,e.IS_TODAY=`IS_TODAY`,e.VECTOR_SEARCH=`VECTOR_SEARCH`,e}({}),al=function(e){return e.AND=`AND`,e.OR=`OR`,e}({}),ol=function(e){return e.DAY=`DAY`,e.WEEK=`WEEK`,e.MONTH=`MONTH`,e}({}),sl=function(e){return e.AND=`AND`,e.OR=`OR`,e.NOT=`NOT`,e}({}),cl=function(e){return e.IS=`IS`,e.IS_NOT_NULL=`IS_NOT_NULL`,e.IS_NOT=`IS_NOT`,e.LESS_THAN_OR_EQUAL=`LESS_THAN_OR_EQUAL`,e.GREATER_THAN_OR_EQUAL=`GREATER_THAN_OR_EQUAL`,e.IS_BEFORE=`IS_BEFORE`,e.IS_AFTER=`IS_AFTER`,e.CONTAINS=`CONTAINS`,e.DOES_NOT_CONTAIN=`DOES_NOT_CONTAIN`,e.IS_EMPTY=`IS_EMPTY`,e.IS_NOT_EMPTY=`IS_NOT_EMPTY`,e.IS_RELATIVE=`IS_RELATIVE`,e.IS_IN_PAST=`IS_IN_PAST`,e.IS_IN_FUTURE=`IS_IN_FUTURE`,e.IS_TODAY=`IS_TODAY`,e.VECTOR_SEARCH=`VECTOR_SEARCH`,e}({}),ll=function(e){return e.Is=`is`,e.IsNotNull=`isNotNull`,e.IsNot=`isNot`,e.LessThanOrEqual=`lessThan`,e.GreaterThanOrEqual=`greaterThan`,e.IsBefore=`isBefore`,e.IsAfter=`isAfter`,e.Contains=`contains`,e.DoesNotContain=`doesNotContain`,e.IsEmpty=`isEmpty`,e.IsNotEmpty=`isNotEmpty`,e.IsRelative=`isRelative`,e.IsInPast=`isInPast`,e.IsInFuture=`isInFuture`,e.IsToday=`isToday`,e}({}),ul=function(e){return e.SIDE_PANEL=`SIDE_PANEL`,e.RECORD_PAGE=`RECORD_PAGE`,e}({}),dl=function(e){return e.ASC=`ASC`,e.DESC=`DESC`,e}({}),Q=function(e){return e.TABLE=`TABLE`,e.KANBAN=`KANBAN`,e.CALENDAR=`CALENDAR`,e.LIST=`LIST`,e.FIELDS_WIDGET=`FIELDS_WIDGET`,e.TABLE_WIDGET=`TABLE_WIDGET`,e.KANBAN_WIDGET=`KANBAN_WIDGET`,e.LIST_WIDGET=`LIST_WIDGET`,e.CALENDAR_WIDGET=`CALENDAR_WIDGET`,e}({}),fl=function(e){return e.WORKSPACE=`WORKSPACE`,e.UNLISTED=`UNLISTED`,e}({}),pl=e.t();Y.CURRENCY,Y.EMAILS,Y.LINKS,Y.PHONES,Y.FULL_NAME,Y.ADDRESS,Y.ACTOR,Y.RICH_TEXT,Y.CURRENCY,Y.EMAILS,Y.LINKS,Y.PHONES,Y.FULL_NAME,Y.ADDRESS,Y.ACTOR,Y.RICH_TEXT;var ml={AED:{label:`UAE dirham`},AFN:{label:`Afghan afghani`},ALL:{label:`Albanian lek`},AMD:{label:`Armenian dram`},ANG:{label:`Netherlands Antillean guilder`},AOA:{label:`Angolan kwanza`},ARS:{label:`Argentine peso`},AUD:{label:`Australian dollar`},AWG:{label:`Aruban florin`},AZN:{label:`Azerbaijani manat`},BAM:{label:`Bosnia and Herzegovina mark`},BBD:{label:`Barbados dollar`},BDT:{label:`Bangladeshi taka`},BGN:{label:`Bulgarian lev`},BHD:{label:`Bahraini dinar`},BIF:{label:`Burundian franc`},BMD:{label:`Bermudian dollar`},BND:{label:`Brunei dollar`},BOB:{label:`Boliviano`},BRL:{label:`Brazilian real`},BSD:{label:`Bahamian dollar`},BTN:{label:`Bhutanese ngultrum`},BWP:{label:`Botswana pula`},BYN:{label:`Belarusian ruble`},BZD:{label:`Belize dollar`},CAD:{label:`Canadian dollar`},CDF:{label:`Congolese franc`},CHF:{label:`Swiss franc`},CLP:{label:`Chilean peso`},CLF:{label:`Unidad de Fomento`},CNY:{label:`Chinese yuan`},COP:{label:`Colombian peso`},CRC:{label:`Costa Rican colon`},CUP:{label:`Cuban peso`},CVE:{label:`Cape Verdean escudo`},CZK:{label:`Czech koruna`},DJF:{label:`Djiboutian franc`},DKK:{label:`Danish krone`},DOP:{label:`Dominican peso`},DZD:{label:`Algerian Dinar`},EGP:{label:`Egyptian pound`},ERN:{label:`Eritrean nakfa`},ETB:{label:`Ethiopian birr`},EUR:{label:`Euro`},FJD:{label:`Fiji dollar`},FKP:{label:`Falkland Islands pound`},GBP:{label:`British pound`},GEL:{label:`Georgian lari`},GHS:{label:`Ghanaian cedi`},GIP:{label:`Gibraltar pound`},GMD:{label:`Gambian dalasi`},GNF:{label:`Guinean franc`},GTQ:{label:`Guatemalan quetzal`},GYD:{label:`Guyanese dollar`},HKD:{label:`Hong Kong dollar`},HNL:{label:`Honduran lempira`},HTG:{label:`Haitian gourde`},HUF:{label:`Hungarian forint`},IDR:{label:`Indonesian rupiah`},ILS:{label:`Israeli shekel`},INR:{label:`Indian rupee`},IQD:{label:`Iraqi dinar`},IRR:{label:`Iranian rial`},ISK:{label:`Icelandic króna`},JMD:{label:`Jamaican dollar`},JOD:{label:`Jordanian dinar`},JPY:{label:`Japanese yen`},KES:{label:`Kenyan shilling`},KGS:{label:`Kyrgyzstani som`},KHR:{label:`Cambodian riel`},KMF:{label:`Comoro franc`},KPW:{label:`North Korean won`},KRW:{label:`South Korean won`},KWD:{label:`Kuwaiti dinar`},KYD:{label:`Cayman Islands dollar`},KZT:{label:`Kazakhstani tenge`},LAK:{label:`Lao kip`},LBP:{label:`Lebanese pound`},LKR:{label:`Sri Lankan rupee`},LRD:{label:`Liberian dollar`},LSL:{label:`Lesotho loti`},LYD:{label:`Libyan dinar`},MAD:{label:`Moroccan dirham`},MDL:{label:`Moldovan leu`},MGA:{label:`Malagasy ariary`},MKD:{label:`Macedonian denar`},MMK:{label:`Myanmar kyat`},MNT:{label:`Mongolian tögrög`},MOP:{label:`Macanese pataca`},MRU:{label:`Mauritanian ouguiya`},MUR:{label:`Mauritian rupee`},MVR:{label:`Maldivian rufiyaa`},MWK:{label:`Malawian kwacha`},MXN:{label:`Mexican peso`},MYR:{label:`Malaysian ringgit`},MZN:{label:`Mozambican metical`},NAD:{label:`Namibian dollar`},NGN:{label:`Nigerian naira`},NIO:{label:`Nicaraguan córdoba`},NOK:{label:`Norwegian krone`},NPR:{label:`Nepalese rupee`},NZD:{label:`New Zealand dollar`},OMR:{label:`Omani rial`},PAB:{label:`Panamanian balboa`},PEN:{label:`Peruvian sol`},PGK:{label:`Papua New Guinean kina`},PHP:{label:`Philippine peso`},PKR:{label:`Pakistani rupee`},PLN:{label:`Polish złoty`},PYG:{label:`Paraguayan guaraní`},QAR:{label:`Qatari riyal`},RON:{label:`Romanian leu`},RSD:{label:`Serbian dinar`},RUB:{label:`Russian ruble`},RWF:{label:`Rwandan franc`},SAR:{label:`Saudi riyal`},SBD:{label:`Solomon Islands dollar`},SCR:{label:`Seychelles rupee`},SDG:{label:`Sudanese pound`},SEK:{label:`Swedish krona`},SGD:{label:`Singapore dollar`},SHP:{label:`Saint Helena pound`},SLE:{label:`Sierra Leonean leone`},SOS:{label:`Somalian shilling`},SRD:{label:`Surinamese dollar`},SSP:{label:`South Sudanese pound`},STN:{label:`São Tomé and Príncipe dobra`},SVC:{label:`Salvadoran colón`},SYP:{label:`Syrian pound`},SZL:{label:`Swazi lilangeni`},THB:{label:`Thai Baht`},TJS:{label:`Tajikistani somoni`},TMT:{label:`Turkmenistan manat`},TND:{label:`Tunisian dinar`},TOP:{label:`Tongan paʻanga`},TRY:{label:`Turkish lira`},TTD:{label:`Trinidad and Tobago dollar`},TWD:{label:`Taiwanese dollar`},TZS:{label:`Tanzanian shilling`},UAH:{label:`Ukrainian hryvnia`},UGX:{label:`Ugandan shilling`},USD:{label:`United States dollar`},UYU:{label:`Uruguayan peso`},UZS:{label:`Uzbekistani sum`},VES:{label:`Venezuelan bolívar`},VND:{label:`Vietnamese đồng`},VUV:{label:`Vanuatu vatu`},WST:{label:`Samoan tala`},XOF:{label:`West African CFA franc`},XCD:{label:`East Caribbean dollar`},XCG:{label:`Caribbean guilder`},YER:{label:`Yemeni rial`},ZAR:{label:`South African rand`},ZMW:{label:`Zambian kwacha`},ZWG:{label:`Zimbabwe Gold`}},hl={default:{w:4,h:4},minimum:{w:2,h:2}};({DEVELOPERS_CONTRIBUTE_CAPABILITIES_LOCAL_SETUP:`/developers/contribute/capabilities/local-setup`,DEVELOPERS_CONTRIBUTE_COMMANDS:`/developers/contribute/commands`,DEVELOPERS_CONTRIBUTE_STYLE_GUIDE:`/developers/contribute/style-guide`,DEVELOPERS_EXTEND_API:`/developers/extend/api`,DEVELOPERS_EXTEND_APPS_CONFIG_APPLICATION:`/developers/extend/apps/config/application`,DEVELOPERS_EXTEND_APPS_CONFIG_INSTALL_HOOKS:`/developers/extend/apps/config/install-hooks`,DEVELOPERS_EXTEND_APPS_CONFIG_OVERVIEW:`/developers/extend/apps/config/overview`,DEVELOPERS_EXTEND_APPS_CONFIG_PUBLIC_ASSETS:`/developers/extend/apps/config/public-assets`,DEVELOPERS_EXTEND_APPS_CONFIG_ROLES:`/developers/extend/apps/config/roles`,DEVELOPERS_EXTEND_APPS_DATA_EXTENDING_OBJECTS:`/developers/extend/apps/data/extending-objects`,DEVELOPERS_EXTEND_APPS_DATA_OBJECTS:`/developers/extend/apps/data/objects`,DEVELOPERS_EXTEND_APPS_DATA_OVERVIEW:`/developers/extend/apps/data/overview`,DEVELOPERS_EXTEND_APPS_DATA_RELATIONS:`/developers/extend/apps/data/relations`,DEVELOPERS_EXTEND_APPS_DATA_SYSTEM_FIELDS:`/developers/extend/apps/data/system-fields`,DEVELOPERS_EXTEND_APPS_DATA_TIMELINE_ACTIVITY_TYPES:`/developers/extend/apps/data/timeline-activity-types`,DEVELOPERS_EXTEND_APPS_GETTING_STARTED_CONCEPTS:`/developers/extend/apps/getting-started/concepts`,DEVELOPERS_EXTEND_APPS_GETTING_STARTED_GOOD_PRACTICES:`/developers/extend/apps/getting-started/good-practices`,DEVELOPERS_EXTEND_APPS_GETTING_STARTED_LOCAL_SERVER:`/developers/extend/apps/getting-started/local-server`,DEVELOPERS_EXTEND_APPS_GETTING_STARTED_PROJECT_STRUCTURE:`/developers/extend/apps/getting-started/project-structure`,DEVELOPERS_EXTEND_APPS_GETTING_STARTED_QUICK_START:`/developers/extend/apps/getting-started/quick-start`,DEVELOPERS_EXTEND_APPS_GETTING_STARTED_SCAFFOLDING:`/developers/extend/apps/getting-started/scaffolding`,DEVELOPERS_EXTEND_APPS_GETTING_STARTED_TROUBLESHOOTING:`/developers/extend/apps/getting-started/troubleshooting`,DEVELOPERS_EXTEND_APPS_LAYOUT_COMMAND_MENU_ITEMS:`/developers/extend/apps/layout/command-menu-items`,DEVELOPERS_EXTEND_APPS_LAYOUT_FRONT_COMPONENTS:`/developers/extend/apps/layout/front-components`,DEVELOPERS_EXTEND_APPS_LAYOUT_NAVIGATION_MENU_ITEMS:`/developers/extend/apps/layout/navigation-menu-items`,DEVELOPERS_EXTEND_APPS_LAYOUT_OVERVIEW:`/developers/extend/apps/layout/overview`,DEVELOPERS_EXTEND_APPS_LAYOUT_PAGE_LAYOUTS:`/developers/extend/apps/layout/page-layouts`,DEVELOPERS_EXTEND_APPS_LAYOUT_VIEWS:`/developers/extend/apps/layout/views`,DEVELOPERS_EXTEND_APPS_LOGIC_BACKGROUND_JOBS:`/developers/extend/apps/logic/background-jobs`,DEVELOPERS_EXTEND_APPS_LOGIC_CONNECTIONS:`/developers/extend/apps/logic/connections`,DEVELOPERS_EXTEND_APPS_LOGIC_CREDITS:`/developers/extend/apps/logic/credits`,DEVELOPERS_EXTEND_APPS_LOGIC_INBOX:`/developers/extend/apps/logic/inbox`,DEVELOPERS_EXTEND_APPS_LOGIC_KEY_VALUE_STORE:`/developers/extend/apps/logic/key-value-store`,DEVELOPERS_EXTEND_APPS_LOGIC_LOGIC_FUNCTIONS:`/developers/extend/apps/logic/logic-functions`,DEVELOPERS_EXTEND_APPS_LOGIC_MESSAGING_CHANNELS:`/developers/extend/apps/logic/messaging-channels`,DEVELOPERS_EXTEND_APPS_LOGIC_OVERVIEW:`/developers/extend/apps/logic/overview`,DEVELOPERS_EXTEND_APPS_LOGIC_SKILLS_AND_AGENTS:`/developers/extend/apps/logic/skills-and-agents`,DEVELOPERS_EXTEND_APPS_LOGIC_WORKFLOWS:`/developers/extend/apps/logic/workflows`,DEVELOPERS_EXTEND_APPS_OPERATIONS_CLI:`/developers/extend/apps/operations/cli`,DEVELOPERS_EXTEND_APPS_OPERATIONS_MARKETPLACE_VETTING:`/developers/extend/apps/operations/marketplace-vetting`,DEVELOPERS_EXTEND_APPS_OPERATIONS_MONITORING:`/developers/extend/apps/operations/monitoring`,DEVELOPERS_EXTEND_APPS_OPERATIONS_OVERVIEW:`/developers/extend/apps/operations/overview`,DEVELOPERS_EXTEND_APPS_OPERATIONS_PUBLISHING:`/developers/extend/apps/operations/publishing`,DEVELOPERS_EXTEND_APPS_OPERATIONS_SYNC_AND_RECOVERY:`/developers/extend/apps/operations/sync-and-recovery`,DEVELOPERS_EXTEND_APPS_OPERATIONS_TESTING:`/developers/extend/apps/operations/testing`,DEVELOPERS_EXTEND_APPS_OPERATIONS_TRANSLATIONS:`/developers/extend/apps/operations/translations`,DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_AI_AGENT:`/developers/extend/apps/tutorials/document-generator/ai-agent`,DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_BUILDING_THE_UI:`/developers/extend/apps/tutorials/document-generator/building-the-ui`,DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_DATA_MODEL:`/developers/extend/apps/tutorials/document-generator/data-model`,DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_GENERATING_DOCUMENTS:`/developers/extend/apps/tutorials/document-generator/generating-documents`,DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_HTTP_ROUTES:`/developers/extend/apps/tutorials/document-generator/http-routes`,DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_OVERVIEW:`/developers/extend/apps/tutorials/document-generator/overview`,DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_PUBLISHING:`/developers/extend/apps/tutorials/document-generator/publishing`,DEVELOPERS_EXTEND_OAUTH:`/developers/extend/oauth`,DEVELOPERS_EXTEND_WEBHOOKS:`/developers/extend/webhooks`,DEVELOPERS_INTRODUCTION:`/developers/introduction`,DEVELOPERS_SELF_HOST_CAPABILITIES_DOCKER_COMPOSE:`/developers/self-host/capabilities/docker-compose`,DEVELOPERS_SELF_HOST_CAPABILITIES_SECURITY:`/developers/self-host/capabilities/security`,DEVELOPERS_SELF_HOST_CAPABILITIES_SETUP:`/developers/self-host/capabilities/setup`,DEVELOPERS_SELF_HOST_CAPABILITIES_TROUBLESHOOTING:`/developers/self-host/capabilities/troubleshooting`,DEVELOPERS_SELF_HOST_CAPABILITIES_UPGRADE_GUIDE:`/developers/self-host/capabilities/upgrade-guide`,GETTING_STARTED_CORE_CONCEPTS_AI:`/getting-started/core-concepts/ai`,GETTING_STARTED_CORE_CONCEPTS_APPS:`/getting-started/core-concepts/apps`,GETTING_STARTED_CORE_CONCEPTS_CALENDAR_AND_EMAIL:`/getting-started/core-concepts/calendar-and-email`,GETTING_STARTED_CORE_CONCEPTS_DASHBOARDS:`/getting-started/core-concepts/dashboards`,GETTING_STARTED_CORE_CONCEPTS_DATA_MODEL:`/getting-started/core-concepts/data-model`,GETTING_STARTED_CORE_CONCEPTS_GLOSSARY:`/getting-started/core-concepts/glossary`,GETTING_STARTED_CORE_CONCEPTS_LAYOUT:`/getting-started/core-concepts/layout`,GETTING_STARTED_CORE_CONCEPTS_WORKFLOWS:`/getting-started/core-concepts/workflows`,GETTING_STARTED_INTRODUCTION:`/getting-started/introduction`,GETTING_STARTED_KEY_FEATURES:`/getting-started/key-features`,GETTING_STARTED_QUICKSTART:`/getting-started/quickstart`,UI_ACCESSIBILITY:`/ui/accessibility`,UI_COMPONENTS_CODE_EDITOR_CODE_EDITOR:`/ui/components/code-editor/code-editor`,UI_COMPONENTS_DATA_DISPLAY_AVATAR_GROUP:`/ui/components/data-display/avatar-group`,UI_COMPONENTS_DATA_DISPLAY_COMMAND_BLOCK:`/ui/components/data-display/command-block`,UI_COMPONENTS_DATA_DISPLAY_DETAILS_ROW:`/ui/components/data-display/details-row`,UI_COMPONENTS_DATA_DISPLAY_JSON_TREE:`/ui/components/data-display/json-tree`,UI_COMPONENTS_DATA_DISPLAY_METRIC_ROW:`/ui/components/data-display/metric-row`,UI_COMPONENTS_DATA_DISPLAY_STACK_ICON:`/ui/components/data-display/stack-icon`,UI_COMPONENTS_DATA_DISPLAY_TINTED_ICON_TILE:`/ui/components/data-display/tinted-icon-tile`,UI_COMPONENTS_FEEDBACK_CALLOUT:`/ui/components/feedback/callout`,UI_COMPONENTS_FEEDBACK_INLINE_BANNER:`/ui/components/feedback/inline-banner`,UI_COMPONENTS_FEEDBACK_TOAST:`/ui/components/feedback/toast`,UI_COMPONENTS_INPUT_COUNTRY_SELECT:`/ui/components/input/country-select`,UI_COMPONENTS_INPUT_CURRENCY_PICKER:`/ui/components/input/currency-picker`,UI_COMPONENTS_INPUT_FORM_FIELD_ROW:`/ui/components/input/form-field-row`,UI_COMPONENTS_INPUT_ICON_BUTTON:`/ui/components/input/icon-button`,UI_COMPONENTS_INPUT_IMAGE_INPUT:`/ui/components/input/image-input`,UI_COMPONENTS_INPUT_LIGHT_BUTTON:`/ui/components/input/light-button`,UI_COMPONENTS_INPUT_LIGHT_ICON_BUTTON:`/ui/components/input/light-icon-button`,UI_COMPONENTS_INPUT_MAIN_BUTTON:`/ui/components/input/main-button`,UI_COMPONENTS_INPUT_NUMBER_STEPPER:`/ui/components/input/number-stepper`,UI_COMPONENTS_INPUT_PHONE_COUNTRY_PICKER:`/ui/components/input/phone-country-picker`,UI_COMPONENTS_INPUT_REACTION_BUTTON:`/ui/components/input/reaction-button`,UI_COMPONENTS_INPUT_SEARCH_INPUT:`/ui/components/input/search-input`,UI_COMPONENTS_INPUT_SEGMENTED_CONTROL:`/ui/components/input/segmented-control`,UI_COMPONENTS_LAYOUT_ANIMATED_ICON_CROSSFADE:`/ui/components/layout/animated-icon-crossfade`,UI_COMPONENTS_LAYOUT_OVERFLOWING_LIST:`/ui/components/layout/overflowing-list`,UI_COMPONENTS_LAYOUT_SECTION:`/ui/components/layout/section`,UI_COMPONENTS_NAVIGATION_DROPDOWN:`/ui/components/navigation/dropdown`,UI_COMPONENTS_NAVIGATION_LIST_ITEM_BUTTON:`/ui/components/navigation/list-item-button`,UI_COMPONENTS_NAVIGATION_TAB_BUTTON:`/ui/components/navigation/tab-button`,UI_COMPONENTS_OVERVIEW:`/ui/components/overview`,UI_COMPONENTS_SETTINGS_SETTINGS_ROW:`/ui/components/settings/settings-row`,UI_DARK_MODE:`/ui/dark-mode`,UI_GETTING_STARTED:`/ui/getting-started`,UI_ICONS:`/ui/icons`,UI_PRIMITIVES_ACCESSIBILITY_VISUALLY_HIDDEN:`/ui/primitives/accessibility/visually-hidden`,UI_PRIMITIVES_DATA_DISPLAY_AVATAR:`/ui/primitives/data-display/avatar`,UI_PRIMITIVES_DATA_DISPLAY_BADGE:`/ui/primitives/data-display/badge`,UI_PRIMITIVES_DATA_DISPLAY_CHIP:`/ui/primitives/data-display/chip`,UI_PRIMITIVES_DATA_DISPLAY_COLOR_SAMPLE:`/ui/primitives/data-display/color-sample`,UI_PRIMITIVES_DATA_DISPLAY_STATUS:`/ui/primitives/data-display/status`,UI_PRIMITIVES_DATA_DISPLAY_TAG:`/ui/primitives/data-display/tag`,UI_PRIMITIVES_FEEDBACK_BANNER:`/ui/primitives/feedback/banner`,UI_PRIMITIVES_FEEDBACK_LOADER:`/ui/primitives/feedback/loader`,UI_PRIMITIVES_FEEDBACK_PROGRESS:`/ui/primitives/feedback/progress`,UI_PRIMITIVES_FEEDBACK_PROGRESS_BAR:`/ui/primitives/feedback/progress-bar`,UI_PRIMITIVES_FEEDBACK_PROGRESS_RING:`/ui/primitives/feedback/progress-ring`,UI_PRIMITIVES_FEEDBACK_SKELETON:`/ui/primitives/feedback/skeleton`,UI_PRIMITIVES_INPUT_BUTTON:`/ui/primitives/input/button`,UI_PRIMITIVES_INPUT_BUTTON_GROUP:`/ui/primitives/input/button-group`,UI_PRIMITIVES_INPUT_CHECKBOX:`/ui/primitives/input/checkbox`,UI_PRIMITIVES_INPUT_FIELD:`/ui/primitives/input/field`,UI_PRIMITIVES_INPUT_INPUT:`/ui/primitives/input/input`,UI_PRIMITIVES_INPUT_INPUT_GROUP:`/ui/primitives/input/input-group`,UI_PRIMITIVES_INPUT_NUMBER_FIELD:`/ui/primitives/input/number-field`,UI_PRIMITIVES_INPUT_RADIO:`/ui/primitives/input/radio`,UI_PRIMITIVES_INPUT_RADIO_GROUP:`/ui/primitives/input/radio-group`,UI_PRIMITIVES_INPUT_SELECT:`/ui/primitives/input/select`,UI_PRIMITIVES_INPUT_SLIDER:`/ui/primitives/input/slider`,UI_PRIMITIVES_INPUT_SWITCH:`/ui/primitives/input/switch`,UI_PRIMITIVES_INPUT_TEXTAREA:`/ui/primitives/input/textarea`,UI_PRIMITIVES_LAYOUT_COLLAPSIBLE:`/ui/primitives/layout/collapsible`,UI_PRIMITIVES_LAYOUT_DIRECTION_PROVIDER:`/ui/primitives/layout/direction-provider`,UI_PRIMITIVES_LAYOUT_RESIZE_HANDLE:`/ui/primitives/layout/resize-handle`,UI_PRIMITIVES_LAYOUT_SEPARATOR:`/ui/primitives/layout/separator`,UI_PRIMITIVES_NAVIGATION_BREADCRUMB:`/ui/primitives/navigation/breadcrumb`,UI_PRIMITIVES_NAVIGATION_LIST_ITEM:`/ui/primitives/navigation/list-item`,UI_PRIMITIVES_NAVIGATION_TABS:`/ui/primitives/navigation/tabs`,UI_PRIMITIVES_OVERVIEW:`/ui/primitives/overview`,UI_PRIMITIVES_SURFACES_ALERT_DIALOG:`/ui/primitives/surfaces/alert-dialog`,UI_PRIMITIVES_SURFACES_CARD:`/ui/primitives/surfaces/card`,UI_PRIMITIVES_SURFACES_DIALOG:`/ui/primitives/surfaces/dialog`,UI_PRIMITIVES_SURFACES_POPOVER:`/ui/primitives/surfaces/popover`,UI_PRIMITIVES_SURFACES_TOOLTIP:`/ui/primitives/surfaces/tooltip`,UI_PRIMITIVES_TYPOGRAPHY_HEADING:`/ui/primitives/typography/heading`,UI_PRIMITIVES_TYPOGRAPHY_OVERFLOWING_TEXT_WITH_TOOLTIP:`/ui/primitives/typography/overflowing-text-with-tooltip`,UI_PRIMITIVES_TYPOGRAPHY_SHORTCUT:`/ui/primitives/typography/shortcut`,UI_PRIMITIVES_TYPOGRAPHY_TEXT:`/ui/primitives/typography/text`,UI_SSR:`/ui/ssr`,UI_TESTING:`/ui/testing`,UI_THEMING:`/ui/theming`,UI_TOKENS:`/ui/tokens`,USER_GUIDE_AI_CAPABILITIES_AI_AGENTS:`/user-guide/ai/capabilities/ai-agents`,USER_GUIDE_AI_CAPABILITIES_AI_CHATBOT:`/user-guide/ai/capabilities/ai-chatbot`,USER_GUIDE_AI_CAPABILITIES_PERMISSIONS_ACCESS_CONTROL:`/user-guide/ai/capabilities/permissions-access-control`,USER_GUIDE_AI_HOW_TOS_AI_FAQ:`/user-guide/ai/how-tos/ai-faq`,USER_GUIDE_AI_OVERVIEW:`/user-guide/ai/overview`,USER_GUIDE_BILLING_CAPABILITIES_CREDITS:`/user-guide/billing/capabilities/credits`,USER_GUIDE_BILLING_CAPABILITIES_PRICING_PLANS:`/user-guide/billing/capabilities/pricing-plans`,USER_GUIDE_BILLING_CAPABILITIES_USAGE_LIMITS:`/user-guide/billing/capabilities/usage-limits`,USER_GUIDE_BILLING_HOW_TOS_BILLING_FAQ:`/user-guide/billing/how-tos/billing-faq`,USER_GUIDE_BILLING_OVERVIEW:`/user-guide/billing/overview`,USER_GUIDE_CALENDAR_EMAILS_CAPABILITIES_CALENDAR:`/user-guide/calendar-emails/capabilities/calendar`,USER_GUIDE_CALENDAR_EMAILS_CAPABILITIES_EMAIL_CHANNELS:`/user-guide/calendar-emails/capabilities/email-channels`,USER_GUIDE_CALENDAR_EMAILS_CAPABILITIES_MAILBOX:`/user-guide/calendar-emails/capabilities/mailbox`,USER_GUIDE_CALENDAR_EMAILS_HOW_TOS_CAN_I_BOOK_MEETINGS_FROM_TWENTY:`/user-guide/calendar-emails/how-tos/can-i-book-meetings-from-twenty`,USER_GUIDE_CALENDAR_EMAILS_HOW_TOS_CAN_I_SEND_EMAILS_FROM_TWENTY:`/user-guide/calendar-emails/how-tos/can-i-send-emails-from-twenty`,USER_GUIDE_CALENDAR_EMAILS_HOW_TOS_CAN_I_TRACK_EMAIL_ACTIVITY_ON_ALL_OBJECTS:`/user-guide/calendar-emails/how-tos/can-i-track-email-activity-on-all-objects`,USER_GUIDE_CALENDAR_EMAILS_HOW_TOS_CONNECT_SEVERAL_MAILBOXES_PER_USER:`/user-guide/calendar-emails/how-tos/connect-several-mailboxes-per-user`,USER_GUIDE_CALENDAR_EMAILS_HOW_TOS_FORWARD_A_SHARED_INBOX_FROM_ANY_MAIL_PROVIDER:`/user-guide/calendar-emails/how-tos/forward-a-shared-inbox-from-any-mail-provider`,USER_GUIDE_CALENDAR_EMAILS_HOW_TOS_FORWARD_A_SHARED_INBOX_FROM_GOOGLE_WORKSPACE:`/user-guide/calendar-emails/how-tos/forward-a-shared-inbox-from-google-workspace`,USER_GUIDE_CALENDAR_EMAILS_HOW_TOS_FORWARD_A_SHARED_INBOX_FROM_MICROSOFT_365:`/user-guide/calendar-emails/how-tos/forward-a-shared-inbox-from-microsoft-365`,USER_GUIDE_CALENDAR_EMAILS_HOW_TOS_I_DONT_SEE_EMAILS_ON_RECORDS:`/user-guide/calendar-emails/how-tos/i-dont-see-emails-on-records`,USER_GUIDE_CALENDAR_EMAILS_HOW_TOS_LIMIT_EMAILS_IMPORTED:`/user-guide/calendar-emails/how-tos/limit-emails-imported`,USER_GUIDE_CALENDAR_EMAILS_OVERVIEW:`/user-guide/calendar-emails/overview`,USER_GUIDE_DASHBOARDS_CAPABILITIES_CHART_SETTINGS:`/user-guide/dashboards/capabilities/chart-settings`,USER_GUIDE_DASHBOARDS_CAPABILITIES_DASHBOARDS:`/user-guide/dashboards/capabilities/dashboards`,USER_GUIDE_DASHBOARDS_CAPABILITIES_WIDGETS:`/user-guide/dashboards/capabilities/widgets`,USER_GUIDE_DASHBOARDS_HOW_TOS_DASHBOARDS_FAQ:`/user-guide/dashboards/how-tos/dashboards-faq`,USER_GUIDE_DASHBOARDS_HOW_TOS_WIDGET_FAQ:`/user-guide/dashboards/how-tos/widget-faq`,USER_GUIDE_DASHBOARDS_OVERVIEW:`/user-guide/dashboards/overview`,USER_GUIDE_DATA_MIGRATION_CAPABILITIES_ERROR_HANDLING:`/user-guide/data-migration/capabilities/error-handling`,USER_GUIDE_DATA_MIGRATION_CAPABILITIES_FIELD_MAPPING:`/user-guide/data-migration/capabilities/field-mapping`,USER_GUIDE_DATA_MIGRATION_CAPABILITIES_FILE_FORMATS:`/user-guide/data-migration/capabilities/file-formats`,USER_GUIDE_DATA_MIGRATION_CAPABILITIES_IMPORT_RELATIONS:`/user-guide/data-migration/capabilities/import-relations`,USER_GUIDE_DATA_MIGRATION_CAPABILITIES_UNIQUENESS_CONSTRAINTS:`/user-guide/data-migration/capabilities/uniqueness-constraints`,USER_GUIDE_DATA_MIGRATION_HOW_TOS_EXPORT_YOUR_DATA:`/user-guide/data-migration/how-tos/export-your-data`,USER_GUIDE_DATA_MIGRATION_HOW_TOS_FIX_IMPORT_ERRORS:`/user-guide/data-migration/how-tos/fix-import-errors`,USER_GUIDE_DATA_MIGRATION_HOW_TOS_IMPORT_COMPANIES_VIA_CSV:`/user-guide/data-migration/how-tos/import-companies-via-csv`,USER_GUIDE_DATA_MIGRATION_HOW_TOS_IMPORT_CONTACTS_VIA_CSV:`/user-guide/data-migration/how-tos/import-contacts-via-csv`,USER_GUIDE_DATA_MIGRATION_HOW_TOS_IMPORT_DATA_VIA_API:`/user-guide/data-migration/how-tos/import-data-via-api`,USER_GUIDE_DATA_MIGRATION_HOW_TOS_IMPORT_RELATIONS_BETWEEN_OBJECTS_VIA_CSV:`/user-guide/data-migration/how-tos/import-relations-between-objects-via-csv`,USER_GUIDE_DATA_MIGRATION_HOW_TOS_MIGRATING_FROM_OTHER_CRMS:`/user-guide/data-migration/how-tos/migrating-from-other-crms`,USER_GUIDE_DATA_MIGRATION_HOW_TOS_MIGRATING_FROM_SELF_HOSTED_TO_CLOUD:`/user-guide/data-migration/how-tos/migrating-from-self-hosted-to-cloud`,USER_GUIDE_DATA_MIGRATION_HOW_TOS_PREPARE_YOUR_CSV_FILES:`/user-guide/data-migration/how-tos/prepare-your-csv-files`,USER_GUIDE_DATA_MIGRATION_HOW_TOS_UPDATE_EXISTING_RECORDS_VIA_IMPORT:`/user-guide/data-migration/how-tos/update-existing-records-via-import`,USER_GUIDE_DATA_MIGRATION_OVERVIEW:`/user-guide/data-migration/overview`,USER_GUIDE_DATA_MODEL_CAPABILITIES_FIELDS:`/user-guide/data-model/capabilities/fields`,USER_GUIDE_DATA_MODEL_CAPABILITIES_OBJECTS:`/user-guide/data-model/capabilities/objects`,USER_GUIDE_DATA_MODEL_CAPABILITIES_RELATION_FIELDS:`/user-guide/data-model/capabilities/relation-fields`,USER_GUIDE_DATA_MODEL_HOW_TOS_CREATE_CUSTOM_FIELDS:`/user-guide/data-model/how-tos/create-custom-fields`,USER_GUIDE_DATA_MODEL_HOW_TOS_CREATE_CUSTOM_OBJECTS:`/user-guide/data-model/how-tos/create-custom-objects`,USER_GUIDE_DATA_MODEL_HOW_TOS_CREATE_MANY_TO_MANY_RELATIONS:`/user-guide/data-model/how-tos/create-many-to-many-relations`,USER_GUIDE_DATA_MODEL_HOW_TOS_CREATE_RELATION_FIELDS:`/user-guide/data-model/how-tos/create-relation-fields`,USER_GUIDE_DATA_MODEL_HOW_TOS_CUSTOMIZE_YOUR_DATA_MODEL:`/user-guide/data-model/how-tos/customize-your-data-model`,USER_GUIDE_DATA_MODEL_HOW_TOS_DATA_MODEL_FAQ:`/user-guide/data-model/how-tos/data-model-faq`,USER_GUIDE_DATA_MODEL_OVERVIEW:`/user-guide/data-model/overview`,USER_GUIDE_EMAIL_CAMPAIGNS_HOW_TOS_CREATE_A_CAMPAIGN_WITH_AI:`/user-guide/email-campaigns/how-tos/create-a-campaign-with-ai`,USER_GUIDE_EMAIL_CAMPAIGNS_HOW_TOS_EMAIL_CAMPAIGN_BEST_PRACTICES:`/user-guide/email-campaigns/how-tos/email-campaign-best-practices`,USER_GUIDE_EMAIL_CAMPAIGNS_HOW_TOS_MANAGE_UNSUBSCRIBES_AND_TOPICS:`/user-guide/email-campaigns/how-tos/manage-unsubscribes-and-topics`,USER_GUIDE_EMAIL_CAMPAIGNS_HOW_TOS_SEND_YOUR_FIRST_CAMPAIGN:`/user-guide/email-campaigns/how-tos/send-your-first-campaign`,USER_GUIDE_EMAIL_CAMPAIGNS_HOW_TOS_SET_UP_A_SENDING_DOMAIN:`/user-guide/email-campaigns/how-tos/set-up-a-sending-domain`,USER_GUIDE_EMAIL_CAMPAIGNS_OVERVIEW:`/user-guide/email-campaigns/overview`,USER_GUIDE_INTRODUCTION:`/user-guide/introduction`,USER_GUIDE_LAYOUT_CAPABILITIES_NAVIGATION:`/user-guide/layout/capabilities/navigation`,USER_GUIDE_LAYOUT_CAPABILITIES_RECORD_PAGES:`/user-guide/layout/capabilities/record-pages`,USER_GUIDE_LAYOUT_OVERVIEW:`/user-guide/layout/overview`,USER_GUIDE_LEGAL_HOW_TOS_LEGAL_FAQ:`/user-guide/legal/how-tos/legal-faq`,USER_GUIDE_LEGAL_OVERVIEW:`/user-guide/legal/overview`,USER_GUIDE_PERMISSIONS_ACCESS_CAPABILITIES_PERMISSIONS:`/user-guide/permissions-access/capabilities/permissions`,USER_GUIDE_PERMISSIONS_ACCESS_CAPABILITIES_SSO_CONFIGURATION:`/user-guide/permissions-access/capabilities/sso-configuration`,USER_GUIDE_PERMISSIONS_ACCESS_HOW_TOS_PERMISSIONS_FAQ:`/user-guide/permissions-access/how-tos/permissions-faq`,USER_GUIDE_PERMISSIONS_ACCESS_OVERVIEW:`/user-guide/permissions-access/overview`,USER_GUIDE_SETTINGS_CAPABILITIES_COMMUNITY_SETTINGS:`/user-guide/settings/capabilities/community-settings`,USER_GUIDE_SETTINGS_CAPABILITIES_DOMAINS_SETTINGS:`/user-guide/settings/capabilities/domains-settings`,USER_GUIDE_SETTINGS_CAPABILITIES_EXPERIENCE_SETTINGS:`/user-guide/settings/capabilities/experience-settings`,USER_GUIDE_SETTINGS_CAPABILITIES_MEMBER_MANAGEMENT:`/user-guide/settings/capabilities/member-management`,USER_GUIDE_SETTINGS_CAPABILITIES_PROFILE_SETTINGS:`/user-guide/settings/capabilities/profile-settings`,USER_GUIDE_SETTINGS_CAPABILITIES_WORKSPACE_SETTINGS:`/user-guide/settings/capabilities/workspace-settings`,USER_GUIDE_SETTINGS_HOW_TOS_SETTINGS_FAQ:`/user-guide/settings/how-tos/settings-faq`,USER_GUIDE_SETTINGS_OVERVIEW:`/user-guide/settings/overview`,USER_GUIDE_VIEWS_PIPELINES_CAPABILITIES_CALENDAR_VIEW:`/user-guide/views-pipelines/capabilities/calendar-view`,USER_GUIDE_VIEWS_PIPELINES_CAPABILITIES_FIELDS_AND_COLUMNS:`/user-guide/views-pipelines/capabilities/fields-and-columns`,USER_GUIDE_VIEWS_PIPELINES_CAPABILITIES_FILTERS_AND_SORTING:`/user-guide/views-pipelines/capabilities/filters-and-sorting`,USER_GUIDE_VIEWS_PIPELINES_CAPABILITIES_KANBAN_VIEWS:`/user-guide/views-pipelines/capabilities/kanban-views`,USER_GUIDE_VIEWS_PIPELINES_CAPABILITIES_TABLE_VIEWS:`/user-guide/views-pipelines/capabilities/table-views`,USER_GUIDE_VIEWS_PIPELINES_CAPABILITIES_VIEW_SETTINGS:`/user-guide/views-pipelines/capabilities/view-settings`,USER_GUIDE_VIEWS_PIPELINES_HOW_TOS_CREATE_A_CALENDAR_VIEW_FOR_TASKS_DUE:`/user-guide/views-pipelines/how-tos/create-a-calendar-view-for-tasks-due`,USER_GUIDE_VIEWS_PIPELINES_HOW_TOS_CREATE_A_KANBAN_VIEW_FOR_PROJECTS:`/user-guide/views-pipelines/how-tos/create-a-kanban-view-for-projects`,USER_GUIDE_VIEWS_PIPELINES_HOW_TOS_CREATE_A_TABLE_VIEW_WITH_GROUPING:`/user-guide/views-pipelines/how-tos/create-a-table-view-with-grouping`,USER_GUIDE_VIEWS_PIPELINES_HOW_TOS_RESTRICT_ACCESS_TO_YOUR_VIEW:`/user-guide/views-pipelines/how-tos/restrict-access-to-your-view`,USER_GUIDE_VIEWS_PIPELINES_HOW_TOS_SET_UP_A_SALES_PIPELINE:`/user-guide/views-pipelines/how-tos/set-up-a-sales-pipeline`,USER_GUIDE_VIEWS_PIPELINES_HOW_TOS_SHOW_EXPECTED_AMOUNT_IN_PIPELINE:`/user-guide/views-pipelines/how-tos/show-expected-amount-in-pipeline`,USER_GUIDE_VIEWS_PIPELINES_HOW_TOS_TRACK_TIME_IN_STAGE:`/user-guide/views-pipelines/how-tos/track-time-in-stage`,USER_GUIDE_WORKFLOWS_CAPABILITIES_SEND_EMAILS_FROM_WORKFLOWS:`/user-guide/workflows/capabilities/send-emails-from-workflows`,USER_GUIDE_WORKFLOWS_CAPABILITIES_USE_BRANCHES_IN_WORKFLOWS:`/user-guide/workflows/capabilities/use-branches-in-workflows`,USER_GUIDE_WORKFLOWS_CAPABILITIES_USE_ITERATOR:`/user-guide/workflows/capabilities/use-iterator`,USER_GUIDE_WORKFLOWS_CAPABILITIES_WORKFLOW_ACTIONS:`/user-guide/workflows/capabilities/workflow-actions`,USER_GUIDE_WORKFLOWS_CAPABILITIES_WORKFLOW_BRANCHES:`/user-guide/workflows/capabilities/workflow-branches`,USER_GUIDE_WORKFLOWS_CAPABILITIES_WORKFLOW_CREDITS:`/user-guide/workflows/capabilities/workflow-credits`,USER_GUIDE_WORKFLOWS_CAPABILITIES_WORKFLOW_RUNS:`/user-guide/workflows/capabilities/workflow-runs`,USER_GUIDE_WORKFLOWS_CAPABILITIES_WORKFLOW_TRIGGERS:`/user-guide/workflows/capabilities/workflow-triggers`,USER_GUIDE_WORKFLOWS_CAPABILITIES_WORKFLOW_VERSIONS:`/user-guide/workflows/capabilities/workflow-versions`,USER_GUIDE_WORKFLOWS_HOW_TOS_ADVANCED_CONFIGURATIONS_HANDLE_ARRAYS_IN_CODE_ACTIONS:`/user-guide/workflows/how-tos/advanced-configurations/handle-arrays-in-code-actions`,USER_GUIDE_WORKFLOWS_HOW_TOS_CONNECT_TO_OTHER_TOOLS_BRING_PRODUCT_DATA_IN_TWENTY:`/user-guide/workflows/how-tos/connect-to-other-tools/bring-product-data-in-twenty`,USER_GUIDE_WORKFLOWS_HOW_TOS_CONNECT_TO_OTHER_TOOLS_BRING_TYPEFORM_SUBMISSIONS_IN_TWENTY:`/user-guide/workflows/how-tos/connect-to-other-tools/bring-typeform-submissions-in-twenty`,USER_GUIDE_WORKFLOWS_HOW_TOS_CONNECT_TO_OTHER_TOOLS_GENERATE_PDF_FROM_TWENTY:`/user-guide/workflows/how-tos/connect-to-other-tools/generate-pdf-from-twenty`,USER_GUIDE_WORKFLOWS_HOW_TOS_CONNECT_TO_OTHER_TOOLS_GENERATE_QUOTE_OR_INVOICE_FROM_TWENTY:`/user-guide/workflows/how-tos/connect-to-other-tools/generate-quote-or-invoice-from-twenty`,USER_GUIDE_WORKFLOWS_HOW_TOS_CONNECT_TO_OTHER_TOOLS_SET_UP_A_WEBHOOK_TRIGGER:`/user-guide/workflows/how-tos/connect-to-other-tools/set-up-a-webhook-trigger`,USER_GUIDE_WORKFLOWS_HOW_TOS_CRM_AUTOMATIONS_AUTO_REPLY_TO_INBOUND_EMAILS:`/user-guide/workflows/how-tos/crm-automations/auto-reply-to-inbound-emails`,USER_GUIDE_WORKFLOWS_HOW_TOS_CRM_AUTOMATIONS_CLOSED_WON_AUTOMATIONS:`/user-guide/workflows/how-tos/crm-automations/closed-won-automations`,USER_GUIDE_WORKFLOWS_HOW_TOS_CRM_AUTOMATIONS_DETECT_STALE_OPPORTUNITIES:`/user-guide/workflows/how-tos/crm-automations/detect-stale-opportunities`,USER_GUIDE_WORKFLOWS_HOW_TOS_CRM_AUTOMATIONS_DISPLAY_NUMBER_OF_EMAILS_RECEIVED:`/user-guide/workflows/how-tos/crm-automations/display-number-of-emails-received`,USER_GUIDE_WORKFLOWS_HOW_TOS_CRM_AUTOMATIONS_DISPLAY_RELATED_RECORD_DATA:`/user-guide/workflows/how-tos/crm-automations/display-related-record-data`,USER_GUIDE_WORKFLOWS_HOW_TOS_CRM_AUTOMATIONS_FORMULA_FIELDS:`/user-guide/workflows/how-tos/crm-automations/formula-fields`,USER_GUIDE_WORKFLOWS_HOW_TOS_CRM_AUTOMATIONS_NOTIFY_TEAMMATES_OF_NOTE_TO_REVIEW:`/user-guide/workflows/how-tos/crm-automations/notify-teammates-of-note-to-review`,USER_GUIDE_WORKFLOWS_HOW_TOS_CRM_AUTOMATIONS_SEND_EMAIL_ALERTS_WITH_TASKS_DUE:`/user-guide/workflows/how-tos/crm-automations/send-email-alerts-with-tasks-due`,USER_GUIDE_WORKFLOWS_HOW_TOS_NEED_MORE_HELP_PROFESSIONAL_SERVICES:`/user-guide/workflows/how-tos/need-more-help/professional-services`,USER_GUIDE_WORKFLOWS_HOW_TOS_NEED_MORE_HELP_WORKFLOW_TROUBLESHOOTING:`/user-guide/workflows/how-tos/need-more-help/workflow-troubleshooting`,USER_GUIDE_WORKFLOWS_HOW_TOS_NEED_MORE_HELP_WORKFLOWS_FAQ:`/user-guide/workflows/how-tos/need-more-help/workflows-faq`,USER_GUIDE_WORKFLOWS_OVERVIEW:`/user-guide/workflows/overview`}).GETTING_STARTED_INTRODUCTION,X.GOOGLE,X.MICROSOFT,X.IMAP_SMTP_CALDAV,X.GOOGLE,X.MICROSOFT,X.IMAP_SMTP_CALDAV,X.EMAIL_GROUP,Y.TS_VECTOR,Y.RAW_JSON,Y.FILES,Y.POSITION,Y.ACTOR,Y.ADDRESS,Y.ARRAY,Y.BOOLEAN,Y.CURRENCY,Y.DATE,Y.DATE_TIME,Y.EMAILS,Y.FILES,Y.FULL_NAME,Y.LINKS,Y.MORPH_RELATION,Y.MULTI_SELECT,Y.NUMBER,Y.NUMERIC,Y.PHONES,Y.POSITION,Y.RATING,Y.RAW_JSON,Y.RELATION,Y.RICH_TEXT,Y.SELECT,Y.TEXT,Y.TS_VECTOR,Y.UUID,Y.TS_VECTOR,Y.ARRAY,Y.MULTI_SELECT,Y.RAW_JSON,Z.DAY,Z.WEEK,Z.MONTH,Z.QUARTER,Z.YEAR,Y.FILES,Y.LINKS,Y.TEXT,Y.FULL_NAME,Y.UUID;var $=function(e){return e.API_KEYS_AND_WEBHOOKS=`API_KEYS_AND_WEBHOOKS`,e.WORKSPACE=`WORKSPACE`,e.WORKSPACE_MEMBERS=`WORKSPACE_MEMBERS`,e.ROLES=`ROLES`,e.DATA_MODEL=`DATA_MODEL`,e.SECURITY=`SECURITY`,e.WORKFLOWS=`WORKFLOWS`,e.IMPERSONATE=`IMPERSONATE`,e.SSO_BYPASS=`SSO_BYPASS`,e.APPLICATIONS=`APPLICATIONS`,e.MARKETPLACE_APPS=`MARKETPLACE_APPS`,e.LAYOUTS=`LAYOUTS`,e.BILLING=`BILLING`,e.AI_SETTINGS=`AI_SETTINGS`,e.AI=`AI`,e.VIEWS=`VIEWS`,e.UPLOAD_FILE=`UPLOAD_FILE`,e.DOWNLOAD_FILE=`DOWNLOAD_FILE`,e.SEND_EMAIL_TOOL=`SEND_EMAIL_TOOL`,e.CREATE_CALENDAR_EVENT_TOOL=`CREATE_CALENDAR_EVENT_TOOL`,e.HTTP_REQUEST_TOOL=`HTTP_REQUEST_TOOL`,e.CODE_INTERPRETER_TOOL=`CODE_INTERPRETER_TOOL`,e.IMPORT_CSV=`IMPORT_CSV`,e.EXPORT_CSV=`EXPORT_CSV`,e.CONNECTED_ACCOUNTS=`CONNECTED_ACCOUNTS`,e.PROFILE_INFORMATION=`PROFILE_INFORMATION`,e}({});Kc.EMAIL;var gl={API_KEYS_AND_WEBHOOKS:`beb99803-9a0e-588d-9c4b-3dd14d9cdf21`,WORKSPACE:`86a58859-a539-5fa8-ba18-a6aaddc811b6`,WORKSPACE_MEMBERS:`ec342166-2df7-53e7-aa9b-64992d6cb35f`,ROLES:`80f1e5ab-484c-5660-a5a1-0ee7413d8190`,DATA_MODEL:`f0c08013-3c9a-5489-bd45-a641fe5f085d`,SECURITY:`4a8b6016-1d3d-5c94-bbe8-a74c5f32335a`,WORKFLOWS:`6189e7bd-4051-5752-b6b1-5f31358fbaf1`,IMPERSONATE:`dd2274d1-bbd5-551d-bcf2-3147539cef11`,SSO_BYPASS:`2e9cfdc0-4669-58ab-b241-b6c3c14d96df`,APPLICATIONS:`9faa55f7-2606-566b-9e1d-aefbedbd0136`,MARKETPLACE_APPS:`3a37e2f5-d3e4-56d6-b541-adf0237468ff`,LAYOUTS:`458d1ee5-ba12-5f4e-9d17-6f8c11fcd7fd`,BILLING:`24b66701-ed97-51e4-aa63-794e1b31414c`,AI_SETTINGS:`e8cc4a30-c120-5925-8f5d-73d6a2247fee`,AI:`1c7f09a7-367d-568b-a0e8-c274eccd6ee3`,VIEWS:`c68354c4-535d-53a9-848a-e3a6774b5fb8`,UPLOAD_FILE:`dc6931a9-44bd-5164-a983-3db5db837f54`,DOWNLOAD_FILE:`6edf252f-228e-5e2f-9706-7bab7a796fd3`,SEND_EMAIL_TOOL:`19f382a8-689d-5792-a18c-737f0ce9025f`,CREATE_CALENDAR_EVENT_TOOL:`5b8c104e-24d3-4e89-986b-1d9208df6cf4`,HTTP_REQUEST_TOOL:`1bf49cf1-bb8f-5eb9-809a-5f34ea79fc6a`,CODE_INTERPRETER_TOOL:`11f31c3a-7042-54b7-a2dd-ae31dd9e9fa2`,IMPORT_CSV:`c4912536-a4db-5af9-85ac-be2919c24c5e`,EXPORT_CSV:`88efced9-ca6d-5316-a695-f1b9158e7370`,CONNECTED_ACCOUNTS:`e5f63b2d-5369-5df6-8f32-a8bd9e79e653`,PROFILE_INFORMATION:`7c13f23f-78d8-5e7d-8963-a7c8772fb4e8`},_l=[$.AI,$.VIEWS,$.UPLOAD_FILE,$.DOWNLOAD_FILE,$.SEND_EMAIL_TOOL,$.CREATE_CALENDAR_EVENT_TOOL,$.HTTP_REQUEST_TOOL,$.IMPORT_CSV,$.EXPORT_CSV,$.CONNECTED_ACCOUNTS,$.PROFILE_INFORMATION,$.CODE_INTERPRETER_TOOL],vl={[Y.CURRENCY]:[`amountMicros`],[Y.FULL_NAME]:[`firstName`,`lastName`],[Y.LINKS]:[`primaryLinkUrl`],[Y.EMAILS]:[`primaryEmail`],[Y.PHONES]:[`primaryPhoneNumber`]};[`Condition that must be true for a record to be saved. When it is false, the write is rejected and the message is shown.`,`Reference fields by name, as returned by get_field_metadata. Use dot access for a composite field part (amount.amountMicros, name.firstName) and for a field of a many-to-one related record (company.name), never brackets.`,`Compare select and multi-select fields with option values, e.g. stage == 'CUSTOMER'. Currency amounts are in micros: amount.amountMicros > 1000000000 means more than 1000.`,`Write text in single quotes. Operators: == != < <= > >= + - * / and or not, and value in [a, b]. now is the date and time of the write; true and false are booleans.`,`Functions: isDefined(value) is true when the value is set, even to an empty text; isEmpty(value) is true when the value is not set, an empty text, an empty list, or a composite field with every part empty; isNonEmptyString(value); includes(listOrText, value) is true when a multi-select or array contains the value, or a text contains a text, case-sensitive; arrayLength(list).`,`To require a field, use not isEmpty(field).`].join(` `);var yl=new WeakSet,bl=new WeakMap,xl=e=>t.t(e)&&!(typeof e==`object`&&yl.has(e)),Sl=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Cl=e=>{if(!t.t(e)||e===``)return!0;if(Array.isArray(e))return e.length===0;if(!Sl(e)||e instanceof Date)return!1;if(yl.has(e))return!0;let n=bl.get(e);if(n===Y.RICH_TEXT)return!(0,pl.isNonEmptyString)(e.markdown)||e.markdown.trim().length===0;let r=t.t(n)?vl[n]:void 0;return(t.t(r)?r.map(t=>e[t]):Object.values(e)).every(Cl)},wl={isDefined:{signature:`isDefined(value)`,evaluate:xl},isEmpty:{signature:`isEmpty(value)`,evaluate:Cl},isNonEmptyString:{signature:`isNonEmptyString(value)`,evaluate:e=>(0,pl.isNonEmptyString)(e)},includes:{signature:`includes(listOrText, value)`,evaluate:(e,t)=>(Array.isArray(e)||(0,pl.isString)(e)&&(0,pl.isString)(t))&&e.includes(t)},arrayLength:{signature:`arrayLength(list)`,evaluate:e=>Array.isArray(e)?e.length:0}},Tl={[Q.TABLE]:`IconTable`,[Q.KANBAN]:`IconLayoutKanban`,[Q.CALENDAR]:`IconCalendar`,[Q.LIST]:`IconList`,[Q.FIELDS_WIDGET]:`IconListDetails`,[Q.TABLE_WIDGET]:`IconTable`,[Q.KANBAN_WIDGET]:`IconLayoutKanban`,[Q.LIST_WIDGET]:`IconList`,[Q.CALENDAR_WIDGET]:`IconCalendar`};Object.defineProperty(exports,"$",{enumerable:!0,get:function(){return Rs}}),Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return nl}}),Object.defineProperty(exports,"B",{enumerable:!0,get:function(){return Mc}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return sl}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return Yc}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return Rc}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"G",{enumerable:!0,get:function(){return Bs}}),Object.defineProperty(exports,"H",{enumerable:!0,get:function(){return nc}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"J",{enumerable:!0,get:function(){return os}}),Object.defineProperty(exports,"K",{enumerable:!0,get:function(){return As}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return el}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return Jc}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return qc}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return zc}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return Gc}}),Object.defineProperty(exports,"Q",{enumerable:!0,get:function(){return Ws}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return Zc}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return ll}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return Xc}}),Object.defineProperty(exports,"U",{enumerable:!0,get:function(){return Ms}}),Object.defineProperty(exports,"V",{enumerable:!0,get:function(){return Ts}}),Object.defineProperty(exports,"W",{enumerable:!0,get:function(){return Ps}}),Object.defineProperty(exports,"X",{enumerable:!0,get:function(){return Dc}}),Object.defineProperty(exports,"Y",{enumerable:!0,get:function(){return Os}}),Object.defineProperty(exports,"Z",{enumerable:!0,get:function(){return ic}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return fl}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return hl}}),Object.defineProperty(exports,"at",{enumerable:!0,get:function(){return es}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return Qc}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return wl}}),Object.defineProperty(exports,"ct",{enumerable:!0,get:function(){return Is}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return ol}}),Object.defineProperty(exports,"dt",{enumerable:!0,get:function(){return Mt}}),Object.defineProperty(exports,"et",{enumerable:!0,get:function(){return Es}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return $c}}),Object.defineProperty(exports,"ft",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return al}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return cl}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return xl}}),Object.defineProperty(exports,"it",{enumerable:!0,get:function(){return Us}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return Bc}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return il}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return rl}}),Object.defineProperty(exports,"lt",{enumerable:!0,get:function(){return cs}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return ul}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Sl}}),Object.defineProperty(exports,"nt",{enumerable:!0,get:function(){return jc}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return gl}}),Object.defineProperty(exports,"ot",{enumerable:!0,get:function(){return Qs}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return Wc}}),Object.defineProperty(exports,"q",{enumerable:!0,get:function(){return Js}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Tl}}),Object.defineProperty(exports,"rt",{enumerable:!0,get:function(){return ec}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return ml}}),Object.defineProperty(exports,"st",{enumerable:!0,get:function(){return Ks}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return _l}}),Object.defineProperty(exports,"tt",{enumerable:!0,get:function(){return Hs}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return Hc}}),Object.defineProperty(exports,"ut",{enumerable:!0,get:function(){return aa}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return dl}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return Uc}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return tl}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return Vc}});
@@ -0,0 +1 @@
1
+ const e=require("./rolldown-runtime-mLOUI7ql.cjs"),t=require("./capitalize-DFPVt1IM-CF4z3TZK.cjs");var n=e.t(((e,t)=>{var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i=`\\ud800-\\udfff`,a=`\\u0300-\\u036f\\ufe20-\\ufe23`,o=`\\u20d0-\\u20f0`,s=`\\u2700-\\u27bf`,c=`a-z\\xdf-\\xf6\\xf8-\\xff`,ee=`\\xac\\xb1\\xd7\\xf7`,te=`\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf`,ne=`\\u2000-\\u206f`,l=` \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000`,u=`A-Z\\xc0-\\xd6\\xd8-\\xde`,d=`\\ufe0e\\ufe0f`,f=ee+te+ne+l,p=`['’]`,re=`[`+i+`]`,m=`[`+f+`]`,h=`[`+a+o+`]`,g=`\\d+`,ie=`[`+s+`]`,_=`[`+c+`]`,v=`[^`+i+f+g+s+c+u+`]`,y=`\\ud83c[\\udffb-\\udfff]`,ae=`(?:`+h+`|`+y+`)`,b=`[^`+i+`]`,x=`(?:\\ud83c[\\udde6-\\uddff]){2}`,S=`[\\ud800-\\udbff][\\udc00-\\udfff]`,C=`[`+u+`]`,w=`\\u200d`,T=`(?:`+_+`|`+v+`)`,oe=`(?:`+C+`|`+v+`)`,E=`(?:`+p+`(?:d|ll|m|re|s|t|ve))?`,D=`(?:`+p+`(?:D|LL|M|RE|S|T|VE))?`,O=ae+`?`,k=`[`+d+`]?`,A=`(?:`+w+`(?:`+[b,x,S].join(`|`)+`)`+k+O+`)*`,j=k+O+A,M=`(?:`+[ie,x,S].join(`|`)+`)`+j,N=`(?:`+[b+h+`?`,h,x,S,re].join(`|`)+`)`,P=RegExp(p,`g`),F=RegExp(h,`g`),I=RegExp(y+`(?=`+y+`)|`+N+j,`g`),L=RegExp([C+`?`+_+`+`+E+`(?=`+[m,C,`$`].join(`|`)+`)`,oe+`+`+D+`(?=`+[m,C+T,`$`].join(`|`)+`)`,C+`?`+T+`+`+E,C+`+`+D,g,M].join(`|`),`g`),R=RegExp(`[`+w+i+a+o+d+`]`),z=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,B={À:`A`,Á:`A`,Â:`A`,Ã:`A`,Ä:`A`,Å:`A`,à:`a`,á:`a`,â:`a`,ã:`a`,ä:`a`,å:`a`,Ç:`C`,ç:`c`,Ð:`D`,ð:`d`,È:`E`,É:`E`,Ê:`E`,Ë:`E`,è:`e`,é:`e`,ê:`e`,ë:`e`,Ì:`I`,Í:`I`,Î:`I`,Ï:`I`,ì:`i`,í:`i`,î:`i`,ï:`i`,Ñ:`N`,ñ:`n`,Ò:`O`,Ó:`O`,Ô:`O`,Õ:`O`,Ö:`O`,Ø:`O`,ò:`o`,ó:`o`,ô:`o`,õ:`o`,ö:`o`,ø:`o`,Ù:`U`,Ú:`U`,Û:`U`,Ü:`U`,ù:`u`,ú:`u`,û:`u`,ü:`u`,Ý:`Y`,ý:`y`,ÿ:`y`,Æ:`Ae`,æ:`ae`,Þ:`Th`,þ:`th`,ß:`ss`,Ā:`A`,Ă:`A`,Ą:`A`,ā:`a`,ă:`a`,ą:`a`,Ć:`C`,Ĉ:`C`,Ċ:`C`,Č:`C`,ć:`c`,ĉ:`c`,ċ:`c`,č:`c`,Ď:`D`,Đ:`D`,ď:`d`,đ:`d`,Ē:`E`,Ĕ:`E`,Ė:`E`,Ę:`E`,Ě:`E`,ē:`e`,ĕ:`e`,ė:`e`,ę:`e`,ě:`e`,Ĝ:`G`,Ğ:`G`,Ġ:`G`,Ģ:`G`,ĝ:`g`,ğ:`g`,ġ:`g`,ģ:`g`,Ĥ:`H`,Ħ:`H`,ĥ:`h`,ħ:`h`,Ĩ:`I`,Ī:`I`,Ĭ:`I`,Į:`I`,İ:`I`,ĩ:`i`,ī:`i`,ĭ:`i`,į:`i`,ı:`i`,Ĵ:`J`,ĵ:`j`,Ķ:`K`,ķ:`k`,ĸ:`k`,Ĺ:`L`,Ļ:`L`,Ľ:`L`,Ŀ:`L`,Ł:`L`,ĺ:`l`,ļ:`l`,ľ:`l`,ŀ:`l`,ł:`l`,Ń:`N`,Ņ:`N`,Ň:`N`,Ŋ:`N`,ń:`n`,ņ:`n`,ň:`n`,ŋ:`n`,Ō:`O`,Ŏ:`O`,Ő:`O`,ō:`o`,ŏ:`o`,ő:`o`,Ŕ:`R`,Ŗ:`R`,Ř:`R`,ŕ:`r`,ŗ:`r`,ř:`r`,Ś:`S`,Ŝ:`S`,Ş:`S`,Š:`S`,ś:`s`,ŝ:`s`,ş:`s`,š:`s`,Ţ:`T`,Ť:`T`,Ŧ:`T`,ţ:`t`,ť:`t`,ŧ:`t`,Ũ:`U`,Ū:`U`,Ŭ:`U`,Ů:`U`,Ű:`U`,Ų:`U`,ũ:`u`,ū:`u`,ŭ:`u`,ů:`u`,ű:`u`,ų:`u`,Ŵ:`W`,ŵ:`w`,Ŷ:`Y`,ŷ:`y`,Ÿ:`Y`,Ź:`Z`,Ż:`Z`,Ž:`Z`,ź:`z`,ż:`z`,ž:`z`,IJ:`IJ`,ij:`ij`,Œ:`Oe`,œ:`oe`,ʼn:`'n`,ſ:`ss`},V=typeof global==`object`&&global&&global.Object===Object&&global,H=typeof self==`object`&&self&&self.Object===Object&&self,U=V||H||Function(`return this`)();function W(e,t,n,r){var i=-1,a=e?e.length:0;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function G(e){return e.split(``)}function K(e){return e.match(n)||[]}function q(e){return function(t){return e?.[t]}}var se=q(B);function J(e){return R.test(e)}function ce(e){return z.test(e)}function le(e){return J(e)?ue(e):G(e)}function ue(e){return e.match(I)||[]}function de(e){return e.match(L)||[]}var fe=Object.prototype.toString,Y=U.Symbol,X=Y?Y.prototype:void 0,Z=X?X.toString:void 0;function pe(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function me(e){if(typeof e==`string`)return e;if(ve(e))return Z?Z.call(e):``;var t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function he(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:pe(e,t,n)}function ge(e){return function(t){t=$(t);var n=J(t)?le(t):void 0,r=n?n[0]:t.charAt(0),i=n?he(n,1).join(``):t.slice(1);return r[e]()+i}}function _e(e){return function(t){return W(Se(ye(t).replace(P,``)),e,``)}}function Q(e){return!!e&&typeof e==`object`}function ve(e){return typeof e==`symbol`||Q(e)&&fe.call(e)==`[object Symbol]`}function $(e){return e==null?``:me(e)}function ye(e){return e=$(e),e&&e.replace(r,se).replace(F,``)}var be=_e(function(e,t,n){return e+(n?` `:``)+xe(t)}),xe=ge(`toUpperCase`);function Se(e,t,n){return e=$(e),t=n?void 0:t,t===void 0?ce(e)?de(e):K(e):e.match(t)||[]}t.exports=be})),r=e.r(n()),i=e=>t.t((0,r.default)(e).toLowerCase());Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
@@ -1 +1 @@
1
- const e=require("./cli-error-CSsayo0u.cjs");var t=({universalIdentifier:t,apiUrl:n,hint:r})=>new e.t({code:`APP_NOT_INSTALLED`,exitCode:e.n.NOT_FOUND,message:`No app with universal identifier ${t} is installed on ${n}.`,hint:r,details:{universalIdentifier:t}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
1
+ const e=require("./cli-error-CrUD8uMp.cjs");var t=({universalIdentifier:t,apiUrl:n,hint:r})=>new e.t({code:`APP_NOT_INSTALLED`,exitCode:e.n.NOT_FOUND,message:`No app with universal identifier ${t} is installed on ${n}.`,hint:r,details:{universalIdentifier:t}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
@@ -1 +1 @@
1
- const e=require("./cli-error-CSsayo0u.cjs");var t=()=>new e.t({code:`CANCELLED`,message:`Cancelled.`,exitCode:e.n.CANCELLED});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
1
+ const e=require("./cli-error-CrUD8uMp.cjs");var t=()=>new e.t({code:`CANCELLED`,message:`Cancelled.`,exitCode:e.n.CANCELLED});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
@@ -0,0 +1 @@
1
+ const e=require("./build--4zYt4wd.cjs"),t=require("./isDefined-Dtu5EYqP-CJctgvfE.cjs"),n=require("./constants-Bod2d_GP-CQVvzM4m.cjs"),r=require("./cli-error-CrUD8uMp.cjs"),i=require("./target-environment-variable.constant-D7z8AihP.cjs");var a=e.t(),o=e=>{if(!t.t(e.remoteName))return`Check ${i.t.API_KEY}.`;let n=e.credentialKind===`apiKey`?` --with-token`:``;return`Sign in again: twenty auth login --remote ${e.remoteName}${n}`},s=[`content-type`,`retry-after`,`x-request-id`,`x-ratelimit-limit`,`x-ratelimit-remaining`,`x-ratelimit-reset`],c=e=>Object.fromEntries(s.flatMap(n=>{let r=e.get(n);return t.t(r)?[[n,r]]:[]})),l=e=>{if(!n.n(e))return;let t=e.messages;return(0,a.isArray)(t)&&(0,a.isNonEmptyString)(t[0])?t[0]:(0,a.isNonEmptyString)(e.message)?e.message:void 0},u=({status:e,headers:t,body:n,target:i})=>{let s=l(n),u={status:e,headers:c(t),body:n};return e===401?new r.t({code:`AUTH_REQUIRED`,exitCode:r.n.AUTHENTICATION,message:`${i.apiUrl} rejected the credentials.`,hint:o(i),details:u}):e===403?new r.t({code:`PERMISSION_DENIED`,exitCode:r.n.AUTHENTICATION,message:s??`Access denied.`,details:u}):e===404?new r.t({code:`NOT_FOUND`,exitCode:r.n.NOT_FOUND,message:s??`Not found.`,details:u}):e===409?new r.t({code:`CONFLICT`,exitCode:r.n.CONFLICT,message:s??`The request conflicts with the current state.`,details:u}):new r.t({code:`HTTP_ERROR`,message:`The server answered ${e}${(0,a.isNonEmptyString)(s)?`: ${s}`:`.`}`,details:u})};Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return u}});