db-studio 2.0.1 → 2.2.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 (202) hide show
  1. package/dist/index.js +79 -79
  2. package/dist/index.js.map +1 -1
  3. package/dist/web-dist/assets/_pathlessLayout-DSqP7uLw.js +1 -0
  4. package/dist/web-dist/assets/_pathlessLayout-sBYxFR0u.js +2 -0
  5. package/dist/web-dist/assets/_queryId-D-e6Pm3D.js +1 -0
  6. package/dist/web-dist/assets/_table-CUkeoJ5r.js +1 -0
  7. package/dist/web-dist/assets/_table-CuzwG7mZ.js +1 -0
  8. package/dist/web-dist/assets/_table-ziU6yws2.js +1 -0
  9. package/dist/web-dist/assets/{abap-DQayJW6v.js → abap-CNHfI6UP.js} +1 -1
  10. package/dist/web-dist/assets/{apex-Djzlm7in.js → apex-DTJWTIPK.js} +1 -1
  11. package/dist/web-dist/assets/{azcli-Bbikkqe4.js → azcli-Degrf7_O.js} +1 -1
  12. package/dist/web-dist/assets/{badge-HtbO9hWg.js → badge-BfsYSaL9.js} +1 -1
  13. package/dist/web-dist/assets/{bat-BUFda2RT.js → bat-og3u3-iX.js} +1 -1
  14. package/dist/web-dist/assets/{bicep-CuUgDHWX.js → bicep-DWKWUTZk.js} +1 -1
  15. package/dist/web-dist/assets/{browser-B6gU7HWo.js → browser-ZSYFt_6v.js} +1 -1
  16. package/dist/web-dist/assets/bundle-mjs-DBtz6MiX.js +1 -0
  17. package/dist/web-dist/assets/{cameligo-DITobApP.js → cameligo-wkA_VlQe.js} +1 -1
  18. package/dist/web-dist/assets/chat-sidebar-BzjjNUcW.js +161 -0
  19. package/dist/web-dist/assets/{clojure-DTFcSI8F.js → clojure-DOzhadKJ.js} +1 -1
  20. package/dist/web-dist/assets/{code-editor-BpsclD2u.js → code-editor-BMXfdFhg.js} +4 -4
  21. package/dist/web-dist/assets/{codicon-Brq4_Ui5.ttf → codicon-DF1abBS2.ttf} +0 -0
  22. package/dist/web-dist/assets/{coffee-CmIRg0oP.js → coffee-CS5CzV5M.js} +1 -1
  23. package/dist/web-dist/assets/connect-DGQjyh4c.js +1 -0
  24. package/dist/web-dist/assets/constants-iNJwkB3Z.js +20 -0
  25. package/dist/web-dist/assets/{cpp-BwBWpZT1.js → cpp-BMgiE7AJ.js} +1 -1
  26. package/dist/web-dist/assets/{csharp-BnWK75m3.js → csharp-Bsvbb6s9.js} +1 -1
  27. package/dist/web-dist/assets/{csp-Dohj3XYI.js → csp-BrZ2q231.js} +1 -1
  28. package/dist/web-dist/assets/{css-DN4GbnxY.js → css-Uqgocp1T.js} +1 -1
  29. package/dist/web-dist/assets/{css.worker-B-fFSVTK.js → css.worker-bHD0dlJO.js} +1507 -1453
  30. package/dist/web-dist/assets/cssMode-BoXwzMyE.js +1 -0
  31. package/dist/web-dist/assets/{cypher-CKAK8eD4.js → cypher-BtFHfHba.js} +1 -1
  32. package/dist/web-dist/assets/{dart-imWXBTLy.js → dart-C5lyYd0g.js} +1 -1
  33. package/dist/web-dist/assets/database.store-BbWvMDJ7.js +57 -0
  34. package/dist/web-dist/assets/dist-BbZuOizk.js +1 -0
  35. package/dist/web-dist/assets/dist-CISR_13N.js +2 -0
  36. package/dist/web-dist/assets/{dockerfile-CXOK4zpC.js → dockerfile-BvQ8yybz.js} +1 -1
  37. package/dist/web-dist/assets/{ecl-lOrW9o9k.js → ecl-DkR5NtXz.js} +1 -1
  38. package/dist/web-dist/assets/editor-g1MJRkXV.css +1 -0
  39. package/dist/web-dist/assets/editor.api-BQRmhEY6.js +926 -0
  40. package/dist/web-dist/assets/{editor.worker-BYfbSb3U.js → editor.worker-ByY_fgkM.js} +1328 -1274
  41. package/dist/web-dist/assets/{elixir-DgvzEwPU.js → elixir-DwgH4lv4.js} +1 -1
  42. package/dist/web-dist/assets/esm-DHn0u-mG.js +1 -0
  43. package/dist/web-dist/assets/{esm-DC8GK2En.js → esm-HKPuItQJ.js} +1 -1
  44. package/dist/web-dist/assets/{flow9-l3BJy5NQ.js → flow9-DdhMBw5Q.js} +1 -1
  45. package/dist/web-dist/assets/format-cell-value-CUgsp8Xn.js +1 -0
  46. package/dist/web-dist/assets/{freemarker2-73G2DeCz.js → freemarker2-g_nJsTeC.js} +2 -2
  47. package/dist/web-dist/assets/{fsharp-sfou20I_.js → fsharp-D3Xp09Vk.js} +1 -1
  48. package/dist/web-dist/assets/{go-DnjkNg4Q.js → go-DiDKwy3n.js} +1 -1
  49. package/dist/web-dist/assets/{graphql-BJFXvNDL.js → graphql-BgFph-jF.js} +1 -1
  50. package/dist/web-dist/assets/{handlebars-DXg2L0KG.js → handlebars-RA6uoaMW.js} +1 -1
  51. package/dist/web-dist/assets/{hcl-B4FYtDde.js → hcl-D4fzt9AB.js} +1 -1
  52. package/dist/web-dist/assets/highlighted-body-JLMTFACH-D8jkzP7m.js +1 -0
  53. package/dist/web-dist/assets/{html-BvAUQUXw.js → html-DchTZAEc.js} +1 -1
  54. package/dist/web-dist/assets/{html.worker-CdalOg9p.js → html.worker-CHVREBCJ.js} +1527 -1473
  55. package/dist/web-dist/assets/{htmlMode-hZ3EloXT.js → htmlMode-BcLYF6v1.js} +1 -1
  56. package/dist/web-dist/assets/icons-DKLzom80.js +1 -0
  57. package/dist/web-dist/assets/index-DTVRtzpz.css +2 -0
  58. package/dist/web-dist/assets/index-L3nylpEA.js +34 -0
  59. package/dist/web-dist/assets/indexes-B3M1QTrn.js +1 -0
  60. package/dist/web-dist/assets/{ini-H3EW14Oa.js → ini-CjG9jGLJ.js} +1 -1
  61. package/dist/web-dist/assets/{java-Cu5qHMXc.js → java-DitR3Nwd.js} +1 -1
  62. package/dist/web-dist/assets/{javascript-bJHYh6Or.js → javascript-l9pEcFVL.js} +1 -1
  63. package/dist/web-dist/assets/json-editor-CeBQ9FBf.js +1 -0
  64. package/dist/web-dist/assets/{json.worker-DI02pyM8.js → json.worker-BKCy_srb.js} +2747 -2693
  65. package/dist/web-dist/assets/{jsonMode-CDMOUPss.js → jsonMode-D4edoDNQ.js} +4 -4
  66. package/dist/web-dist/assets/{julia-CZ0npMib.js → julia-_g8mQYsr.js} +1 -1
  67. package/dist/web-dist/assets/{keys-By5o7bPm.js → keys-DhNPoWOm.js} +1 -1
  68. package/dist/web-dist/assets/{kotlin-BpW0qHIt.js → kotlin-3o4lP58u.js} +1 -1
  69. package/dist/web-dist/assets/{label-C93T1BbF.js → label-CavJMZd3.js} +1 -1
  70. package/dist/web-dist/assets/{less-DTBM-Kxp.js → less-CdRSAxY_.js} +1 -1
  71. package/dist/web-dist/assets/{lexon-CLOvNp8v.js → lexon-B1v3Gspe.js} +1 -1
  72. package/dist/web-dist/assets/{liquid-IpfBCIUY.js → liquid-3wMbC9OJ.js} +1 -1
  73. package/dist/web-dist/assets/{logs-CnLvqVtL.js → logs-C22dj_JT.js} +1 -1
  74. package/dist/web-dist/assets/{lspLanguageFeatures-CnYZSn_O.js → lspLanguageFeatures-TaH7V4jh.js} +1 -1
  75. package/dist/web-dist/assets/{lua-BERpVknn.js → lua-D3D-_pEE.js} +1 -1
  76. package/dist/web-dist/assets/{m3-B_gILjHh.js → m3-fsgnMtjU.js} +1 -1
  77. package/dist/web-dist/assets/{markdown-DamaZSqy.js → markdown-DTtmtPZi.js} +1 -1
  78. package/dist/web-dist/assets/{mdx-BTw_ghf-.js → mdx-B7jfJVLI.js} +1 -1
  79. package/dist/web-dist/assets/mermaid-WFAXDIZX-qzZppTtW.js +1 -0
  80. package/dist/web-dist/assets/middleware-DLeL20gb.js +1 -0
  81. package/dist/web-dist/assets/{mips-BkjI-_01.js → mips-BA6kSOEZ.js} +1 -1
  82. package/dist/web-dist/assets/module-B7dXHbVt.js +3 -0
  83. package/dist/web-dist/assets/monaco-theme-BwGcwpJl.js +68 -0
  84. package/dist/web-dist/assets/monaco-theme-DtsiNm_H.css +1 -0
  85. package/dist/web-dist/assets/{msdax-5OSOIuww.js → msdax-B96QDI_e.js} +1 -1
  86. package/dist/web-dist/assets/{mysql-CMtxQW5J.js → mysql-ZJG-Zmb7.js} +1 -1
  87. package/dist/web-dist/assets/{objective-c-CoW52So-.js → objective-c-D1BqZdFg.js} +1 -1
  88. package/dist/web-dist/assets/{overlay.store-BL-3zX6X.js → overlay.store-DoGHwFxO.js} +1 -1
  89. package/dist/web-dist/assets/{pascal-BxyU4sPJ.js → pascal-CXwopv-V.js} +1 -1
  90. package/dist/web-dist/assets/{pascaligo-C63_040U.js → pascaligo-DbxCO0kO.js} +1 -1
  91. package/dist/web-dist/assets/{perl-ayfptt23.js → perl-DL95F-1i.js} +1 -1
  92. package/dist/web-dist/assets/{personal-preferences.store-BIr71Re8.js → personal-preferences.store-BgUar1W1.js} +1 -1
  93. package/dist/web-dist/assets/{pgsql-CPGqMVI3.js → pgsql-D6V7y-We.js} +1 -1
  94. package/dist/web-dist/assets/{php-DA-YJ6wI.js → php-Cl4Rc77T.js} +1 -1
  95. package/dist/web-dist/assets/{pla-DesDCKWW.js → pla-C2-KEJLZ.js} +1 -1
  96. package/dist/web-dist/assets/{postiats-B8yhii_n.js → postiats-CnwS6VBM.js} +1 -1
  97. package/dist/web-dist/assets/{powerquery-CG8tCOct.js → powerquery-IxSHxxBc.js} +1 -1
  98. package/dist/web-dist/assets/{powershell-C68aZHza.js → powershell-DAkyXnxj.js} +1 -1
  99. package/dist/web-dist/assets/preload-helper-BmptvQqE.js +1 -0
  100. package/dist/web-dist/assets/{protobuf-OaVxpJrs.js → protobuf-FnPVBP5H.js} +1 -1
  101. package/dist/web-dist/assets/{pug-0lOSC2rA.js → pug-C_d8B8nZ.js} +1 -1
  102. package/dist/web-dist/assets/{python-C8ab8TeJ.js → python-DK9sRx0Y.js} +1 -1
  103. package/dist/web-dist/assets/{qsharp-BmHeDwNl.js → qsharp-DHzbHTnS.js} +1 -1
  104. package/dist/web-dist/assets/{queries.store-Dwdw-Gej.js → queries.store-CXQwDZiV.js} +1 -1
  105. package/dist/web-dist/assets/query-runner-D0LqVvy4.js +17 -0
  106. package/dist/web-dist/assets/{r-DoHxhOJg.js → r-BreUQjgc.js} +1 -1
  107. package/dist/web-dist/assets/radix-ui-CJhaEsHV.js +41 -0
  108. package/dist/web-dist/assets/{razor-DynaHCXX.js → razor-CI-yLdex.js} +1 -1
  109. package/dist/web-dist/assets/react-CGNcTA1t.js +1 -0
  110. package/dist/web-dist/assets/react-dom-Czf_u9MH.js +9 -0
  111. package/dist/web-dist/assets/{redis-CSL-jfR-.js → redis-BdhjrevD.js} +1 -1
  112. package/dist/web-dist/assets/redis-value-Cq8YBvSS.js +1 -0
  113. package/dist/web-dist/assets/{redshift-Cb-LWZ8f.js → redshift-CwVMUyQc.js} +1 -1
  114. package/dist/web-dist/assets/{restructuredtext-DTqnvYsu.js → restructuredtext-D6U9PIiF.js} +1 -1
  115. package/dist/web-dist/assets/rolldown-runtime-D_n5YsVB.js +1 -0
  116. package/dist/web-dist/assets/{ruby-DbgDuslH.js → ruby-D0QS81Wd.js} +1 -1
  117. package/dist/web-dist/assets/runner-BE2YTdi9.js +1 -0
  118. package/dist/web-dist/assets/{rust-CWzrsIL_.js → rust-Bsq9cLDY.js} +1 -1
  119. package/dist/web-dist/assets/{sb-BghszYt-.js → sb-DAQADLLd.js} +1 -1
  120. package/dist/web-dist/assets/{scala-Cw9RU1Qz.js → scala-oEMLo0pl.js} +1 -1
  121. package/dist/web-dist/assets/schema-B-jmgfHC.js +1 -0
  122. package/dist/web-dist/assets/schema-JCqbh3DE.js +1 -0
  123. package/dist/web-dist/assets/{scheme-DeYmvmAH.js → scheme-DDI6muad.js} +1 -1
  124. package/dist/web-dist/assets/{scss-D_S6B2H1.js → scss-BU9Ttlwm.js} +1 -1
  125. package/dist/web-dist/assets/{select-DU0HoKZ4.js → select-3l4LDMzT.js} +1 -1
  126. package/dist/web-dist/assets/{separator-CZgXYjVQ.js → separator-BD46sVx9.js} +1 -1
  127. package/dist/web-dist/assets/{sheet-sidebar-KvxY47ZZ.js → sheet-sidebar-CjbtFAKn.js} +1 -1
  128. package/dist/web-dist/assets/{shell-B59ItoUV.js → shell-BI6rOefn.js} +1 -1
  129. package/dist/web-dist/assets/{solidity-De0h6YhL.js → solidity-B17zzzu-.js} +1 -1
  130. package/dist/web-dist/assets/{sophia-DWmKHYE0.js → sophia-DQi6mooo.js} +1 -1
  131. package/dist/web-dist/assets/{sparql-0sKQlAae.js → sparql-DGFBDMPi.js} +1 -1
  132. package/dist/web-dist/assets/spinner-D7Cvt3BD.js +1 -0
  133. package/dist/web-dist/assets/{sql-Cafrv7gm.js → sql-DGzRlxQo.js} +1 -1
  134. package/dist/web-dist/assets/{st-qkFqcB41.js → st-Ceq2dhS_.js} +1 -1
  135. package/dist/web-dist/assets/{swift-CDPKFfVs.js → swift-8-FeeRSy.js} +1 -1
  136. package/dist/web-dist/assets/{systemverilog-rjtBmhAJ.js → systemverilog-mmioB6wo.js} +1 -1
  137. package/dist/web-dist/assets/table-sVAmZLcg.js +1 -0
  138. package/dist/web-dist/assets/tables-TW8L7_FW.js +16 -0
  139. package/dist/web-dist/assets/tanstack-D9GckDbx.js +5 -0
  140. package/dist/web-dist/assets/{tcl-C0NrUCCP.js → tcl-BTUJQo2X.js} +1 -1
  141. package/dist/web-dist/assets/{ts.worker-r_qbh1JO.js → ts.worker-BLC4EdqU.js} +18311 -18257
  142. package/dist/web-dist/assets/{tsMode-C2yuf0pi.js → tsMode-BRJ2WiSx.js} +4 -4
  143. package/dist/web-dist/assets/{twig-RBrBABOf.js → twig-C6ea54bM.js} +1 -1
  144. package/dist/web-dist/assets/{typescript-DWkZjHjp.js → typescript-U3aTTn2d.js} +1 -1
  145. package/dist/web-dist/assets/{typespec-DfQiGud4.js → typespec-B4z8l2XF.js} +1 -1
  146. package/dist/web-dist/assets/use-database-engine-CG7rZQXQ.js +1 -0
  147. package/dist/web-dist/assets/{use-theme-BLw5dtZV.js → use-theme-CKjVHAZg.js} +1 -1
  148. package/dist/web-dist/assets/utils-CZdosIsH.js +1 -0
  149. package/dist/web-dist/assets/{vb-BslxQW9i.js → vb-BbQNgbjG.js} +1 -1
  150. package/dist/web-dist/assets/visualizer-c23lRr6o.js +1 -0
  151. package/dist/web-dist/assets/{wgsl-Bq67ZIFU.js → wgsl-SWAFFAY4.js} +1 -1
  152. package/dist/web-dist/assets/{workers-rMl5Xrk2.js → workers-DeOJBffb.js} +1 -1
  153. package/dist/web-dist/assets/{xml-PfDqoe6w.js → xml-DM-qLhlQ.js} +1 -1
  154. package/dist/web-dist/assets/{yaml-CIuY3cB5.js → yaml-BB3LUpV7.js} +1 -1
  155. package/dist/web-dist/index.html +31 -31
  156. package/package.json +22 -22
  157. package/dist/web-dist/assets/_pathlessLayout-aKKQKRJX.js +0 -1
  158. package/dist/web-dist/assets/_pathlessLayout-s6cwJxH6.js +0 -2
  159. package/dist/web-dist/assets/_queryId-DnPgn-AJ.js +0 -1
  160. package/dist/web-dist/assets/_table-Bgt0zJ9m.js +0 -1
  161. package/dist/web-dist/assets/_table-CU8PHZQE.js +0 -1
  162. package/dist/web-dist/assets/_table-DIbpzW3q.js +0 -1
  163. package/dist/web-dist/assets/bundle-mjs-DEMZsBkP.js +0 -1
  164. package/dist/web-dist/assets/chat-sidebar-Cr2fVFDF.js +0 -132
  165. package/dist/web-dist/assets/connect-BM4hZPnz.js +0 -1
  166. package/dist/web-dist/assets/constants-BBxXyYPa.js +0 -12
  167. package/dist/web-dist/assets/cssMode-CiAtMuTk.js +0 -1
  168. package/dist/web-dist/assets/database.store-73Wsz2L5.js +0 -57
  169. package/dist/web-dist/assets/dist-D4HUXaJv.js +0 -1
  170. package/dist/web-dist/assets/dist-DwRWhVwY.js +0 -2
  171. package/dist/web-dist/assets/editor-1FQrmyyI.css +0 -1
  172. package/dist/web-dist/assets/editor.api-DSevzNN8.js +0 -865
  173. package/dist/web-dist/assets/format-cell-value-CuhjnBNV.js +0 -1
  174. package/dist/web-dist/assets/highlighted-body-OFNGDK62-Bi4CQl8I.js +0 -1
  175. package/dist/web-dist/assets/icons-CheF8KGp.js +0 -1
  176. package/dist/web-dist/assets/index-YCx2RIFq.js +0 -34
  177. package/dist/web-dist/assets/index-mbFBVmHb.css +0 -2
  178. package/dist/web-dist/assets/indexes-BYqaS45O.js +0 -1
  179. package/dist/web-dist/assets/json-editor-ZcSS1MRc.js +0 -1
  180. package/dist/web-dist/assets/mermaid-GHXKKRXX-B7fOqMvZ.js +0 -1
  181. package/dist/web-dist/assets/middleware-DKaxoFZs.js +0 -1
  182. package/dist/web-dist/assets/module-BbdCXsK0.js +0 -2
  183. package/dist/web-dist/assets/monaco-theme-BnSsSzUH.css +0 -1
  184. package/dist/web-dist/assets/monaco-theme-DkPj5STI.js +0 -64
  185. package/dist/web-dist/assets/preload-helper-DZhPwQp1.js +0 -1
  186. package/dist/web-dist/assets/query-runner-C430BH5I.js +0 -17
  187. package/dist/web-dist/assets/radix-ui-ByvuE8TW.js +0 -51
  188. package/dist/web-dist/assets/react-CKF1H7h0.js +0 -1
  189. package/dist/web-dist/assets/react-dom-DQQG0g0D.js +0 -9
  190. package/dist/web-dist/assets/redis-value-Bf0tOet0.js +0 -1
  191. package/dist/web-dist/assets/rolldown-runtime-0wqQW3ea.js +0 -1
  192. package/dist/web-dist/assets/runner-DFzqBXp0.js +0 -1
  193. package/dist/web-dist/assets/schema-B_EtHxTf.js +0 -1
  194. package/dist/web-dist/assets/schema-iTfBKwXl.js +0 -1
  195. package/dist/web-dist/assets/spinner-FJ-tXoFX.js +0 -1
  196. package/dist/web-dist/assets/table-DmoKTp5U.js +0 -1
  197. package/dist/web-dist/assets/tables-By-PTDwU.js +0 -13
  198. package/dist/web-dist/assets/tanstack-Cb7WFPRi.js +0 -8
  199. package/dist/web-dist/assets/use-database-engine-Mwmv8X7V.js +0 -1
  200. package/dist/web-dist/assets/utils-awMbhLwX.js +0 -1
  201. package/dist/web-dist/assets/visualizer-LoD_yU5U.js +0 -1
  202. package/dist/web-dist/assets/vscode-Ba8jYSS7.js +0 -1
@@ -1 +0,0 @@
1
- import{m as d}from"./index-YCx2RIFq.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9cda1092-ec8f-439b-8007-31cefd6e20a9",e._sentryDebugIdIdentifier="sentry-dbid-9cda1092-ec8f-439b-8007-31cefd6e20a9")}catch{}})();var f=d;export{f as component};
@@ -1,12 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/esm-DC8GK2En.js","assets/rolldown-runtime-0wqQW3ea.js","assets/icons-CheF8KGp.js"])))=>i.map(i=>d[i]);
2
- import{n as Bt}from"./rolldown-runtime-0wqQW3ea.js";import{m as Ft,n as kt}from"./database.store-73Wsz2L5.js";import{t as qt}from"./preload-helper-DZhPwQp1.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="022fb077-8874-43a7-93fa-70711551fb98",e._sentryDebugIdIdentifier="sentry-dbid-022fb077-8874-43a7-93fa-70711551fb98")}catch{}})();var dt={},Je=dt?.NODE_ENV,xe={PORT:3333,ENV:".env",VAR_NAME:"DATABASE_URL",BASE_URL:"https://api.db-studio.localhost",API_PREFIX:"/api",IS_DEV:Je==="development",PROXY_URL:dt?.DB_STUDIO_PROXY_URL??(Je==="development"?"https://proxy.db-studio.localhost":"https://db-studio-proxy.husamql3.workers.dev")};function ft(e,t){return function(){return e.apply(t,arguments)}}var{toString:jt}=Object.prototype,{getPrototypeOf:he}=Object,{iterator:me,toStringTag:pt}=Symbol,be=(e=>t=>{const r=jt.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),L=e=>(e=e.toLowerCase(),t=>be(t)===e),ye=e=>t=>typeof t===e,{isArray:Y}=Array,X=ye("undefined");function te(e){return e!==null&&!X(e)&&e.constructor!==null&&!X(e.constructor)&&x(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var ht=L("ArrayBuffer");function Mt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ht(e.buffer),t}var $t=ye("string"),x=ye("function"),mt=ye("number"),re=e=>e!==null&&typeof e=="object",Ht=e=>e===!0||e===!1,ue=e=>{if(be(e)!=="object")return!1;const t=he(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(pt in e)&&!(me in e)},zt=e=>{if(!re(e)||te(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Vt=L("Date"),Wt=L("File"),Kt=e=>!!(e&&typeof e.uri<"u"),Jt=e=>e&&typeof e.getParts<"u",Xt=L("Blob"),Yt=L("FileList"),Gt=e=>re(e)&&x(e.pipe);function Qt(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var Xe=Qt(),Ye=typeof Xe.FormData<"u"?Xe.FormData:void 0,Zt=e=>{if(!e)return!1;if(Ye&&e instanceof Ye)return!0;const t=he(e);if(!t||t===Object.prototype||!x(e.append))return!1;const r=be(e);return r==="formdata"||r==="object"&&x(e.toString)&&e.toString()==="[object FormData]"},er=L("URLSearchParams"),[tr,rr,nr,sr]=["ReadableStream","Request","Response","Headers"].map(L),or=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ne(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),Y(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(te(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let l;for(n=0;n<a;n++)l=o[n],t.call(null,e[l],l,e)}}function bt(e,t){if(te(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}var z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,yt=e=>!X(e)&&e!==z;function Ne(...e){const{caseless:t,skipUndefined:r}=yt(this)&&this||{},n={},s=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const l=t&&bt(n,a)||a,c=De(n,l)?n[l]:void 0;ue(c)&&ue(o)?n[l]=Ne(c,o):ue(o)?n[l]=Ne({},o):Y(o)?n[l]=o.slice():(!r||!X(o))&&(n[l]=o)};for(let o=0,a=e.length;o<a;o++)e[o]&&ne(e[o],s);return n}var ar=(e,t,r,{allOwnKeys:n}={})=>(ne(t,(s,o)=>{r&&x(s)?Object.defineProperty(e,o,{__proto__:null,value:ft(s,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),ir=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),lr=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},cr=(e,t,r,n)=>{let s,o,a;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)a=s[o],(!n||n(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=r!==!1&&he(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},ur=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},dr=e=>{if(!e)return null;if(Y(e))return e;let t=e.length;if(!mt(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},fr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&he(Uint8Array)),pr=(e,t)=>{const r=(e&&e[me]).call(e);let n;for(;(n=r.next())&&!n.done;){const s=n.value;t.call(e,s[0],s[1])}},hr=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},mr=L("HTMLFormElement"),br=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),De=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),yr=L("RegExp"),Et=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};ne(r,(s,o)=>{let a;(a=t(s,o,e))!==!1&&(n[o]=a||s)}),Object.defineProperties(e,n)},Er=e=>{Et(e,(t,r)=>{if(x(e)&&["arguments","caller","callee"].includes(r))return!1;const n=e[r];if(x(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Rr=(e,t)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return Y(e)?n(e):n(String(e).split(t)),r},wr=()=>{},gr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Sr(e){return!!(e&&x(e.append)&&e[pt]==="FormData"&&e[me])}var _r=e=>{const t=new Array(10),r=(n,s)=>{if(re(n)){if(t.indexOf(n)>=0)return;if(te(n))return n;if(!("toJSON"in n)){t[s]=n;const o=Y(n)?[]:{};return ne(n,(a,l)=>{const c=r(a,s+1);!X(c)&&(o[l]=c)}),t[s]=void 0,o}}return n};return r(e,0)},Tr=L("AsyncFunction"),Ar=e=>e&&(re(e)||x(e))&&x(e.then)&&x(e.catch),Rt=((e,t)=>e?setImmediate:t?((r,n)=>(z.addEventListener("message",({source:s,data:o})=>{s===z&&o===r&&n.length&&n.shift()()},!1),s=>{n.push(s),z.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",x(z.postMessage)),vr=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||Rt,Or=e=>e!=null&&x(e[me]),i={isArray:Y,isArrayBuffer:ht,isBuffer:te,isFormData:Zt,isArrayBufferView:Mt,isString:$t,isNumber:mt,isBoolean:Ht,isObject:re,isPlainObject:ue,isEmptyObject:zt,isReadableStream:tr,isRequest:rr,isResponse:nr,isHeaders:sr,isUndefined:X,isDate:Vt,isFile:Wt,isReactNativeBlob:Kt,isReactNative:Jt,isBlob:Xt,isRegExp:yr,isFunction:x,isStream:Gt,isURLSearchParams:er,isTypedArray:fr,isFileList:Yt,forEach:ne,merge:Ne,extend:ar,trim:or,stripBOM:ir,inherits:lr,toFlatObject:cr,kindOf:be,kindOfTest:L,endsWith:ur,toArray:dr,forEachEntry:pr,matchAll:hr,isHTMLForm:mr,hasOwnProperty:De,hasOwnProp:De,reduceDescriptors:Et,freezeMethods:Er,toObjectSet:Rr,toCamelCase:br,noop:wr,toFiniteNumber:gr,findKey:bt,global:z,isContextDefined:yt,isSpecCompliantForm:Sr,toJSONObject:_r,isAsyncFn:Tr,isThenable:Ar,setImmediate:Rt,asap:vr,isIterable:Or},Cr=i.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xr=e=>{const t={};let r,n,s;return e&&e.split(`
3
- `).forEach(function(a){s=a.indexOf(":"),r=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!r||t[r]&&Cr[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Ge=Symbol("internals"),Nr=/[^\x09\x20-\x7E\x80-\xFF]/g;function Dr(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}function Z(e){return e&&String(e).trim().toLowerCase()}function Pr(e){return Dr(e.replace(Nr,""))}function de(e){return e===!1||e==null?e:i.isArray(e)?e.map(de):Pr(String(e))}function Lr(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}var Ur=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Te(e,t,r,n,s){if(i.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!i.isString(t)){if(i.isString(n))return t.indexOf(n)!==-1;if(i.isRegExp(n))return n.test(t)}}function Ir(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function Br(e,t){const r=i.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(s,o,a){return this[n].call(this,t,s,o,a)},configurable:!0})})}var C=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function s(a,l,c){const d=Z(l);if(!d)throw new Error("header name must be a non-empty string");const u=i.findKey(n,d);(!u||n[u]===void 0||c===!0||c===void 0&&n[u]!==!1)&&(n[u||l]=de(a))}const o=(a,l)=>i.forEach(a,(c,d)=>s(c,d,l));if(i.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(i.isString(e)&&(e=e.trim())&&!Ur(e))o(xr(e),t);else if(i.isObject(e)&&i.isIterable(e)){let a={},l,c;for(const d of e){if(!i.isArray(d))throw TypeError("Object iterator must return a key-value pair");a[c=d[0]]=(l=a[c])?i.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}o(a,t)}else e!=null&&s(t,e,r);return this}get(e,t){if(e=Z(e),e){const r=i.findKey(this,e);if(r){const n=this[r];if(!t)return n;if(t===!0)return Lr(n);if(i.isFunction(t))return t.call(this,n,r);if(i.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Z(e),e){const r=i.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||Te(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let n=!1;function s(o){if(o=Z(o),o){const a=i.findKey(r,o);a&&(!t||Te(r,r[a],a,t))&&(delete r[a],n=!0)}}return i.isArray(e)?e.forEach(s):s(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const s=t[r];(!e||Te(this,this[s],s,e,!0))&&(delete this[s],n=!0)}return n}normalize(e){const t=this,r={};return i.forEach(this,(n,s)=>{const o=i.findKey(r,s);if(o){t[o]=de(n),delete t[s];return}const a=e?Ir(s):String(s).trim();a!==s&&delete t[s],t[a]=de(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return i.forEach(this,(r,n)=>{r!=null&&r!==!1&&(t[n]=e&&i.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
4
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(n=>r.set(n)),r}static accessor(e){const t=(this[Ge]=this[Ge]={accessors:{}}).accessors,r=this.prototype;function n(s){const o=Z(s);t[o]||(Br(r,s),t[o]=!0)}return i.isArray(e)?e.forEach(n):n(e),this}};C.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);i.reduceDescriptors(C.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});i.freezeMethods(C);var Fr="[REDACTED ****]";function kr(e){if(i.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(i.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function qr(e,t){const r=new Set(t.map(o=>String(o).toLowerCase())),n=[],s=o=>{if(o===null||typeof o!="object"||i.isBuffer(o))return o;if(n.indexOf(o)!==-1)return;o instanceof C&&(o=o.toJSON()),n.push(o);let a;if(i.isArray(o))a=[],o.forEach((l,c)=>{const d=s(l);i.isUndefined(d)||(a[c]=d)});else{if(!i.isPlainObject(o)&&kr(o))return n.pop(),o;a=Object.create(null);for(const[l,c]of Object.entries(o)){const d=r.has(l.toLowerCase())?Fr:s(c);i.isUndefined(d)||(a[l]=d)}}return n.pop(),a};return s(e)}var p=class wt extends Error{static from(t,r,n,s,o,a){const l=new wt(t.message,r||t.code,n,s,o);return l.cause=t,l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),a&&Object.assign(l,a),l}constructor(t,r,n,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,r=t&&i.hasOwnProp(t,"redact")?t.redact:void 0,n=i.isArray(r)&&r.length>0?qr(t,r):i.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};p.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";p.ERR_BAD_OPTION="ERR_BAD_OPTION";p.ECONNABORTED="ECONNABORTED";p.ETIMEDOUT="ETIMEDOUT";p.ECONNREFUSED="ECONNREFUSED";p.ERR_NETWORK="ERR_NETWORK";p.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";p.ERR_DEPRECATED="ERR_DEPRECATED";p.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";p.ERR_BAD_REQUEST="ERR_BAD_REQUEST";p.ERR_CANCELED="ERR_CANCELED";p.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";p.ERR_INVALID_URL="ERR_INVALID_URL";p.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function Pe(e){return i.isPlainObject(e)||i.isArray(e)}function gt(e){return i.endsWith(e,"[]")?e.slice(0,-2):e}function Ae(e,t,r){return e?e.concat(t).map(function(s,o){return s=gt(s),!r&&o?"["+s+"]":s}).join(r?".":""):t}function jr(e){return i.isArray(e)&&!e.some(Pe)}var Mr=i.toFlatObject(i,{},null,function(t){return/^is[A-Z]/.test(t)});function Ee(e,t,r){if(!i.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=i.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,m){return!i.isUndefined(m[f])});const n=r.metaTokens,s=r.visitor||h,o=r.dots,a=r.indexes,l=r.Blob||typeof Blob<"u"&&Blob,c=r.maxDepth===void 0?100:r.maxDepth,d=l&&i.isSpecCompliantForm(t);if(!i.isFunction(s))throw new TypeError("visitor must be a function");function u(b){if(b===null)return"";if(i.isDate(b))return b.toISOString();if(i.isBoolean(b))return b.toString();if(!d&&i.isBlob(b))throw new p("Blob is not supported. Use a Buffer instead.");return i.isArrayBuffer(b)||i.isTypedArray(b)?d&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function h(b,f,m){let _=b;if(i.isReactNative(t)&&i.isReactNativeBlob(b))return t.append(Ae(m,f,o),u(b)),!1;if(b&&!m&&typeof b=="object"){if(i.endsWith(f,"{}"))f=n?f:f.slice(0,-2),b=JSON.stringify(b);else if(i.isArray(b)&&jr(b)||(i.isFileList(b)||i.endsWith(f,"[]"))&&(_=i.toArray(b)))return f=gt(f),_.forEach(function(R,P){!(i.isUndefined(R)||R===null)&&t.append(a===!0?Ae([f],P,o):a===null?f:f+"[]",u(R))}),!1}return Pe(b)?!0:(t.append(Ae(m,f,o),u(b)),!1)}const y=[],E=Object.assign(Mr,{defaultVisitor:h,convertValue:u,isVisitable:Pe});function S(b,f,m=0){if(!i.isUndefined(b)){if(m>c)throw new p("Object is too deeply nested ("+m+" levels). Max depth: "+c,p.ERR_FORM_DATA_DEPTH_EXCEEDED);if(y.indexOf(b)!==-1)throw Error("Circular reference detected in "+f.join("."));y.push(b),i.forEach(b,function(w,R){(!(i.isUndefined(w)||w===null)&&s.call(t,w,i.isString(R)?R.trim():R,f,E))===!0&&S(w,f?f.concat(R):[R],m+1)}),y.pop()}}if(!i.isObject(e))throw new TypeError("data must be an object");return S(e),t}function Qe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function Fe(e,t){this._pairs=[],e&&Ee(e,this,t)}var St=Fe.prototype;St.append=function(t,r){this._pairs.push([t,r])};St.toString=function(t){const r=t?function(n){return t.call(this,n,Qe)}:Qe;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function $r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function _t(e,t,r){if(!t)return e;const n=r&&r.encode||$r,s=i.isFunction(r)?{serialize:r}:r,o=s&&s.serialize;let a;if(o?a=o(t,s):a=i.isURLSearchParams(t)?t.toString():new Fe(t,s).toString(n),a){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}var Ze=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){i.forEach(this.handlers,function(r){r!==null&&e(r)})}},ke={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Hr=typeof URLSearchParams<"u"?URLSearchParams:Fe,zr=typeof FormData<"u"?FormData:null,Vr=typeof Blob<"u"?Blob:null,Wr={isBrowser:!0,classes:{URLSearchParams:Hr,FormData:zr,Blob:Vr},protocols:["http","https","file","blob","url","data"]},Kr=Bt({hasBrowserEnv:()=>qe,hasStandardBrowserEnv:()=>Jr,hasStandardBrowserWebWorkerEnv:()=>Xr,navigator:()=>Le,origin:()=>Yr}),qe=typeof window<"u"&&typeof document<"u",Le=typeof navigator=="object"&&navigator||void 0,Jr=qe&&(!Le||["ReactNative","NativeScript","NS"].indexOf(Le.product)<0),Xr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Yr=qe&&window.location.href||"http://localhost",O={...Kr,...Wr};function Gr(e,t){return Ee(e,new O.classes.URLSearchParams,{visitor:function(r,n,s,o){return O.isNode&&i.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function Qr(e){return i.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Zr(e){const t={},r=Object.keys(e);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],t[o]=e[o];return t}function Tt(e){function t(r,n,s,o){let a=r[o++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),c=o>=r.length;return a=!a&&i.isArray(s)?s.length:a,c?(i.hasOwnProp(s,a)?s[a]=i.isArray(s[a])?s[a].concat(n):[s[a],n]:s[a]=n,!l):((!s[a]||!i.isObject(s[a]))&&(s[a]=[]),t(r,n,s[a],o)&&i.isArray(s[a])&&(s[a]=Zr(s[a])),!l)}if(i.isFormData(e)&&i.isFunction(e.entries)){const r={};return i.forEachEntry(e,(n,s)=>{t(Qr(n),s,r,0)}),r}return null}var J=(e,t)=>e!=null&&i.hasOwnProp(e,t)?e[t]:void 0;function en(e,t,r){if(i.isString(e))try{return(t||JSON.parse)(e),i.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var se={transitional:ke,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=i.isObject(t);if(o&&i.isHTMLForm(t)&&(t=new FormData(t)),i.isFormData(t))return s?JSON.stringify(Tt(t)):t;if(i.isArrayBuffer(t)||i.isBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t)||i.isReadableStream(t))return t;if(i.isArrayBufferView(t))return t.buffer;if(i.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){const l=J(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return Gr(t,l).toString();if((a=i.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=J(this,"env"),d=c&&c.FormData;return Ee(a?{"files[]":t}:t,d&&new d,l)}}return o||s?(r.setContentType("application/json",!1),en(t)):t}],transformResponse:[function(t){const r=J(this,"transitional")||se.transitional,n=r&&r.forcedJSONParsing,s=J(this,"responseType"),o=s==="json";if(i.isResponse(t)||i.isReadableStream(t))return t;if(t&&i.isString(t)&&(n&&!s||o)){const a=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,J(this,"parseReviver"))}catch(l){if(a)throw l.name==="SyntaxError"?p.from(l,p.ERR_BAD_RESPONSE,this,null,J(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};i.forEach(["delete","get","head","post","put","patch","query"],e=>{se.headers[e]={}});function ve(e,t){const r=this||se,n=t||r,s=C.from(n.headers);let o=n.data;return i.forEach(e,function(l){o=l.call(r,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function At(e){return!!(e&&e.__CANCEL__)}var oe=class extends p{constructor(e,t,r){super(e??"canceled",p.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function vt(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new p("Request failed with status code "+r.status,r.status>=400&&r.status<500?p.ERR_BAD_REQUEST:p.ERR_BAD_RESPONSE,r.config,r.request,r))}function tn(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function rn(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,o=0,a;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),u=n[o];a||(a=d),r[s]=c,n[s]=d;let h=o,y=0;for(;h!==s;)y+=r[h++],h=h%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),d-a<t)return;const E=u&&d-u;return E?Math.round(y*1e3/E):void 0}}function nn(e,t){let r=0,n=1e3/t,s,o;const a=(d,u=Date.now())=>{r=u,s=null,o&&(clearTimeout(o),o=null),e(...d)};return[(...d)=>{const u=Date.now(),h=u-r;h>=n?a(d,u):(s=d,o||(o=setTimeout(()=>{o=null,a(s)},n-h)))},()=>s&&a(s)]}var pe=(e,t,r=3)=>{let n=0;const s=rn(50,250);return nn(o=>{const a=o.loaded,l=o.lengthComputable?o.total:void 0,c=l!=null?Math.min(a,l):a,d=Math.max(0,c-n),u=s(d);n=Math.max(n,c),e({loaded:c,total:l,progress:l?c/l:void 0,bytes:d,rate:u||void 0,estimated:u&&l?(l-c)/u:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0})},r)},et=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},tt=e=>(...t)=>i.asap(()=>e(...t)),sn=O.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,O.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,on=O.hasStandardBrowserEnv?{write(e,t,r,n,s,o,a){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];i.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),i.isString(n)&&l.push(`path=${n}`),i.isString(s)&&l.push(`domain=${s}`),o===!0&&l.push("secure"),i.isString(a)&&l.push(`SameSite=${a}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const n=t[r].replace(/^\s+/,""),s=n.indexOf("=");if(s!==-1&&n.slice(0,s)===e)return decodeURIComponent(n.slice(s+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function an(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ln(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ot(e,t,r){let n=!an(t);return e&&(n||r===!1)?ln(e,t):t}var rt=e=>e instanceof C?{...e}:e;function W(e,t){t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(d,u,h,y){return i.isPlainObject(d)&&i.isPlainObject(u)?i.merge.call({caseless:y},d,u):i.isPlainObject(u)?i.merge({},u):i.isArray(u)?u.slice():u}function s(d,u,h,y){if(i.isUndefined(u)){if(!i.isUndefined(d))return n(void 0,d,h,y)}else return n(d,u,h,y)}function o(d,u){if(!i.isUndefined(u))return n(void 0,u)}function a(d,u){if(i.isUndefined(u)){if(!i.isUndefined(d))return n(void 0,d)}else return n(void 0,u)}function l(d,u,h){if(i.hasOwnProp(t,h))return n(d,u);if(i.hasOwnProp(e,h))return n(void 0,d)}const c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:l,headers:(d,u,h)=>s(rt(d),rt(u),h,!0)};return i.forEach(Object.keys({...e,...t}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const h=i.hasOwnProp(c,u)?c[u]:s,y=h(i.hasOwnProp(e,u)?e[u]:void 0,i.hasOwnProp(t,u)?t[u]:void 0,u);i.isUndefined(y)&&h!==l||(r[u]=y)}),r}var cn=["content-type","content-length"];function un(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t).forEach(([n,s])=>{cn.includes(n.toLowerCase())&&e.set(n,s)})}var dn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),Ct=e=>{const t=W({},e),r=y=>i.hasOwnProp(t,y)?t[y]:void 0,n=r("data");let s=r("withXSRFToken");const o=r("xsrfHeaderName"),a=r("xsrfCookieName");let l=r("headers");const c=r("auth"),d=r("baseURL"),u=r("allowAbsoluteUrls"),h=r("url");if(t.headers=l=C.from(l),t.url=_t(Ot(d,h,u),e.params,e.paramsSerializer),c&&l.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?dn(c.password):""))),i.isFormData(n)&&(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv?l.setContentType(void 0):i.isFunction(n.getHeaders)&&un(l,n.getHeaders(),r("formDataHeaderPolicy"))),O.hasStandardBrowserEnv&&(i.isFunction(s)&&(s=s(t)),s===!0||s==null&&sn(t.url))){const y=o&&a&&on.read(a);y&&l.set(o,y)}return t},fn=typeof XMLHttpRequest<"u",pn=fn&&function(e){return new Promise(function(r,n){const s=Ct(e);let o=s.data;const a=C.from(s.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=s,u,h,y,E,S;function b(){E&&E(),S&&S(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(s.method.toUpperCase(),s.url,!0),f.timeout=s.timeout;function m(){if(!f)return;const w=C.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),R={data:!l||l==="text"||l==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:w,config:e,request:f};vt(function(B){r(B),b()},function(B){n(B),b()},R),f=null}"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.startsWith("file:"))||setTimeout(m)},f.onabort=function(){f&&(n(new p("Request aborted",p.ECONNABORTED,e,f)),b(),f=null)},f.onerror=function(R){const P=R&&R.message?R.message:"Network Error",B=new p(P,p.ERR_NETWORK,e,f);B.event=R||null,n(B),b(),f=null},f.ontimeout=function(){let R=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const P=s.transitional||ke;s.timeoutErrorMessage&&(R=s.timeoutErrorMessage),n(new p(R,P.clarifyTimeoutError?p.ETIMEDOUT:p.ECONNABORTED,e,f)),b(),f=null},o===void 0&&a.setContentType(null),"setRequestHeader"in f&&i.forEach(a.toJSON(),function(R,P){f.setRequestHeader(P,R)}),i.isUndefined(s.withCredentials)||(f.withCredentials=!!s.withCredentials),l&&l!=="json"&&(f.responseType=s.responseType),d&&([y,S]=pe(d,!0),f.addEventListener("progress",y)),c&&f.upload&&([h,E]=pe(c),f.upload.addEventListener("progress",h),f.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(u=w=>{f&&(n(!w||w.type?new oe(null,e,f):w),f.abort(),b(),f=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const _=tn(s.url);if(_&&!O.protocols.includes(_)){n(new p("Unsupported protocol "+_+":",p.ERR_BAD_REQUEST,e));return}f.send(o||null)})},hn=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,s;const o=function(d){if(!s){s=!0,l();const u=d instanceof Error?d:this.reason;n.abort(u instanceof p?u:new oe(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,o(new p(`timeout of ${t}ms exceeded`,p.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=()=>i.asap(l),c}},mn=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},bn=async function*(e,t){for await(const r of yn(e))yield*mn(r,t)},yn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},nt=(e,t,r,n)=>{const s=bn(e,t);let o=0,a,l=c=>{a||(a=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:d,value:u}=await s.next();if(d){l(),c.close();return}let h=u.byteLength;r&&r(o+=h),c.enqueue(new Uint8Array(u))}catch(d){throw l(d),d}},cancel(c){return l(c),s.return()}},{highWaterMark:2})};function En(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),n=e.slice(t+1);if(/;base64/i.test(r)){let o=n.length;const a=n.length;for(let h=0;h<a;h++)if(n.charCodeAt(h)===37&&h+2<a){const y=n.charCodeAt(h+1),E=n.charCodeAt(h+2);(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102)&&(E>=48&&E<=57||E>=65&&E<=70||E>=97&&E<=102)&&(o-=2,h+=2)}let l=0,c=a-1;const d=h=>h>=2&&n.charCodeAt(h-2)===37&&n.charCodeAt(h-1)===51&&(n.charCodeAt(h)===68||n.charCodeAt(h)===100);c>=0&&(n.charCodeAt(c)===61?(l++,c--):d(c)&&(l++,c-=3)),l===1&&c>=0&&(n.charCodeAt(c)===61||d(c))&&l++;const u=Math.floor(o/4)*3-(l||0);return u>0?u:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(n,"utf8");let s=0;for(let o=0,a=n.length;o<a;o++){const l=n.charCodeAt(o);if(l<128)s+=1;else if(l<2048)s+=2;else if(l>=55296&&l<=56319&&o+1<a){const c=n.charCodeAt(o+1);c>=56320&&c<=57343?(s+=4,o++):s+=3}else s+=3}return s}var je="1.16.0",st=65536,{isFunction:ce}=i,ot=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Rn=e=>{const t=i.global??globalThis,{ReadableStream:r,TextEncoder:n}=t;e=i.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:o,Response:a}=e,l=s?ce(s):typeof fetch=="function",c=ce(o),d=ce(a);if(!l)return!1;const u=l&&ce(r),h=l&&(typeof n=="function"?(m=>_=>m.encode(_))(new n):async m=>new Uint8Array(await new o(m).arrayBuffer())),y=c&&u&&ot(()=>{let m=!1;const _=new o(O.origin,{body:new r,method:"POST",get duplex(){return m=!0,"half"}}),w=_.headers.has("Content-Type");return _.body!=null&&_.body.cancel(),m&&!w}),E=d&&u&&ot(()=>i.isReadableStream(new a("").body)),S={stream:E&&(m=>m.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!S[m]&&(S[m]=(_,w)=>{let R=_&&_[m];if(R)return R.call(_);throw new p(`Response type '${m}' is not supported`,p.ERR_NOT_SUPPORT,w)})});const b=async m=>{if(m==null)return 0;if(i.isBlob(m))return m.size;if(i.isSpecCompliantForm(m))return(await new o(O.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(i.isArrayBufferView(m)||i.isArrayBuffer(m))return m.byteLength;if(i.isURLSearchParams(m)&&(m=m+""),i.isString(m))return(await h(m)).byteLength},f=async(m,_)=>{const w=i.toFiniteNumber(m.getContentLength());return w??b(_)};return async m=>{let{url:_,method:w,data:R,signal:P,cancelToken:B,timeout:Lt,onDownloadProgress:ge,onUploadProgress:He,responseType:q,headers:$,withCredentials:ae="same-origin",fetchOptions:ze,maxContentLength:U,maxBodyLength:Se}=Ct(m);const G=i.isNumber(U)&&U>-1,Ut=i.isNumber(Se)&&Se>-1;let Ve=s||fetch;q=q?(q+"").toLowerCase():"text";let j=hn([P,B&&B.toAbortSignal()],Lt),N=null;const H=j&&j.unsubscribe&&(()=>{j.unsubscribe()});let We;try{if(G&&typeof _=="string"&&_.startsWith("data:")&&En(_)>U)throw new p("maxContentLength size of "+U+" exceeded",p.ERR_BAD_RESPONSE,m,N);if(Ut&&w!=="get"&&w!=="head"){const T=await f($,R);if(typeof T=="number"&&isFinite(T)&&T>Se)throw new p("Request body larger than maxBodyLength limit",p.ERR_BAD_REQUEST,m,N)}if(He&&y&&w!=="get"&&w!=="head"&&(We=await f($,R))!==0){let T=new o(_,{method:"POST",body:R,duplex:"half"}),K;if(i.isFormData(R)&&(K=T.headers.get("content-type"))&&$.setContentType(K),T.body){const[ie,le]=et(We,pe(tt(He)));R=nt(T.body,st,ie,le)}}i.isString(ae)||(ae=ae?"include":"omit");const v=c&&"credentials"in o.prototype;if(i.isFormData(R)){const T=$.getContentType();T&&/^multipart\/form-data/i.test(T)&&!/boundary=/i.test(T)&&$.delete("content-type")}$.set("User-Agent","axios/"+je,!1);const M={...ze,signal:j,method:w.toUpperCase(),headers:$.normalize().toJSON(),body:R,duplex:"half",credentials:v?ae:void 0};N=c&&new o(_,M);let I=await(c?Ve(N,ze):Ve(_,M));if(G){const T=i.toFiniteNumber(I.headers.get("content-length"));if(T!=null&&T>U)throw new p("maxContentLength size of "+U+" exceeded",p.ERR_BAD_RESPONSE,m,N)}const _e=E&&(q==="stream"||q==="response");if(E&&I.body&&(ge||G||_e&&H)){const T={};["status","statusText","headers"].forEach(Q=>{T[Q]=I[Q]});const K=i.toFiniteNumber(I.headers.get("content-length")),[ie,le]=ge&&et(K,pe(tt(ge),!0))||[];let Ke=0;const It=Q=>{if(G&&(Ke=Q,Ke>U))throw new p("maxContentLength size of "+U+" exceeded",p.ERR_BAD_RESPONSE,m,N);ie&&ie(Q)};I=new a(nt(I.body,st,It,()=>{le&&le(),H&&H()}),T)}q=q||"text";let F=await S[i.findKey(S,q)||"text"](I,m);if(G&&!E&&!_e){let T;if(F!=null&&(typeof F.byteLength=="number"?T=F.byteLength:typeof F.size=="number"?T=F.size:typeof F=="string"&&(T=typeof n=="function"?new n().encode(F).byteLength:F.length)),typeof T=="number"&&T>U)throw new p("maxContentLength size of "+U+" exceeded",p.ERR_BAD_RESPONSE,m,N)}return!_e&&H&&H(),await new Promise((T,K)=>{vt(T,K,{data:F,headers:C.from(I.headers),status:I.status,statusText:I.statusText,config:m,request:N})})}catch(v){if(H&&H(),j&&j.aborted&&j.reason instanceof p){const M=j.reason;throw M.config=m,N&&(M.request=N),v!==M&&(M.cause=v),M}throw v&&v.name==="TypeError"&&/Load failed|fetch/i.test(v.message)?Object.assign(new p("Network Error",p.ERR_NETWORK,m,N,v&&v.response),{cause:v.cause||v}):p.from(v,v&&v.code,m,N,v&&v.response)}}},wn=new Map,xt=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:s}=t,o=[n,s,r];let a=o.length,l,c,d=wn;for(;a--;)l=o[a],c=d.get(l),c===void 0&&d.set(l,c=a?new Map:Rn(t)),d=c;return c},kn=xt(),Me={http:null,xhr:pn,fetch:{get:xt}};i.forEach(Me,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var at=e=>`- ${e}`,gn=e=>i.isFunction(e)||e===null||e===!1;function Sn(e,t){e=i.isArray(e)?e:[e];const{length:r}=e;let n,s;const o={};for(let a=0;a<r;a++){n=e[a];let l;if(s=n,!gn(n)&&(s=Me[(l=String(n)).toLowerCase()],s===void 0))throw new p(`Unknown adapter '${l}'`);if(s&&(i.isFunction(s)||(s=s.get(t))))break;o[l||"#"+a]=s}if(!s){const a=Object.entries(o).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=r?a.length>1?`since :
5
- `+a.map(at).join(`
6
- `):" "+at(a[0]):"as no adapter specified";throw new p("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return s}var Nt={getAdapter:Sn,adapters:Me};function Oe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new oe(null,e)}function it(e){return Oe(e),e.headers=C.from(e.headers),e.data=ve.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Nt.getAdapter(e.adapter||se.adapter,e)(e).then(function(r){Oe(e),e.response=r;try{r.data=ve.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=C.from(r.headers),r},function(r){if(!At(r)&&(Oe(e),r&&r.response)){e.response=r.response;try{r.response.data=ve.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=C.from(r.response.headers)}return Promise.reject(r)})}var Re={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Re[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var lt={};Re.transitional=function(t,r,n){function s(o,a){return"[Axios v"+je+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return(o,a,l)=>{if(t===!1)throw new p(s(a," has been removed"+(r?" in "+r:"")),p.ERR_DEPRECATED);return r&&!lt[a]&&(lt[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,a,l):!0}};Re.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function _n(e,t,r){if(typeof e!="object")throw new p("options must be an object",p.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const o=n[s],a=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(a){const l=e[o],c=l===void 0||a(l,o,e);if(c!==!0)throw new p("option "+o+" must be "+c,p.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new p("Unknown option "+o,p.ERR_BAD_OPTION)}}var fe={assertOptions:_n,validators:Re},D=fe.validators,V=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ze,response:new Ze}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const s=(()=>{if(!n.stack)return"";const o=n.stack.indexOf(`
7
- `);return o===-1?"":n.stack.slice(o+1)})();try{if(!r.stack)r.stack=s;else if(s){const o=s.indexOf(`
8
- `),a=o===-1?-1:s.indexOf(`
9
- `,o+1),l=a===-1?"":s.slice(a+1);String(r.stack).endsWith(l)||(r.stack+=`
10
- `+s)}}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=W(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:s}=t;r!==void 0&&fe.assertOptions(r,{silentJSONParsing:D.transitional(D.boolean),forcedJSONParsing:D.transitional(D.boolean),clarifyTimeoutError:D.transitional(D.boolean),legacyInterceptorReqResOrdering:D.transitional(D.boolean)},!1),n!=null&&(i.isFunction(n)?t.paramsSerializer={serialize:n}:fe.assertOptions(n,{encode:D.function,serialize:D.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),fe.assertOptions(t,{baseUrl:D.spelling("baseURL"),withXsrfToken:D.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&i.merge(s.common,s[t.method]);s&&i.forEach(["delete","get","head","post","put","patch","query","common"],E=>{delete s[E]}),t.headers=C.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(t)===!1)return;l=l&&S.synchronous;const b=t.transitional||ke;b&&b.legacyInterceptorReqResOrdering?a.unshift(S.fulfilled,S.rejected):a.push(S.fulfilled,S.rejected)});const c=[];this.interceptors.response.forEach(function(S){c.push(S.fulfilled,S.rejected)});let d,u=0,h;if(!l){const E=[it.bind(this),void 0];for(E.unshift(...a),E.push(...c),h=E.length,d=Promise.resolve(t);u<h;)d=d.then(E[u++],E[u++]);return d}h=a.length;let y=t;for(;u<h;){const E=a[u++],S=a[u++];try{y=E(y)}catch(b){S.call(this,b);break}}try{d=it.call(this,y)}catch(E){return Promise.reject(E)}for(u=0,h=c.length;u<h;)d=d.then(c[u++],c[u++]);return d}getUri(e){e=W(this.defaults,e);const t=Ot(e.baseURL,e.url,e.allowAbsoluteUrls);return _t(t,e.params,e.paramsSerializer)}};i.forEach(["delete","get","head","options"],function(t){V.prototype[t]=function(r,n){return this.request(W(n||{},{method:t,url:r,data:(n||{}).data}))}});i.forEach(["post","put","patch","query"],function(t){function r(n){return function(o,a,l){return this.request(W(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}V.prototype[t]=r(),t!=="query"&&(V.prototype[t+"Form"]=r(!0))});var Tn=class Dt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(s=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const a=new Promise(l=>{n.subscribe(l),o=l}).then(s);return a.cancel=function(){n.unsubscribe(o)},a},t(function(o,a,l){n.reason||(n.reason=new oe(o,a,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Dt(function(n){t=n}),cancel:t}}};function An(e){return function(r){return e.apply(null,r)}}function vn(e){return i.isObject(e)&&e.isAxiosError===!0}var Ue={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ue).forEach(([e,t])=>{Ue[t]=e});function Pt(e){const t=new V(e),r=ft(V.prototype.request,t);return i.extend(r,V.prototype,t,{allOwnKeys:!0}),i.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return Pt(W(e,s))},r}var A=Pt(se);A.Axios=V;A.CanceledError=oe;A.CancelToken=Tn;A.isCancel=At;A.VERSION=je;A.toFormData=Ee;A.AxiosError=p;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=An;A.isAxiosError=vn;A.mergeConfig=W;A.AxiosHeaders=C;A.formToJSON=e=>Tt(i.isHTMLForm(e)?new FormData(e):e);A.getAdapter=Nt.getAdapter;A.HttpStatusCode=Ue;A.default=A;var Ce={getTimestamp(){return new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})},request(e){},response(e,t){},error(e,t){}},ee,On=new RegExp(`/api/(?:${Ft.join("|")})/(databases|tables|records|query|keys|chat)(?:/\\S*)?`,"g"),Cn="https://c1a01551ba00da0aee2c5e9c977906e7@o4509725125181440.ingest.de.sentry.io/4512040493318224",xn=()=>{for(const[e,t]of[["Edg","edge"],["OPR","opera"],["Firefox","firefox"],["Chrome","chrome"],["Version","safari"]]){const r=navigator.userAgent.match(new RegExp(`${e}/(\\d+)`))?.[1];if(r)return`${t}-${r}`}return"other"},qn=async()=>{const e=Cn;ee??=await qt(()=>import("./esm-DC8GK2En.js"),__vite__mapDeps([0,1,2])),ee.init({dsn:e,environment:"production",release:"db-studio@2.0.1",integrations:[ee.browserTracingIntegration()],tracesSampleRate:.1,sendDefaultPii:!1,beforeSend(t){delete t.request;const r=kt()?.installationId;if(t.user=r?{id:r}:void 0,delete t.message,delete t.contexts,delete t.extra,t.tags={...t.tags,browser:xn()},t.breadcrumbs=t.breadcrumbs?.filter(n=>n.category==="db_studio.http").map(n=>({category:n.category,level:n.level,timestamp:n.timestamp,data:{operation:n.data?.operation,method:n.data?.method,request_id:n.data?.request_id}})),t.tags?.error_kind!=="network")for(const n of t.exception?.values??[])n.value="Client error";return t},beforeSendSpan(t){const r=t.description?.replace(/[?#].*$/,"").replace(On,"/api/$1").replace(/\/(table|schema|runner)\/[^/\s]+/g,"/$1/:id");return{...t,description:r,data:{}}},beforeSendTransaction(t){return t.transaction&&(t.transaction=t.transaction.replace(/\/(table|schema|runner)\/[^/]+/g,"/$1/:id")),t}})},Nn=()=>crypto.randomUUID?.()??Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,"0")).join(""),Ie="dbstudio-connection-id",Be=sessionStorage.getItem(Ie),Dn=()=>Be?{"X-Connection-Id":Be}:{},jn=e=>{Be=e,e?sessionStorage.setItem(Ie,e):sessionStorage.removeItem(Ie)},ct=e=>(e.interceptors.request.use(t=>{const r=Nn();return t.headers.set("X-Request-Id",r),t.headers.set(Dn()),t.metadata={startTime:performance.now()},Ce.request(t),ee?.addBreadcrumb({category:"db_studio.http",data:{operation:ut(t.method,t.url),method:t.method?.toUpperCase(),request_id:r},level:"info"}),t},t=>Promise.reject(t)),e.interceptors.response.use(t=>{const r=t.config.metadata?.startTime??0,n=Math.round(performance.now()-r);return Ce.response(t,n),t},t=>{const r=t.config?.metadata?.startTime??0,n=Math.round(performance.now()-r);Ce.error(t,n);const s=t.response?.status??500,o=t.response?.data,a=o?.error??t.message??"An error occurred",l=o?.details,c=t.config?.headers.get("X-Request-Id")?.toString(),d=Object.assign(new Error(a),{status:s,details:l,requestId:c});if(!t.response){const u=ut(t.config?.method,t.config?.url),h=typeof t.code=="string"&&/^[A-Z0-9_]{2,32}$/.test(t.code)?t.code:"unknown",y=`${u} did not reach the server (${h})`,E=new Error(y);if(E.name="AxiosError",t.stack){const S=t.stack.split(`
11
- `).slice(1).filter(Pn);E.stack=[`AxiosError: ${y}`,...S].join(`
12
- `)}ee?.captureException(E,{tags:{source:"client",error_kind:"network",operation:u,error_code:h,...c?{request_id:c}:{}},fingerprint:["network",u,h]})}return Promise.reject(d)}),e),Pn=e=>/^\s*at\s/.test(e),ut=(e,t)=>{const r=t?.replace(/[?#].*$/,"").match(/\/(databases|tables|records|query|keys|chat)(?:\/|$)/)?.[1];return`${e?.toLowerCase()??"unknown"}_${r??"other"}`},Ln=()=>globalThis.location?.origin??xe.BASE_URL,Un=class{rootApi;api;dbType=null;resolveBaseUrl;constructor(e=Ln){this.resolveBaseUrl=e;const t=`${this.resolveBaseUrl()}${xe.API_PREFIX}`;this.rootApi=ct(A.create({baseURL:t})),this.api=ct(A.create({baseURL:t}))}setDbType(e){this.dbType!==e&&(this.dbType=e,this.api.defaults.baseURL=`${this.resolveBaseUrl()}${xe.API_PREFIX}/${e}`)}},$e=new Un,k=$e.rootApi,g=$e.api,Mn=e=>$e.setDbType(e),$n=()=>k.get("/chat/limit"),Hn=()=>k.get("/connections"),zn=e=>k.post("/connections",{url:e}),Vn=e=>k.post(`/connections/${encodeURIComponent(e)}/connect`),Wn=(e,t)=>k.patch(`/connections/${encodeURIComponent(e)}`,t),Kn=e=>k.delete(`/connections/${encodeURIComponent(e)}`),Jn=()=>k.get("/databases"),Xn=()=>k.get("/databases/current"),Yn=()=>k.get("/databases/connection"),Gn=e=>g.get("/logs",{params:{db:e??""}}),Qn=({query:e,db:t})=>g.post("/query",{query:e},{params:{db:t??""}}),Zn=({tableName:e,schemaName:t,data:r,db:n})=>g.post("/records",{tableName:e,data:r},{params:{db:n??"",schemaName:t}}),es=({tableName:e,schemaName:t,updates:r,primaryKey:n,primaryKeys:s,db:o})=>g.patch("/records",{tableName:e,updates:r,...n?{primaryKey:n}:{},...s?.length?{primaryKeys:s}:{}},{params:{db:o??"",schemaName:t}}),ts=({tableName:e,schemaName:t,records:r,db:n})=>g.post("/records/bulk",{tableName:e,records:r},{params:{db:n??"",schemaName:t}}),rs=({tableName:e,schemaName:t,primaryKeys:r,force:n,db:s})=>g.delete(n?"/records/force":"/records",{data:{tableName:e,primaryKeys:r},params:{db:s??"",schemaName:t}}),we=e=>e||"-",ns=e=>g.get("/keys",{params:e}),ss=({db:e,key:t,cursor:r,limit:n=100,full:s=!1,direction:o="forward"})=>g.get(`/keys/${we(t)}`,{params:{db:e,cursor:r,limit:n,full:s,direction:o}}),os=({db:e,key:t,offset:r,expectedRevision:n})=>g.get(`/keys/${we(t)}/raw`,{params:{db:e,offset:r,limit:1048576,expectedRevision:n}}),as=({db:e,data:t})=>g.post("/keys",t,{params:{db:e}}),is=({db:e,key:t,data:r})=>g.post(`/keys/${we(t)}/actions`,r,{params:{db:e}}),ls=({db:e,key:t,expectedRevision:r,force:n=!1})=>g.delete(`/keys/${we(t)}`,{params:{db:e,expectedRevision:r,force:n}}),cs=e=>g.get("/tables",{params:{db:e??""}}),us=e=>g.get("/tables/graph",{params:{db:e??""}}),ds=(e,t,r)=>g.get(`/tables/${encodeURIComponent(e)}/columns`,{params:{db:t??"",schemaName:r}}),fs=({tableName:e,schemaName:t,db:r,limit:n,cursor:s,direction:o,sort:a,order:l,filters:c})=>g.get(`/tables/${encodeURIComponent(e)}/data`,{params:{db:r,schemaName:t,limit:n,cursor:s??void 0,direction:o??void 0,sort:a,order:l??void 0,filters:c}}),ps=(e,t)=>g.post("/tables",e,{params:{db:t??""}}),hs=({tableName:e,schemaName:t,db:r,cascade:n=!1})=>g.delete(`/tables/${encodeURIComponent(e)}`,{params:{db:r??"",schemaName:t,cascade:n?"true":"false"}}),ms=({tableName:e,data:t,db:r})=>g.patch(`/tables/${encodeURIComponent(e)}/rename`,t,{params:{db:r??""}}),bs=({tableName:e,schemaName:t,data:r,db:n})=>g.post(`/tables/${encodeURIComponent(e)}/columns`,r,{params:{db:n??"",schemaName:t}}),ys=({tableName:e,schemaName:t,columnName:r,data:n,db:s})=>g.patch(`/tables/${encodeURIComponent(e)}/columns/${encodeURIComponent(r)}`,n,{params:{db:s??"",schemaName:t}}),Es=({tableName:e,schemaName:t,columnName:r,data:n,db:s})=>g.patch(`/tables/${encodeURIComponent(e)}/columns/${encodeURIComponent(r)}/rename`,n,{params:{db:s??"",schemaName:t}}),Rs=({tableName:e,schemaName:t,columnName:r,cascade:n,db:s})=>g.delete(`/tables/${encodeURIComponent(e)}/columns/${encodeURIComponent(r)}`,{params:{db:s??"",schemaName:t,cascade:n?"true":"false"}}),ws=(e,t,r)=>g.get(`/tables/${encodeURIComponent(e)}/indexes`,{params:{db:t??"",schemaName:r}}),gs=({tableName:e,schemaName:t,data:r,db:n})=>g.post(`/tables/${encodeURIComponent(e)}/indexes`,r,{params:{db:n??"",schemaName:t}}),Ss=({tableName:e,schemaName:t,indexName:r,db:n})=>g.delete(`/tables/${encodeURIComponent(e)}/indexes/${encodeURIComponent(r)}`,{params:{db:n??"",schemaName:t}}),_s=(e,t,r)=>g.get(`/tables/${encodeURIComponent(e)}/schema`,{params:{db:t??"",schemaName:r}}),Ts=({tableName:e,schemaName:t,format:r,db:n})=>g.get(`/tables/${encodeURIComponent(e)}/export`,{params:{db:n??"",schemaName:t,format:r},responseType:"blob"}),As=["table","runner","schema","indexes","logs","visualizer"],vs={SIDEBAR_SEARCH:"search",ACTIVE_TABLE:"table",ACTIVE_SCHEMA:"schema",TABLE_SCHEMA:"tableSchema",ACTIVE_TAB:"t",COLUMN_NAME:"columnName",CACHE_KEYS:{TABLES_LIST:"tablesList",TABLE_COLUMNS:"tableColumns",TABLE_DATA:"tableData",TABLE_DEFAULT_PAGE:1,TABLE_DEFAULT_LIMIT:50,DATABASES_LIST:"databasesList",CURRENT_DATABASE:"currentDatabase",DATABASE_CONNECTION_INFO:"databaseConnectionInfo"},RUNNER_STATE_KEYS:{SHOW_AS:"view"},TABLE_STATE_KEYS:{SORT:"sort",ORDER:"order",CURSOR:"cursor",DIRECTION:"dir",LIMIT:"limit",FILTERS:"filters"},REFERENCED_TABLE_STATE_KEYS:{ACTIVE_TABLE:"rTable",CURSOR:"rCursor",DIRECTION:"rDir",DEFAULT_PAGE:1,LIMIT:"rLimit",DEFAULT_LIMIT:30,FILTERS:"rFilters",SORT:"rSort",ORDER:"rOrder"},RAIL_WIDTH:48},Os=[5,10,25,50,100,500];export{Qn as A,$n as B,ss as C,Zn as D,ts as E,Vn as F,Mn as G,Dn as H,zn as I,qn as K,Kn as L,Xn as M,Yn as N,rs as O,Jn as P,Hn as R,ls as S,ns as T,Ln as U,g as V,jn as W,cs as _,ys as a,is as b,Rs as c,Ts as d,us as f,_s as g,ws as h,bs as i,Gn as j,es as k,hs as l,fs as m,Os as n,gs as o,ds as p,xe as q,As as r,ps as s,vs as t,Ss as u,Es as v,os as w,as as x,ms as y,Wn as z};
@@ -1 +0,0 @@
1
- import{l as n}from"./editor.api-DSevzNN8.js";import{t as c}from"./workers-rMl5Xrk2.js";import{_ as W,a as u,c as h,d as f,f as p,g as S,h as F,i as m,l as _,m as w,n as v,o as k,p as D,r as I,s as T,t as b,u as R,v as L}from"./lspLanguageFeatures-CnYZSn_O.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"db-studio@2.0.1"};var o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="51f02ce2-3349-4f7c-a35a-1d0463ddbc9b",t._sentryDebugIdIdentifier="sentry-dbid-51f02ce2-3349-4f7c-a35a-1d0463ddbc9b")}catch{}})();var P=12e4,y=class{constructor(t){this._defaults=t,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>P&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=c({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL("/assets/css.worker-B-fFSVTK.js",""+import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...t){let o;return this._getClient().then(e=>{o=e}).then(e=>{if(this._worker)return this._worker.withSyncedResources(t)}).then(e=>o)}};function H(t){const o=[],e=[],a=new y(t);o.push(a);const i=(...r)=>a.getLanguageServiceWorker(...r);function l(){const{languageId:r,modeConfiguration:s}=t;g(e),s.completionItems&&e.push(n.registerCompletionItemProvider(r,new b(i,["/","-",":"]))),s.hovers&&e.push(n.registerHoverProvider(r,new f(i))),s.documentHighlights&&e.push(n.registerDocumentHighlightProvider(r,new k(i))),s.definitions&&e.push(n.registerDefinitionProvider(r,new v(i))),s.references&&e.push(n.registerReferenceProvider(r,new p(i))),s.documentSymbols&&e.push(n.registerDocumentSymbolProvider(r,new _(i))),s.rename&&e.push(n.registerRenameProvider(r,new D(i))),s.colors&&e.push(n.registerColorProvider(r,new m(i))),s.foldingRanges&&e.push(n.registerFoldingRangeProvider(r,new R(i))),s.diagnostics&&e.push(new I(r,i,t.onDidChange)),s.selectionRanges&&e.push(n.registerSelectionRangeProvider(r,new w(i))),s.documentFormattingEdits&&e.push(n.registerDocumentFormattingEditProvider(r,new u(i))),s.documentRangeFormattingEdits&&e.push(n.registerDocumentRangeFormattingEditProvider(r,new h(i)))}return l(),o.push(d(e)),d(o)}function d(t){return{dispose:()=>g(t)}}function g(t){for(;t.length;)t.pop().dispose()}export{b as CompletionAdapter,v as DefinitionAdapter,I as DiagnosticsAdapter,m as DocumentColorAdapter,u as DocumentFormattingEditProvider,k as DocumentHighlightAdapter,T as DocumentLinkAdapter,h as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,R as FoldingRangeAdapter,f as HoverAdapter,p as ReferenceAdapter,D as RenameAdapter,w as SelectionRangeAdapter,y as WorkerManager,F as fromPosition,S as fromRange,H as setupMode,W as toRange,L as toTextEdit};
@@ -1,57 +0,0 @@
1
- import{t as Nn}from"./react-CKF1H7h0.js";import{t as In}from"./preload-helper-DZhPwQp1.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.0.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5c38cb27-c2e5-4630-a835-afc188527ec5",e._sentryDebugIdIdentifier="sentry-dbid-5c38cb27-c2e5-4630-a835-afc188527ec5")}catch{}})();function st(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,n])=>t.indexOf(+r)===-1).map(([r,n])=>n)}function jt(e,t="|"){return e.map(r=>Zr(r)).join(t)}function ut(e,t){return typeof t=="bigint"?t.toString():t}var En=class{constructor(e){this._getter=e,this._value=void 0}get value(){const e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Ke(e){return new En(e)}function Tn(e){return e==null}function vt(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function An(e,t){const r=e/t,n=Math.round(r),o=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<o?0:r-n}function H(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function gt(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function G(e){return gt(e._zod.def)??e._zod.def.shape}function zr(e,t,r){Object.defineProperty(e,t,{get(){const n=r();return H(this,t,n),n},enumerable:!0,configurable:!0})}function $r(e,t,r){t in e?H(e,t,r):e[t]=r}function ie(e,t,r,n){const o=G(t);for(const i of r){const a=Object.getOwnPropertyDescriptor(o,i);a.enumerable&&(a.get?zr(e,i,()=>{const s=t._zod.def.shape[i];return n?n(s,i):s}):$r(e,i,n?n(a.value,i):a.value))}}function Rn(e,t){for(const r of Reflect.ownKeys(t)){const n=Object.getOwnPropertyDescriptor(t,r);n.enumerable&&(n.get?zr(e,r,()=>t[r]):$r(e,r,n.value))}}function L(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Cn(e){return JSON.stringify(e)}function jn(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Or="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function we(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Dn=Ke(()=>{if(F.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function se(e){if(we(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(we(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Pr(e){return se(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var xn=new Set(["string","number","symbol"]);function ue(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ne(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function b(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new 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 Zr(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Ln(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var Nr={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Mn={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Un(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o={};return ie(o,e,Ve(e,t)),ne(e,L(r,{shape:o,checks:[]}))}function Ve(e,t){const r=G(e),n=[];for(const o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&n.push(o)}return n}function Fn(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=new Set(Ve(e,t)),i={};return ie(i,e,Reflect.ownKeys(G(e)).filter(a=>!o.has(a))),ne(e,L(r,{shape:i,checks:[]}))}function qn(e,t){if(!se(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const n=G(e);for(const o of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return ne(e,L(e._zod.def,{shape:Ir(e,t)}))}function Ir(e,t){const r={};return ie(r,e,Reflect.ownKeys(G(e))),Rn(r,t),r}function Kn(e,t){if(!se(t))throw new Error("Invalid input to safeExtend: expected a plain object");return ne(e,L(e._zod.def,{shape:Ir(e,t)}))}function Vn(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const r={};return ie(r,e,Reflect.ownKeys(G(e))),ie(r,t,Reflect.ownKeys(G(t))),ne(e,L(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Dt(e,t,r,n="partial"){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(`.${n}() cannot be used on object schemas containing refinements`);const i=r?new Set(Ve(t,r)):void 0,a={};return ie(a,t,Reflect.ownKeys(G(t)),e&&((s,c)=>i&&!i.has(c)?s:new e({type:"optional",innerType:s}))),ne(t,L(t._zod.def,{shape:a,checks:[]}))}function Jn(e,t,r){const n=r?new Set(Ve(t,r)):void 0,o={};return ie(o,t,Reflect.ownKeys(G(t)),(i,a)=>n&&!n.has(a)?i:new e({type:"nonoptional",innerType:i})),ne(t,L(t._zod.def,{shape:o}))}function K(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Bn(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function X(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function he(e){return typeof e=="string"?e:e?.message}function xt(e,t,r){var n;for(let o=t;o<e.length;o++)(n=e[o]).schema??(n.schema=r)}function ee(e,t,r){var n;const o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(n=e).schema??(n.schema=e.inst):e.schema=e.inst);const i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:he(e.inst?._zod.def?.error?.(e))??he(i?.(e))??he(t?.error?.(e))??he(r.customError?.(e))??he(r.localeError?.(e))??"Invalid input",s={};for(const c of Object.keys(e))c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__"||(s[c]=e[c]);return s.path??(s.path=[]),s.message=a,t?.reportInput&&(s.input=e.input),s}var Wn=/[\uD800-\uDBFF]/;function _t(e){const t=e.length;if(!Wn.test(e))return t;let r=t;for(let n=0;n<t-1;n++)(e.charCodeAt(n)&64512)===55296&&(e.charCodeAt(n+1)&64512)===56320&&(r--,n++);return r}function bt(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Gn(e){const 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";const r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function Se(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function Hn(e,t){for(const r in t){const n=Object.getOwnPropertyDescriptor(t,r);n.get?Object.defineProperty(e,r,{...n,enumerable:!1}):Qn(e,r,n.value)}}function te(e,t,r,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:r}),r}function Er(e,t,r){return te(e,t,r,!1)}function Tr(e,t){for(const r in e){const n=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return te(this,r,n(this))},set(o){te(this,r,o)}})}return t}function Qn(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:te(this,t,r.bind(this))},set(n){te(this,t,n)}})}function Yn(e,t){const r=Object.getPrototypeOf(e);return t in r?void 0:r}var et,Y=!1,Xn={configurable:!0,get(){Y=!0}};function w(e,t,r){const n=Object.getPrototypeOf(e._zod);if(t in n&&et!==e._zod){et=void 0;return}et=e._zod,Object.defineProperty(n,t,{configurable:!0,get(){Object.defineProperty(this,t,Xn);const o=Y;Y=!1;try{const i=r(this);return Y?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),Y=Y||o,i}catch(i){throw delete this[t],Y=Y||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function eo(e,t,r,n){const o=Yn(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const i={configurable:!0,writable:!0,enumerable:n,value:void 0};return Object.defineProperty(this,t,i),i.value=r(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:n,value:i})}})}var to="~constantCatch";function ro(e){const t=()=>e;return t[to]=!0,t}var Lt,tt={value:void 0,enumerable:!1},Mt="captureStackTrace"in Error?Error:null;function no(e){const t=Mt;if(t){const r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return Mt=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function f(e,t,r,n){const o={};function i(h){this.def=h,this.constr=p,this.traits=new Set}i.prototype=o;const a=r,s=a&&new WeakSet;function c(h,m){if(h._zod){if(h._zod.traits.has(e))return}else{tt.value=new i(m);try{Object.defineProperty(h,"_zod",tt)}finally{tt.value=void 0}}if(h._zod.traits.add(e),t(h,m),s){const _=Object.getPrototypeOf(h),y=h._zod.constr.prototype;let S=_;for(;S&&S!==y;)S=Object.getPrototypeOf(S);const D=S??_;s.has(D)||(s.add(D),Hn(D,a))}const g=p.prototype;for(const _ in g)Object.prototype.hasOwnProperty.call(g,_)&&(_ in h||(h[_]=g[_].bind(h)))}const u=n?.Parent??Object;class l extends u{}Object.defineProperty(l,"name",{value:e});function p(h){const m=n?.Parent?no(l):this;c(m,h);const g=m._zod.deferred;if(g){for(const y of g)y();m._zod.deferred=void 0}const _=globalThis.__zod_globalConfig?.postProcessor;return _&&_(m),m}return Object.defineProperty(p,"init",{value:c}),Object.defineProperty(p,Symbol.hasInstance,{value:h=>n?.Parent&&h instanceof n.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(p,"name",{value:e}),p}var oe=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ar=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Lt=globalThis).__zod_globalConfig??(Lt.__zod_globalConfig={});var F=globalThis.__zod_globalConfig;function B(e){return e&&Object.assign(F,e),F}function oo(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,ut,2)),e.message}function io(e){this._zod.message=e}var ao={get:oo,set:io,enumerable:!0,configurable:!0},rt={value:void 0,enumerable:!1},Ut=new WeakSet([Object.prototype,Error.prototype]),Rr=(e,t)=>{e.name="$ZodError",rt.value=t,Object.defineProperty(e,"issues",rt),rt.value=void 0,Object.defineProperty(e,"message",ao);const r=Object.getPrototypeOf(e);Ut.has(r)||(Ut.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){const n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0})}}))},so=f("$ZodError",Rr),Cr=f("$ZodError",Rr,void 0,{Parent:Error});function uo(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function co(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?uo(r,o.path[0],()=>[]).push(t(o)):n.push(t(o));return{formErrors:n,fieldErrors:r}}function lo(e,t=r=>r.message){const r={_errors:[]},n=(o,i=[])=>{for(const a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>n({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")n({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")n({issues:a.issues},[...i,...a.path]);else{const s=[...i,...a.path];if(s.length===0)r._errors.push(t(a));else{let c=r,u=0;for(;u<s.length;){const l=s[u],p=u===s.length-1;if(l==="_errors"){p&&c._errors.push(t(a)),u++;continue}Object.prototype.hasOwnProperty.call(c,l)||Object.defineProperty(c,l,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const h=c[l];p&&h._errors.push(t(a)),c=h,u++}}}};return n(e),r}function Je(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Be=e=>{const t=(r,n,o,i)=>{const a=o?{...o,async:!1}:{async:!1},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new oe;if(s.issues.length){const c=new(i?.Err??e)(s.issues.map(u=>ee(u,a,B())));throw Or(c,i?.callee??t),c}return s.value};return t},wl=Be(Cr),We=e=>{const t=async(r,n,o,i)=>{const a=o?{...o,async:!0}:{async:!0};let s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){const c=new(i?.Err??e)(s.issues.map(u=>ee(u,a,B())));throw Or(c,i?.callee??t),c}return s.value};return t},Sl=We(Cr),yt=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new oe;return i.issues.length?jr(e,i.issues,o):{success:!0,data:i.value}};function jr(e,t,r){let n;return{success:!1,get error(){return n||(n=new e(t.map(o=>ee(o,r,B()))),t=void 0,r=void 0),n},set error(o){n=o,t=void 0,r=void 0}}}var wt=e=>async(t,r,n)=>{const o=n?{...n,async:!0}:{async:!0};let i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?jr(e,i.issues,o):{success:!0,data:i.value}},fo=Symbol.for("zod.compile.invalid"),po=Symbol.for("zod.compile.fallback"),mo=((e,t,r)=>{const n=e._zod.bag.validator;if(n!==void 0){if(n(t)!==fo)return!0;if(n.definite===!0&&r===void 0)return!1}return ho(e,t,r)});function ho(e,t,r){const n=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let i;if(o?(n[po]=!0,i=o({value:t,issues:[]},n)):i=e._zod.run({value:t,issues:[]},n),i instanceof Promise)throw new oe;return i.issues.length===0}var vo=async(e,t,r)=>{const n=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:t,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length===0},go=e=>{const t=Be(e),r=(n,o,i,a)=>{const s=i?{...i,direction:"backward"}:{direction:"backward"};return t(n,o,s,Je(r,a))};return r},_o=e=>{const t=Be(e),r=(n,o,i,a)=>t(n,o,i,Je(r,a));return r},bo=e=>{const t=We(e),r=async(n,o,i,a)=>{const s=i?{...i,direction:"backward"}:{direction:"backward"};return await t(n,o,s,Je(r,a))};return r},yo=e=>{const t=We(e),r=async(n,o,i,a)=>await t(n,o,i,Je(r,a));return r},wo=e=>(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return yt(e)(t,r,o)},So=e=>(t,r,n)=>yt(e)(t,r,n),ko=e=>async(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return wt(e)(t,r,o)},zo=e=>async(t,r,n)=>wt(e)(t,r,n),$o=/^[cC][0-9a-z]{6,}$/,Oo=/^[0-9a-z]+$/,Po=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Zo=/^[0-9a-vA-V]{20}$/,No=/^[A-Za-z0-9]{27}$/,Io=/^[a-zA-Z0-9_-]{21}$/;function Eo(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var To=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ao=/^([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})$/,Ft=e=>e?new 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)$/,Ro=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Co="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function jo(){return new RegExp(Co,"u")}var Do=/^(?:(?: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])$/,xo=/^(([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}|:))$/,Lo=/^((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])$/,Mo=/^(([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])$/,Uo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Fo=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,qo=/^https?$/,Ko=/^\+[1-9]\d{6,14}$/,Dr="(?:(?:\\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 Vo(e){return new RegExp(`^${e}$`)}var Jo=Vo(Dr);function ct(e){const 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 Bo(e){return new RegExp(`^${ct(e)}$`)}function Wo(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${ct({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,n=e.local?`${r}|${ct({precision:e.precision})}`:r;return new RegExp(`^${Dr}T(?:${n})$`)}var Go=/^[\s\S]{0,}$/,Ho=/^-?\d+$/,St=/^-?\d+(?:\.\d+)?$/,Qo=/^(?:true|false)$/i,Yo=/^null$/i,Xo=/^[^A-Z]*$/,ei=/^[^a-z]*$/,x=f("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),kt=e=>{const t=e.value;return!Tn(t)&&t.length!==void 0},Le={number:"number",bigint:"bigint",object:"date"},xr=f("$ZodCheckLessThan",(e,t)=>{x.init(e,t);const r=Le[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:Le[typeof n.value]??r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Lr=f("$ZodCheckGreaterThan",(e,t)=>{x.init(e,t);const r=Le[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:Le[typeof n.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ti=f("$ZodCheckMultipleOf",(e,t)=>{x.init(e,t),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):An(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),ri=f("$ZodCheckNumberFormat",(e,t)=>{x.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,i]=Nr[t.format];e._zod.check=a=>{const s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}s<o&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),ni=f("$ZodCheckMaxLength",(e,t)=>{var r;x.init(e,t),(r=e._zod.def).when??(r.when=kt),e._zod.check=n=>{const o=n.value,i=o.length;if((typeof o=="string"&&i>t.maximum?_t(o):i)<=t.maximum)return;const a=bt(o);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),oi=f("$ZodCheckMinLength",(e,t)=>{var r;x.init(e,t),(r=e._zod.def).when??(r.when=kt),e._zod.check=n=>{const o=n.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?_t(o):i)>=t.minimum)return;const a=bt(o);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),ii=f("$ZodCheckLengthEquals",(e,t)=>{var r;x.init(e,t),(r=e._zod.def).when??(r.when=kt),e._zod.check=n=>{const o=n.value,i=o.length,a=typeof o=="string"&&i>=t.length&&i<=t.length*2?_t(o):i;if(a===t.length)return;const s=bt(o),c=a>t.length;n.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ge=f("$ZodCheckStringFormat",(e,t)=>{var r,n;x.init(e,t),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),ai=f("$ZodCheckRegex",(e,t)=>{Ge.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),si=f("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Xo),Ge.init(e,t)}),ui=f("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ei),Ge.init(e,t)}),ci=f("$ZodCheckIncludes",(e,t)=>{x.init(e,t);const r=ue(t.includes);t.pattern=new RegExp(typeof t.position=="number"?`^.{${t.position},}${r}`:r),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})}}),li=f("$ZodCheckStartsWith",(e,t)=>{x.init(e,t);const r=new RegExp(`^${ue(t.prefix)}.*`);t.pattern??(t.pattern=r),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})}}),fi=f("$ZodCheckEndsWith",(e,t)=>{x.init(e,t);const r=new RegExp(`.*${ue(t.suffix)}$`);t.pattern??(t.pattern=r),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})}}),di=f("$ZodCheckOverwrite",(e,t)=>{x.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),pi=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-=1}}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const t=e.split(`
2
- `).filter(o=>o),r=Math.min(...t.map(o=>o.length-o.trimStart().length)),n=t.map(o=>o.slice(r)).map(o=>" ".repeat(this.indent*2)+o);for(const o of n)this.content.push(o)}compile(){const e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
3
- ${t.join(`
4
- `)}
5
- };`)(...Object.values(this.closed))}},mi={major:4,minor:6,patch:5},P=f("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=mi;const n=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...n??[]]:n?.length?[...n]:[];for(const i of o)for(const a of i._zod.onattach)a(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(s,c,u)=>{if(s.memo)return s;let l=K(s),p;for(const h of c){if(h._zod.def.when){if(Bn(s)||!h._zod.def.when(s))continue}else if(l)continue;const m=s.issues.length,g=h._zod.check(s);if(g instanceof Promise&&u?.async===!1)throw new oe;if(p||g instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await g,s.issues.length!==m&&(xt(s.issues,m,e),l||(l=K(s,m)))});else{if(s.issues.length===m)continue;xt(s.issues,m,e),l||(l=K(s,m))}}return p?p.then(()=>s):s},a=(s,c,u)=>{if(K(s))return s.aborted=!0,s;const l=i(c,o,u);if(l instanceof Promise){if(u.async===!1)throw new oe;return l.then(p=>e._zod.parse(p,u))}return e._zod.parse(l,u)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){const l=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(p=>a(p,s,c)):a(l,s,c)}const u=e._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new oe;return u.then(l=>i(l,o,c))}return i(u,o,c)}}},{get"~standard"(){return Er(this,"~standard",Ur(this))},set"~standard"(e){te(this,"~standard",e)}}),Mr=(e,t)=>e.issues.length?{issues:e.issues.map(r=>ee(r,t,B()))}:{value:e.value};async function hi(e,t){const r={async:!0};return Mr(await e._zod.run({value:t,issues:[]},r),r)}function Ur(e){return{validate:t=>{const r={async:!1};try{const n=e._zod.run({value:t,issues:[]},r);if(!(n instanceof Promise))return Mr(n,r)}catch{}return hi(e,t)},vendor:"zod",version:1}}var He=f("$ZodString",(e,t)=>{P.init(e,t),e._zod.pattern=t.pattern??Go,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),I=f("$ZodStringFormat",(e,t)=>{Ge.init(e,t),He.init(e,t)}),vi=f("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ao),I.init(e,t)}),gi=f("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ft(r))}else t.pattern??(t.pattern=Ft());I.init(e,t)}),_i=f("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ro),I.init(e,t)});function Fr(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function bi(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?Fr(e)||2:yi(e,t)}function yi(e,t){if(!t.normalize&&t.protocol?.source===qo.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<"u"){const r=URL;if(typeof r.parse=="function")return r.parse(e)??2}return new URL(e)}catch{return 2}}var wi=/[\t\n\r]/g;function qt(e){return e.replace(wi,"")}function Si(e,t){return t.lastIndex=0,t.test(e.hostname)}function ki(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var zi=f("$ZodURL",(e,t)=>{I.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),o=bi(n,t);if(o===1){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(o===2){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}if(o===!0){r.value=qt(n);return}t.hostname&&!Si(o,t.hostname)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&!ki(o,t.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?o.href:qt(n);return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),$i=f("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=jo()),I.init(e,t)}),Oi=f("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?Io:Eo(t.length)),I.init(e,t)}),Pi=f("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=$o),I.init(e,t)}),Zi=f("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Oo),I.init(e,t)}),Ni=f("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Po),I.init(e,t)}),Ii=f("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Zo),I.init(e,t)}),Ei=f("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=No),I.init(e,t)}),Ti=f("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Wo(t)),I.init(e,t)}),Ai=f("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Jo),I.init(e,t)}),Ri=f("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Bo(t)),I.init(e,t)}),Ci=f("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=To),I.init(e,t)}),ji=f("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Do),I.init(e,t)}),Di=/^[0-9a-fA-F:.]+$/;function qr(e){return Di.test(e)?Fr(`http://[${e}]`):!1}var xi=f("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=xo),I.init(e,t),e._zod.check=r=>{qr(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),Li=f("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Lo),I.init(e,t)});function Mi(e){const t=e.split("/");if(t.length!==2)return!1;const[r,n]=t;if(!n)return!1;const o=Number(n);return`${o}`!==n||o<0||o>128?!1:qr(r)}var Ui=f("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Mo),I.init(e,t),e._zod.check=r=>{Mi(r.value)||r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function Kr(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Vr=/^[0-9a-zA-Z+/]*={0,2}$/,Fi=f("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Vr),I.init(e,t),e._zod.check=r=>{Kr(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),zt=/^[A-Za-z0-9_-]*$/;function qi(e){if(!zt.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/");return Kr(t.padEnd(Math.ceil(t.length/4)*4,"="))}var Ki=f("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=zt),I.init(e,t),e._zod.check=r=>{qi(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Vi=f("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Ko),I.init(e,t)});function Ji(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}var Bi=f("$ZodJWT",(e,t)=>{I.init(e,t),e._zod.check=r=>{Ji(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Jr=f("$ZodNumber",(e,t)=>{P.init(e,t),e._zod.pattern=St,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;const i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),Wi=f("$ZodNumberFormat",(e,t)=>{ri.init(e,t),Jr.init(e,t)}),Br=f("$ZodBoolean",(e,t)=>{P.init(e,t),e._zod.pattern=Qo,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),Gi=f("$ZodNull",(e,t)=>{P.init(e,t),e._zod.pattern=Yo,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{const o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}}),Hi=f("$ZodAny",(e,t)=>{P.init(e,t),e._zod.parse=r=>r}),Qi=f("$ZodUnknown",(e,t)=>{P.init(e,t),e._zod.parse=r=>r}),Yi=f("$ZodNever",(e,t)=>{P.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Kt(e,t,r){e.issues.length&&t.issues.push(...X(r,e.issues)),t.value[r]=e.value}var Xi=f("$ZodArray",(e,t)=>{P.init(e,t);const r=F.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=r?r.alloc(e,n,Array(i.length),o):Array(i.length);const a=[],s=o?.abortEarly;for(let c=0;c<i.length;c++){const u=i[c],l=t.element._zod.run({value:u,issues:[]},o);if(l instanceof Promise)a.push(l.then(p=>Kt(p,n,c)));else if(Kt(l,n,c),s&&l.issues.length!==0&&K(l))break}return a.length?Promise.all(a).then(()=>n):n}});function Me(e,t,r,n,o,i){const a=r in n,s=i==="optional";if(!(!a&&s&&o==="optional")){if(e.issues.length){if(o!==void 0&&s&&!a)return;t.issues.push(...X(r,e.issues))}if(!a&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?(a||o==="defaulted"&&!s)&&(t.value[r]=void 0):t.value[r]=e.value}}var ea=[];function Wr(e){const t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),n=r.length?r:ea,o=n.length?[...t,...n]:t;for(const a of o)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);const i=Ln(e.shape);return{...e,allKeys:o,symbolKeys:n,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function Gr(e,t,r,n,o,i,a){const s=[],c=o.keySet,u=o.catchall._zod,l=u.def.type,p=u.optin,h=u.optout;let m=0;for(const g in t){if(a&&r.issues.length!==m){if(K(r,m))break;m=r.issues.length}if(c.has(g))continue;if(g==="__proto__"){l==="never"&&s.push(g);continue}if(l==="never"){s.push(g);continue}const _=u.run({value:t[g],issues:[]},n);_ instanceof Promise?e.push(_.then(y=>Me(y,r,g,t,p,h))):Me(_,r,g,t,p,h)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i,continue:!0}),e.length?Promise.all(e).then(()=>r):r}var ta=f("$ZodObject",(e,t)=>{P.init(e,t);const r=Object.getOwnPropertyDescriptor(t,"shape"),n=r?.get?r.get.raw:t.shape??{};if(n){const u=()=>{const l={...n};return Object.defineProperty(t,"shape",{value:l}),u.raw=l,l};u.raw=n,Object.defineProperty(t,"shape",{get:u})}const o=Ke(()=>Wr(t));w(e,"propValues",u=>{const l=u.def.shape,p={};for(const h in l){const m=l[h]._zod;if(m.values){Object.prototype.hasOwnProperty.call(p,h)||H(p,h,new Set);for(const g of m.values)p[h].add(g);m.optin!==void 0&&p[h].add(void 0)}}return p});const i=we,a=t.catchall;let s;const c=F.memoizer;c?.attach(e),e._zod.parse=(u,l)=>{s??(s=o.value);const p=u.value;if(!i(p))return u.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),u;u.value=c?c.alloc(e,u,{},l):{};const h=[],m=s.shape,g=l?.abortEarly;let _=u.issues.length;for(const y of s.allKeys){if(g&&u.issues.length!==_){if(K(u,_))break;_=u.issues.length}if(y==="__proto__")continue;const S=m[y],D=S._zod.optin,pe=S._zod.optout,me=S._zod.run({value:p[y],issues:[]},l);me instanceof Promise?h.push(me.then(R=>Me(R,u,y,p,D,pe))):Me(me,u,y,p,D,pe)}return a?Gr(h,p,u,l,o.value,e,g===!0):h.length?Promise.all(h).then(()=>u):u}}),ra=f("$ZodObjectJIT",(e,t)=>{ta.init(e,t);const r=e._zod.parse,n=Ke(()=>Wr(t)),o=F.memoizer,i=m=>{const g=n.value,_=g.symbolKeys,y=new pi(["payload","ctx"],{shape:m,inst:e,memo:o,syms:_}),S=R=>`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`,D=(R,N)=>`
6
- let ${R}_ab = false;
7
- for (let i = 0; i < ${R}.issues.length; i++) {
8
- const iss = ${R}.issues[i];
9
- iss.path = iss.path ? [${N}, ...iss.path] : [${N}];
10
- payload.issues.push(iss);
11
- if (iss.continue !== true) ${R}_ab = true;
12
- }
13
- if (${R}_ab && ctx && ctx.abortEarly) {
14
- payload.value = newResult;
15
- return payload;
16
- }`;y.write("const input = payload.value;");const pe=Object.create(null);let me=0;for(const R of g.allKeys)pe[R]=`key_${me++}`;y.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const R of g.allKeys){if(R==="__proto__")continue;const N=pe[R],J=typeof R=="symbol"?`syms[${_.indexOf(R)}]`:Cn(R),Ye=`${J} in input`,Rt=m[R],Xe=Rt?._zod?.optin,Ct=Xe!==void 0,Pn=Rt?._zod?.optout==="optional";if(y.write(`const ${N} = ${S(J)};`),Ct&&Pn){const Zn=Xe==="optional"?`${N}_present`:`${N}.value !== undefined || ${N}_present`;y.write(`
17
- const ${N}_present = ${Ye};
18
- if (!${N}.issues.length || ${N}_present) {
19
- if (${N}.issues.length) {${D(N,J)}
20
- }
21
-
22
- if (${Zn}) {
23
- newResult[${J}] = ${N}.value;
24
- }
25
- }
26
-
27
- `)}else Ct?(y.write(`
28
- if (${N}.issues.length) {${D(N,J)}
29
- }
30
- `),Xe==="defaulted"?y.write(`newResult[${J}] = ${N}.value;`):y.write(`
31
- if (${N}.value !== undefined || ${Ye}) {
32
- newResult[${J}] = ${N}.value;
33
- }
34
- `)):y.write(`
35
- const ${N}_present = ${Ye};
36
- if (${N}.issues.length) {${D(N,J)}
37
- }
38
- if (!${N}_present && !${N}.issues.length) {
39
- payload.issues.push({
40
- code: "invalid_type",
41
- expected: "nonoptional",
42
- input: undefined,
43
- path: [${J}]
44
- });
45
- if (ctx && ctx.abortEarly) {
46
- payload.value = newResult;
47
- return payload;
48
- }
49
- }
50
-
51
- if (${N}_present) {
52
- newResult[${J}] = ${N}.value;
53
- }
54
-
55
- `)}return y.write("payload.value = newResult;"),y.write("return payload;"),y.compile()};let a;const s=we,c=!F.jitless,l=c&&Dn.value,p=t.catchall;let h;e._zod.parse=(m,g)=>{h??(h=n.value);const _=m.value;return s(_)?c&&l&&g?.async===!1&&g.jitless!==!0?(a||(a=i(t.shape)),m=a(m,g),p?Gr([],_,m,g,h,e,g?.abortEarly===!0):m):r(m,g):(m.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),m)}});function Vt(e,t,r,n){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!K(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>ee(a,n,B())))}),t)}var Hr=f("$ZodUnion",(e,t)=>{P.init(e,t),w(e,"optin",n=>n.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":n.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),w(e,"optout",n=>n.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),w(e,"values",n=>{if(n.def.options.every(o=>o._zod.values))return new Set(n.def.options.flatMap(o=>Array.from(o._zod.values)))}),w(e,"pattern",n=>{if(n.def.options.every(o=>o._zod.pattern)){const o=n.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>vt(i.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1;const a=[];for(const s of t.options){const c=s._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)a.push(c),i=!0;else{if(c.issues.length===0)return c;a.push(c)}}return i?Promise.all(a).then(s=>Vt(s,n,e,o)):Vt(a,n,e,o)}});function na(e){const t=new Map;for(const r of e.options){const n=r._zod.propValues?.[e.discriminator];if(!n||n.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(const o of n)if(t.has(o)){if(o!==void 0)throw new Error(`Duplicate discriminator value "${String(o)}"`);t.set(o,null)}else t.set(o,r)}return t}var oa=f("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Hr.init(e,t);const r=e._zod.parse;w(e,"propValues",o=>{const i={};let a=0;for(const s of o.def.options){const c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(s)}"`);c[o.def.discriminator]?.has(void 0)&&a++;for(const[u,l]of Object.entries(c)){Object.prototype.hasOwnProperty.call(i,u)||H(i,u,new Set);for(const p of l)i[u].add(p)}}return!o.def.unionFallback&&a>1&&i[o.def.discriminator]?.delete(void 0),i}),t.options.forEach((o,i)=>{const a=gt(o._zod.def);if(a&&!Object.prototype.hasOwnProperty.call(a,t.discriminator))throw new Error(`Invalid discriminated union option at index "${i}"`)});const n=Ke(()=>na(t));e._zod.parse=(o,i)=>{const a=o.value;if(!we(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;const s=a?.[t.discriminator],c=n.value.get(s);return c&&(s!==void 0||i.direction!=="backward")?c._zod.run(o,i):t.unionFallback||i.direction==="backward"?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()).filter(u=>n.value.get(u)!==null),input:a,path:[t.discriminator],inst:e}),o)}}),ia=f("$ZodIntersection",(e,t)=>{P.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,i=t.left._zod.run({value:o,issues:[]},n),a=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([s,c])=>Jt(r,s,c)):Jt(r,i,a)}});function lt(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(se(e)&&se(t)){const r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const i of n){if(i==="__proto__")continue;const a=lt(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],i=t[n],a=lt(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Jt(e,t,r){const n=new Map;let o;const i=new Map,a=(u,l)=>{let p;if(u.code==="unrecognized_keys"&&!u.path?.length)o??(o=u),p=u.keys;else if(u.code==="invalid_key"&&u.origin==="record"&&u.path?.length===1){const h=String(u.path[0]);i.has(h)||i.set(h,u),p=[h]}else return!1;for(const h of p)n.has(h)||n.set(h,{}),n.get(h)[l]=!0;return!0};for(const u of t.issues)a(u,"l")||e.issues.push(u);for(const u of r.issues)a(u,"r")||e.issues.push(u);const s=[...n].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(s.length){const u=o?s.filter(l=>o.keys.includes(l)):[];u.length&&e.issues.push({...o,keys:u});for(const l of s)!u.includes(l)&&i.has(l)&&e.issues.push(i.get(l))}const c=lt(t.value,r.value);if(!c.valid){if(K(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var aa=f("$ZodTuple",(e,t)=>{P.init(e,t);const r=t.items,n=F.memoizer;n?.attach(e),e._zod.parse=(o,i)=>{const a=o.value;if(!Array.isArray(a))return o.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=n?n.alloc(e,o,[],i):[];const s=[],c=Bt(r,"optin"),u=Bt(r,"optout");if(!t.rest){if(a.length<c)return o.issues.push({code:"too_small",minimum:c,inclusive:!0,input:a,inst:e,origin:"array"}),o;a.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:a,inst:e,origin:"array"})}const l=new Array(r.length),p=t.rest?i?.abortEarly:void 0;let h=!1;for(let m=0;m<r.length;m++){const g=r[m]._zod.run({value:a[m],issues:[]},i);g instanceof Promise?s.push(g.then(_=>{l[m]=_})):(l[m]=g,p&&!h&&g.issues.length&&(h=K(g)))}if(t.rest&&!h){let m=r.length-1;const g=a.slice(r.length);let _=o.issues.length;for(const y of g){if(p&&o.issues.length!==_){if(K(o,_))break;_=o.issues.length}m++;const S=t.rest._zod.run({value:y,issues:[]},i);S instanceof Promise?s.push(S.then(D=>Wt(D,o,m))):Wt(S,o,m)}}return s.length?Promise.all(s).then(()=>Gt(l,o,r,a,u)):Gt(l,o,r,a,u)}});function Bt(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function Wt(e,t,r){e.issues.length&&t.issues.push(...X(r,e.issues)),t.value[r]=e.value}function Gt(e,t,r,n,o){for(let i=0;i<r.length;i++){const a=e[i],s=i<n.length;if(!s&&i>=o&&r[i]._zod.optin==="optional"){t.value.length=i;break}if(a.issues.length){if(!s&&i>=o){t.value.length=i;break}t.issues.push(...X(i,a.issues))}t.value[i]=a.value}for(let i=t.value.length-1;i>=n.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var sa=f("$ZodRecord",(e,t)=>{P.init(e,t);const r=F.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{const i=n.value;if(!se(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;const a=[],s=t.keyType._zod.values;if(s&&!t.partial){n.value=r?r.alloc(e,n,{},o):{};const c=new Set;for(const l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){if(c.add(typeof l=="number"?l.toString():l),l==="__proto__")continue;const p=t.keyType._zod.run({value:l,issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(p.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(g=>ee(g,o,B())),input:l,path:[l],inst:e});continue}const h=p.value;if(h==="__proto__")continue;const m=t.valueType._zod.run({value:i[l],issues:[]},o);m instanceof Promise?a.push(m.then(g=>{g.issues.length&&n.issues.push(...X(l,g.issues)),n.value[h]=g.value})):(m.issues.length&&n.issues.push(...X(l,m.issues)),n.value[h]=m.value)}let u;for(const l in i)if(!c.has(l))if(t.mode==="loose"){if(l==="__proto__")continue;n.value[l]=i[l]}else u=u??[],u.push(l);u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:u,continue:!0})}else{n.value=r?r.alloc(e,n,{},o):{};let c;for(const u of Reflect.ownKeys(i)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,u))continue;let l=t.keyType._zod.run({value:u,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&St.test(u)&&l.issues.length){const m=t.keyType._zod.run({value:Number(u),issues:[]},o);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(l=m)}if(l.issues.length){t.mode==="loose"?n.value[u]=i[u]:s?(c=c??[],c.push(u)):n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(m=>ee(m,o,B())),input:u,path:[u],inst:e});continue}const p=l.value;if(p==="__proto__")continue;const h=t.valueType._zod.run({value:i[u],issues:[]},o);h instanceof Promise?a.push(h.then(m=>{m.issues.length&&n.issues.push(...X(u,m.issues)),n.value[p]=m.value})):(h.issues.length&&n.issues.push(...X(u,h.issues)),n.value[p]=h.value)}c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c,continue:!0})}return a.length?Promise.all(a).then(()=>n):n}}),ua=f("$ZodEnum",(e,t)=>{P.init(e,t);const r=st(t.entries),n=new Set(r);e._zod.values=n,w(e,"pattern",o=>{const i=st(o.def.entries).filter(a=>xn.has(typeof a));return new RegExp(i.length?`^(${i.map(a=>ue(a.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,i)=>{const a=o.value;return n.has(a)||o.issues.push({code:"invalid_value",values:r,input:a,inst:e}),o}}),ca=f("$ZodLiteral",(e,t)=>{P.init(e,t);const r=new Set(t.values);e._zod.values=r,w(e,"pattern",n=>{const o=n.def.values;return new RegExp(o.length?`^(${o.map(i=>typeof i=="string"?ue(i):i?ue(i.toString()):String(i)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,o)=>{const i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),la=f("$ZodTransform",(e,t)=>{P.init(e,t),e._zod.optin="optional",F.memoizer?.guard(e),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ar(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r));if(o instanceof Promise)throw new oe;return r.value=o,r}});function Ht(e,t){return e.value=t.issues.length?void 0:t.value,e}var Qr=f("$ZodOptional",(e,t)=>{P.init(e,t),w(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",w(e,"values",r=>{const n=r.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),w(e,"pattern",r=>{const n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${vt(n.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;const o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>Ht(r,i)):Ht(r,o)}return t.innerType._zod.run(r,n)}}),fa=f("$ZodExactOptional",(e,t)=>{Qr.init(e,t),w(e,"values",r=>r.def.innerType._zod.values),w(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),da=f("$ZodNullable",(e,t)=>{P.init(e,t),w(e,"optin",r=>r.def.innerType._zod.optin),w(e,"optout",r=>r.def.innerType._zod.optout),w(e,"pattern",r=>{const n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${vt(n.source)}|null)$`):void 0}),w(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),pa=f("$ZodDefault",(e,t)=>{P.init(e,t),e._zod.optin="defaulted",w(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>Qt(i,t)):Qt(o,t)}});function Qt(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ma=f("$ZodPrefault",(e,t)=>{P.init(e,t),e._zod.optin="defaulted",w(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),ha=f("$ZodNonOptional",(e,t)=>{P.init(e,t),w(e,"values",r=>{const n=r.def.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>Yt(i,e)):Yt(o,e)}});function Yt(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 Xt(e,t,r,n){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>ee(o,n,B()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var va=f("$ZodCatch",(e,t)=>{P.init(e,t),w(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),w(e,"optout",r=>r.def.innerType._zod.optout),w(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>Xt(r,i,t,n)):Xt(r,o,t,n)}}),Yr=f("$ZodPipe",(e,t)=>{P.init(e,t),w(e,"values",r=>r.def.in._zod.values),w(e,"optin",r=>r.def.in._zod.optin),w(e,"optout",r=>r.def.out._zod.optout),w(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const i=t.out._zod.run(r,n);return i instanceof Promise?i.then(a=>Ze(a,t.in,n)):Ze(i,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>Ze(i,t.out,n)):Ze(o,t.out,n)}});function Ze(e,t,r){return e.issues.some(n=>n.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var Xr=f("$ZodCodec",(e,t)=>{P.init(e,t),w(e,"values",r=>r.def.in._zod.values),w(e,"optin",r=>r.def.in._zod.optin),w(e,"optout",r=>r.def.out._zod.optout),w(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>Ne(i,t,n)):Ne(o,t,n)}else{const o=t.out._zod.run(r,n);return o instanceof Promise?o.then(i=>Ne(i,t,n)):Ne(o,t,n)}}});function Ne(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){const n=t.transform(e.value,e);return n instanceof Promise?n.then(o=>Ie(e,o,t.out,r)):Ie(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>Ie(e,o,t.in,r)):Ie(e,n,t.in,r)}}function Ie(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}var ga=f("$ZodPreprocess",(e,t)=>{Yr.init(e,t)}),_a=f("$ZodReadonly",(e,t)=>{P.init(e,t),w(e,"propValues",r=>r.def.innerType._zod.propValues),w(e,"values",r=>r.def.innerType._zod.values),w(e,"optin",r=>r.def.innerType?._zod?.optin),w(e,"optout",r=>r.def.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(er):er(o)}});function er(e){return e.memo||(e.value=Object.freeze(e.value)),e}var ba=f("$ZodCustom",(e,t)=>{x.init(e,t),P.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>tr(i,r,n,e));tr(o,r,n,e)}});function tr(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(Se(o))}}var ya=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},ft="~memo",rr=[];function en(e){return e!==null&&typeof e=="object"}function nt(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var tn=new WeakMap,ve=0,Ce=1,be=2;function je(e,t,r){const n=tn.get(e);if(n!==void 0)return n?be:ve;if(t.has(e))return be;t.add(e);let o=ve;const i=u=>{if(o!==be&&u?._zod){const l=je(u,t,r);l>o&&(o=l)}},a=(u,l)=>{let p=ve;for(const h of Reflect.ownKeys(u)){const m=Object.getOwnPropertyDescriptor(u,h);if(l&&!m.enumerable)continue;const g=m.get?Ce:m.value?._zod?je(m.value,t,r):ve;g>p&&(p=g)}return p},s=u=>{u>o&&(o=u)},c=e._zod.def;switch(c.type){case"object":{const u=gt(c);s(u?a(u,!0):Ce),i(c.catchall);break}case"array":i(c.element);break;case"tuple":for(const u of c.items)i(u);i(c.rest);break;case"record":case"map":i(c.keyType),i(c.valueType);break;case"set":i(c.valueType);break;case"union":for(const u of c.options)i(u);break;case"intersection":i(c.left),i(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":i(c.innerType);break;case"pipe":i(c.in),i(c.out);break;case"function":i(c.input),i(c.output);break;case"lazy":{const u=c._cachedInner??(r?e._zod.innerType:void 0);s(u?je(u,t,!1):Ce);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(const u in c){const l=Object.getOwnPropertyDescriptor(c,u);if(!l||l.get)continue;const p=l.value;if(!(!p||typeof p!="object")){if(p._zod)i(p);else if(Array.isArray(p))for(const h of p)i(h)}}}return t.delete(e),wa(e,o)}function wa(e,t){return t!==Ce&&tn.set(e,t===be),t}function Sa(e,t){let r=e.buckets.get(t);return r||(r=new WeakMap,e.buckets.set(t,r)),r}var Ee,Te=[],ka={alloc(e,t,r){const n=Ee;if(!n)return r;Ee=void 0;const o={value:r,issues:null};return n.set(t.value,o),Te.push(o),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const r=e._zod.parse,n=(o,i)=>{if(i.direction!=="backward"&&$a(i,o.value))throw new ya;return r(o,i)};e._zod.parse=n,e._zod.run===r&&(e._zod.run=n)})},attach(e){var t;let r,n=!1,o,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const a=e._zod.parse,s=(c,u)=>{if(r===void 0){const S=je(e,new Set,!1);if(S===ve)return e._zod.parse=a,e._zod.run===s&&(e._zod.run=a),a(c,u);S===be||n?r=!0:n=!0}const l=c.value;if(!en(l))return a(c,u);let p=u[ft];p||(p={buckets:new WeakMap,backEdges:void 0},u[ft]=p);let h;o===u?h=i:(h=Sa(p,e),o=u,i=h);const m=h.get(l);if(m)return c.value=m.value,m.issues?m.issues.length&&c.issues.push(...nt(m.issues)):(c.memo=!0,p.backEdges??(p.backEdges=new WeakSet),p.backEdges.add(m.value)),c;Ee=h;const g=Te.length,_=a(c,u);Ee=void 0;const y=Te.length>g?Te.pop():void 0;return _ instanceof Promise?_.then(S=>(y&&(y.issues=S.issues.length?nt(S.issues):rr),S)):(y&&(y.issues=_.issues.length?nt(_.issues):rr),_)};e._zod.parse=s,e._zod.run===a&&(e._zod.run=s)})}};function za(){return ka}function $a(e,t){const r=e[ft]?.backEdges;return r!==void 0&&en(t)&&r.has(t)}var Oa=()=>{const 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(i){return e[i]??null}const r={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"},n={nan:"NaN"};function o(i,a){return i==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):n[i]??i}return i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${o(i.expected)}, received ${o(Gn(i.input),i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${Zr(i.values[0])}`:`Invalid option: expected one of ${jt(i.values,"|")}`;case"too_big":{const a=i.exact?"exactly ":i.inclusive?"<=":"<",s=t(i.origin);return s?`Too big: expected ${i.origin??"value"} to have ${a}${i.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${a}${i.maximum.toString()}`}case"too_small":{const a=i.exact?"exactly ":i.inclusive?">=":">",s=t(i.origin);return s?`Too small: expected ${i.origin} to have ${a}${i.minimum.toString()} ${s.unit}`:`Too small: expected ${i.origin} to be ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${r[a.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${jt(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(a=>`'${a}'`).join(" | ")}`:i.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Pa(){return{localeError:Oa()}}var nr,Za=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const 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){const t=e._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Na(){return new Za}(nr=globalThis).__zod_globalRegistry??(nr.__zod_globalRegistry=Na());var ge=globalThis.__zod_globalRegistry;function $t(e){return e.checks&&(e.checks=[...e.checks]),e}function Ia(e,t){return new e($t({type:"string",...b(t)}))}function Ea(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...b(t)})}function Ta(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...b(t)})}function Aa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...b(t)})}function Ra(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...b(t)})}function Ca(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...b(t)})}function ja(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...b(t)})}function Da(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...b(t)})}function xa(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...b(t)})}function La(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...b(t)})}function Ma(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...b(t)})}function Ua(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...b(t)})}function Fa(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...b(t)})}function qa(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...b(t)})}function Ka(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...b(t)})}function Va(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...b(t)})}function Ja(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...b(t)})}function Ba(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...b(t)})}function Wa(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...b(t)})}function Ga(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...b(t)})}function Ha(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...b(t)})}function Qa(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...b(t)})}function Ya(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...b(t)})}function Xa(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...b(t)})}function es(e,t){return new e({type:"string",format:"date",check:"string_format",...b(t)})}function ts(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...b(t)})}function rs(e,t){return new e({type:"string",format:"duration",check:"string_format",...b(t)})}function ns(e,t){return new e($t({type:"number",checks:[],...b(t)}))}function os(e,t){return new e($t({type:"number",coerce:!0,checks:[],...b(t)}))}function is(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...b(t)})}function as(e,t){return new e({type:"boolean",...b(t)})}function ss(e,t){return new e({type:"null",...b(t)})}function us(e){return new e({type:"any"})}function cs(e){return new e({type:"unknown"})}function ls(e,t){return new e({type:"never",...b(t)})}function or(e,t){return new xr({check:"less_than",...b(t),value:e,inclusive:!1})}function ot(e,t){return new xr({check:"less_than",...b(t),value:e,inclusive:!0})}function ir(e,t){return new Lr({check:"greater_than",...b(t),value:e,inclusive:!1})}function it(e,t){return new Lr({check:"greater_than",...b(t),value:e,inclusive:!0})}function ar(e,t){return new ti({check:"multiple_of",...b(t),value:e})}function rn(e,t){return new ni({check:"max_length",...b(t),maximum:e})}function Ue(e,t){return new oi({check:"min_length",...b(t),minimum:e})}function nn(e,t){return new ii({check:"length_equals",...b(t),length:e})}function fs(e,t){return new ai({check:"string_format",format:"regex",...b(t),pattern:e})}function ds(e){return new si({check:"string_format",format:"lowercase",...b(e)})}function ps(e){return new ui({check:"string_format",format:"uppercase",...b(e)})}function ms(e,t){return new ci({check:"string_format",format:"includes",...b(t),includes:e})}function hs(e,t){return new li({check:"string_format",format:"starts_with",...b(t),prefix:e})}function vs(e,t){return new fi({check:"string_format",format:"ends_with",...b(t),suffix:e})}function de(e){return new di({check:"overwrite",tx:e})}function gs(e){return de(t=>t.normalize(e))}function _s(){return de(e=>e.trim())}function bs(){return de(e=>e.toLowerCase())}function ys(){return de(e=>e.toUpperCase())}function ws(){return de(e=>jn(e))}function Ss(e,t,r){return new e({type:"array",element:t,...b(r)})}function ks(e,t,r){return new e({type:"custom",check:"custom",fn:t,...b(r)})}function zs(e,t){const r=$s(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(Se(o,n.value,r._zod.def));else{const i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),n.issues.push(Se(i))}},e(n.value,n)),t);return r}function $s(e,t){const r=new x({check:"custom",...b(t)});return r._zod.check=e,r}function Os(e,t){const r=b(t);let n=r.truthy??["true","1","yes","on","y","enabled"],o=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(l=>typeof l=="string"?l.toLowerCase():l),o=o.map(l=>typeof l=="string"?l.toLowerCase():l));const i=new Set(n),a=new Set(o),s=e.Codec??Xr,c=e.Boolean??Br,u=new s({type:"pipe",in:new(e.String??He)({type:"string",error:r.error}),out:new c({type:"boolean",error:r.error}),transform:((l,p)=>{let h=l;return r.case!=="sensitive"&&(h=h.toLowerCase()),i.has(h)?!0:a.has(h)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:p.value,inst:u,continue:!1}),{})}),reverseTransform:((l,p)=>l===!0?n[0]||"true":o[0]||"false"),error:r.error});return u._zod.bag.truthy=n,u._zod.bag.falsy=o,u._zod.bag.case=r.case??"insensitive",u}function ye(e,...t){for(const r of t)for(const n of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,n)&&H(e,n,r[n]);return e}function on(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??ge,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 re(e,t,r,n,o){const i=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:n.path,message:o}):t.unrepresentable;if(i==="any")return!1;if(i===void 0||i==="throw")throw new Error(o);return Object.assign(r,i),!0}function T(e,t,r={path:[],schemaPath:[]}){var n;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{const u={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,u);else{const p=a.schema,h=t.processors[o.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);h(e,t,p,u)}const l=e._zod.parent;l&&(a.ref||(a.ref=l),T(l,t,u),t.seen.get(l).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&ye(a.schema,c),t.io==="input"&&j(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function sr(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function an(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const n=new Map;for(const a of e.seen.entries()){const s=e.metadataRegistry.get(a[0])?.id;if(s){const c=n.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(s,a[0])}}const o=a=>{const s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(a[0])?.id,h=e.external.uri??(g=>g);if(p)return{ref:h(p)};const m=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=m,{defId:m,ref:`${h("__shared")}#/${s}/${sr(m)}`}}const c="#",u=`${c}/${s}/`;if(a[1]===r&&!a[1].schema.id)return{ref:c};const l=a[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+sr(l)}},i=a=>{if(a[1].schema.$ref)return;const s=a[1],{ref:c,defId:u}=o(a);s.def={...s.schema},u&&(s.defId=u);const l=s.schema;for(const p in l)delete l[p];l.$ref=c};if(e.cycles==="throw")for(const a of e.seen.entries()){const s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
56
-
57
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const s=a[1];if(t===a[0]){i(a);continue}if(e.external){const c=e.external.registry.get(a[0])?.id;if(t!==a[0]&&c){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}s.count>1&&e.reused==="ref"&&i(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function sn(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const r=[];for(const n of t){if(!n||typeof n!="object")return;sn(n);const o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;const i=n.type;for(const a of Array.isArray(i)?i:[i]){if(typeof a!="string")return;r.includes(a)||r.push(a)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var un=new Set(["type","properties","required","additionalProperties"]),ur=["oneOf","anyOf"];function cr(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function dt(e){const t=[];for(const i of e){if(typeof i!="object"||i.type!=="object")return null;for(const a in i)if(!un.has(a))return null;t.push(i)}const r={},n=new Set;for(const i of t){for(const a in i.properties){if(Object.prototype.hasOwnProperty.call(r,a))continue;const s=[];for(const u of t){const l=u.properties?.[a]??cr(u);l!=null&&(s.some(p=>JSON.stringify(p)===JSON.stringify(l))||s.push(l))}const c=s.length===1?s[0]:dt(s)??{allOf:s};H(r,a,c)}for(const a of i.required??[])n.add(a)}const o={type:"object",properties:r};if(n.size&&(o.required=[...n]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{const i=[];for(const a of t){const s=cr(a);s&&!i.some(c=>JSON.stringify(c)===JSON.stringify(s))&&i.push(s)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function Ps(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const o of un)if(o in e)return;const r=t.filter(o=>ur.some(i=>Array.isArray(o[i])));let n=null;if(!r.length)n=dt(t);else{const o=r[0],i=ur.find(c=>Array.isArray(o[c]));if(Object.keys(o).length!==1)return;const a=t.filter(c=>c!==o),s=o[i].map(c=>dt([...a,c]));if(s.some(c=>!c))return;n={[i]:s}}n&&(delete e.allOf,ye(e,n))}function cn(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=s=>{const c=e.seen.get(s);if(c.ref===null)return;const u=c.def??c.schema,l={...u},p=c.ref;if(c.ref=null,p){n(p);const m=e.seen.get(p),g=m.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(g)):ye(u,g),ye(u,l),s._zod.parent===p)for(const _ in u)_==="$ref"||_==="allOf"||_ in l||delete u[_];if(g.$ref&&m.def)for(const _ in u)_==="$ref"||_==="allOf"||_ in m.def&&JSON.stringify(u[_])===JSON.stringify(m.def[_])&&delete u[_]}const h=s._zod.parent;if(h&&h!==p){n(h);const m=e.seen.get(h);if(m?.schema.$ref&&(u.$ref=m.schema.$ref,m.def))for(const g in u)g==="$ref"||g==="allOf"||g in m.def&&JSON.stringify(u[g])===JSON.stringify(m.def[g])&&delete u[g]}e.override({zodSchema:s,jsonSchema:u,path:c.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const s of[...e.seen.entries()].reverse())n(s[0]);if(e.target!=="openapi-3.0")for(const s of e.seen.entries())sn(s[1].def??s[1].schema);for(const s of e.deferred)s();if(e.intersections.length){const s=new Map;for(const c of e.seen.values())for(const u of[c.schema,c.def]){const l=u?.allOf;if(!Array.isArray(l))continue;const p=s.get(l);p?p.push(u):s.set(l,[u])}for(const c of e.intersections)for(const u of s.get(c)??[])Ps(u)}}const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}ye(o,r.defId?r.schema:r.def??r.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;const a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const s of e.seen.entries()){const c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,H(a,c.defId,c.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?o.$defs=a:o.definitions=a);try{const s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Fe(t,"input",e.processors),output:Fe(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function j(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return j(n.element,r);if(n.type==="set")return j(n.valueType,r);if(n.type==="lazy")return j(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return j(n.innerType,r);if(n.type==="intersection")return j(n.left,r)||j(n.right,r);if(n.type==="record"||n.type==="map")return j(n.keyType,r)||j(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:j(n.in,r)||j(n.out,r);if(n.type==="object"){for(const o in n.shape)if(j(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(const o of n.options)if(j(o,r))return!0;return!1}if(n.type==="tuple"){for(const o of n.items)if(j(o,r))return!0;return!!(n.rest&&j(n.rest,r))}return!1}var Zs=(e,t={})=>r=>{const n=on({...r,processors:t});return T(e,n),an(n,e),cn(n,e)},Fe=(e,t,r={})=>n=>{const{libraryOptions:o,target:i}=n??{},a=on({...o??{},target:i,io:t,processors:r});return T(e,a),an(a,e),cn(a,e)},ce=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},le=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},lr=(e,t)=>{ce(e,"minimum",t),le(e,"maximum",t)},ln=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},fn=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},dn=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},pn=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},fr=(e,t)=>ce(e,"minimum",t.minimum),dr=(e,t)=>le(e,"maximum",t.maximum),pr=e=>(t,r)=>{pn(t,r.format);const[n,o]=e[r.format];ce(t,"minimum",n),le(t,"maximum",o)},Ns={greater_than:(e,t)=>ce(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>le(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>ln(e,t.value),number_format:pr(Nr),bigint_format:pr(Mn),min_length:fr,max_length:dr,length_equals:(e,t)=>lr(e,t.length),min_size:fr,max_size:dr,size_equals:(e,t)=>lr(e,t.size),string_format:(e,t)=>{pn(e,t.format),t.pattern&&fn(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)=>dn(e,t.mime)};function U(e){const t={},r=e._zod.def,n=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(const i of n)Ns[i._zod.def.check]?.(t,i._zod.def);const o=e._zod.bag;o.minimum!==void 0&&ce(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&ce(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&le(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&le(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&ln(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&dn(t,o.mime);for(const i of o.patterns??[])fn(t,i);return t}var Is={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Es=new Map([[Vr,Uo],[zt,Fo]]),mn=e=>Es.get(e)??e,Ts=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:u,laxFormat:l}=U(e);if(typeof i=="number"&&(o.minLength=i),typeof a=="number"&&(o.maxLength=a),s&&(o.format=Is[s]??s,o.format===""&&delete o.format,(s==="time"||l)&&delete o.format),u&&(o.contentEncoding=u),c&&c.size>0){const p=[...c].map(mn);p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},As=(e,t,r,n)=>{const o=r,{minimum:i,maximum:a,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:u,isInt:l}=U(e);o.type=l?"integer":"number";const p=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),h=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),m=t.target==="draft-04"||t.target==="openapi-3.0";if(p?m?(o.minimum=u,o.exclusiveMinimum=!0):o.exclusiveMinimum=u:typeof i=="number"&&(o.minimum=i),h?m?(o.maximum=c,o.exclusiveMaximum=!0):o.exclusiveMaximum=c:typeof a=="number"&&(o.maximum=a),s){const g=new Set;for(const S of s)Number.isFinite(S)&&S!==0?g.add(Math.abs(S)):re(e,t,o,n,`A multipleOf divisor of ${S} cannot be represented in JSON Schema`);const[_,...y]=g;_!==void 0&&(o.multipleOf=_),y.length&&(o.allOf=[...o.allOf??[],...y.map(S=>({multipleOf:S}))])}},Rs=(e,t,r,n)=>{r.type="boolean"},Cs=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},js=(e,t,r,n)=>{r.not={}},Ds=(e,t,r,n)=>{},xs=(e,t,r,n)=>{},Ls=(e,t,r,n)=>{const o=e._zod.def,i=st(o.entries);if(i.length===0){r.not={};return}i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},Ms=(e,t,r,n)=>{const o=e._zod.def;if(o.values.length===0){r.not={};return}const i=[];for(const a of o.values)if(a===void 0){if(re(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(re(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){const a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},Us=(e,t,r,n)=>{re(e,t,r,n,"Custom types cannot be represented in JSON Schema")},Fs=(e,t,r,n)=>{re(e,t,r,n,"Transforms cannot be represented in JSON Schema")},qs=(e,t,r,n)=>{const o=r,i=e._zod.def,{minimum:a,maximum:s}=U(e);typeof a=="number"&&(o.minItems=a),typeof s=="number"&&(o.maxItems=s),o.type="array",o.items=T(i.element,t,{...n,path:[...n.path,"items"]})};function ke(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?ke(t.out):t.type==="catch"?ke(t.innerType):e._zod.optin}var Ks=(e,t,r,n)=>{const o=r,i=e._zod.def,a=i.shape;if(Object.getOwnPropertySymbols(a).length&&re(e,t,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const c in a)H(o.properties,c,T(a[c],t,{...n,path:[...n.path,"properties",c]}));const s=[];for(const c of Object.keys(a)){const u=i.shape[c];(t.io==="input"?ke(u)===void 0:u._zod.optout===void 0)&&s.push(c)}s.length>0&&(o.required=s),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=T(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Vs=(e,t,r,n)=>{const o=e._zod.def,i=o.inclusive===!1,a=o.options.map((s,c)=>T(s,t,{...n,path:[...n.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=a:r.anyOf=a},Js=(e,t,r,n)=>{const o=e._zod.def,i=T(o.left,t,{...n,path:[...n.path,"allOf",0]}),a=T(o.right,t,{...n,path:[...n.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=c,t.intersections.push(c)},Bs=(e,t,r,n)=>{const o=r,i=e._zod.def;o.type="array";const a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((_,y)=>T(_,t,{...n,path:[...n.path,a,y]})),u=i.rest?T(i.rest,t,{...n,path:[...n.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;let l=i.items.length;for(;l>0;){const _=i.items[l-1];if(!(t.io==="input"?ke(_)!==void 0:_._zod.optout==="optional"))break;l--}const p=i.items.length,h=!i.rest;t.target==="draft-2020-12"?(o.prefixItems=c,h?o.items=!1:u&&(o.items=u),l>0&&(o.minItems=l),h&&(o.maxItems=p)):t.target==="openapi-3.0"?(o.items={anyOf:c},u&&o.items.anyOf.push(u),l>0&&(o.minItems=l),h&&(o.maxItems=p)):(o.items=c,h?o.additionalItems=!1:u&&(o.additionalItems=u),l>0&&(o.minItems=l),h&&(o.maxItems=p));const{minimum:m,maximum:g}=U(e);typeof m=="number"&&(o.minItems=m),typeof g=="number"&&(o.maxItems=g)};function pt(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);const g=e.get(t)?.def;if(!g)return t;const _=pt(e,g,r);return _===g?t:_}for(const g of["anyOf","oneOf"]){const _=t[g];if(!Array.isArray(_))continue;const y=_.map(S=>pt(e,S,r));y.some((S,D)=>S!==_[D])&&(t={...t,[g]:y})}const n=Array.isArray(t.type)?t.type:[t.type],o=!n.includes("string")&&n.some(g=>g==="number"||g==="integer"),i=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!i?.some(g=>typeof g=="number"))return t;const{minimum:a,maximum:s,exclusiveMinimum:c,exclusiveMaximum:u,multipleOf:l,format:p,id:h,...m}=t;return m.enum?m.enum=m.enum.map(g=>typeof g=="number"?String(g):g):typeof m.const=="number"&&(m.const=String(m.const)),o&&(m.type="string",i||(m.pattern=(n.includes("number")?St:Ho).source)),m}var mt=new WeakMap;function Ws(e){const t=new Map;for(const n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);const r=new Map;for(const n of mt.get(e)??[]){const o=e.seen.get(n),i=(o?.def??o?.schema)?.propertyNames;if(!i||i===!0||r.has(i))continue;const a=pt(t,i,new Set);a!==i&&r.set(i,a)}if(r.size)for(const n of e.seen.values())for(const o of[n.schema,n.def]){const i=o&&r.get(o.propertyNames);i&&(o.propertyNames=i)}}var Gs=(e,t,r,n)=>{const o=r,i=e._zod.def;o.type="object";const a=i.keyType,s=U(a).patterns;if(i.mode==="loose"&&s&&s.size>0){const l=T(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(const p of s)H(o.patternProperties,mn(p).source,l)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=T(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let l=mt.get(t);l||(l=[],mt.set(t,l),t.deferred.push(()=>Ws(t))),l.push(e)}o.additionalProperties=T(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}const c=a._zod.values,u=t.io==="input"&&ke(i.valueType)!==void 0;if(c&&!i.partial&&!u){const l=[...c].filter(p=>typeof p=="string"||typeof p=="number");l.length>0&&(o.required=l.map(String))}},Hs=(e,t,r,n)=>{const o=e._zod.def,i=T(o.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},Qs=(e,t,r,n)=>{const o=e._zod.def;T(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},Ot=Symbol();function hn(e,t,r,n,o){let i=!1;const a=JSON.stringify(e,(s,c)=>typeof c!="bigint"?c:(i=!0,null));return i?(re(t,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),Ot):JSON.parse(a)}var Ys=(e,t,r,n)=>{const o=e._zod.def;T(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;const a=hn(o.defaultValue,e,t,r,n);a!==Ot&&(r.default=a)},Xs=(e,t,r,n)=>{const o=e._zod.def;T(o.innerType,t,n);const i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;const a=hn(o.defaultValue,e,t,r,n);a!==Ot&&(r._prefault=a)},eu=(e,t,r,n)=>{const o=e._zod.def;T(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{re(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=a},tu=(e,t,r,n)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?o.out:o.in:o.out;T(a,t,n);const s=t.seen.get(e);s.ref=a},ru=(e,t,r,n)=>{const o=e._zod.def;T(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},vn=(e,t,r,n)=>{const o=e._zod.def;T(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},mr=new WeakSet([Object.prototype,Error.prototype]);function Ae(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const n=r(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0})}})}var nu=(e,t)=>{so.init(e,t),e.name="ZodError";const r=Object.getPrototypeOf(e);mr.has(r)||(mr.add(r),Ae(r,"format",n=>o=>lo(n,o)),Ae(r,"flatten",n=>o=>co(n,o)),Ae(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,ut,2)}),Ae(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,ut,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},q=f("ZodError",nu,void 0,{Parent:Error}),ou=Be(q),iu=We(q),au=yt(q),su=wt(q),uu=go(q),cu=_o(q),lu=bo(q),fu=yo(q),du=wo(q),pu=So(q),mu=ko(q),hu=zo(q);function vu(){F.localeError||B(Pa())}function $e(){F.memoizer||B({memoizer:za()})}var Z=f("ZodType",(e,t)=>(vu(),P.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(L(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return ne(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(mc(e,t))},superRefine(e,t){return this.check(hc(e,t))},overwrite(e){return this.check(de(e))},optional(){return gr(this)},exactOptional(){return ec(this)},nullable(){return _r(this)},nullish(){return gr(_r(this))},nonoptional(e){return ac(this,e)},array(){return z(this)},or(e){return Qe([this,e])},and(e){return Hu(this,e)},transform(e){return br(this,wn(e))},default(e){return nc(this,e)},prefault(e){return ic(this,e)},catch(e){return uc(this,e)},pipe(e){return br(this,e)},readonly(){return dc(this)},describe(e){const t=this.clone();return ge.add(t,{description:e}),t},meta(...e){if(e.length===0)return ge.get(this);const t=this.clone();return ge.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 Er(this,"~standard",{...Ur(this),jsonSchema:{input:Fe(this,"input"),output:Fe(this,"output")}})},set"~standard"(e){te(this,"~standard",e)},parse:function e(t,r){return ou(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await iu(this,t,r,{callee:e})},safeParse(e,t){return au(this,e,t)},async safeParseAsync(e,t){return su(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){te(this,"spa",e)},validate(e,t){return mo(this,e,t)},validateAsync(e,t){return vo(this,e,t)},encode:function e(t,r){return uu(this,t,r,{callee:e})},decode:function e(t,r){return cu(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await lu(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await fu(this,t,r,{callee:e})},safeEncode(e,t){return du(this,e,t)},safeDecode(e,t){return pu(this,e,t)},async safeEncodeAsync(e,t){return mu(this,e,t)},async safeDecodeAsync(e,t){return hu(this,e,t)},toJSONSchema(e){return Zs(this,{})(e)},get description(){return ge.get(this)?.description},get _def(){return this._zod.def}}),gn=f("_ZodString",(e,t)=>{He.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ts(e,r,n,o)},Tr({format:e=>U(e).format??null,minLength:e=>U(e).minimum??null,maxLength:e=>U(e).maximum??null},{regex(...e){return this.check(fs(...e))},includes(...e){return this.check(ms(...e))},startsWith(...e){return this.check(hs(...e))},endsWith(...e){return this.check(vs(...e))},min(...e){return this.check(Ue(...e))},max(...e){return this.check(rn(...e))},length(...e){return this.check(nn(...e))},nonempty(...e){return this.check(Ue(1,...e))},lowercase(e){return this.check(ds(e))},uppercase(e){return this.check(ps(e))},trim(){return this.check(_s())},normalize(...e){return this.check(gs(...e))},toLowerCase(){return this.check(bs())},toUpperCase(){return this.check(ys())},slugify(){return this.check(ws())}})),_n=f("ZodString",(e,t)=>{He.init(e,t),gn.init(e,t)},{email(e){return this.check(Ea(wu,e))},url(e){return this.check(Da(ku,e))},jwt(e){return this.check(Ya(xu,e))},emoji(e){return this.check(xa(zu,e))},guid(e){return this.check(Ta(Su,e))},uuid(e){return this.check(Aa(Re,e))},uuidv4(e){return this.check(Ra(Re,e))},uuidv6(e){return this.check(Ca(Re,e))},uuidv7(e){return this.check(ja(Re,e))},nanoid(e){return this.check(La($u,e))},cuid(e){return this.check(Ma(Ou,e))},cuid2(e){return this.check(Ua(Pu,e))},ulid(e){return this.check(Fa(Zu,e))},base64(e){return this.check(Ga(Cu,e))},base64url(e){return this.check(Ha(ju,e))},xid(e){return this.check(qa(Nu,e))},ksuid(e){return this.check(Ka(Iu,e))},ipv4(e){return this.check(Va(Eu,e))},ipv6(e){return this.check(Ja(Tu,e))},cidrv4(e){return this.check(Ba(Au,e))},cidrv6(e){return this.check(Wa(Ru,e))},e164(e){return this.check(Qa(Du,e))},datetime(e){return this.check(Xa(gu,e))},date(e){return this.check(es(_u,e))},time(e){return this.check(ts(bu,e))},duration(e){return this.check(rs(yu,e))}});function d(e){return Ia(_n,e)}var E=f("ZodStringFormat",(e,t)=>{I.init(e,t),gn.init(e,t)}),gu=f("ZodISODateTime",(e,t)=>{Ti.init(e,t),E.init(e,t)}),_u=f("ZodISODate",(e,t)=>{Ai.init(e,t),E.init(e,t)}),bu=f("ZodISOTime",(e,t)=>{Ri.init(e,t),E.init(e,t)}),yu=f("ZodISODuration",(e,t)=>{Ci.init(e,t),E.init(e,t)}),wu=f("ZodEmail",(e,t)=>{_i.init(e,t),E.init(e,t)}),Su=f("ZodGUID",(e,t)=>{vi.init(e,t),E.init(e,t)}),Re=f("ZodUUID",(e,t)=>{gi.init(e,t),E.init(e,t)}),ku=f("ZodURL",(e,t)=>{zi.init(e,t),E.init(e,t)}),zu=f("ZodEmoji",(e,t)=>{$i.init(e,t),E.init(e,t)}),$u=f("ZodNanoID",(e,t)=>{Oi.init(e,t),E.init(e,t)}),Ou=f("ZodCUID",(e,t)=>{Pi.init(e,t),E.init(e,t)}),Pu=f("ZodCUID2",(e,t)=>{Zi.init(e,t),E.init(e,t)}),Zu=f("ZodULID",(e,t)=>{Ni.init(e,t),E.init(e,t)}),Nu=f("ZodXID",(e,t)=>{Ii.init(e,t),E.init(e,t)}),Iu=f("ZodKSUID",(e,t)=>{Ei.init(e,t),E.init(e,t)}),Eu=f("ZodIPv4",(e,t)=>{ji.init(e,t),E.init(e,t)}),Tu=f("ZodIPv6",(e,t)=>{xi.init(e,t),E.init(e,t)}),Au=f("ZodCIDRv4",(e,t)=>{Li.init(e,t),E.init(e,t)}),Ru=f("ZodCIDRv6",(e,t)=>{Ui.init(e,t),E.init(e,t)}),Cu=f("ZodBase64",(e,t)=>{Fi.init(e,t),E.init(e,t)}),ju=f("ZodBase64URL",(e,t)=>{Ki.init(e,t),E.init(e,t)}),Du=f("ZodE164",(e,t)=>{Vi.init(e,t),E.init(e,t)}),xu=f("ZodJWT",(e,t)=>{Bi.init(e,t),E.init(e,t)}),Pt=f("ZodNumber",(e,t)=>{Jr.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>As(e,r,n,o),e.isFinite=!0},Tr({minValue:e=>{const{minimum:t,exclusiveMinimum:r}=U(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:t,exclusiveMaximum:r}=U(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:t,multipleOf:r}=U(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>U(e).format??null},{gt(e,t){return this.check(ir(e,t))},gte(e,t){return this.check(it(e,t))},min(e,t){return this.check(it(e,t))},lt(e,t){return this.check(or(e,t))},lte(e,t){return this.check(ot(e,t))},max(e,t){return this.check(ot(e,t))},int(e){return this.check(hr(e))},safe(e){return this.check(hr(e))},positive(e){return this.check(ir(0,e))},nonnegative(e){return this.check(it(0,e))},negative(e){return this.check(or(0,e))},nonpositive(e){return this.check(ot(0,e))},multipleOf(e,t){return this.check(ar(e,t))},step(e,t){return this.check(ar(e,t))},finite(){return this}}));function A(e){return ns(Pt,e)}var Lu=f("ZodNumberFormat",(e,t)=>{Wi.init(e,t),Pt.init(e,t)});function hr(e){return is(Lu,e)}var bn=f("ZodBoolean",(e,t)=>{Br.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Rs(e,r,n,o)});function $(e){return as(bn,e)}var Mu=f("ZodNull",(e,t)=>{Gi.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Cs(e,r,n,o)});function Uu(e){return ss(Mu,e)}var Fu=f("ZodAny",(e,t)=>{Hi.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ds(e,r,n,o)});function ze(){return us(Fu)}var qu=f("ZodUnknown",(e,t)=>{Qi.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>xs(e,r,n,o)});function qe(){return cs(qu)}var Ku=f("ZodNever",(e,t)=>{Yi.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>js(e,r,n,o)});function Vu(e){return ls(Ku,e)}var Ju=f("ZodArray",(e,t)=>{$e(),Xi.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>qs(e,r,n,o),e.element=t.element},{min(e,t){return this.check(Ue(e,t))},nonempty(e){return this.check(Ue(1,e))},max(e,t){return this.check(rn(e,t))},length(e,t){return this.check(nn(e,t))},unwrap(){return this.element}});function z(e,t){return Ss(Ju,e,t)}var Bu=f("ZodObject",(e,t)=>{$e(),ra.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ks(e,r,n,o),eo(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return C(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(L(this._zod.def,{catchall:e}))},passthrough(){return this.clone(L(this._zod.def,{catchall:qe()}))},loose(){return this.clone(L(this._zod.def,{catchall:qe()}))},strict(){return this.clone(L(this._zod.def,{catchall:Vu()}))},strip(){return this.clone(L(this._zod.def,{catchall:void 0}))},extend(e){return qn(this,e)},safeExtend(e){return Kn(this,e)},merge(e){return Vn(this,e)},pick(e){return Un(this,e)},omit(e){return Fn(this,e)},partial(...e){return Dt(Nt,this,e[0])},exactPartial(...e){return Dt(Sn,this,e[0],"exactPartial")},required(...e){return Jn(kn,this,e[0])}});function v(e,t){const r={type:"object",shape:e??{},...b(t)};return new Bu(r)}var yn=f("ZodUnion",(e,t)=>{Hr.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Vs(e,r,n,o),e.options=t.options});function Qe(e,t){return new yn({type:"union",options:e,...b(t)})}var Wu=f("ZodDiscriminatedUnion",(e,t)=>{yn.init(e,t),oa.init(e,t)});function Zt(e,t,r){return new Wu({type:"union",options:t,discriminator:e,...b(r)})}var Gu=f("ZodIntersection",(e,t)=>{ia.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Js(e,r,n,o)});function Hu(e,t){return new Gu({type:"intersection",left:e,right:t})}var Qu=f("ZodTuple",(e,t)=>{$e(),aa.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Bs(e,r,n,o)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){const e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Nt({type:"optional",innerType:t}))})}});function kl(e,t,r){const n=t instanceof P,o=n?r:t;return new Qu({type:"tuple",items:e,rest:n?t:null,...b(o)})}var vr=f("ZodRecord",(e,t)=>{$e(),sa.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Gs(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function Oe(e,t,r){return!t||!t._zod?new vr({type:"record",keyType:d(),valueType:e,...b(t)}):new vr({type:"record",keyType:e,valueType:t,...b(r)})}var ht=f("ZodEnum",(e,t)=>{ua.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Ls(e,n,o,i),e.enum=t.entries,e.options=[...e._zod.values];const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const i={};for(const a of n)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ht({...t,checks:[],...b(o),entries:i})},e.exclude=(n,o)=>{const i={...t.entries};for(const a of n)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new ht({...t,checks:[],...b(o),entries:i})}});function C(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ht({type:"enum",entries:r,...b(t)})}var Yu=f("ZodLiteral",(e,t)=>{ca.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ms(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function O(e,t){return new Yu({type:"literal",values:Array.isArray(e)?e:[e],...b(t)})}var Xu=f("ZodTransform",(e,t)=>{$e(),la.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Fs(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ar(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(Se(i,r.value,t));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Se(a))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function wn(e){return new Xu({type:"transform",transform:e})}var Nt=f("ZodOptional",(e,t)=>{Qr.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>vn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function gr(e){return new Nt({type:"optional",innerType:e})}var Sn=f("ZodExactOptional",(e,t)=>{fa.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>vn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function ec(e){return new Sn({type:"optional",innerType:e})}var tc=f("ZodNullable",(e,t)=>{da.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Hs(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function _r(e){return new tc({type:"nullable",innerType:e})}var rc=f("ZodDefault",(e,t)=>{pa.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ys(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function nc(e,t){return new rc({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Pr(t)}})}var oc=f("ZodPrefault",(e,t)=>{ma.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Xs(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function ic(e,t){return new oc({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Pr(t)}})}var kn=f("ZodNonOptional",(e,t)=>{ha.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Qs(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function ac(e,t){return new kn({type:"nonoptional",innerType:e,...b(t)})}var sc=f("ZodCatch",(e,t)=>{va.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>eu(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function uc(e,t){return new sc({type:"catch",innerType:e,catchValue:typeof t=="function"?t:ro(t)})}var It=f("ZodPipe",(e,t)=>{Yr.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>tu(e,r,n,o),e.in=t.in,e.out=t.out});function br(e,t){return new It({type:"pipe",in:e,out:t})}var cc=f("ZodCodec",(e,t)=>{It.init(e,t),Xr.init(e,t)}),lc=f("ZodPreprocess",(e,t)=>{It.init(e,t),ga.init(e,t)}),fc=f("ZodReadonly",(e,t)=>{_a.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ru(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function dc(e){return new fc({type:"readonly",innerType:e})}var pc=f("ZodCustom",(e,t)=>{ba.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Us(e,r,n,o)});function mc(e,t={}){return ks(pc,e,t)}function hc(e,t){return zs(e,t)}var Et=(...e)=>Os({Codec:cc,Boolean:bn,String:_n},...e);function zl(e,t){return new lc({type:"pipe",in:wn(e),out:t})}function ae(e){return os(Pt,e)}var V=v({db:d("Database name is required")}),W=V.extend({schemaName:d().optional()}),zn=["pg","mysql","mssql","mongodb","sqlite","redis","duckdb","oracle","clickhouse"],Pe=C(zn,{message:"Invalid database type"}),$l=V.extend({dbType:Pe}),Ol=v({dbType:Pe}),Tt=v({tableName:d("Table name is required")}),Q=v({columnName:d("Column name is required"),columnType:d("Column type is required"),defaultValue:d().optional(),isPrimaryKey:$().default(!1),isNullable:$().default(!1),isUnique:$().default(!1),isIdentity:$().default(!1),isArray:$().default(!1)}),Pl=v({db:V.shape.db,tableName:Tt.shape.tableName,schemaName:W.shape.schemaName,columnName:Q.shape.columnName,columnType:Q.shape.columnType,defaultValue:Q.shape.defaultValue,isPrimaryKey:Q.shape.isPrimaryKey,isNullable:Q.shape.isNullable,isUnique:Q.shape.isUnique,isIdentity:Q.shape.isIdentity,isArray:Q.shape.isArray}),Zl=v({tableName:d("Table name is required"),data:Oe(d("Column name is required"),ze())}),vc=["gemini","openai","anthropic","grok","openrouter"],gc=C(vc),_c=[{id:"gemini",label:"Google Gemini",models:[{id:"gemini-3-flash-preview",label:"Gemini 3 Flash"},{id:"gemini-2.5-pro",label:"Gemini 2.5 Pro"}]},{id:"openai",label:"OpenAI",models:[{id:"gpt-5.2",label:"GPT-5.2"},{id:"gpt-5-mini",label:"GPT-5 mini"}]},{id:"anthropic",label:"Anthropic",models:[{id:"claude-sonnet-4-6",label:"Claude Sonnet 4.6"},{id:"claude-haiku-4-5",label:"Claude Haiku 4.5"}]},{id:"grok",label:"xAI Grok",models:[{id:"grok-4.6",label:"Grok 4.6"},{id:"grok-4.5",label:"Grok 4.5"}]},{id:"openrouter",label:"OpenRouter",models:[{id:"openai/gpt-5.2",label:"GPT-5.2 via OpenRouter"},{id:"anthropic/claude-sonnet-4.6",label:"Claude Sonnet 4.6 via OpenRouter"}]}],bc=e=>_c.find(t=>t.id===e)?.models[0]?.id??"gemini-3-flash-preview",Nl=W.extend({cascade:d().optional().transform(e=>e==="true")}),fe=v({tableName:d("Table name is required"),columnName:d("Column name is required")}),Il=v({db:V.shape.db,tableName:fe.shape.tableName,schemaName:W.shape.schemaName,columnName:fe.shape.columnName,cascade:$().optional()}),El=v({message:d("Message is required"),tableName:d("Table name is required"),columnName:d("Column name is required"),deletedCount:A("Deleted count is required").default(0)}),at=v({columnType:d("Column type is required"),isNullable:$(),defaultValue:d().nullable().optional()}),Tl=v({db:V.shape.db,tableName:fe.shape.tableName,schemaName:W.shape.schemaName,columnName:fe.shape.columnName,columnType:at.shape.columnType,isNullable:at.shape.isNullable,defaultValue:at.shape.defaultValue}),Al=v({tableName:d().min(1,"Table name is required"),records:z(Oe(d(),ze())).min(1,"At least one record is required")}),yc=v({type:d(),content:d().optional()}).passthrough(),wc=v({provider:gc.optional().default("gemini"),model:d().min(1).optional(),messages:z(v({id:d(),role:C(["user","assistant","system","tool","reasoning"]),content:Qe([d(),Uu(),z(qe())]).optional(),parts:z(yc).optional()}).passthrough()),data:v({conversationId:d().optional(),db:V.shape.db,includeSchema:$().optional().default(!0)})}),Rl=wc.transform(e=>({...e,model:e.model??bc(e.provider)})),Sc=["text","boolean","number","enum","json","date","array"],kc=C(Sc),zc=["int","bigint","smallint","numeric","float","double","money","tinyint","mediumint","bit","boolean","text","varchar","char","tinytext","mediumtext","longtext","json","jsonb","xml","uuid","date","time","timestamp","timestamptz","interval","datetime","year","bytea","inet","cidr","macaddr","macaddr8","point","line","polygon","binary","varbinary","blob","tinyblob","mediumblob","longblob","array","enum","set"],$c=C(zc),Cl=v({columnName:d(),dataType:kc,dataTypeLabel:$c,isNullable:$(),columnDefault:d().nullable(),isPrimaryKey:$(),isForeignKey:$(),referencedTable:d().nullable(),referencedSchema:d().optional(),referencedColumn:d().nullable(),enumValues:z(d()).nullable()}),Oc=["red","orange","amber","green","teal","blue","violet","pink"],$n=C(Oc),Pc=v({id:d(),name:d(),color:$n.nullable(),lastUsedAt:A(),dbType:Pe,maskedUrl:d()}),jl=v({connections:z(Pc),active:v({id:d().nullable(),dbType:Pe,connectionId:d()}).nullable()}),Dl=v({url:d().trim().min(1,"Paste a connection URL")}),xl=v({name:d().trim().min(1,"Name is required").max(100).optional(),color:$n.nullable().optional()}),Zc=["CASCADE","SET NULL","SET DEFAULT","RESTRICT","NO ACTION"],yr=C(Zc),Nc=v({columnName:d("Column name is required"),columnType:d("Column type is required"),defaultValue:d().optional(),isPrimaryKey:$().default(!1),isNullable:$().default(!1),isUnique:$().default(!1),isIdentity:$().default(!1),isArray:$().default(!1)}),Ic=v({columnName:d("Column name is required"),referencedTable:d("Referenced table is required"),referencedColumn:d("Referenced column is required"),onUpdate:yr.default("NO ACTION"),onDelete:yr.default("NO ACTION")}),Ll=v({tableName:d("Table name is required"),fields:z(Nc).min(1,"At least one field is required"),foreignKeys:z(Ic).optional()}),Ec={pg:{label:"PostgreSQL",protocols:["postgres","postgresql","cockroachdb"],defaultPort:5432,dataModel:"relational",editorLanguage:"pgsql",liveMode:!0,schemaSelector:!0,rowMutation:!0,indexes:{methods:["btree","hash","gin","gist","spgist","brin"],createNote:"Building an index blocks writes to this table until it finishes."},serverLogs:!0},mysql:{label:"MySQL",protocols:["mysql","mysql2","mariadb","tidb"],defaultPort:3306,dataModel:"relational",editorLanguage:"pgsql",liveMode:!0,schemaSelector:!1,rowMutation:!0,indexes:{methods:[],createNote:null},serverLogs:!0},mssql:{label:"SQL Server",protocols:["mssql","sqlserver"],defaultPort:1433,dataModel:"relational",editorLanguage:"pgsql",liveMode:!0,schemaSelector:!1,rowMutation:!0,indexes:{methods:[],createNote:"Building an index blocks writes to this table until it finishes."},serverLogs:!0},mongodb:{label:"MongoDB",protocols:["mongodb","mongodb+srv"],defaultPort:27017,dataModel:"document",editorLanguage:"json",liveMode:!1,schemaSelector:!1,rowMutation:!0,indexes:{methods:[],createNote:null},serverLogs:!0},sqlite:{label:"SQLite / libSQL / D1",protocols:["sqlite","libsql","d1"],defaultPort:null,dataModel:"relational",editorLanguage:"pgsql",liveMode:!0,schemaSelector:!1,rowMutation:!0,indexes:{methods:[],createNote:null},serverLogs:!1},redis:{label:"Redis",protocols:["redis","rediss"],defaultPort:6379,dataModel:"key-value",editorLanguage:"plaintext",liveMode:!1,schemaSelector:!1,rowMutation:!0,indexes:!1,serverLogs:!0},duckdb:{label:"DuckDB",protocols:["duckdb"],defaultPort:null,dataModel:"relational",editorLanguage:"pgsql",liveMode:!0,schemaSelector:!1,rowMutation:!0,indexes:{methods:[],createNote:"DuckDB cannot alter or rename a table that has an index, or alter or drop a column an index covers."},serverLogs:!1},oracle:{label:"Oracle",protocols:["oracle"],defaultPort:1521,dataModel:"relational",editorLanguage:"pgsql",liveMode:!0,schemaSelector:!1,rowMutation:!0,indexes:{methods:[],createNote:"Building an index blocks writes to this table until it finishes."},serverLogs:!0},clickhouse:{label:"ClickHouse",protocols:["clickhouse","clickhouses"],defaultPort:8123,dataModel:"relational",editorLanguage:"pgsql",liveMode:!1,schemaSelector:!1,indexes:!1,rowMutation:!1,rowMutationReason:"Use a SQL query to update or delete ClickHouse rows; sorting keys are not unique.",serverLogs:!0}},Ml=e=>zn.find(t=>Ec[t].protocols.includes(e)),Tc=v({name:d("Name is required"),size:d("Size is required"),owner:d("Owner is required"),encoding:d("Encoding is required")}),Ul=v({databases:z(Tc),dbType:Pe}),Fl=v({version:d("Version is required"),database:d("Database is required"),user:d("User is required"),host:d("Host is required").nullable(),port:A("Port is required").nullable(),active_connections:ae("Active connections is required"),max_connections:ae("Max connections is required")}),ql=v({tableName:d("Table name is required"),primaryKeys:z(v({columnName:d("Column name is required"),value:ze()})).min(1,"At least one primary key is required")}),Kl=W.extend({cascade:d().optional().transform(e=>e==="true")}),Vl=v({query:d("Query is required")}),Ac=["csv","xlsx","json"],Jl=W.extend({format:C(Ac,{message:"Invalid format. Supported formats: csv, xlsx, json"})}),Rc=["primary","unique-constraint","index"],Bl=v({indexName:d(),columns:z(d()),isUnique:$(),isSparse:$().optional(),expireAfterSeconds:A().nonnegative().optional(),method:d().nullable(),kind:C(Rc),definition:d().nullable()}),Cc=v({indexName:d().min(1),columns:z(d().min(1)).min(1),isUnique:$(),method:d().optional()}),Wl=Cc.extend({db:V.shape.db,tableName:Tt.shape.tableName,schemaName:W.shape.schemaName}),jc=v({tableName:d("Table name is required"),indexName:d("Index name is required")}),Gl=jc.extend({db:V.shape.db,schemaName:W.shape.schemaName}),At=C(["string","hash","list","set","zset","stream","unknown"]),k=v({base64:d().max(16777216).refine(e=>/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/.test(e),"Invalid unpadded base64url value"),utf8:d().optional()}),Hl=v({db:d(),cursor:d().max(2048).regex(/^[A-Za-z0-9_-]+$/).optional(),limit:ae().int().min(1).max(200).default(50),search:d().max(512).optional(),exactPattern:Et().default(!1),type:At.exclude(["unknown"]).optional()}),On=v({key:k,type:At,ttlMs:A().int(),memoryBytes:A().int().nonnegative().nullable()}),Ql=v({keys:z(On),nextCursor:d().nullable(),hasMore:$()}),Yl=v({db:d(),cursor:d().max(2048).regex(/^[A-Za-z0-9_-]+$/).optional(),limit:ae().int().min(1).max(500).default(100),full:Et().default(!1),direction:C(["forward","backward"]).default("forward")}),Xl=v({key:d().min(1).max(16384).regex(/^[A-Za-z0-9_-]+$/)}),Dc=v({kind:O("string"),value:k,truncated:$()}),xc=v({kind:O("hash"),entries:z(v({field:k,value:k}))}),Lc=v({kind:O("list"),entries:z(v({index:A().int(),value:k}))}),Mc=v({kind:O("set"),members:z(k)}),Uc=v({kind:O("zset"),entries:z(v({member:k,score:Qe([A(),O("inf"),O("-inf")])}))}),Fc=v({kind:O("stream"),entries:z(v({id:d(),fields:z(v({field:k,value:k}))}))}),qc=v({kind:O("unknown")}),Kc=Zt("kind",[Dc,xc,Lc,Mc,Uc,Fc,qc]),ef=On.extend({length:A().int().nonnegative().nullable(),revision:d(),value:Kc,nextCursor:d().nullable(),hasMore:$()}),tf=v({db:d(),offset:ae().int().nonnegative().default(0),limit:ae().int().min(1).max(1048576).default(1048576),expectedRevision:d().optional()}),rf=v({chunk:k,length:A().int().nonnegative(),nextOffset:A().int().nonnegative().nullable(),hasMore:$()}),Vc=v({kind:O("string"),value:k}),Jc=v({kind:O("hash"),entries:z(v({field:k,value:k})).min(1)}),Bc=v({kind:O("list"),entries:z(k).min(1)}),Wc=v({kind:O("set"),members:z(k).min(1)}),Gc=v({kind:O("zset"),entries:z(v({member:k,score:A()})).min(1)}),Hc=v({kind:O("stream"),id:d().default("*"),fields:z(v({field:k,value:k})).min(1)}),nf=v({key:k,type:At.exclude(["unknown"]),value:Zt("kind",[Vc,Jc,Bc,Wc,Gc,Hc]),ttlMs:A().int().positive().nullable().default(null)}),of=v({key:k,revision:d().nullable(),deleted:$()}),Qc=v({action:O("rename"),newKey:k}),Yc=v({action:O("setTtl"),ttlMs:A().int().positive().nullable()}),Xc=v({action:O("setString"),value:k}),el=v({action:O("upsertHash"),field:k,value:k}),tl=v({action:O("deleteHash"),field:k}),rl=v({action:O("pushList"),side:C(["left","right"]),value:k}),nl=v({action:O("setList"),index:A().int(),value:k}),ol=v({action:O("deleteList"),index:A().int()}),il=v({action:O("addSet"),member:k}),al=v({action:O("removeSet"),member:k}),sl=v({action:O("upsertZset"),member:k,score:A()}),ul=v({action:O("removeZset"),member:k}),cl=v({action:O("appendStream"),id:d().default("*"),fields:z(v({field:k,value:k})).min(1)}),ll=v({action:O("deleteStream"),id:d()}),af=v({expectedRevision:d(),force:$().default(!1),operation:Zt("action",[Qc,Yc,Xc,el,tl,rl,nl,ol,il,al,sl,ul,cl,ll])}),sf=v({db:d(),expectedRevision:d(),force:Et().default(!1)}),uf=v({deleted:$()}),fl=v({newColumnName:d("New column name is required")}),cf=v({db:V.shape.db,tableName:fe.shape.tableName,schemaName:W.shape.schemaName,columnName:fe.shape.columnName,newColumnName:fl.shape.newColumnName}),wr=v({newTableName:d("New table name is required").trim().min(1,"New table name is required"),schemaName:d().trim().min(1).optional()}),lf=v({db:V.shape.db,tableName:Tt.shape.tableName,newTableName:wr.shape.newTableName,schemaName:wr.shape.schemaName}),dl=["fatal","error","warning","info","debug"],pl=C(dl),ff=v({ts:d(),level:pl,rawLevel:d(),source:d().optional(),code:d().optional(),message:d(),durationMs:A().optional(),statement:d().optional(),detail:Oe(d(),d())}),ml=v({columnName:d(),operator:d(),value:d()}),De=["asc","desc"],hl=v({columnName:d(),direction:C(De)}),vl=v({limit:A(),total:A(),totalEstimated:$().optional(),hasNextPage:$(),hasPreviousPage:$(),nextCursor:d().nullable(),prevCursor:d().nullable()}),df=v({data:z(Oe(d(),qe())),meta:vl}),pf=v({db:V.shape.db,schemaName:W.shape.schemaName,cursor:d().optional(),limit:d().optional().default("50").transform(Number),direction:C(De).optional().default(De[0]),sort:d().optional().transform(e=>{if(!e)return"";try{const t=JSON.parse(e);return Array.isArray(t)?t:e}catch{return e}}).pipe(Qe([d(),z(hl)])),order:C(De).optional(),filters:d().optional().transform(e=>{if(!e)return[];try{return JSON.parse(e)}catch{return[]}}).pipe(z(ml))}),mf=v({tableName:d("Table name is required"),schemaName:d().optional(),rowCount:ae("Row count is required"),rowCountEstimated:$().optional()}),hf=v({schema:d()}),vf=v({tableName:d("Table name is required"),primaryKey:d("Primary key is required").default("id"),primaryKeys:z(d().min(1)).min(1).optional(),updates:z(v({rowData:Oe(d("Column name is required"),ze()),columnName:d("Column name is required"),value:ze()},{message:"Each update must have a row data, column name, and value."})).min(1,"At least one update is required")}),gl="phc_nxaQk54MWAehmL72J4gjVbrQCpbSTedMyHn3PvFxAhkd",M,_e,xe=!1,Sr=!1,_l=()=>navigator.globalPrivacyControl===!0,gf=()=>M,_f=async()=>{try{M=(await(await fetch("/api/telemetry/config",{headers:_l()?{"x-db-studio-gpc":"1"}:void 0})).json()).data}catch{return}const e=gl;return!M?.enabled||xe?M:(_e??=(await In(async()=>{const{default:t}=await import("./module-BbdCXsK0.js");return{default:t}},[])).default,Sr?(_e.opt_in_capturing(),_e.identify(M.installationId),xe=!0,M):(_e.init(e,{api_host:"https://eu.i.posthog.com",person_profiles:"identified_only",autocapture:!1,capture_pageview:!1,capture_pageleave:!1,disable_session_recording:!0,persistence:"memory",loaded(t){M&&t.identify(M.installationId)}}),xe=!0,Sr=!0,M))},kr={capture(e,t){!xe||!M?.enabled||_e?.capture(e,{...t,source:"client",app_version:M.appVersion,$geoip_disable:!1})}},bf=Nn()((e,t)=>({selectedDatabase:null,setSelectedDatabase:r=>{e({selectedDatabase:r});const{dbType:n}=t();r&&n&&kr.capture("db_selected",{db_type:n})},dbType:null,setDbType:r=>{e({dbType:r}),r&&kr.capture("db_connected",{db_type:r})}}));export{Sl as C,wl as S,$ as _,dl as a,d as b,Ml as c,_c as d,bc as f,z as g,C as h,kr as i,Oc as l,zn as m,gf as n,Cc as o,Q as p,_f as r,Ec as s,bf as t,at as u,v,so as w,kl as x,zl as y};