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 +1 @@
1
- import{t as a}from"./react-CKF1H7h0.js";import{t as l}from"./middleware-DKaxoFZs.js";(function(){try{var d=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};d.SENTRY_RELEASE={id:"db-studio@2.0.1"};var o=new d.Error().stack;o&&(d._sentryDebugIds=d._sentryDebugIds||{},d._sentryDebugIds[o]="81cff93f-d7ca-4afa-a92f-7994da254c6b",d._sentryDebugIdIdentifier="sentry-dbid-81cff93f-d7ca-4afa-a92f-7994da254c6b")}catch{}})();var u=a()(l((d,o)=>({folders:[],queries:[],addFolder:e=>d(i=>({folders:[...i.folders,e]})),updateFolder:(e,i)=>d(r=>({folders:r.folders.map(s=>s.id===e?{...s,...i}:s)})),deleteFolder:e=>d(i=>({folders:i.folders.filter(r=>r.id!==e),queries:i.queries.filter(r=>r.folderId!==e)})),toggleFolder:e=>d(i=>({folders:i.folders.map(r=>r.id===e?{...r,isExpanded:!r.isExpanded}:r)})),toggleFavoriteFolder:e=>d(i=>({folders:i.folders.map(r=>r.id===e?{...r,isFavorite:!r.isFavorite}:r)})),addQuery:(e,i)=>{const r=Math.random().toString(36).substring(2,15),s={id:r,name:e??"Untitled Query",query:"",isFavorite:!1,isSelected:!1,folderId:i??void 0};return d(t=>({queries:[...t.queries,s]})),r},updateQuery:(e,i)=>d(r=>({queries:r.queries.map(s=>s.id===e?{...s,...i}:s)})),deleteQuery:e=>d(i=>({queries:i.queries.filter(r=>r.id!==e)})),moveQuery:(e,i)=>d(r=>({queries:r.queries.map(s=>s.id===e?{...s,folderId:i}:s)})),toggleFavorite:e=>d(i=>({queries:i.queries.map(r=>r.id===e?{...r,isFavorite:!r.isFavorite}:r)})),getQueriesByFolder:e=>o().queries.filter(i=>i.folderId===e&&!i.isFavorite).sort((i,r)=>i.name.localeCompare(r.name)),getFavoriteQueries:()=>o().queries.filter(e=>e.isFavorite).sort((e,i)=>e.name.localeCompare(i.name)),getFavoriteFolders:()=>o().folders.filter(e=>e.isFavorite),getQuery:e=>o().queries.find(i=>i.id===e),setSelectedQuery:e=>d(i=>({queries:i.queries.map(r=>r.id===e?{...r,isSelected:!0}:{...r,isSelected:!1})})),getSelectedQuery:()=>o().queries.find(e=>e.isSelected)}),{name:"dbstudio-queries"}));window.addEventListener("storage",d=>{d.key==="dbstudio-queries"&&u.persist.rehydrate()});export{u as t};
1
+ import{t as a}from"./react-CGNcTA1t.js";import{t as l}from"./middleware-DLeL20gb.js";(function(){try{var d=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};d.SENTRY_RELEASE={id:"db-studio@2.2.0"};var o=new d.Error().stack;o&&(d._sentryDebugIds=d._sentryDebugIds||{},d._sentryDebugIds[o]="3f906289-a251-4c07-a00b-80555e8fc97e",d._sentryDebugIdIdentifier="sentry-dbid-3f906289-a251-4c07-a00b-80555e8fc97e")}catch{}})();var u=a()(l((d,o)=>({folders:[],queries:[],addFolder:e=>d(i=>({folders:[...i.folders,e]})),updateFolder:(e,i)=>d(r=>({folders:r.folders.map(s=>s.id===e?{...s,...i}:s)})),deleteFolder:e=>d(i=>({folders:i.folders.filter(r=>r.id!==e),queries:i.queries.filter(r=>r.folderId!==e)})),toggleFolder:e=>d(i=>({folders:i.folders.map(r=>r.id===e?{...r,isExpanded:!r.isExpanded}:r)})),toggleFavoriteFolder:e=>d(i=>({folders:i.folders.map(r=>r.id===e?{...r,isFavorite:!r.isFavorite}:r)})),addQuery:(e,i)=>{const r=Math.random().toString(36).substring(2,15),s={id:r,name:e??"Untitled Query",query:"",isFavorite:!1,isSelected:!1,folderId:i??void 0};return d(t=>({queries:[...t.queries,s]})),r},updateQuery:(e,i)=>d(r=>({queries:r.queries.map(s=>s.id===e?{...s,...i}:s)})),deleteQuery:e=>d(i=>({queries:i.queries.filter(r=>r.id!==e)})),moveQuery:(e,i)=>d(r=>({queries:r.queries.map(s=>s.id===e?{...s,folderId:i}:s)})),toggleFavorite:e=>d(i=>({queries:i.queries.map(r=>r.id===e?{...r,isFavorite:!r.isFavorite}:r)})),getQueriesByFolder:e=>o().queries.filter(i=>i.folderId===e&&!i.isFavorite).sort((i,r)=>i.name.localeCompare(r.name)),getFavoriteQueries:()=>o().queries.filter(e=>e.isFavorite).sort((e,i)=>e.name.localeCompare(i.name)),getFavoriteFolders:()=>o().folders.filter(e=>e.isFavorite),getQuery:e=>o().queries.find(i=>i.id===e),setSelectedQuery:e=>d(i=>({queries:i.queries.map(r=>r.id===e?{...r,isSelected:!0}:{...r,isSelected:!1})})),getSelectedQuery:()=>o().queries.find(e=>e.isSelected)}),{name:"dbstudio-queries"}));window.addEventListener("storage",d=>{d.key==="dbstudio-queries"&&u.persist.rehydrate()});export{u as t};
@@ -0,0 +1,17 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-editor-BMXfdFhg.js","assets/rolldown-runtime-D_n5YsVB.js","assets/monaco-theme-BwGcwpJl.js","assets/editor.api-BQRmhEY6.js","assets/preload-helper-BmptvQqE.js","assets/editor-g1MJRkXV.css","assets/monaco-theme-DtsiNm_H.css","assets/icons-DKLzom80.js","assets/dist-BbZuOizk.js","assets/radix-ui-CJhaEsHV.js","assets/use-theme-CKjVHAZg.js","assets/personal-preferences.store-BgUar1W1.js","assets/react-CGNcTA1t.js","assets/middleware-DLeL20gb.js"])))=>i.map(i=>d[i]);
2
+ import{r as G}from"./rolldown-runtime-D_n5YsVB.js";import{C as P,a as K,i as Y,n as B,r as A,v as J}from"./tanstack-D9GckDbx.js";import{C as Z,J as q,f as X,ft as ee,jt as re,lt as te,t as se,u as oe,v as ae,zt as ne}from"./icons-DKLzom80.js";import{n as j}from"./dist-BbZuOizk.js";import{t as le}from"./use-database-engine-CG7rZQXQ.js";import{t as ie}from"./queries.store-CXQwDZiV.js";import{a as w,c as N,n as b,o as S,t as D}from"./overlay.store-DoGHwFxO.js";import{t as de}from"./spinner-D7Cvt3BD.js";import{t as ce}from"./esm-DHn0u-mG.js";import{n as F}from"./dist-CISR_13N.js";import{C as L,o as ue,s as $}from"./index-L3nylpEA.js";import{A as me,t as O}from"./constants-iNJwkB3Z.js";import{t as he}from"./format-cell-value-CUgsp8Xn.js";import{jt as xe}from"./radix-ui-CJhaEsHV.js";import{i as fe,t as be}from"./database.store-BbWvMDJ7.js";import{t as ge}from"./preload-helper-BmptvQqE.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"db-studio@2.2.0"};var a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="19053715-36f0-41bd-a655-202d02530d26",r._sentryDebugIdIdentifier="sentry-dbid-19053715-36f0-41bd-a655-202d02530d26")}catch{}})();var n=G(ne(),1),pe={pgsql:`-- Your query here...
3
+ `,json:`{
4
+ "collection": "your_collection",
5
+ "operation": "find",
6
+ "filter": {},
7
+ "sort": { "_id": 1 },
8
+ "limit": 50
9
+ }`,plaintext:"PING"},ve={"--w-rjv-font-family":"monospace","--w-rjv-color":"#9cdcfe","--w-rjv-key-string":"#9cdcfe","--w-rjv-background-color":"#1e1e1e","--w-rjv-line-color":"#36334280","--w-rjv-arrow-color":"#838383","--w-rjv-edit-color":"var(--w-rjv-color)","--w-rjv-info-color":"#9c9c9c7a","--w-rjv-update-color":"#9cdcfe","--w-rjv-copied-color":"#9cdcfe","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#d4d4d4","--w-rjv-colon-color":"#d4d4d4","--w-rjv-brackets-color":"#d4d4d4","--w-rjv-quotes-color":"var(--w-rjv-key-string)","--w-rjv-quotes-string-color":"var(--w-rjv-type-string-color)","--w-rjv-type-string-color":"#ce9178","--w-rjv-type-int-color":"#b5cea8","--w-rjv-type-float-color":"#b5cea8","--w-rjv-type-bigint-color":"#b5cea8","--w-rjv-type-boolean-color":"#569cd6","--w-rjv-type-date-color":"#b5cea8","--w-rjv-type-url-color":"#3b89cf","--w-rjv-type-null-color":"#569cd6","--w-rjv-type-nan-color":"#859900","--w-rjv-type-undefined-color":"#569cd6"},e=xe(),ye=({results:r})=>{const a=(0,n.useMemo)(()=>r?.columns?r.columns.map(s=>({id:s,accessorKey:s,header:s,cell:({row:t})=>(0,e.jsx)("div",{className:"font-medium truncate text-foreground",children:he(t.getValue(s))})})):[],[r?.columns]),o=Y({columns:a,data:r?.rows??[],getCoreRowModel:K(),columnResizeMode:"onChange",enableColumnResizing:!0}),{rows:l}=o.getRowModel(),c=(0,n.useRef)(null),h=B({count:l.length,getScrollElement:()=>c.current,estimateSize:()=>35,overscan:10}),i=h.getVirtualItems(),u=o.getAllColumns().reduce((s,t)=>s+t.getSize(),0);return(0,e.jsxs)("div",{ref:c,className:"relative h-full overflow-auto w-full bg-background text-foreground",children:[(0,e.jsx)("div",{className:"sticky top-0 z-20 bg-muted/40 border-b border-border supports-backdrop-filter:backdrop-blur-sm",style:{width:`${u}px`,minWidth:"100%"},children:o.getHeaderGroups().map(s=>(0,e.jsx)("div",{className:"flex text-xs",children:s.headers.map(t=>(0,e.jsxs)("div",{className:"shrink-0 p-2 font-semibold text-muted-foreground border-r border-border relative",style:{width:`${t.getSize()}px`},children:[t.isPlaceholder?null:A(t.column.columnDef.header,t.getContext()),(0,e.jsx)("div",{role:"presentation",onMouseDown:t.getResizeHandler(),onTouchStart:t.getResizeHandler(),className:`absolute top-0 right-0 h-full w-1 cursor-col-resize select-none touch-none hover:bg-blue-500 ${t.column.getIsResizing()?"bg-blue-500":""}`})]},t.id))},s.id))}),(0,e.jsx)("div",{style:{height:`${h.getTotalSize()}px`,width:`${u}px`,minWidth:"100%",position:"relative"},children:i.map(s=>{const t=l[s.index];return(0,e.jsx)("div",{style:{position:"absolute",top:0,left:0,width:`${u}px`,minWidth:"100%",height:`${s.size}px`,transform:`translateY(${s.start}px)`},className:"flex text-xs border-b border-border hover:bg-accent/20",children:t.getVisibleCells().map(d=>(0,e.jsx)("div",{className:"shrink-0 p-2 border-r border-border",style:{width:`${d.column.getSize()}px`},children:A(d.column.columnDef.cell,d.getContext())},d.id))},t.id)})}),l.length===0&&(0,e.jsx)("div",{className:"flex items-center justify-center h-24 text-muted-foreground",children:"No results."})]})},je=({results:r,isLoading:a,error:o,lastExecutedQuery:l})=>{const[c]=F(O.RUNNER_STATE_KEYS.SHOW_AS),{requestAssistant:h}=L(),{openOverlay:i}=D(),u=t=>{h(t),i("chat.assistant")},s=(0,n.useMemo)(()=>o?(0,e.jsx)("div",{className:"flex h-full p-2",children:(0,e.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,e.jsxs)("div",{children:["Error: ",o.message]}),(0,e.jsx)(b,{type:"button",variant:"outline",size:"sm",disabled:!l.trim(),onClick:()=>u(`Fix this failing query. Explain the cause and return the complete corrected query in a fenced code block.
10
+
11
+ Query:
12
+ ${l}
13
+
14
+ Error:
15
+ ${o.message}`),children:"Suggest fix"})]})}):r?.message?(0,e.jsx)("div",{className:"flex h-full p-2",children:(0,e.jsx)("p",{children:r.message})}):!r||r.rows.length===0?(0,e.jsx)("div",{className:"flex h-full p-2",children:(0,e.jsx)("p",{children:"Run the query to see the results"})}):c==="json"?(0,e.jsx)("div",{className:"p-2",children:(0,e.jsx)(ce,{value:r?.rows??[],objectSortKeys:!0,displayObjectSize:!1,displayDataTypes:!1,indentWidth:14,collapsed:2,shortenTextAfterLength:100,highlightUpdates:!1,style:ve,enableClipboard:!1,className:"size-full"})}):(0,e.jsx)(ye,{results:r}),[c,r,o,l]);return(0,e.jsx)("div",{className:"absolute bottom-0 left-0 right-0 border-t border-border flex flex-col bg-background text-foreground w-full",style:{height:"calc(100vh - 400px)"},children:(0,e.jsx)("div",{className:"flex-1 overflow-auto w-full",children:a?(0,e.jsx)("div",{className:"flex items-center justify-center h-full overflow-auto",children:(0,e.jsx)(de,{size:"size-8",color:"bg-[#d4d4d4]"})}):s})})},we=({isExecutingQuery:r,handleButtonClick:a,handleFormatQuery:o,handleSaveQuery:l,handleFavorite:c,isFavorite:h,queryId:i,hasUnsavedChanges:u,queryResult:s,currentQuery:t})=>{const[d,g]=F(O.RUNNER_STATE_KEYS.SHOW_AS),{requestAssistant:p}=L(),{openOverlay:C}=D(),v=f=>{p(f),C("chat.assistant")};return(0,e.jsxs)("header",{className:"max-h-8 overflow-hidden border-b border-border w-full flex items-center justify-between bg-background text-foreground sticky top-0 left-0 right-0 z-0",children:[(0,e.jsxs)("div",{className:"flex items-center",children:[(0,e.jsxs)(b,{type:"button",variant:"default",className:"h-8! border-l-0 border-y-0 border-r border-border rounded-none bg-green-700 text-white hover:bg-green-800 gap-1 disabled:opacity-50",onClick:a,disabled:r,"aria-label":"Run the query",children:["Run",(0,e.jsx)(ee,{className:"size-3"}),(0,e.jsx)(te,{className:"size-3"})]}),(0,e.jsxs)(w,{children:[(0,e.jsx)(N,{asChild:!0,children:(0,e.jsx)(b,{type:"button",variant:"ghost",className:"h-8! border-l-0 border-y-0 border-r border-zinc-800 rounded-none","aria-label":"Generate a query with AI",onClick:()=>v("Generate a query for this database. Ask me for the goal if it is unclear."),children:(0,e.jsx)(ae,{className:"size-3"})})}),(0,e.jsx)(S,{children:"Generate with AI"})]}),(0,e.jsxs)(w,{children:[(0,e.jsx)(N,{asChild:!0,children:(0,e.jsx)(b,{type:"button",variant:"ghost",className:"h-8! border-l-0 border-y-0 border-r border-zinc-800 rounded-none","aria-label":"Optimize the query with AI",disabled:!t.trim()||r,onClick:()=>v(`Suggest a faster, clearer version of this query. Explain the tradeoffs and return the complete query in a fenced code block.
16
+
17
+ ${t}`),children:(0,e.jsx)(se,{className:"size-3"})})}),(0,e.jsx)(S,{children:"Optimize with AI"})]}),(0,e.jsxs)(b,{type:"button",variant:"ghost",className:"h-8! border-l-0 border-y-0 border-r border-border rounded-none text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors","aria-label":"Format the query",onClick:o,children:["Format ",(0,e.jsx)(oe,{className:"size-3"})]}),(0,e.jsxs)(b,{type:"button",variant:"ghost",className:"h-8! border-l-0 border-y-0 border-r border-border rounded-none text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors","aria-label":"Save the query",onClick:l,children:["Save ",(0,e.jsx)(Z,{className:"size-3"})]}),(0,e.jsx)(b,{type:"button",variant:"ghost",className:"h-8! border-l-0 border-y-0 border-r border-border rounded-none text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors","aria-label":"Favorite the query",onClick:c,children:h?(0,e.jsx)(q,{className:"size-3 fill-current"}):(0,e.jsx)(q,{className:"size-3"})}),i&&u&&(0,e.jsx)("span",{className:"text-xs px-2 text-muted-foreground",children:"Unsaved changes"})]}),(0,e.jsxs)("div",{className:"flex items-center",children:[s&&(0,e.jsxs)("div",{className:"flex items-center gap-1 px-2",children:[(0,e.jsxs)("span",{className:"text-xs text-muted-foreground",children:[s.data?.duration?.toFixed(2),"ms"]}),(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:"•"}),(0,e.jsxs)("span",{className:"text-xs text-muted-foreground",children:[s.data?.rowCount??0," rows"]})]}),(0,e.jsxs)(ue,{type:"single",variant:"ghost",onValueChange:f=>{f!==d&&g(f)},value:d??void 0,className:"h-8! rounded-none! border-l! border-border!",children:[(0,e.jsxs)(w,{children:[(0,e.jsx)(N,{asChild:!0,children:(0,e.jsx)($,{value:"table","aria-label":"Toggle table",className:"rounded-none! h-8! aspect-square!","data-selected":d==="table",children:(0,e.jsx)(X,{})})}),(0,e.jsx)(S,{children:(0,e.jsx)("p",{children:"View as a table"})})]}),(0,e.jsxs)(w,{children:[(0,e.jsx)(N,{asChild:!0,children:(0,e.jsx)($,{value:"json","aria-label":"Toggle JSON",className:"rounded-none! h-8! aspect-square!","data-selected":d==="json",children:(0,e.jsx)(re,{})})}),(0,e.jsx)(S,{children:(0,e.jsx)("p",{children:"View as a JSON"})})]})]})]})]})},Ne=()=>{const{selectedDatabase:r,dbType:a}=be(),{mutateAsync:o,isPending:l,error:c}=P({mutationFn:async({query:i})=>(await me({query:i,db:r})).data.data,onSuccess:()=>{a&&fe.capture("query_executed",{db_type:a})}});return{executeQuery:async({query:i})=>{try{return await o({query:i})}catch{return}},isExecutingQuery:l,executeQueryError:c}},Se=(0,n.lazy)(()=>ge(()=>import("./code-editor-BMXfdFhg.js").then(r=>({default:r.CodeEditor})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),He=({queryId:r,initialQuery:a})=>{const o=J(),[l,c]=(0,n.useState)(void 0),{getQuery:h,updateQuery:i,toggleFavorite:u,addQuery:s}=ie(),t=r?h(r):null,d=t?.isFavorite??!1,{executeQuery:g,isExecutingQuery:p,executeQueryError:C}=Ne(),[v,f]=(0,n.useState)(!1),[x,V]=(0,n.useState)(""),[H,M]=(0,n.useState)(""),Q=le(),k=Q?.editorLanguage??"pgsql",E=Q?.dataModel==="key-value",U=(0,n.useCallback)(()=>{if(a)return a;const m=pe[k];return t?t?.query??m:m},[t,k,a]),z=(0,n.useCallback)(async m=>{if(!m.trim()){j.error("Query is empty!");return}const y=m.trim().match(/^\S+/)?.[0]?.toUpperCase();if(E&&(y==="FLUSHDB"||y==="FLUSHALL")&&window.prompt(`This permanently deletes Redis data. Type ${y} to continue.`)!==y)return;M(m);const R=await g({query:m});R&&c({data:R,queryId:r??""})},[E,g,r]),I=(0,n.useCallback)(()=>{if(!x.trim()){j.error("Query is empty!");return}z(x)},[z,x]),W=(0,n.useCallback)(()=>{r&&(u(r),j.success(d?"Query unfavorited":"Query favorited"))},[u,r,d]),T=(0,n.useCallback)(()=>{},[]),_=(0,n.useCallback)(()=>{if(x){if(r)i(r,{query:x});else{const m=s();i(m,{query:x}),o({to:"/runner/$queryId",params:{queryId:m}})}f(!1),j.success("Query saved")}},[x,r,i,s,o]);return(0,e.jsxs)("div",{className:"flex-1 relative w-full flex flex-col",children:[(0,e.jsx)(we,{isExecutingQuery:p,handleButtonClick:I,handleFormatQuery:T,handleSaveQuery:_,handleFavorite:W,isFavorite:d,queryId:r??"",hasUnsavedChanges:v,queryResult:l??null,currentQuery:x}),(0,e.jsx)(n.Suspense,{fallback:(0,e.jsx)("div",{className:"flex-1 bg-background size-full"}),children:(0,e.jsx)(Se,{initialQuery:U(),queryId:r,savedQuery:t?.query??"",language:k,onQueryChange:V,onUnsavedChanges:f,onExecuteQuery:z,onFormatQuery:T,onSaveQuery:_})}),(0,e.jsx)(je,{results:l?.data??null,isLoading:p,error:C,lastExecutedQuery:H})]})};export{He as t};
@@ -1 +1 @@
1
- (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 o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="9abbc610-fa3f-4137-8835-7bf9e6d843a8",e._sentryDebugIdIdentifier="sentry-dbid-9abbc610-fa3f-4137-8835-7bf9e6d843a8")}catch{}})();var t={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},a={defaultToken:"",tokenPostfix:".r",roxygen:["@alias","@aliases","@assignee","@author","@backref","@callGraph","@callGraphDepth","@callGraphPrimitives","@concept","@describeIn","@description","@details","@docType","@encoding","@evalNamespace","@evalRd","@example","@examples","@export","@exportClass","@exportMethod","@exportPattern","@family","@field","@formals","@format","@import","@importClassesFrom","@importFrom","@importMethodsFrom","@include","@inherit","@inheritDotParams","@inheritParams","@inheritSection","@keywords","@md","@method","@name","@noMd","@noRd","@note","@param","@rawNamespace","@rawRd","@rdname","@references","@return","@S3method","@section","@seealso","@setClass","@slot","@source","@template","@templateVar","@title","@TODO","@usage","@useDynLib"],constants:["NULL","FALSE","TRUE","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","T","F","LETTERS","letters","month.abb","month.name","pi","R.version.string"],keywords:["break","next","return","if","else","for","in","repeat","while","array","category","character","complex","double","function","integer","list","logical","matrix","numeric","vector","data.frame","factor","library","require","attach","detach","source"],special:["\\n","\\r","\\t","\\b","\\a","\\f","\\v","\\'",'\\"',"\\\\"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@numbers"},{include:"@strings"},[/[{}\[\]()]/,"@brackets"],{include:"@operators"},[/#'$/,"comment.doc"],[/#'/,"comment.doc","@roxygen"],[/(^#.*$)/,"comment"],[/\s+/,"white"],[/[,:;]/,"delimiter"],[/@[a-zA-Z]\w*/,"tag"],[/[a-zA-Z]\w*/,{cases:{"@keywords":"keyword","@constants":"constant","@default":"identifier"}}]],roxygen:[[/@\w+/,{cases:{"@roxygen":"tag","@eos":{token:"comment.doc",next:"@pop"},"@default":"comment.doc"}}],[/\s+/,{cases:{"@eos":{token:"comment.doc",next:"@pop"},"@default":"comment.doc"}}],[/.*/,{token:"comment.doc",next:"@pop"}]],numbers:[[/0[xX][0-9a-fA-F]+/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?/,"number"]],operators:[[/<{1,2}-/,"operator"],[/->{1,2}/,"operator"],[/%[^%\s]+%/,"operator"],[/\*\*/,"operator"],[/%%/,"operator"],[/&&/,"operator"],[/\|\|/,"operator"],[/<</,"operator"],[/>>/,"operator"],[/[-+=&|!<>^~*/:$]/,"operator"]],strings:[[/'/,"string.escape","@stringBody"],[/"/,"string.escape","@dblStringBody"]],stringBody:[[/\\./,{cases:{"@special":"string","@default":"error-token"}}],[/'/,"string.escape","@popall"],[/./,"string"]],dblStringBody:[[/\\./,{cases:{"@special":"string","@default":"error-token"}}],[/"/,"string.escape","@popall"],[/./,"string"]]}};export{t as conf,a as language};
1
+ (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.2.0"};var o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="551bbcc3-2473-4a7e-9cc3-05be770cdb27",e._sentryDebugIdIdentifier="sentry-dbid-551bbcc3-2473-4a7e-9cc3-05be770cdb27")}catch{}})();var t={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},a={defaultToken:"",tokenPostfix:".r",roxygen:["@alias","@aliases","@assignee","@author","@backref","@callGraph","@callGraphDepth","@callGraphPrimitives","@concept","@describeIn","@description","@details","@docType","@encoding","@evalNamespace","@evalRd","@example","@examples","@export","@exportClass","@exportMethod","@exportPattern","@family","@field","@formals","@format","@import","@importClassesFrom","@importFrom","@importMethodsFrom","@include","@inherit","@inheritDotParams","@inheritParams","@inheritSection","@keywords","@md","@method","@name","@noMd","@noRd","@note","@param","@rawNamespace","@rawRd","@rdname","@references","@return","@S3method","@section","@seealso","@setClass","@slot","@source","@template","@templateVar","@title","@TODO","@usage","@useDynLib"],constants:["NULL","FALSE","TRUE","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","T","F","LETTERS","letters","month.abb","month.name","pi","R.version.string"],keywords:["break","next","return","if","else","for","in","repeat","while","array","category","character","complex","double","function","integer","list","logical","matrix","numeric","vector","data.frame","factor","library","require","attach","detach","source"],special:["\\n","\\r","\\t","\\b","\\a","\\f","\\v","\\'",'\\"',"\\\\"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@numbers"},{include:"@strings"},[/[{}\[\]()]/,"@brackets"],{include:"@operators"},[/#'$/,"comment.doc"],[/#'/,"comment.doc","@roxygen"],[/(^#.*$)/,"comment"],[/\s+/,"white"],[/[,:;]/,"delimiter"],[/@[a-zA-Z]\w*/,"tag"],[/[a-zA-Z]\w*/,{cases:{"@keywords":"keyword","@constants":"constant","@default":"identifier"}}]],roxygen:[[/@\w+/,{cases:{"@roxygen":"tag","@eos":{token:"comment.doc",next:"@pop"},"@default":"comment.doc"}}],[/\s+/,{cases:{"@eos":{token:"comment.doc",next:"@pop"},"@default":"comment.doc"}}],[/.*/,{token:"comment.doc",next:"@pop"}]],numbers:[[/0[xX][0-9a-fA-F]+/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?/,"number"]],operators:[[/<{1,2}-/,"operator"],[/->{1,2}/,"operator"],[/%[^%\s]+%/,"operator"],[/\*\*/,"operator"],[/%%/,"operator"],[/&&/,"operator"],[/\|\|/,"operator"],[/<</,"operator"],[/>>/,"operator"],[/[-+=&|!<>^~*/:$]/,"operator"]],strings:[[/'/,"string.escape","@stringBody"],[/"/,"string.escape","@dblStringBody"]],stringBody:[[/\\./,{cases:{"@special":"string","@default":"error-token"}}],[/'/,"string.escape","@popall"],[/./,"string"]],dblStringBody:[[/\\./,{cases:{"@special":"string","@default":"error-token"}}],[/"/,"string.escape","@popall"],[/./,"string"]]}};export{t as conf,a as language};
@@ -0,0 +1,41 @@
1
+ import{r as hi,t as xn}from"./rolldown-runtime-D_n5YsVB.js";import{zt as gi}from"./icons-DKLzom80.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.2.0"};var e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="c3f80485-4eda-4610-8a2d-b402d7bd03a2",t._sentryDebugIdIdentifier="sentry-dbid-c3f80485-4eda-4610-8a2d-b402d7bd03a2")}catch{}})();var zc=xn((t=>{var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function o(r,i,s){var a=null;if(s!==void 0&&(a=""+s),i.key!==void 0&&(a=""+i.key),"key"in i){s={};for(var u in i)u!=="key"&&(s[u]=i[u])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:a,ref:i!==void 0?i:null,props:s}}t.Fragment=n,t.jsx=o,t.jsxs=o})),Kc=xn(((t,e)=>{e.exports=zc()})),Yc=xn((t=>{var e=gi();function n(f){var l="https://react.dev/errors/"+f;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)l+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+f+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var r={d:{f:o,r:function(){throw Error(n(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},i=Symbol.for("react.portal"),s=Symbol.for("react.recoverable"),a=Symbol.for("react.optimistic_key");function u(f,l,h){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:v==null?null:v===a?a:""+v,children:f,containerInfo:l,implementation:h}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(f,l){if(f==="font")return"";if(typeof l=="string")return l==="use-credentials"?l:""}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,t.browser=function(f){return{$$typeof:s,_reason:f}},t.createPortal=function(f,l){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)throw Error(n(299));return u(f,l,null,h)},t.flushSync=function(f){var l=d.T,h=r.p;try{if(d.T=null,r.p=2,f)return f()}finally{d.T=l,r.p=h,r.d.f()}},t.preconnect=function(f,l){typeof f=="string"&&(l?(l=l.crossOrigin,l=typeof l=="string"?l==="use-credentials"?l:"":void 0):l=null,r.d.C(f,l))},t.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},t.preinit=function(f,l){if(typeof f=="string"&&l&&typeof l.as=="string"){var h=l.as,v=p(h,l.crossOrigin),m=typeof l.integrity=="string"?l.integrity:void 0,b=typeof l.fetchPriority=="string"?l.fetchPriority:void 0;h==="style"?r.d.S(f,typeof l.precedence=="string"?l.precedence:void 0,{crossOrigin:v,integrity:m,fetchPriority:b}):h==="script"&&r.d.X(f,{crossOrigin:v,integrity:m,fetchPriority:b,nonce:typeof l.nonce=="string"?l.nonce:void 0})}},t.preinitModule=function(f,l){if(typeof f=="string")if(typeof l=="object"&&l!==null){if(l.as==null||l.as==="script"){var h=p(l.as,l.crossOrigin);r.d.M(f,{crossOrigin:h,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0})}}else l??r.d.M(f)},t.preload=function(f,l){if(typeof f=="string"&&typeof l=="object"&&l!==null&&typeof l.as=="string"){var h=l.as,v=p(h,l.crossOrigin);r.d.L(f,h,{crossOrigin:v,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,type:typeof l.type=="string"?l.type:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0,referrerPolicy:typeof l.referrerPolicy=="string"?l.referrerPolicy:void 0,imageSrcSet:typeof l.imageSrcSet=="string"?l.imageSrcSet:void 0,imageSizes:typeof l.imageSizes=="string"?l.imageSizes:void 0,media:typeof l.media=="string"?l.media:void 0})}},t.preloadModule=function(f,l){if(typeof f=="string")if(l){var h=p(l.as,l.crossOrigin);r.d.m(f,{as:typeof l.as=="string"&&l.as!=="script"?l.as:void 0,crossOrigin:h,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0})}else r.d.m(f)},t.requestFormReset=function(f){r.d.r(f)},t.unstable_batchedUpdates=function(f,l){return f(l)},t.useFormState=function(f,l,h){return d.H.useFormState(f,l,h)},t.useFormStatus=function(){return d.H.useHostTransitionStatus()},t.version="19.3.1"})),Xc=xn(((t,e)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(o){console.error(o)}}n(),e.exports=Yc()})),c=hi(gi(),1),qc=Object.defineProperty,xt=(t,e)=>qc(t,"name",{value:e,configurable:!0}),vi=!!(typeof window<"u"&&window.document&&window.document.createElement);function E(t,e,{checkForDefaultPrevented:n=!0}={}){return xt(function(r){if(t?.(r),n===!1||!r||!r.defaultPrevented)return e?.(r)},"handleEvent")}xt(E,"composeEventHandlers");function Zc(t){if(!vi)throw new Error("Cannot access window outside of the DOM");return t?.ownerDocument?.defaultView??window}xt(Zc,"getOwnerWindow");function co(t){if(!vi)throw new Error("Cannot access document outside of the DOM");return t?.ownerDocument??document}xt(co,"getOwnerDocument");function mi(t,e=!1){const{activeElement:n}=co(t);if(!n?.nodeName)return null;if(bi(n)&&n.contentDocument)return mi(n.contentDocument.body,e);if(e){const o=n.getAttribute("aria-activedescendant");if(o){const r=co(n).getElementById(o);if(r)return r}}return n}xt(mi,"getActiveElement");function bi(t){return t.tagName==="IFRAME"}xt(bi,"isFrame");var Qc=Object.defineProperty,Io=(t,e)=>Qc(t,"name",{value:e,configurable:!0});function ao(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}Io(ao,"setRef");function Ci(...t){return e=>{let n=!1;const o=t.map(r=>{const i=ao(r,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<o.length;r++){const i=o[r];typeof i=="function"?i():ao(t[r],null)}}}}Io(Ci,"composeRefs");function N(...t){return c.useCallback(Ci(...t),t)}Io(N,"useComposedRefs");var g=Kc(),Jc=Object.defineProperty,Ce=(t,e)=>Jc(t,"name",{value:e,configurable:!0});function ea(t,e){const n=c.createContext(e);n.displayName=t+"Context";const o=Ce(i=>{const{children:s,...a}=i,u=c.useMemo(()=>a,Object.values(a));return(0,g.jsx)(n.Provider,{value:u,children:s})},"Provider");o.displayName=t+"Provider";function r(i,s={}){const{optional:a=!1}=s,u=c.useContext(n);if(u)return u;if(e!==void 0)return e;if(!a)throw new Error(`\`${i}\` must be used within \`${t}\``)}return Ce(r,"useContext"),[o,r]}Ce(ea,"createContext");function re(t,e=[]){let n=[];function o(i,s){const a=c.createContext(s);a.displayName=i+"Context";const u=n.length;n=[...n,s];const d=Ce(f=>{const{scope:l,children:h,...v}=f,m=l?.[t]?.[u]||a,b=c.useMemo(()=>v,Object.values(v));return(0,g.jsx)(m.Provider,{value:b,children:h})},"Provider");d.displayName=i+"Provider";function p(f,l,h={}){const{optional:v=!1}=h,m=l?.[t]?.[u]||a,b=c.useContext(m);if(b)return b;if(s!==void 0)return s;if(!v)throw new Error(`\`${f}\` must be used within \`${i}\``)}return Ce(p,"useContext"),[d,p]}Ce(o,"createContext");const r=Ce(()=>{const i=n.map(s=>c.createContext(s));return Ce(function(a){const u=a?.[t]||i;return c.useMemo(()=>({[`__scope${t}`]:{...a,[t]:u}}),[a,u])},"useScope")},"createScope");return r.scopeName=t,[o,wi(r,...e)]}Ce(re,"createContextScope");function wi(...t){const e=t[0];if(t.length===1)return e;const n=Ce(()=>{const o=t.map(r=>({useScope:r(),scopeName:r.scopeName}));return Ce(function(i){const s=o.reduce((a,{useScope:u,scopeName:d})=>{const p=u(i)[`__scope${d}`];return{...a,...p}},{});return c.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return n.scopeName=e.scopeName,n}Ce(wi,"composeContextScopes");var Ht=hi(Xc(),1),ta=Object.defineProperty,me=(t,e)=>ta(t,"name",{value:e,configurable:!0});function Re(t){const e=c.forwardRef((n,o)=>{let{children:r,...i}=n,s=null,a=!1;const u=[];r=Ei(r),c.Children.forEach(r,l=>{if(Pi(l)){a=!0;const h=l;let v="child"in h.props?h.props.child:h.props.children;for(;Do(v)&&typeof vn=="function";)v=vn(v._payload);s=na(h,v),u.push(s?.props?.children)}else u.push(l)}),s?s=c.cloneElement(s,void 0,u):!a&&c.Children.count(r)===1&&c.isValidElement(r)&&(s=r);const d=s?xi(s):void 0,p=N(o,d);if(!s){if(r||r===0)throw new Error(a?ia(t):ra(t));return r}const f=yi(i,s.props??{});return s.type!==c.Fragment&&(f.ref=o?p:d),c.cloneElement(s,f)});return e.displayName=`${t}.Slot`,e}me(Re,"createSlot");var Qp=Re("Slot"),Si=Symbol.for("radix.slottable");function Oo(t){const e=me(n=>"child"in n?n.children(n.child):n.children,"Slottable");return e.displayName=`${t}.Slottable`,e.__radixId=Si,e}me(Oo,"createSlottable");var na=me((t,e)=>"child"in t.props?c.isValidElement(e)?c.cloneElement(e,void 0,t.props.children(e.props.children)):null:c.isValidElement(e)?e:null,"getSlottableElementFromSlottable");function yi(t,e){const n={...e};for(const o in e){const r=t[o],i=e[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{const a=i(...s);return r(...s),a}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"?n[o]=[r,i].filter(Boolean).join(" "):o==="aria-describedby"&&(n[o]=_i(i,r))}return{...t,...n}}me(yi,"mergeProps");function xi(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}me(xi,"getElementRef");function Pi(t){return c.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Si}me(Pi,"isSlottable");var oa=Symbol.for("react.lazy");function Do(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===oa&&"_payload"in t&&Ri(t._payload)}me(Do,"isLazyComponent");function Ri(t){return typeof t=="object"&&t!==null&&"then"in t}me(Ri,"isPromiseLike");function Ei(t){let e=t;for(;Do(e)&&typeof vn=="function";)e=vn(e._payload);return e}me(Ei,"useUnwrappedLazy");function _i(...t){const e=new Set;for(const n of t)if(typeof n=="string")for(const o of String(n).trim().split(/\s+/))o&&e.add(o);return e.size>0?Array.from(e).join(" "):void 0}me(_i,"concatAriaDescribedby");var ra=me(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),ia=me(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),vn=c[" use ".trim().toString()],sa=Object.defineProperty,ca=(t,e)=>sa(t,"name",{value:e,configurable:!0}),k=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,e)=>{const n=Re(`Primitive.${e}`),o=c.forwardRef((r,i)=>{const{asChild:s,...a}=r,u=s?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,g.jsx)(u,{...a,ref:i})});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{});function Mo(t,e){t&&Ht.flushSync(()=>t.dispatchEvent(e))}ca(Mo,"dispatchDiscreteCustomEvent");var Z=globalThis?.document?c.useLayoutEffect:()=>{},aa=Object.defineProperty,la=(t,e)=>aa(t,"name",{value:e,configurable:!0}),Tr=c[" useInsertionEffect ".trim().toString()];function J(t){const e=c.useRef(t);return typeof Tr=="function"?Tr(()=>{e.current=t}):Z(()=>{e.current=t}),c.useMemo(()=>((...n)=>e.current?.(...n)),[])}la(J,"useCallbackRef");var ua=Object.defineProperty,ce=(t,e)=>ua(t,"name",{value:e,configurable:!0}),lo="dismissableLayer.update",da="dismissableLayer.pointerDownOutside",fa="dismissableLayer.focusOutside",Ar,Ti=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Ut=c.forwardRef(ce(function(e,n){const{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:u,onDismiss:d,...p}=e,f=c.useContext(Ti),[l,h]=c.useState(null),v=l?.ownerDocument??globalThis?.document,[,m]=c.useState({}),b=N(n,h),S=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),C=y?S.indexOf(y):-1,w=l?S.indexOf(l):-1,P=f.layersWithOutsidePointerEventsDisabled.size>0,x=w>=C,R=c.useRef(!1),T=Ii(I=>{s?.(I),u?.(I),I.defaultPrevented||d?.()},{ownerDocument:v,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:R,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:c.useCallback(I=>{if(!(I instanceof Node))return!1;const j=[...f.branches].some(F=>F.contains(I));return x&&!j},[f.branches,x])}),A=Oi(I=>{if(r&&R.current)return;const j=I.target;[...f.branches].some(F=>F.contains(j))||(a?.(I),u?.(I),I.defaultPrevented||d?.())},v),_=l?w===S.length-1:!1,D=J(I=>{I.key==="Escape"&&(i?.(I),!I.defaultPrevented&&d&&(I.preventDefault(),d()))});return c.useEffect(()=>{if(_)return v.addEventListener("keydown",D,{capture:!0}),()=>v.removeEventListener("keydown",D,{capture:!0})},[v,_,D]),c.useEffect(()=>{if(l)return o&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Ar=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(l)),f.layers.add(l),uo(),()=>{o&&(f.layersWithOutsidePointerEventsDisabled.delete(l),f.layersWithOutsidePointerEventsDisabled.size===0&&(v.body.style.pointerEvents=Ar))}},[l,v,o,f]),c.useEffect(()=>()=>{l&&(f.layers.delete(l),f.layersWithOutsidePointerEventsDisabled.delete(l),uo())},[l,f]),c.useEffect(()=>{const I=ce(()=>m({}),"handleUpdate");return document.addEventListener(lo,I),()=>document.removeEventListener(lo,I)},[]),(0,g.jsx)(k.div,{...p,ref:b,style:{pointerEvents:P?x?"auto":"none":void 0,...e.style},onFocusCapture:E(e.onFocusCapture,A.onFocusCapture),onBlurCapture:E(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:E(e.onPointerDownCapture,T.onPointerDownCapture)})},"DismissableLayer"));function Ai(){const t=c.useContext(Ti),[e,n]=c.useState(null);return c.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}ce(Ai,"useDismissableLayerSurface");var pa=ce(()=>!0,"IS_TRUE");function Ii(t,e){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:r,dismissableSurfaces:i,shouldHandlePointerDownOutside:s=pa}=e,a=J(t),u=c.useRef(!1),d=c.useRef(!1),p=c.useRef(new Map),f=c.useRef(()=>{});return c.useEffect(()=>{function l(){d.current=!1,r.current=!1,p.current.clear()}ce(l,"resetOutsideInteraction");function h(){return Array.from(p.current.values()).some(Boolean)}ce(h,"isOutsideInteractionIntercepted");function v(C){if(!d.current)return;const w=C.target;w instanceof Node&&[...i].some(P=>P.contains(w))||p.current.set(C.type,!0),C.type==="click"&&window.setTimeout(()=>{d.current&&f.current()},0)}ce(v,"handleInteractionCapture");function m(C){d.current&&p.current.set(C.type,!1)}ce(m,"handleInteractionBubble");const b=ce(C=>{if(C.target&&!u.current){let w=function(){n.removeEventListener("click",f.current);const x=h();l(),x||ko(da,a,P,{discrete:!0})};if(ce(w,"handleAndDispatchPointerDownOutsideEvent"),!s(C.target)){n.removeEventListener("click",f.current),l(),u.current=!1;return}const P={originalEvent:C};d.current=!0,r.current=o&&C.button===0,p.current.clear(),!o||C.button!==0?w():(n.removeEventListener("click",f.current),f.current=w,n.addEventListener("click",f.current,{once:!0}))}else n.removeEventListener("click",f.current),l();u.current=!1},"handlePointerDown"),S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const C of S)n.addEventListener(C,v,!0),n.addEventListener(C,m);const y=window.setTimeout(()=>{n.addEventListener("pointerdown",b)},0);return()=>{window.clearTimeout(y),n.removeEventListener("pointerdown",b),n.removeEventListener("click",f.current);for(const C of S)n.removeEventListener(C,v,!0),n.removeEventListener(C,m)}},[n,a,o,r,i,s]),{onPointerDownCapture:ce(()=>u.current=!0,"onPointerDownCapture")}}ce(Ii,"usePointerDownOutside");function Oi(t,e=globalThis?.document){const n=J(t),o=c.useRef(!1);return c.useEffect(()=>{const r=ce(i=>{i.target&&!o.current&&ko(fa,n,{originalEvent:i},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,n]),{onFocusCapture:ce(()=>o.current=!0,"onFocusCapture"),onBlurCapture:ce(()=>o.current=!1,"onBlurCapture")}}ce(Oi,"useFocusOutside");function uo(){const t=new CustomEvent(lo);document.dispatchEvent(t)}ce(uo,"dispatchUpdate");function ko(t,e,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),o?Mo(r,i):r.dispatchEvent(i)}ce(ko,"handleAndDispatchCustomEvent");var ha=Object.defineProperty,ee=(t,e)=>ha(t,"name",{value:e,configurable:!0}),qn="focusScope.autoFocusOnMount",Zn="focusScope.autoFocusOnUnmount",Ir={bubbles:!1,cancelable:!0},Pn=c.forwardRef(ee(function(e,n){const{loop:o=!1,trapped:r=!1,branches:i,onMountAutoFocus:s,onUnmountAutoFocus:a,...u}=e,[d,p]=c.useState(null),f=J(s),l=J(a),h=c.useRef(null),v=N(n,p),m=c.useRef(i);c.useEffect(()=>{m.current=i});const b=c.useCallback(C=>C?d?.contains(C)?!0:!!m.current?.some(w=>w.contains(C)):!1,[d]),S=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let C=function(R){if(S.paused||!d)return;const T=R.target;b(T)?h.current=T:Le(h.current,{select:!0})},w=function(R){if(S.paused||!d)return;const T=R.relatedTarget;T!==null&&(b(T)||Le(h.current,{select:!0}))},P=function(R){if(document.activeElement===document.body)for(const T of R)T.removedNodes.length>0&&Le(d)};ee(C,"handleFocusIn"),ee(w,"handleFocusOut"),ee(P,"handleMutations"),document.addEventListener("focusin",C),document.addEventListener("focusout",w);const x=new MutationObserver(P);return d&&x.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",w),x.disconnect()}}},[r,d,S.paused,b]),c.useEffect(()=>{if(d){Or.add(S);const C=document.activeElement;if(!d.contains(C)){const w=new CustomEvent(qn,Ir);d.addEventListener(qn,f),d.dispatchEvent(w),w.defaultPrevented||(Mi(Fi(jo(d)),{select:!0}),document.activeElement===C&&Le(d))}return()=>{d.removeEventListener(qn,f);const w=d.ownerDocument,P=CustomEvent;setTimeout(()=>{const x=new P(Zn,Ir);d.addEventListener(Zn,l),d.dispatchEvent(x),x.defaultPrevented||Le(C??w.body,{select:!0}),d.removeEventListener(Zn,l),Or.remove(S)},0)}}},[d,f,l,S]);const y=c.useCallback(C=>{if(!o&&!r||S.paused)return;const w=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,P=document.activeElement;if(w&&P){const x=C.currentTarget,[R,T]=ki(x);R&&T?!C.shiftKey&&P===T?(C.preventDefault(),o&&Le(R,{select:!0})):C.shiftKey&&P===R&&(C.preventDefault(),o&&Le(T,{select:!0})):P===x&&C.preventDefault()}},[o,r,S.paused]);return(0,g.jsx)(k.div,{tabIndex:-1,...u,ref:v,onKeyDown:y})},"FocusScope")),Di=c.createContext(null);function Rn({registry:t,children:e}){return t?(0,g.jsx)(Di.Provider,{value:t,children:e}):e}ee(Rn,"FocusScopeBranchProvider");function En(){const[t,e]=c.useState([]);return{nodes:t,registry:c.useMemo(()=>({add:ee(n=>e(o=>o.includes(n)?o:[...o,n]),"add"),remove:ee(n=>e(o=>o.filter(r=>r!==n)),"remove")}),[])}}ee(En,"useFocusScopeBranchRegistry");function _n(t){const e=c.useContext(Di);c.useEffect(()=>{if(!(!t||!e))return e.add(t),()=>e.remove(t)},[t,e])}ee(_n,"useFocusScopeBranch");function Mi(t,{select:e=!1}={}){const n=document.activeElement;for(const o of t)if(Le(o,{select:e}),document.activeElement!==n)return}ee(Mi,"focusFirst");function ki(t){const e=jo(t);return[fo(e,t),fo(e.reverse(),t)]}ee(ki,"getTabbableEdges");function jo(t){const e=[],n=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:ee(o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)e.push(n.currentNode);return e}ee(jo,"getTabbableCandidates");function fo(t,e){const n=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const o of t)if(!(n?!o.checkVisibility({checkVisibilityCSS:!0}):ji(o,{upTo:e})))return o}ee(fo,"findVisible");function ji(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}ee(ji,"isHidden");function Ni(t){return t.tagName==="INPUT"&&typeof t.select=="function"}ee(Ni,"isSelectableInput");function Le(t,{select:e=!1}={}){if(t&&t.focus){const n=(t.ownerDocument??document).activeElement;t.focus({preventScroll:!0}),t!==n&&Ni(t)&&e&&t.select()}}ee(Le,"focus");var Or=Li();function Li(){let t=[];return{add(e){const n=t[0];e!==n&&n?.pause(),t=po(t,e),t.unshift(e)},remove(e){t=po(t,e),t[0]?.resume()}}}ee(Li,"createFocusScopesStack");function po(t,e){const n=[...t],o=n.indexOf(e);return o!==-1&&n.splice(o,1),n}ee(po,"arrayRemove");function Fi(t){return t.filter(e=>e.tagName!=="A")}ee(Fi,"removeLinks");var ga=Object.defineProperty,va=(t,e)=>ga(t,"name",{value:e,configurable:!0}),ma=c[" useId ".trim().toString()]||(()=>{}),ba=0;function le(t){const[e,n]=c.useState(ma());return Z(()=>{t||n(o=>o??String(ba++))},[t]),t||(e?`radix-${e}`:"")}va(le,"useId");var Ca=["top","right","bottom","left"],Xe=Math.min,ge=Math.max,mn=Math.round,tn=Math.floor,De=t=>({x:t,y:t}),wa={left:"right",right:"left",bottom:"top",top:"bottom"};function ho(t,e,n){return ge(t,Xe(e,n))}function Be(t,e){return typeof t=="function"?t(e):t}function He(t){return t.split("-")[0]}function Pt(t){return t.split("-")[1]}function No(t){return t==="x"?"y":"x"}function Lo(t){return t==="y"?"height":"width"}function Oe(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Fo(t){return No(Oe(t))}function Sa(t,e,n){n===void 0&&(n=!1);const o=Pt(t),r=Fo(t),i=Lo(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=bn(s)),[s,bn(s)]}function ya(t){const e=bn(t);return[go(t),e,go(e)]}function go(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var Dr=["left","right"],Mr=["right","left"],xa=["top","bottom"],Pa=["bottom","top"];function Ra(t,e,n){switch(t){case"top":case"bottom":return n?e?Mr:Dr:e?Dr:Mr;case"left":case"right":return e?xa:Pa;default:return[]}}function Ea(t,e,n,o){const r=Pt(t);let i=Ra(He(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(go)))),i}function bn(t){const e=He(t);return wa[e]+t.slice(e.length)}function _a(t){return{top:0,right:0,bottom:0,left:0,...t}}function $i(t){return typeof t!="number"?_a(t):{top:t,right:t,bottom:t,left:t}}function Cn(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function kr(t,e,n){let{reference:o,floating:r}=t;const i=Oe(e),s=Fo(e),a=Lo(s),u=He(e),d=i==="y",p=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,l=o[a]/2-r[a]/2;let h;switch(u){case"top":h={x:p,y:o.y-r.height};break;case"bottom":h={x:p,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-r.width,y:f};break;default:h={x:o.x,y:o.y}}switch(Pt(e)){case"start":h[s]-=l*(n&&d?-1:1);break;case"end":h[s]+=l*(n&&d?-1:1)}return h}async function Ta(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:u}=t,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:l=!1,padding:h=0}=Be(e,t),v=$i(h),m=a[l?f==="floating"?"reference":"floating":f],b=Cn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:d,rootBoundary:p,strategy:u})),S=f==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),C=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},w=Cn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:y,strategy:u}):S);return{top:(b.top-w.top+v.top)/C.y,bottom:(w.bottom-b.bottom+v.bottom)/C.y,left:(b.left-w.left+v.left)/C.x,right:(w.right-b.right+v.right)/C.x}}var Aa=50,Ia=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:Ta},u=await(s.isRTL==null?void 0:s.isRTL(e));let d=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:p,y:f}=kr(d,o,u),l=o,h=0;const v={};for(let m=0;m<i.length;m++){const b=i[m];if(!b)continue;const{name:S,fn:y}=b,{x:C,y:w,data:P,reset:x}=await y({x:p,y:f,initialPlacement:o,placement:l,strategy:r,middlewareData:v,rects:d,platform:a,elements:{reference:t,floating:e}});p=C??p,f=w??f,v[S]={...v[S],...P},x&&h<Aa&&(h++,typeof x=="object"&&(x.placement&&(l=x.placement),x.rects&&(d=x.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):x.rects),{x:p,y:f}=kr(d,l,u)),m=-1)}return{x:p,y:f,placement:l,strategy:r,middlewareData:v}},Oa=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:a,middlewareData:u}=e,{element:d,padding:p=0}=Be(t,e)||{};if(d==null)return{};const f=$i(p),l={x:n,y:o},h=Fo(r),v=Lo(h),m=await s.getDimensions(d),b=h==="y",S=b?"top":"left",y=b?"bottom":"right",C=b?"clientHeight":"clientWidth",w=i.reference[v]+i.reference[h]-l[h]-i.floating[v],P=l[h]-i.reference[h],x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let R=x?x[C]:0;(!R||!await(s.isElement==null?void 0:s.isElement(x)))&&(R=a.floating[C]||i.floating[v]);const T=w/2-P/2,A=R/2-m[v]/2-1,_=Xe(f[S],A),D=Xe(f[y],A),I=_,j=R-m[v]-D,F=R/2-m[v]/2+T,Y=ho(I,F,j),H=!u.arrow&&Pt(r)!=null&&F!==Y&&i.reference[v]/2-(F<I?_:D)-m[v]/2<0,B=H?F<I?F-I:F-j:0;return{[h]:l[h]+B,data:{[h]:Y,centerOffset:F-Y-B,...H&&{alignmentOffset:B}},reset:H}}}),Da=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:u,elements:d}=e,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:l,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...b}=Be(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const S=He(r),y=Oe(a),C=He(a)===a,w=await(u.isRTL==null?void 0:u.isRTL(d.floating)),P=l||(C||!m?[bn(a)]:ya(a)),x=v!=="none";!l&&x&&P.push(...Ea(a,m,v,w));const R=[a,...P],T=await u.detectOverflow(e,b),A=[];let _=((o=i.flip)==null?void 0:o.overflows)||[];if(p&&A.push(T[S]),f){const F=Sa(r,s,w);A.push(T[F[0]],T[F[1]])}if(_=[..._,{placement:r,overflows:A}],!A.every(F=>F<=0)){var D,I;const F=(((D=i.flip)==null?void 0:D.index)||0)+1,Y=R[F];if(Y&&(!(f==="alignment"&&y!==Oe(Y))||_.every(B=>Oe(B.placement)===y?B.overflows[0]>0:!0)))return{data:{index:F,overflows:_},reset:{placement:Y}};let H=(I=_.filter(B=>B.overflows[0]<=0).sort((B,O)=>B.overflows[1]-O.overflows[1])[0])==null?void 0:I.placement;if(!H)switch(h){case"bestFit":{var j;const B=(j=_.filter(O=>{if(x){const L=Oe(O.placement);return L===y||L==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(L=>L>0).reduce((L,z)=>L+z,0)]).sort((O,L)=>O[1]-L[1])[0])==null?void 0:j[0];B&&(H=B);break}case"initialPlacement":H=a}if(r!==H)return{reset:{placement:H}}}return{}}}};function jr(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Nr(t){return Ca.some(e=>t[e]>=0)}var Ma=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:r="referenceHidden",...i}=Be(t,e);switch(r){case"referenceHidden":{const s=jr(await o.detectOverflow(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Nr(s)}}}case"escaped":{const s=jr(await o.detectOverflow(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:s,escaped:Nr(s)}}}default:return{}}}}},Bi=new Set(["left","top"]);async function ka(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=He(n),a=Pt(n),u=Oe(n)==="y",d=Bi.has(s)?-1:1,p=i&&u?-1:1,f=Be(e,t);let{mainAxis:l,crossAxis:h,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),u?{x:h*p,y:l*d}:{x:l*d,y:h*p}}var ja=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=e,u=await ka(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:i+u.y,data:{...u,placement:s}}}}},Na=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:S=>{let{x:y,y:C}=S;return{x:y,y:C}}},...d}=Be(t,e),p={x:n,y:o},f=await i.detectOverflow(e,d),l=Oe(He(r)),h=No(l);let v=p[h],m=p[l];if(s){const S=h==="y"?"top":"left",y=h==="y"?"bottom":"right",C=v+f[S],w=v-f[y];v=ho(C,v,w)}if(a){const S=l==="y"?"top":"left",y=l==="y"?"bottom":"right",C=m+f[S],w=m-f[y];m=ho(C,m,w)}const b=u.fn({...e,[h]:v,[l]:m});return{...b,data:{x:b.x-n,y:b.y-o,enabled:{[h]:s,[l]:a}}}}}},La=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=e,{offset:a=0,mainAxis:u=!0,crossAxis:d=!0}=Be(t,e),p={x:n,y:o},f=Oe(r),l=No(f);let h=p[l],v=p[f];const m=Be(a,e),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const C=l==="y"?"height":"width",w=i.reference[l]-i.floating[C]+b.mainAxis,P=i.reference[l]+i.reference[C]-b.mainAxis;h<w?h=w:h>P&&(h=P)}if(d){var S,y;const C=l==="y"?"width":"height",w=Bi.has(He(r)),P=i.reference[f]-i.floating[C]+(w&&((S=s.offset)==null?void 0:S[f])||0)+(w?0:b.crossAxis),x=i.reference[f]+i.reference[C]+(w?0:((y=s.offset)==null?void 0:y[f])||0)-(w?b.crossAxis:0);v<P?v=P:v>x&&(v=x)}return{[l]:h,[f]:v}}}},Fa=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:a}=e,{apply:u=()=>{},...d}=Be(t,e),p=await s.detectOverflow(e,d),f=He(r),l=Pt(r),h=Oe(r)==="y",{width:v,height:m}=i.floating;let b,S;f==="top"||f==="bottom"?(b=f,S=l===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(S=f,b=l==="end"?"top":"bottom");const y=m-p.top-p.bottom,C=v-p.left-p.right,w=Xe(m-p[b],y),P=Xe(v-p[S],C),x=!e.middlewareData.shift;let R=w,T=P;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(T=C),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(R=y),x&&!l){const _=ge(p.left,0),D=ge(p.right,0),I=ge(p.top,0),j=ge(p.bottom,0);h?T=v-2*(_!==0||D!==0?_+D:ge(p.left,p.right)):R=m-2*(I!==0||j!==0?I+j:ge(p.top,p.bottom))}await u({...e,availableWidth:T,availableHeight:R});const A=await s.getDimensions(a.floating);return v!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function Tn(){return typeof window<"u"}function Rt(t){return Hi(t)?(t.nodeName||"").toLowerCase():"#document"}function ve(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ke(t){var e;return(e=(Hi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Hi(t){return Tn()?t instanceof Node||t instanceof ve(t).Node:!1}function Ee(t){return Tn()?t instanceof Element||t instanceof ve(t).Element:!1}function We(t){return Tn()?t instanceof HTMLElement||t instanceof ve(t).HTMLElement:!1}function Lr(t){return!Tn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ve(t).ShadowRoot}function Vt(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=_e(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&r!=="inline"&&r!=="contents"}function $a(t){return/^(table|td|th)$/.test(Rt(t))}function An(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Ba=/transform|translate|scale|rotate|perspective|filter/,Ha=/paint|layout|strict|content/,nt=t=>!!t&&t!=="none",Qn;function $o(t){const e=Ee(t)?_e(t):t;return nt(e.transform)||nt(e.translate)||nt(e.scale)||nt(e.rotate)||nt(e.perspective)||!Bo()&&(nt(e.backdropFilter)||nt(e.filter))||Ba.test(e.willChange||"")||Ha.test(e.contain||"")}function Ua(t){let e=qe(t);for(;We(e)&&!wt(e);){if($o(e))return e;if(An(e))return null;e=qe(e)}return null}function Bo(){return Qn==null&&(Qn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qn}function wt(t){return/^(html|body|#document)$/.test(Rt(t))}function _e(t){return ve(t).getComputedStyle(t)}function In(t){return Ee(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function qe(t){if(Rt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Lr(t)&&t.host||ke(t);return Lr(e)?e.host:e}function Ui(t){const e=qe(t);return wt(e)?t.ownerDocument?t.ownerDocument.body:t.body:We(e)&&Vt(e)?e:Ui(e)}function Mt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=Ui(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=ve(r);if(i){const a=vo(s);return e.concat(s,s.visualViewport||[],Vt(r)?r:[],a&&n?Mt(a):[])}else return e.concat(r,Mt(r,[],n))}function vo(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Vi(t){const e=_e(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=We(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,a=mn(n)!==i||mn(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function Ho(t){return Ee(t)?t:t.contextElement}function bt(t){const e=Ho(t);if(!We(e))return De(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=Vi(e);let s=(i?mn(n.width):n.width)/o,a=(i?mn(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Va=De(0);function Wi(t){const e=ve(t);return!Bo()||!e.visualViewport?Va:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Wa(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ve(t)?!1:e}function ot(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=Ho(t);let s=De(1);e&&(o?Ee(o)&&(s=bt(o)):s=bt(t));const a=Wa(i,n,o)?Wi(i):De(0);let u=(r.left+a.x)/s.x,d=(r.top+a.y)/s.y,p=r.width/s.x,f=r.height/s.y;if(i){const l=ve(i),h=o&&Ee(o)?ve(o):o;let v=l,m=vo(v);for(;m&&o&&h!==v;){const b=bt(m),S=m.getBoundingClientRect(),y=_e(m),C=S.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,w=S.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;u*=b.x,d*=b.y,p*=b.x,f*=b.y,u+=C,d+=w,v=ve(m),m=vo(v)}}return Cn({width:p,height:f,x:u,y:d})}function On(t,e){const n=In(t).scrollLeft;return e?e.left+n:ot(ke(t)).left+n}function Gi(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-On(t,n),y:n.top+e.scrollTop}}function Ga(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=ke(o),a=e?An(e.floating):!1;if(o===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},d=De(1);const p=De(0),f=We(o);if((f||!f&&!i)&&((Rt(o)!=="body"||Vt(s))&&(u=In(o)),f)){const h=ot(o);d=bt(o),p.x=h.x+o.clientLeft,p.y=h.y+o.clientTop}const l=s&&!f&&!i?Gi(s,u):De(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+p.x+l.x,y:n.y*d.y-u.scrollTop*d.y+p.y+l.y}}function za(t){return Array.from(t.getClientRects())}function Ka(t){const e=ke(t),n=In(t),o=t.ownerDocument.body,r=ge(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=ge(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+On(t);const a=-n.scrollTop;return _e(o).direction==="rtl"&&(s+=ge(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}var Fr=25;function Ya(t,e){const n=ve(t),o=ke(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,u=0;if(r){i=r.width,s=r.height;const p=Bo();(!p||p&&e==="fixed")&&(a=r.offsetLeft,u=r.offsetTop)}const d=On(o);if(d<=0){const p=o.ownerDocument,f=p.body,l=getComputedStyle(f),h=p.compatMode==="CSS1Compat"&&parseFloat(l.marginLeft)+parseFloat(l.marginRight)||0,v=Math.abs(o.clientWidth-f.clientWidth-h);v<=Fr&&(i-=v)}else d<=Fr&&(i+=d);return{width:i,height:s,x:a,y:u}}function Xa(t,e){const n=ot(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=We(t)?bt(t):De(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}function $r(t,e,n){let o;if(e==="viewport")o=Ya(t,n);else if(e==="document")o=Ka(ke(t));else if(Ee(e))o=Xa(e,n);else{const r=Wi(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Cn(o)}function zi(t,e){const n=qe(t);return n===e||!Ee(n)||wt(n)?!1:_e(n).position==="fixed"||zi(n,e)}function qa(t,e){const n=e.get(t);if(n)return n;let o=Mt(t,[],!1).filter(a=>Ee(a)&&Rt(a)!=="body"),r=null;const i=_e(t).position==="fixed";let s=i?qe(t):t;for(;Ee(s)&&!wt(s);){const a=_e(s),u=$o(s);!u&&a.position==="fixed"&&(r=null),(i?!u&&!r:!u&&a.position==="static"&&r&&(r.position==="absolute"||r.position==="fixed")||Vt(s)&&!u&&zi(t,s))?o=o.filter(d=>d!==s):r=a,s=qe(s)}return e.set(t,o),o}function Za(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[...n==="clippingAncestors"?An(e)?[]:qa(e,this._c):[].concat(n),o],s=$r(e,i[0],r);let a=s.top,u=s.right,d=s.bottom,p=s.left;for(let f=1;f<i.length;f++){const l=$r(e,i[f],r);a=ge(l.top,a),u=Xe(l.right,u),d=Xe(l.bottom,d),p=ge(l.left,p)}return{width:u-p,height:d-a,x:p,y:a}}function Qa(t){const{width:e,height:n}=Vi(t);return{width:e,height:n}}function Ja(t,e,n){const o=We(e),r=ke(e),i=n==="fixed",s=ot(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const u=De(0);function d(){u.x=On(r)}if(o||!o&&!i)if((Rt(e)!=="body"||Vt(r))&&(a=In(e)),o){const f=ot(e,!0,i,e);u.x=f.x+e.clientLeft,u.y=f.y+e.clientTop}else r&&d();i&&!o&&r&&d();const p=r&&!o&&!i?Gi(r,a):De(0);return{x:s.left+a.scrollLeft-u.x-p.x,y:s.top+a.scrollTop-u.y-p.y,width:s.width,height:s.height}}function Jn(t){return _e(t).position==="static"}function Br(t,e){if(!We(t)||_e(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return ke(t)===n&&(n=n.ownerDocument.body),n}function Ki(t,e){const n=ve(t);if(An(t))return n;if(!We(t)){let r=qe(t);for(;r&&!wt(r);){if(Ee(r)&&!Jn(r))return r;r=qe(r)}return n}let o=Br(t,e);for(;o&&$a(o)&&Jn(o);)o=Br(o,e);return o&&wt(o)&&Jn(o)&&!$o(o)?n:o||Ua(t)||n}var el=async function(t){const e=this.getOffsetParent||Ki,n=this.getDimensions,o=await n(t.floating);return{reference:Ja(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function tl(t){return _e(t).direction==="rtl"}var nl={convertOffsetParentRelativeRectToViewportRelativeRect:Ga,getDocumentElement:ke,getClippingRect:Za,getOffsetParent:Ki,getElementRects:el,getClientRects:za,getDimensions:Qa,getScale:bt,isElement:Ee,isRTL:tl};function Yi(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ol(t,e){let n=null,o;const r=ke(t);function i(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),i();const d=t.getBoundingClientRect(),{left:p,top:f,width:l,height:h}=d;if(a||e(),!l||!h)return;const v=tn(f),m=tn(r.clientWidth-(p+l)),b=tn(r.clientHeight-(f+h)),S=tn(p),y={rootMargin:-v+"px "+-m+"px "+-b+"px "+-S+"px",threshold:ge(0,Xe(1,u))||1};let C=!0;function w(P){const x=P[0].intersectionRatio;if(x!==u){if(!C)return s();x?s(!1,x):o=setTimeout(()=>{s(!1,1e-7)},1e3)}x===1&&!Yi(d,t.getBoundingClientRect())&&s(),C=!1}try{n=new IntersectionObserver(w,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(t)}return s(!0),i}function rl(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=Ho(t),p=r||i?[...d?Mt(d):[],...e?Mt(e):[]]:[];p.forEach(S=>{r&&S.addEventListener("scroll",n,{passive:!0}),i&&S.addEventListener("resize",n)});const f=d&&a?ol(d,n):null;let l=-1,h=null;s&&(h=new ResizeObserver(S=>{let[y]=S;y&&y.target===d&&h&&e&&(h.unobserve(e),cancelAnimationFrame(l),l=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(e)})),n()}),d&&!u&&h.observe(d),e&&h.observe(e));let v,m=u?ot(t):null;u&&b();function b(){const S=ot(t);m&&!Yi(m,S)&&n(),m=S,v=requestAnimationFrame(b)}return n(),()=>{var S;p.forEach(y=>{r&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(S=h)==null||S.disconnect(),h=null,u&&cancelAnimationFrame(v)}}var il=ja,sl=Na,cl=Da,al=Fa,ll=Ma,Hr=Oa,ul=La,dl=(t,e,n)=>{const o=new Map,r={platform:nl,...n},i={...r.platform,_c:o};return Ia(t,e,{...r,platform:i})},dn=typeof document<"u"?c.useLayoutEffect:function(){};function wn(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!wn(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&t.$$typeof)&&!wn(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function Xi(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ur(t,e){const n=Xi(t);return Math.round(e*n)/n}function eo(t){const e=c.useRef(t);return dn(()=>{e.current=t}),e}function fl(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:u,open:d}=t,[p,f]=c.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[l,h]=c.useState(o);wn(l,o)||h(o);const[v,m]=c.useState(null),[b,S]=c.useState(null),y=c.useCallback(O=>{O!==x.current&&(x.current=O,m(O))},[]),C=c.useCallback(O=>{O!==R.current&&(R.current=O,S(O))},[]),w=i||v,P=s||b,x=c.useRef(null),R=c.useRef(null),T=c.useRef(p),A=u!=null,_=eo(u),D=eo(r),I=eo(d),j=c.useCallback(()=>{if(!x.current||!R.current)return;const O={placement:e,strategy:n,middleware:l};D.current&&(O.platform=D.current),dl(x.current,R.current,O).then(L=>{const z={...L,isPositioned:I.current!==!1};F.current&&!wn(T.current,z)&&(T.current=z,Ht.flushSync(()=>{f(z)}))})},[l,e,n,D,I]);dn(()=>{d===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[d]);const F=c.useRef(!1);dn(()=>(F.current=!0,()=>{F.current=!1}),[]),dn(()=>{if(w&&(x.current=w),P&&(R.current=P),w&&P){if(_.current)return _.current(w,P,j);j()}},[w,P,j,_,A]);const Y=c.useMemo(()=>({reference:x,floating:R,setReference:y,setFloating:C}),[y,C]),H=c.useMemo(()=>({reference:w,floating:P}),[w,P]),B=c.useMemo(()=>{const O={position:n,left:0,top:0};if(!H.floating)return O;const L=Ur(H.floating,p.x),z=Ur(H.floating,p.y);return a?{...O,transform:"translate("+L+"px, "+z+"px)",...Xi(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:z}},[n,a,H.floating,p.x,p.y]);return c.useMemo(()=>({...p,update:j,refs:Y,elements:H,floatingStyles:B}),[p,j,Y,H,B])}var pl=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:r}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?Hr({element:o.current,padding:r}).fn(n):{}:o?Hr({element:o,padding:r}).fn(n):{}}}},hl=(t,e)=>{const n=il(t);return{name:n.name,fn:n.fn,options:[t,e]}},gl=(t,e)=>{const n=sl(t);return{name:n.name,fn:n.fn,options:[t,e]}},vl=(t,e)=>({fn:ul(t).fn,options:[t,e]}),ml=(t,e)=>{const n=cl(t);return{name:n.name,fn:n.fn,options:[t,e]}},bl=(t,e)=>{const n=al(t);return{name:n.name,fn:n.fn,options:[t,e]}},Cl=(t,e)=>{const n=ll(t);return{name:n.name,fn:n.fn,options:[t,e]}},wl=(t,e)=>{const n=pl(t);return{name:n.name,fn:n.fn,options:[t,e]}},Sl=Object.defineProperty,yl=(t,e)=>Sl(t,"name",{value:e,configurable:!0}),xl=c.forwardRef(yl(function(e,n){const{children:o,width:r=10,height:i=5,...s}=e;return(0,g.jsx)(k.svg,{...s,ref:n,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:(0,g.jsx)("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),Pl=Object.defineProperty,Rl=(t,e)=>Pl(t,"name",{value:e,configurable:!0});function Dn(t){const[e,n]=c.useState(void 0);return Z(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});let o=0;const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];window.cancelAnimationFrame(o),o=window.requestAnimationFrame(()=>{let a,u;if("borderBoxSize"in s){const d=s.borderBoxSize,p=Array.isArray(d)?d[0]:d;a=p.inlineSize,u=p.blockSize}else a=t.offsetWidth,u=t.offsetHeight;n({width:a,height:u})})});return r.observe(t,{box:"border-box"}),()=>{window.cancelAnimationFrame(o),r.unobserve(t)}}else n(void 0)},[t]),e}Rl(Dn,"useSize");var El=Object.defineProperty,Fe=(t,e)=>El(t,"name",{value:e,configurable:!0}),Vr={Partial:"partial",Always:"always"},Wr={Optimized:"optimized",Always:"always"},qi="Popper",[Zi,Je]=re(qi),[_l,Qi]=Zi(qi),Wt=Fe(t=>{const{__scopePopper:e,children:n}=t,[o,r]=c.useState(null),[i,s]=c.useState(void 0);return(0,g.jsx)(_l,{scope:e,anchor:o,onAnchorChange:r,placementState:i,setPlacementState:s,children:n})},"Popper"),Tl="PopperAnchor",Gt=c.forwardRef(Fe(function(e,n){const{__scopePopper:o,virtualRef:r,...i}=e,s=Qi(Tl,o),a=c.useRef(null),u=s.onAnchorChange,d=c.useCallback(m=>{a.current=m,m&&u(m)},[u]),p=N(n,d),f=c.useRef(null);c.useEffect(()=>{if(!r)return;const m=f.current;f.current=r.current,m!==f.current&&u(f.current)});const l=s.placementState&&kn(s.placementState),h=l?.[0],v=l?.[1];return r?null:(0,g.jsx)(k.div,{"data-radix-popper-side":h,"data-radix-popper-align":v,...i,ref:p})},"PopperAnchor")),Ji="PopperContent",[Al,Il]=Zi(Ji),Mn=c.forwardRef(Fe(function(e,n){const{__scopePopper:o,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:p=[],collisionPadding:f=0,sticky:l=Vr.Partial,hideWhenDetached:h=!1,updatePositionStrategy:v=Wr.Optimized,onPlaced:m,...b}=e,S=Qi(Ji,o),[y,C]=c.useState(null),w=N(n,C),[P,x]=c.useState(null),R=Dn(P),T=R?.width??0,A=R?.height??0,_=r+(s!=="center"?"-"+s:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},I=Array.isArray(p)?p:[p],j=I.length>0,F={padding:D,boundary:I.filter(es),altBoundary:j},{refs:Y,floatingStyles:H,placement:B,isPositioned:O,middlewareData:L}=fl({strategy:"fixed",placement:_,whileElementsMounted:Fe((...de)=>rl(...de,{animationFrame:v===Wr.Always}),"whileElementsMounted"),elements:{reference:S.anchor},middleware:[hl({mainAxis:i+A,alignmentAxis:a}),d&&gl({mainAxis:!0,crossAxis:!1,...l===Vr.Partial?{limiter:vl()}:{},...F}),d&&ml({...F}),bl({...F,apply:Fe(({elements:de,rects:$,availableWidth:X,availableHeight:V})=>{const{width:W,height:q}=$.reference,fe=de.floating.style;fe.setProperty("--radix-popper-available-width",`${X}px`),fe.setProperty("--radix-popper-available-height",`${V}px`),fe.setProperty("--radix-popper-anchor-width",`${W}px`),fe.setProperty("--radix-popper-anchor-height",`${q}px`)},"apply")}),P&&wl({element:P,padding:u}),kl({arrowWidth:T,arrowHeight:A}),h&&Cl(j?{strategy:"referenceHidden",...F}:{strategy:"referenceHidden",padding:F.padding,altBoundary:F.altBoundary})]}),z=S.setPlacementState;Z(()=>(z(B),()=>{z(void 0)}),[B,z]);const[ne,pe]=kn(B),Ae=J(m);Z(()=>{O&&Ae?.()},[O,Ae]);const Ne=L.arrow?.x,se=L.arrow?.y,M=L.arrow?.centerOffset!==0,[Q,ae]=c.useState();return Z(()=>{y&&ae(window.getComputedStyle(y).zIndex)},[y]),(0,g.jsx)("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:O?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,g.jsx)(Al,{scope:o,placedSide:ne,placedAlign:pe,onArrowChange:x,arrowX:Ne,arrowY:se,shouldHideArrow:M,children:(0,g.jsx)(k.div,{"data-side":ne,"data-align":pe,...b,ref:w,style:{...b.style,animation:O?b.style?.animation:"none"}})})})},"PopperContent")),Ol="PopperArrow",Dl={top:"bottom",right:"left",bottom:"top",left:"right"},Ml=c.forwardRef(Fe(function(e,n){const{__scopePopper:o,...r}=e,i=Il(Ol,o),s=Dl[i.placedSide];return(0,g.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,g.jsx)(xl,{...r,ref:n,style:{...r.style,display:"block"}})})},"PopperArrow"));function es(t){return t!==null}Fe(es,"isNotNull");var kl=Fe(t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:r}=e,i=r.arrow?.centerOffset!==0,s=i?0:t.arrowWidth,a=i?0:t.arrowHeight,[u,d]=kn(n),p={start:"0%",center:"50%",end:"100%"}[d],f=(r.arrow?.x??0)+s/2,l=(r.arrow?.y??0)+a/2;let h="",v="";return u==="bottom"?(h=i?p:`${f}px`,v=`${-a}px`):u==="top"?(h=i?p:`${f}px`,v=`${o.floating.height+a}px`):u==="right"?(h=`${-a}px`,v=i?p:`${l}px`):u==="left"&&(h=`${o.floating.width+a}px`,v=i?p:`${l}px`),{data:{x:h,y:v}}}}),"transformOrigin");function kn(t){const[e,n="center"]=t.split("-");return[e,n]}Fe(kn,"getSideAndAlignFromPlacement");var jl=Object.defineProperty,Nl=(t,e)=>jl(t,"name",{value:e,configurable:!0}),zt=c.forwardRef(Nl(function(e,n){const{container:o,...r}=e,[i,s]=c.useState(!1);Z(()=>s(!0),[]);const a=o||i&&globalThis?.document?.body;return a?Ht.createPortal((0,g.jsx)(k.div,{...r,ref:n}),a):null},"Portal")),Ll=Object.defineProperty,Ue=(t,e)=>Ll(t,"name",{value:e,configurable:!0});function ts(t,e){return c.useReducer((n,o)=>e[n][o]??n,t)}Ue(ts,"useStateMachine");var ie=Ue(t=>{const{present:e,children:n}=t,o=ns(e),r=typeof n=="function"?n({present:o.isPresent}):c.Children.only(n),i=os(o.ref,rs(r));return typeof n=="function"||o.isPresent?c.cloneElement(r,{ref:i}):null},"Presence");function ns(t){const[e,n]=c.useState(),o=c.useRef(null),r=c.useRef(t),i=c.useRef("none"),s=c.useRef(void 0),[a,u]=ts(t?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{a==="mounted"?(i.current=s.current??vt(o.current),s.current=void 0):i.current="none"},[a]),Z(()=>{const d=o.current,p=r.current;if(p!==t){const f=i.current,l=vt(d);t?(s.current=l,u("MOUNT")):l==="none"||d?.display==="none"?u("UNMOUNT"):u(p&&f!==l?"ANIMATION_OUT":"UNMOUNT"),r.current=t}},[t,u]),Z(()=>{if(e){let d;const p=e.ownerDocument.defaultView??window,f=Ue(h=>{const v=vt(o.current).includes(CSS.escape(h.animationName));if(h.target===e&&v&&(u("ANIMATION_END"),!r.current)){const m=e.style.animationFillMode;e.style.animationFillMode="forwards",d=p.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=m)})}},"handleAnimationEnd"),l=Ue(h=>{h.target===e&&(i.current=vt(o.current))},"handleAnimationStart");return e.addEventListener("animationstart",l),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{p.clearTimeout(d),e.removeEventListener("animationstart",l),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(d=>{if(d){const p=getComputedStyle(d);o.current=p,s.current=vt(p)}else o.current=null;n(d)},[])}}Ue(ns,"usePresence");function mo(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}Ue(mo,"setRef");function os(...t){const e=c.useRef(t);return e.current=t,c.useCallback(n=>{const o=e.current;let r=!1;const i=o.map(s=>{const a=mo(s,n);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let s=0;s<i.length;s++){const a=i[s];typeof a=="function"?a():mo(o[s],null)}}},[])}Ue(os,"useStableComposedRefs");function vt(t){return t?.animationName||"none"}Ue(vt,"getAnimationName");function rs(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}Ue(rs,"getElementRef");var Fl=Object.defineProperty,$l=(t,e)=>Fl(t,"name",{value:e,configurable:!0}),Gr=c[" useEffectEvent ".trim().toString()],zr=c[" useInsertionEffect ".trim().toString()];function is(t){if(typeof Gr=="function")return Gr(t);const e=c.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof zr=="function"?zr(()=>{e.current=t}):Z(()=>{e.current=t}),c.useMemo(()=>((...n)=>e.current?.(...n)),[])}$l(is,"useEffectEvent");var Bl=Object.defineProperty,Kt=(t,e)=>Bl(t,"name",{value:e,configurable:!0}),Hl=c[" useInsertionEffect ".trim().toString()]||Z;function ue({prop:t,defaultProp:e,onChange:n=Kt(()=>{},"onChange"),caller:o}){const[r,i,s]=ss({defaultProp:e,onChange:n}),a=t!==void 0;return[a?t:r,c.useCallback(d=>{if(a){const p=cs(d)?d(t):d;p!==t&&s.current?.(p)}else i(d)},[a,t,i,s])]}Kt(ue,"useControllableState");function ss({defaultProp:t,onChange:e}){const[n,o]=c.useState(t),r=c.useRef(n),i=c.useRef(e);return Hl(()=>{i.current=e},[e]),c.useEffect(()=>{r.current!==n&&(i.current?.(n),r.current=n)},[n,r]),[n,o,i]}Kt(ss,"useUncontrolledState");function cs(t){return typeof t=="function"}Kt(cs,"isFunction");var Kr=Symbol("RADIX:SYNC_STATE");function Ul(t,e,n,o){const{prop:r,defaultProp:i,onChange:s,caller:a}=e,u=r!==void 0,d=is(s),p=[{...n,state:i}];o&&p.push(o);const[f,l]=c.useReducer((b,S)=>{if(S.type===Kr)return{...b,state:S.state};const y=t(b,S);return u&&!Object.is(y.state,b.state)&&d(y.state),y},...p),h=f.state,v=c.useRef(h);c.useEffect(()=>{v.current!==h&&(v.current=h,u||d(h))},[h,v,u]);const m=c.useMemo(()=>r!==void 0?{...f,state:r}:f,[f,r]);return c.useEffect(()=>{u&&!Object.is(r,f.state)&&l({type:Kr,state:r})},[r,f.state,u]),[m,l]}Kt(Ul,"useControllableStateReducer");var Vl=Object.defineProperty,Wl=(t,e)=>Vl(t,"name",{value:e,configurable:!0}),as=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Gl=c.forwardRef(Wl(function(e,n){return(0,g.jsx)(k.span,{...e,ref:n,style:{...as,...e.style}})},"VisuallyHidden")),zl=Object.defineProperty,te=(t,e)=>zl(t,"name",{value:e,configurable:!0}),[Uo,Jp]=re("Tooltip",[Je]),jn=Je(),Kl="TooltipProvider",Yl=700,bo="tooltip.open",[Xl,Vo]=Uo(Kl),eh=te(t=>{const{__scopeTooltip:e,delayDuration:n=Yl,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:i}=t,s=c.useRef(!0),a=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),(0,g.jsx)(Xl,{scope:e,isOpenDelayedRef:s,delayDuration:n,onOpen:c.useCallback(()=>{o<=0||(window.clearTimeout(u.current),s.current=!1)},[o]),onClose:c.useCallback(()=>{o<=0||(window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,o))},[o]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(d=>{a.current=d},[]),disableHoverableContent:r,children:i})},"TooltipProvider"),Co="Tooltip",[ql,Yt]=Uo(Co),th=te(t=>{const{__scopeTooltip:e,children:n,open:o,defaultOpen:r,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=t,u=Vo(Co,t.__scopeTooltip),d=jn(e),[p,f]=c.useState(null),[l,h]=c.useState(void 0),v=le(),m=c.useRef(0),b=s??u.disableHoverableContent,S=a??u.delayDuration,y=c.useRef(!1),[C,w]=ue({prop:o,defaultProp:r??!1,onChange:te(_=>{_?(u.onOpen(),document.dispatchEvent(new CustomEvent(bo))):u.onClose(),i?.(_)},"onChange"),caller:Co}),P=c.useMemo(()=>C?y.current?"delayed-open":"instant-open":"closed",[C]),x=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y.current=!1,w(!0)},[w]),R=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),T=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y.current=!0,w(!0),m.current=0},S)},[S,w]);c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]);const A=l??v;return(0,g.jsx)(Wt,{...d,children:(0,g.jsx)(ql,{scope:e,contentId:A,setContentId:h,open:C,stateAttribute:P,trigger:p,onTriggerChange:f,onTriggerEnter:c.useCallback(()=>{u.isOpenDelayedRef.current?T():x()},[u.isOpenDelayedRef,T,x]),onTriggerLeave:c.useCallback(()=>{b?R():(window.clearTimeout(m.current),m.current=0)},[R,b]),onOpen:x,onClose:R,disableHoverableContent:b,children:n})})},"Tooltip"),Yr="TooltipTrigger",nh=c.forwardRef(te(function(e,n){const{__scopeTooltip:o,"aria-describedby":r,...i}=e,s=Yt(Yr,o),a=Vo(Yr,o),u=jn(o),d=c.useRef(null),p=N(n,d,s.onTriggerChange),f=c.useRef(!1),l=c.useRef(!1),h=c.useCallback(()=>f.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),(0,g.jsx)(Gt,{asChild:!0,...u,children:(0,g.jsx)(k.button,{"aria-describedby":s.open?ms(r,s.contentId):r,"data-state":s.stateAttribute,...i,ref:p,onPointerMove:E(e.onPointerMove,v=>{v.pointerType!=="touch"&&!l.current&&!a.isPointerInTransitRef.current&&(s.onTriggerEnter(),l.current=!0)}),onPointerLeave:E(e.onPointerLeave,()=>{s.onTriggerLeave(),l.current=!1}),onPointerDown:E(e.onPointerDown,()=>{s.open&&s.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:E(e.onFocus,()=>{f.current||s.onOpen()}),onBlur:E(e.onBlur,s.onClose),onClick:E(e.onClick,s.onClose)})})},"TooltipTrigger")),ls="TooltipPortal",[Zl,Ql]=Uo(ls,{forceMount:void 0}),oh=te(t=>{const{__scopeTooltip:e,forceMount:n,children:o,container:r}=t,i=Yt(ls,e);return(0,g.jsx)(Zl,{scope:e,forceMount:n,children:(0,g.jsx)(ie,{present:n||i.open,children:(0,g.jsx)(zt,{asChild:!0,container:r,children:o})})})},"TooltipPortal"),kt="TooltipContent",rh=c.forwardRef(te(function(e,n){const o=Ql(kt,e.__scopeTooltip),{forceMount:r=o.forceMount,side:i="top",...s}=e,a=Yt(kt,e.__scopeTooltip);return(0,g.jsx)(ie,{present:r||a.open,children:a.disableHoverableContent?(0,g.jsx)(us,{side:i,...s,ref:n}):(0,g.jsx)(Jl,{side:i,...s,ref:n})})},"TooltipContent")),Jl=c.forwardRef(te(function(e,n){const o=Yt(kt,e.__scopeTooltip),r=Vo(kt,e.__scopeTooltip),i=c.useRef(null),s=N(n,i),[a,u]=c.useState(null),{trigger:d,onClose:p}=o,f=i.current,{onPointerInTransitChange:l}=r,h=c.useCallback(()=>{u(null),l(!1)},[l]),v=c.useCallback((m,b)=>{const S=m.currentTarget,y={x:m.clientX,y:m.clientY},C=fs(y,ds(y,S.getBoundingClientRect())),w=ps(b.getBoundingClientRect()),P=gs([...C,...w]);u(P),l(!0)},[l]);return c.useEffect(()=>()=>h(),[h]),c.useEffect(()=>{if(d&&f){const m=te(S=>v(S,f),"handleTriggerLeave"),b=te(S=>v(S,d),"handleContentLeave");return d.addEventListener("pointerleave",m),f.addEventListener("pointerleave",b),()=>{d.removeEventListener("pointerleave",m),f.removeEventListener("pointerleave",b)}}},[d,f,v,h]),c.useEffect(()=>{if(a){const m=te(b=>{const S=b.target,y={x:b.clientX,y:b.clientY},C=d?.contains(S)||f?.contains(S),w=!hs(y,a);C?h():w&&(h(),p())},"handleTrackPointerGrace");return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[d,f,a,p,h]),(0,g.jsx)(us,{...e,ref:s})},"TooltipContentHoverable")),eu=Oo("TooltipContent"),us=c.forwardRef(te(function(e,n){const{__scopeTooltip:o,children:r,"aria-label":i,id:s,onEscapeKeyDown:a,onPointerDownOutside:u,...d}=e,p=Yt(kt,o),f=jn(o),{onClose:l}=p,[h,v]=c.useState(null),m=N(n,v);_n(h),c.useEffect(()=>(document.addEventListener(bo,l),()=>document.removeEventListener(bo,l)),[l]),c.useEffect(()=>{if(p.trigger){const S=te(y=>{y.target instanceof Node&&y.target.contains(p.trigger)&&l()},"handleScroll");return window.addEventListener("scroll",S,{capture:!0}),()=>window.removeEventListener("scroll",S,{capture:!0})}},[p.trigger,l]);const{setContentId:b}=p;return Z(()=>(b(s),()=>{b(void 0)}),[s,b]),(0,g.jsx)(Ut,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:S=>S.preventDefault(),onDismiss:l,children:(0,g.jsxs)(Mn,{"data-state":p.stateAttribute,role:i?void 0:"tooltip",id:i?void 0:p.contentId,...f,...d,ref:m,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,g.jsx)(eu,{children:r}),i?(0,g.jsx)(Gl,{id:p.contentId,role:"tooltip",children:i}):null]})})},"TooltipContentImpl")),ih=c.forwardRef(te(function(e,n){const{__scopeTooltip:o,...r}=e,i=jn(o);return(0,g.jsx)(Ml,{...i,...r,ref:n})},"TooltipArrow"));function ds(t,e){const n=Math.abs(e.top-t.y),o=Math.abs(e.bottom-t.y),r=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}te(ds,"getExitSideFromRect");function fs(t,e,n=5){const o=[];switch(e){case"top":o.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":o.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":o.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":o.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n})}return o}te(fs,"getPaddedExitPoints");function ps(t){const{top:e,right:n,bottom:o,left:r}=t;return[{x:r,y:e},{x:n,y:e},{x:n,y:o},{x:r,y:o}]}te(ps,"getPointsFromRect");function hs(t,e){const{x:n,y:o}=t;let r=!1;for(let i=0,s=e.length-1;i<e.length;s=i++){const a=e[i],u=e[s],d=a.x,p=a.y,f=u.x,l=u.y;p>o!=l>o&&n<(f-d)*(o-p)/(l-p)+d&&(r=!r)}return r}te(hs,"isPointInPolygon");function gs(t){const e=t.slice();return e.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),vs(e)}te(gs,"getHull");function vs(t){if(t.length<=1)return t.slice();const e=[];for(let o=0;o<t.length;o++){const r=t[o];for(;e.length>=2;){const i=e[e.length-1],s=e[e.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))e.pop();else break}e.push(r)}e.pop();const n=[];for(let o=t.length-1;o>=0;o--){const r=t[o];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))n.pop();else break}n.push(r)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}te(vs,"getHullPresorted");function ms(...t){const e=new Set;for(const n of t)if(typeof n=="string")for(const o of String(n).trim().split(/\s+/))o&&e.add(o);return e.size>0?Array.from(e).join(" "):void 0}te(ms,"concatAriaDescribedby");var tu=Object.defineProperty,Wo=(t,e)=>tu(t,"name",{value:e,configurable:!0}),nn=0,ft=null;function nu(t){return Et(),t.children}Wo(nu,"FocusGuards");function Et(){c.useEffect(()=>{ft||(ft={start:wo(),end:wo()});const{start:t,end:e}=ft;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),nn++,()=>{nn===1&&(ft?.start.remove(),ft?.end.remove(),ft=null),nn=Math.max(0,nn-1)}},[])}Wo(Et,"useFocusGuards");function wo(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}Wo(wo,"createFocusGuard");var Ie=function(){return Ie=Object.assign||function(e){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ie.apply(this,arguments)};function bs(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}function ou(t,e,n){if(n||arguments.length===2)for(var o=0,r=e.length,i;o<r;o++)(i||!(o in e))&&(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}var fn="right-scroll-bar-position",pn="width-before-scroll-bar",ru="with-scroll-bars-hidden",iu="--removed-body-scroll-bar-size";function to(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function su(t,e){var n=(0,c.useState)(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=e,n.facade}var cu=typeof window<"u"?c.useLayoutEffect:c.useEffect,Xr=new WeakMap;function au(t,e){var n=su(e||null,function(o){return t.forEach(function(r){return to(r,o)})});return cu(function(){var o=Xr.get(n);if(o){var r=new Set(o),i=new Set(t),s=n.current;r.forEach(function(a){i.has(a)||to(a,null)}),i.forEach(function(a){r.has(a)||to(a,s)})}Xr.set(n,t)},[t]),n}function lu(t){return t}function uu(t,e){e===void 0&&(e=lu);var n=[],o=!1;return{read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(r){var i=e(r,o);return n.push(i),function(){n=n.filter(function(s){return s!==i})}},assignSyncMedium:function(r){for(o=!0;n.length;){var i=n;n=[],i.forEach(r)}n={push:function(s){return r(s)},filter:function(){return n}}},assignMedium:function(r){o=!0;var i=[];if(n.length){var s=n;n=[],s.forEach(r),i=n}var a=function(){var d=i;i=[],d.forEach(r)},u=function(){return Promise.resolve().then(a)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}}}function du(t){t===void 0&&(t={});var e=uu(null);return e.options=Ie({async:!0,ssr:!1},t),e}var Cs=function(t){var e=t.sideCar,n=bs(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=e.read();if(!o)throw new Error("Sidecar medium not found");return c.createElement(o,Ie({},n))};Cs.isSideCarExport=!0;function fu(t,e){return t.useMedium(e),Cs}var ws=du(),no=function(){},Nn=c.forwardRef(function(t,e){var n=c.useRef(null),o=c.useState({onScrollCapture:no,onWheelCapture:no,onTouchMoveCapture:no}),r=o[0],i=o[1],s=t.forwardProps,a=t.children,u=t.className,d=t.removeScrollBar,p=t.enabled,f=t.shards,l=t.sideCar,h=t.noRelative,v=t.noIsolation,m=t.inert,b=t.allowPinchZoom,S=t.as,y=S===void 0?"div":S,C=t.gapMode,w=bs(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=l,x=au([n,e]),R=Ie(Ie({},w),r);return c.createElement(c.Fragment,null,p&&c.createElement(P,{sideCar:ws,removeScrollBar:d,shards:f,noRelative:h,noIsolation:v,inert:m,setCallbacks:i,allowPinchZoom:!!b,lockRef:n,gapMode:C}),s?c.cloneElement(c.Children.only(a),Ie(Ie({},R),{ref:x})):c.createElement(y,Ie({},R,{className:u,ref:x}),a))});Nn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Nn.classNames={fullWidth:pn,zeroRight:fn};var qr,pu=function(){if(qr)return qr;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hu(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=pu();return e&&t.setAttribute("nonce",e),t}function gu(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function vu(t){(document.head||document.getElementsByTagName("head")[0]).appendChild(t)}var mu=function(){var t=0,e=null;return{add:function(n){t==0&&(e=hu())&&(gu(e,n),vu(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},bu=function(){var t=mu();return function(e,n){c.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Ss=function(){var t=bu(),e=function(n){var o=n.styles,r=n.dynamic;return t(o,r),null};return e},Cu={left:0,top:0,right:0,gap:0},oo=function(t){return parseInt(t||"",10)||0},wu=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],o=e[t==="padding"?"paddingTop":"marginTop"],r=e[t==="padding"?"paddingRight":"marginRight"];return[oo(n),oo(o),oo(r)]},Su=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Cu;var e=wu(t),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,o-n+e[2]-e[0])}},yu=Ss(),Dt="data-scroll-locked",xu=function(t,e,n,o){var r=t.left,i=t.top,s=t.right,a=t.gap;return n===void 0&&(n="margin"),`
2
+ .`.concat(ru,` {
3
+ overflow: hidden `).concat(o,`;
4
+ padding-right: `).concat(a,"px ").concat(o,`;
5
+ }
6
+ body[`).concat(Dt,`] {
7
+ overflow: hidden `).concat(o,`;
8
+ overscroll-behavior: contain;
9
+ `).concat([e&&"position: relative ".concat(o,";"),n==="margin"&&`
10
+ padding-left: `.concat(r,`px;
11
+ padding-top: `).concat(i,`px;
12
+ padding-right: `).concat(s,`px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: `).concat(a,"px ").concat(o,`;
16
+ `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(o,";")].filter(Boolean).join(""),`
17
+ }
18
+
19
+ .`).concat(fn,` {
20
+ right: `).concat(a,"px ").concat(o,`;
21
+ }
22
+
23
+ .`).concat(pn,` {
24
+ margin-right: `).concat(a,"px ").concat(o,`;
25
+ }
26
+
27
+ .`).concat(fn," .").concat(fn,` {
28
+ right: 0 `).concat(o,`;
29
+ }
30
+
31
+ .`).concat(pn," .").concat(pn,` {
32
+ margin-right: 0 `).concat(o,`;
33
+ }
34
+
35
+ body[`).concat(Dt,`] {
36
+ `).concat(iu,": ").concat(a,`px;
37
+ }
38
+ `)},Zr=function(){var t=parseInt(document.body.getAttribute("data-scroll-locked")||"0",10);return isFinite(t)?t:0},Pu=function(){c.useEffect(function(){return document.body.setAttribute(Dt,(Zr()+1).toString()),function(){var t=Zr()-1;t<=0?document.body.removeAttribute(Dt):document.body.setAttribute(Dt,t.toString())}},[])},Ru=function(t){var e=t.noRelative,n=t.noImportant,o=t.gapMode,r=o===void 0?"margin":o;Pu();var i=c.useMemo(function(){return Su(r)},[r]);return c.createElement(yu,{styles:xu(i,!e,r,n?"":"!important")})},So=!1;if(typeof window<"u")try{var on=Object.defineProperty({},"passive",{get:function(){return So=!0,!0}});window.addEventListener("test",on,on),window.removeEventListener("test",on,on)}catch{So=!1}var pt=So?{passive:!1}:!1,Eu=function(t){return t.tagName==="TEXTAREA"},ys=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Eu(t)&&n[e]==="visible")},_u=function(t){return ys(t,"overflowY")},Tu=function(t){return ys(t,"overflowX")},Qr=function(t,e){var n=e.ownerDocument,o=e;do{if(typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host),xs(t,o)){var r=Ps(t,o);if(r[1]>r[2])return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Au=function(t){return[t.scrollTop,t.scrollHeight,t.clientHeight]},Iu=function(t){return[t.scrollLeft,t.scrollWidth,t.clientWidth]},xs=function(t,e){return t==="v"?_u(e):Tu(e)},Ps=function(t,e){return t==="v"?Au(e):Iu(e)},Ou=function(t,e){return t==="h"&&e==="rtl"?-1:1},Du=function(t,e,n,o,r){var i=Ou(t,window.getComputedStyle(e).direction),s=i*o,a=n.target,u=e.contains(a),d=!1,p=s>0,f=0,l=0;do{if(!a)break;var h=Ps(t,a),v=h[0],m=h[1]-h[2]-i*v;(v||m)&&xs(t,a)&&(f+=m,l+=v);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!u&&a!==document.body||u&&(e.contains(a)||e===a));return(p&&(r&&Math.abs(f)<1||!r&&s>f)||!p&&(r&&Math.abs(l)<1||!r&&-s>l))&&(d=!0),d},rn=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Jr=function(t){return[t.deltaX,t.deltaY]},ei=function(t){return t&&"current"in t?t.current:t},Mu=function(t,e){return t[0]===e[0]&&t[1]===e[1]},ku=function(t){return`
39
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
40
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
41
+ `)},ju=0,ht=[];function Nu(t){var e=c.useRef([]),n=c.useRef([0,0]),o=c.useRef(),r=c.useState(ju++)[0],i=c.useState(Ss)[0],s=c.useRef(t);c.useEffect(function(){s.current=t},[t]),c.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(r));var m=ou([t.lockRef.current],(t.shards||[]).map(ei),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(r))})}}},[t.inert,t.lockRef.current,t.shards]);var a=c.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var S=rn(m),y=n.current,C="deltaX"in m?m.deltaX:y[0]-S[0],w="deltaY"in m?m.deltaY:y[1]-S[1],P,x=m.target,R=Math.abs(C)>Math.abs(w)?"h":"v";if("touches"in m&&R==="h"&&x.type==="range")return!1;var T=window.getSelection(),A=T&&T.anchorNode;if(A&&(A===x||A.contains(x)))return!1;var _=Qr(R,x);if(!_)return!0;if(_?P=R:(P=R==="v"?"h":"v",_=Qr(R,x)),!_)return!1;if(!o.current&&"changedTouches"in m&&(C||w)&&(o.current=P),!P)return!0;var D=o.current||P;return Du(D,b,m,D==="h"?C:w,!0)},[]),u=c.useCallback(function(m){var b=m;if(!(!ht.length||ht[ht.length-1]!==i)){var S="deltaY"in b?Jr(b):rn(b),y=e.current.filter(function(w){return w.name===b.type&&(w.target===b.target||b.target===w.shadowParent)&&Mu(w.delta,S)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var C=(s.current.shards||[]).map(ei).filter(Boolean).filter(function(w){return w.contains(b.target)});(C.length>0?a(b,C[0]):!s.current.noIsolation)&&b.cancelable&&b.preventDefault()}}},[]),d=c.useCallback(function(m,b,S,y){var C={name:m,delta:b,target:S,should:y,shadowParent:Lu(S)};e.current.push(C),setTimeout(function(){e.current=e.current.filter(function(w){return w!==C})},1)},[]),p=c.useCallback(function(m){n.current=rn(m),o.current=void 0},[]),f=c.useCallback(function(m){d(m.type,Jr(m),m.target,a(m,t.lockRef.current))},[]),l=c.useCallback(function(m){d(m.type,rn(m),m.target,a(m,t.lockRef.current))},[]);c.useEffect(function(){return ht.push(i),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:l}),document.addEventListener("wheel",u,pt),document.addEventListener("touchmove",u,pt),document.addEventListener("touchstart",p,pt),function(){ht=ht.filter(function(m){return m!==i}),document.removeEventListener("wheel",u,pt),document.removeEventListener("touchmove",u,pt),document.removeEventListener("touchstart",p,pt)}},[]);var h=t.removeScrollBar,v=t.inert;return c.createElement(c.Fragment,null,v?c.createElement(i,{styles:ku(r)}):null,h?c.createElement(Ru,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function Lu(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}var Fu=fu(ws,Nu),Xt=c.forwardRef(function(t,e){return c.createElement(Nn,Ie({},t,{ref:e,sideCar:Fu}))});Xt.classNames=Nn.classNames;var $u=function(t){return typeof document>"u"?null:(Array.isArray(t)?t[0]:t).ownerDocument.body},gt=new WeakMap,sn=new WeakMap,cn={},ro=0,Rs=function(t){return t&&(t.host||Rs(t.parentNode))},Bu=function(t,e){return e.map(function(n){if(t.contains(n))return n;var o=Rs(n);return o&&t.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},Hu=function(t,e,n,o){var r=Bu(e,Array.isArray(t)?t:[t]);cn[n]||(cn[n]=new WeakMap);var i=cn[n],s=[],a=new Set,u=new Set(r),d=function(f){!f||a.has(f)||(a.add(f),d(f.parentNode))};r.forEach(d);var p=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(l){if(a.has(l))p(l);else try{var h=l.getAttribute(o),v=h!==null&&h!=="false",m=(gt.get(l)||0)+1,b=(i.get(l)||0)+1;gt.set(l,m),i.set(l,b),s.push(l),m===1&&v&&sn.set(l,!0),b===1&&l.setAttribute(n,"true"),v||l.setAttribute(o,"true")}catch(S){console.error("aria-hidden: cannot operate on ",l,S)}})};return p(e),a.clear(),ro++,function(){s.forEach(function(f){var l=gt.get(f)-1,h=i.get(f)-1;gt.set(f,l),i.set(f,h),l||(sn.has(f)||f.removeAttribute(o),sn.delete(f)),h||f.removeAttribute(n)}),ro--,ro||(gt=new WeakMap,gt=new WeakMap,sn=new WeakMap,cn={})}},Ln=function(t,e,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(t)?t:[t]),r=e||$u(t);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),Hu(o,r,n,"aria-hidden")):function(){return null}},Uu=Object.defineProperty,he=(t,e)=>Uu(t,"name",{value:e,configurable:!0}),Go="Dialog",[Es,_s]=re(Go),[Vu,Te]=Es(Go),Wu=he(t=>{const{__scopeDialog:e,children:n,open:o,defaultOpen:r,onOpenChange:i,modal:s=!0}=t,a=c.useRef(null),u=c.useRef(null),{nodes:d,registry:p}=En(),[f,l]=ue({prop:o,defaultProp:r??!1,onChange:i,caller:Go}),[h,v]=c.useState(0),[m,b]=c.useState(0);return(0,g.jsx)(Vu,{scope:e,triggerRef:a,contentRef:u,contentId:le(),titleId:le(),descriptionId:le(),titlePresent:h>0,descriptionPresent:m>0,setTitleCount:v,setDescriptionCount:b,open:f,onOpenChange:l,onOpenToggle:c.useCallback(()=>l(S=>!S),[l]),modal:s,branchNodes:d,branchRegistry:p,children:n})},"Dialog"),Gu="DialogTrigger",zu=c.forwardRef(he(function(e,n){const{__scopeDialog:o,...r}=e,i=Te(Gu,o),s=N(n,i.triggerRef);return(0,g.jsx)(k.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Fn(i.open),...r,ref:s,onClick:E(e.onClick,i.onOpenToggle)})},"DialogTrigger")),Ts="DialogPortal",[Ku,As]=Es(Ts,{forceMount:void 0}),Yu=he(t=>{const{__scopeDialog:e,forceMount:n,children:o,container:r}=t,i=Te(Ts,e);return(0,g.jsx)(Ku,{scope:e,forceMount:n,children:c.Children.map(o,s=>(0,g.jsx)(ie,{present:n||i.open,children:(0,g.jsx)(zt,{asChild:!0,container:r,children:s})}))})},"DialogPortal"),yo="DialogOverlay",Xu=c.forwardRef(he(function(e,n){const o=As(yo,e.__scopeDialog),{forceMount:r=o.forceMount,...i}=e,s=Te(yo,e.__scopeDialog);return s.modal?(0,g.jsx)(ie,{present:r||s.open,children:(0,g.jsx)(Zu,{...i,ref:n})}):null},"DialogOverlay")),qu=Re("DialogOverlay.RemoveScroll"),Zu=c.forwardRef(he(function(e,n){const{__scopeDialog:o,...r}=e,i=Te(yo,o),s=Ai(),a=N(n,s);return(0,g.jsx)(Xt,{as:qu,allowPinchZoom:!0,shards:c.useMemo(()=>[i.contentRef,...i.branchNodes.map(u=>({current:u}))],[i.contentRef,i.branchNodes]),children:(0,g.jsx)(k.div,{"data-state":Fn(i.open),...r,ref:a,style:{pointerEvents:"auto",...r.style}})})},"DialogOverlayImpl")),jt="DialogContent",Qu=c.forwardRef(he(function(e,n){const o=As(jt,e.__scopeDialog),{forceMount:r=o.forceMount,...i}=e,s=Te(jt,e.__scopeDialog);return(0,g.jsx)(ie,{present:r||s.open,children:s.modal?(0,g.jsx)(Ju,{...i,ref:n}):(0,g.jsx)(ed,{...i,ref:n})})},"DialogContent")),Ju=c.forwardRef(he(function(e,n){const o=Te(jt,e.__scopeDialog),r=c.useRef(null),i=N(n,o.contentRef,r);return c.useEffect(()=>{const s=r.current;if(s)return Ln(s)},[]),(0,g.jsx)(Is,{...e,ref:i,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:E(e.onCloseAutoFocus,s=>{s.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:E(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0;(a.button===2||u)&&s.preventDefault()}),onFocusOutside:E(e.onFocusOutside,s=>s.preventDefault())})},"DialogContentModal")),ed=c.forwardRef(he(function(e,n){const o=Te(jt,e.__scopeDialog),r=c.useRef(!1),i=c.useRef(!1);return(0,g.jsx)(Is,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})},"DialogContentNonModal")),Is=c.forwardRef(he(function(e,n){const{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,"aria-describedby":a,children:u,...d}=e,p=Te(jt,o);return Et(),(0,g.jsx)(Rn,{registry:p.branchRegistry,children:(0,g.jsx)(Pn,{asChild:!0,loop:!0,trapped:r,branches:p.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:s,children:(0,g.jsx)(Ut,{role:"dialog",id:p.contentId,"aria-labelledby":p.titlePresent?p.titleId:void 0,"aria-describedby":p.descriptionPresent?Ds(a,p.descriptionId):a,"data-state":Fn(p.open),...d,ref:n,deferPointerDownOutside:!0,onDismiss:()=>p.onOpenChange(!1),children:u})})})},"DialogContentImpl")),td=c.forwardRef(he(function(e,n){const{__scopeDialog:o,...r}=e,i=Te("DialogTitle",o),{setTitleCount:s}=i;return Z(()=>(s(a=>a+1),()=>s(a=>a-1)),[s]),(0,g.jsx)(k.h2,{id:i.titleId,...r,ref:n})},"DialogTitle")),nd=c.forwardRef(he(function(e,n){const{__scopeDialog:o,...r}=e,i=Te("DialogDescription",o),{setDescriptionCount:s}=i;return Z(()=>(s(a=>a+1),()=>s(a=>a-1)),[s]),(0,g.jsx)(k.p,{id:i.descriptionId,...r,ref:n})},"DialogDescription")),od="DialogClose",Os=c.forwardRef(he(function(e,n){const{__scopeDialog:o,...r}=e,i=Te(od,o);return(0,g.jsx)(k.button,{type:"button",...r,ref:n,onClick:E(e.onClick,()=>i.onOpenChange(!1))})},"DialogClose"));function Ds(...t){const e=new Set;for(const n of t)if(typeof n=="string")for(const o of String(n).trim().split(/\s+/))o&&e.add(o);return e.size>0?Array.from(e).join(" "):void 0}he(Ds,"concatAriaDescribedby");function Fn(t){return t?"open":"closed"}he(Fn,"getState");function ti(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function rd(...t){return e=>{let n=!1;const o=t.map(r=>{const i=ti(r,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<o.length;r++){const i=o[r];typeof i=="function"?i():ti(t[r],null)}}}}var id=Symbol.for("react.lazy"),Sn=c[" use ".trim().toString()];function sd(t){return typeof t=="object"&&t!==null&&"then"in t}function Ms(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===id&&"_payload"in t&&sd(t._payload)}function cd(t){const e=ad(t),n=c.forwardRef((o,r)=>{let{children:i,...s}=o;Ms(i)&&typeof Sn=="function"&&(i=Sn(i._payload));const a=c.Children.toArray(i),u=a.find(ud);if(u){const d=u.props.children,p=a.map(f=>f===u?c.Children.count(d)>1?c.Children.only(null):c.isValidElement(d)?d.props.children:null:f);return(0,g.jsx)(e,{...s,ref:r,children:c.isValidElement(d)?c.cloneElement(d,void 0,p):null})}return(0,g.jsx)(e,{...s,ref:r,children:i})});return n.displayName=`${t}.Slot`,n}function ad(t){const e=c.forwardRef((n,o)=>{let{children:r,...i}=n;if(Ms(r)&&typeof Sn=="function"&&(r=Sn(r._payload)),c.isValidElement(r)){const s=fd(r),a=dd(i,r.props);return r.type!==c.Fragment&&(a.ref=o?rd(o,s):s),c.cloneElement(r,a)}return c.Children.count(r)>1?c.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var ld=Symbol("radix.slottable");function ud(t){return c.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===ld}function dd(t,e){const n={...e};for(const o in e){const r=t[o],i=e[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{const a=i(...s);return r(...s),a}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...t,...n}}function fd(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var sh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,e)=>{const n=cd(`Primitive.${e}`),o=c.forwardRef((r,i)=>{const{asChild:s,...a}=r,u=s?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,g.jsx)(u,{...a,ref:i})});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{}),pd=globalThis?.document?c.useLayoutEffect:()=>{},hd=c[" useId ".trim().toString()]||(()=>{}),gd=0;function ch(t){const[e,n]=c.useState(hd());return pd(()=>{t||n(o=>o??String(gd++))},[t]),t||(e?`radix-${e}`:"")}var vd=Object.defineProperty,md=(t,e)=>vd(t,"name",{value:e,configurable:!0}),ah=c.forwardRef(md(function(e,n){return(0,g.jsx)(k.label,{...e,ref:n,onMouseDown:o=>{o.target.closest("button, input, select, textarea")||(e.onMouseDown?.(o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}})},"Label")),bd=Object.defineProperty,Cd=(t,e)=>bd(t,"name",{value:e,configurable:!0});function yn(t,[e,n]){return Math.min(n,Math.max(e,t))}Cd(yn,"clamp");var wd=Object.defineProperty,oe=(t,e)=>wd(t,"name",{value:e,configurable:!0});function $n(t){const e=t+"CollectionProvider",[n,o]=re(e),[r,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=oe(m=>{const{scope:b,children:S}=m,y=c.useRef(null),C=c.useRef(new Map).current;return(0,g.jsx)(r,{scope:b,itemMap:C,collectionRef:y,children:S})},"CollectionProvider");s.displayName=e;const a=t+"CollectionSlot",u=Re(a),d=c.forwardRef((m,b)=>{const{scope:S,children:y}=m,C=i(a,S),w=N(b,C.collectionRef);return(0,g.jsx)(u,{ref:w,children:y})});d.displayName=a;const p=t+"CollectionItemSlot",f="data-radix-collection-item",l=Re(p),h=c.forwardRef((m,b)=>{const{scope:S,children:y,...C}=m,w=c.useRef(null),P=N(b,w),x=i(p,S);return c.useEffect(()=>(x.itemMap.set(w,{ref:w,...C}),()=>{x.itemMap.delete(w)})),(0,g.jsx)(l,{[f]:"",ref:P,children:y})});h.displayName=p;function v(m){const b=i(t+"CollectionConsumer",m);return c.useCallback(()=>{const S=b.collectionRef.current;if(!S)return[];const y=Array.from(S.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((C,w)=>y.indexOf(C.ref.current)-y.indexOf(w.ref.current))},[b.collectionRef,b.itemMap])}return oe(v,"useCollection"),[{Provider:s,Slot:d,ItemSlot:h},v,o]}oe($n,"createCollection");var ni=new WeakMap,an=class Ye extends Map{static{oe(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],ni.set(this,!0)}set(e,n){return ni.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,n),this}insert(e,n,o){const r=this.has(n),i=r?this.size:this.size+1,s=zo(e),a=s>=0?Math.min(s,i-1):Math.max(i+s,0);if(r?this.#e.indexOf(n)===a:a===this.size)return this.set(n,o),this;const u=this.#e.filter(p=>p!==n);u.splice(a,0,n);const d=u.map(p=>[p,p===n?o:this.get(p)]);this.clear();for(const[p,f]of d)this.set(p,f);return this}with(e,n,o){const r=new Ye(this);return r.insert(e,n,o),r}before(e){const n=this.#e.indexOf(e)-1;if(!(n<0))return this.entryAt(n)}setBefore(e,n,o){const r=this.#e.indexOf(e);if(r===-1)return this;const i=this.#e.indexOf(n),s=i!==-1&&i<r?r-1:r;return this.insert(s,n,o)}after(e){let n=this.#e.indexOf(e);if(n=n===-1||n===this.size-1?-1:n+1,n!==-1)return this.entryAt(n)}setAfter(e,n,o){const r=this.#e.indexOf(e);if(r===-1)return this;const i=this.#e.indexOf(n),s=i!==-1&&i<=r?r:r+1;return this.insert(s,n,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){const n=super.delete(e);return n&&this.#e.splice(this.#e.indexOf(e),1),n}deleteAt(e){const n=this.keyAt(e);return n!==void 0?this.delete(n):!1}at(e){const n=hn(this.#e,e);if(n!==void 0)return this.get(n)}entryAt(e){const n=hn(this.#e,e);if(n!==void 0)return[n,this.get(n)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return hn(this.#e,e)}from(e,n){const o=this.indexOf(e);if(o===-1)return;let r=o+n;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,n){const o=this.indexOf(e);if(o===-1)return;let r=o+n;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,n){let o=0;for(const r of this){if(Reflect.apply(e,n,[r,o,this]))return r;o++}}findIndex(e,n){let o=0;for(const r of this){if(Reflect.apply(e,n,[r,o,this]))return o;o++}return-1}filter(e,n){const o=[];let r=0;for(const i of this)Reflect.apply(e,n,[i,r,this])&&o.push(i),r++;return new Ye(o)}map(e,n){const o=[];let r=0;for(const i of this)o.push([i[0],Reflect.apply(e,n,[i,r,this])]),r++;return new Ye(o)}reduce(...e){const[n,o]=e,r=e.length>1;if(!r&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let i=0,s=o;for(const a of this)i===0&&!r?s=a:s=Reflect.apply(n,this,[s,a,i,this]),i++;return s}reduceRight(...e){const[n,o]=e,r=e.length>1;if(!r&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let i=o;for(let s=this.size-1;s>=0;s--){const a=this.entryAt(s);s===this.size-1&&!r?i=a:i=Reflect.apply(n,this,[i,a,s,this])}return i}sort(e){if(typeof e!="function")throw new TypeError("OrderedDict.sort requires a compare function");const n=[...this.entries()].sort(e);this.clear();for(const[o,r]of n)this.set(o,r);return this}toSorted(e){if(typeof e!="function")throw new TypeError("OrderedDict.toSorted requires a compare function");const n=[...this.entries()].sort(e);return new Ye(n)}toReversed(){const e=new Ye;for(let n=this.size-1;n>=0;n--){const o=this.keyAt(n),r=this.get(o);e.set(o,r)}return e}toSpliced(...e){const n=[...this.entries()];return n.splice(...e),new Ye(n)}slice(e,n){const o=new Ye;for(const r of this.#e.slice(e,n))o.set(r,this.get(r));return o}every(e,n){let o=0;for(const r of this){if(!Reflect.apply(e,n,[r,o,this]))return!1;o++}return!0}some(e,n){let o=0;for(const r of this){if(Reflect.apply(e,n,[r,o,this]))return!0;o++}return!1}};function hn(t,e){if("at"in Array.prototype)return Array.prototype.at.call(t,e);const n=ks(t,e);return n===-1?void 0:t[n]}oe(hn,"at");function ks(t,e){const n=t.length,o=zo(e),r=o>=0?o:n+o;return r<0||r>=n?-1:r}oe(ks,"toSafeIndex");function zo(t){return t!==t||t===0?0:Math.trunc(t)}oe(zo,"toSafeInteger");function Sd(t){const e=t+"CollectionProvider",[n,o]=re(e),[r,i]=n(e);r.displayName=t+"CollectionStableContextProvider";const[s,a]=n(e);s.displayName=t+"CollectionStatefulContextProvider";const u=oe(({state:P,...x})=>P?(0,g.jsx)(p,{...x,state:P}):(0,g.jsx)(d,{...x}),"CollectionProvider");u.displayName=e;const d=oe(P=>{const x=y();return(0,g.jsx)(p,{...P,state:x})},"CollectionInit");d.displayName=t+"CollectionInit";const p=oe(P=>{const{scope:x,children:R,state:T}=P,A=c.useRef(null),[_,D]=c.useState(null),I=N(A,D),[j,F]=T,Y=c.useRef(new an),H=c.useCallback(()=>{const B=Y.current;return Ls(B)||B.sort(gn),B},[]);return c.useEffect(()=>{if(!_)return;const B=Fs(()=>{F(O=>{const L=O.toSorted(gn);return L.some(([z],ne)=>O.keyAt(ne)!==z)?L:O})});return B.observe(_,{childList:!0,subtree:!0}),()=>{B.disconnect()}},[_,F]),(0,g.jsx)(r,{scope:x,collectionElementRef:I,collectionElementRefObject:A,getCollection:H,setCollection:F,registryRef:Y,children:(0,g.jsx)(s,{scope:x,collectionElement:_,collection:j,children:R})})},"CollectionProviderImpl");p.displayName=t+"CollectionProviderImpl";const f=t+"CollectionSlot",l=Re(f),h=c.forwardRef((P,x)=>{const{scope:R,children:T}=P,A=i(f,R),_=N(x,A.collectionElementRef);return(0,g.jsx)(l,{ref:_,children:T})});h.displayName=f;const v=t+"CollectionItemSlot",m="data-radix-collection-item",b=Re(v),S=c.forwardRef((P,x)=>{const{scope:R,children:T,...A}=P,_=c.useRef(null),{setCollection:D,registryRef:I}=i(v,R),j=c.useRef(A);js(j.current,A)||(j.current=A);const F=j.current,Y=c.useCallback(O=>{const L=I.current;O?L.set(O,{...j.current,element:O}):_.current&&L.delete(_.current)},[I]),H=N(x,Y,_);Z(()=>{const O=_.current,L=I.current;O&&L.has(O)&&L.set(O,{...F,element:O})},[F,I]);const B=c.useRef(null);return c.useEffect(()=>{const O=_.current,L=B.current;(L?.element??null)===O&&(!O||L?.itemData===F)||(B.current=O?{element:O,itemData:F}:null,D(z=>{const ne=new an(z);return L&&L.element!==O&&ne.delete(L.element),O&&ne.set(O,{...F,element:O}),ne.sort(gn)}))}),c.useEffect(()=>()=>{const O=B.current;B.current=null,O&&D(L=>{if(!L.has(O.element))return L;const z=new an(L);return z.delete(O.element),z})},[D]),(0,g.jsx)(b,{[m]:"",ref:H,children:T})});S.displayName=v;function y(){return c.useState(new an)}oe(y,"useInitCollection");function C(P){const{collection:x}=a(t+"CollectionConsumer",P);return x}oe(C,"useCollection");function w(P){const{getCollection:x}=i(t+"CollectionConsumer",P);return x}return oe(w,"useGetCollection"),[{Provider:u,Slot:h,ItemSlot:S},{createCollectionScope:o,useCollection:C,useGetCollection:w,useInitCollection:y}]}oe(Sd,"createCollection");function js(t,e){if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t==null||e==null)return!1;const n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(e,r)||t[r]!==e[r])return!1;return!0}oe(js,"shallowEqual");function Ns(t,e){return!!(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}oe(Ns,"isElementPreceding");function Ls(t){let e;for(const n of t.keys()){if(e){const o=e.compareDocumentPosition(n);if(!(o&Node.DOCUMENT_POSITION_DISCONNECTED)&&o&Node.DOCUMENT_POSITION_PRECEDING)return!1}e=n}return!0}oe(Ls,"isInDocumentOrder");function gn(t,e){return!t[1].element||!e[1].element?0:Ns(t[1].element,e[1].element)?-1:1}oe(gn,"sortByDocumentPosition");function Fs(t){return new MutationObserver(e=>{for(const n of e)if(n.type==="childList"){t();return}})}oe(Fs,"getChildListObserver");var yd=Object.defineProperty,xd=(t,e)=>yd(t,"name",{value:e,configurable:!0}),Pd={LTR:"ltr",RTL:"rtl"},Rd=c.createContext(void 0);function st(t){const e=c.useContext(Rd);return t||e||Pd.LTR}xd(st,"useDirection");var Ed=Object.defineProperty,G=(t,e)=>Ed(t,"name",{value:e,configurable:!0}),oi={ItemAligned:"item-aligned",Popper:"popper"},_d={LTR:"ltr",RTL:"rtl"},Td=[" ","Enter","ArrowUp","ArrowDown"],Ad=[" ","Enter"],St="Select",[Bn,Hn,Id]=$n(St),[ct,lh]=re(St,[Id,Je]),Ko=Je(),[Od,et]=ct(St),[Dd,Md]=ct(St);function $s(t){const{__scopeSelect:e,children:n,open:o,defaultOpen:r,onOpenChange:i,value:s,defaultValue:a,onValueChange:u,dir:d,name:p,autoComplete:f,disabled:l,required:h,form:v,internal_do_not_use_render:m}=t,b=Ko(e),[S,y]=c.useState(null),[C,w]=c.useState(null),[P,x]=c.useState(!1),R=st(d),[T,A]=ue({prop:o,defaultProp:r??!1,onChange:i,caller:St}),[_,D]=ue({prop:s,defaultProp:a,onChange:u,caller:St}),I=c.useRef(null),j=c.useRef(!1),[F,Y]=c.useState(null),H=G(M=>{Y({value:M,hasConsumerStoppedPropagation:j.current}),D(M)},"handleUserSelect"),B=c.useRef(_);c.useEffect(()=>{const M=v?S?.ownerDocument.getElementById(v):S?.form;if(M instanceof HTMLFormElement){const Q=G(()=>D(B.current),"reset");return M.addEventListener("reset",Q),()=>M.removeEventListener("reset",Q)}},[v,S,D]);const O=S?!!v||!!S.closest("form"):!0,[L,z]=c.useState(new Set),ne=le(),pe=Array.from(L).map(M=>M.props.value).join(";"),Ae=c.useCallback(M=>{z(Q=>new Set(Q).add(M))},[]),Ne=c.useCallback(M=>{z(Q=>{const ae=new Set(Q);return ae.delete(M),ae})},[]),se={required:h,trigger:S,onTriggerChange:y,valueNode:C,onValueNodeChange:w,valueNodeHasChildren:P,onValueNodeHasChildrenChange:x,contentId:ne,value:_,onValueChange:D,hasConsumerStoppedPropagationRef:j,userSelection:F,onUserSelect:H,open:T,onOpenChange:A,dir:R,triggerPointerDownPosRef:I,disabled:l,name:p,autoComplete:f,form:v,nativeOptions:L,nativeSelectKey:pe,isFormControl:O};return(0,g.jsx)(Wt,{...b,children:(0,g.jsx)(Od,{scope:e,...se,children:(0,g.jsx)(Bn.Provider,{scope:e,children:(0,g.jsx)(Dd,{scope:e,onNativeOptionAdd:Ae,onNativeOptionRemove:Ne,children:Vs(m)?m(se):n})})})})}G($s,"SelectProvider");var uh=G(t=>{const{__scopeSelect:e,children:n,...o}=t;return(0,g.jsx)($s,{__scopeSelect:e,...o,internal_do_not_use_render:({isFormControl:r})=>(0,g.jsxs)(g.Fragment,{children:[n,r?(0,g.jsx)(zd,{__scopeSelect:e}):null]})})},"Select"),kd="SelectTrigger",dh=c.forwardRef(G(function(e,n){const{__scopeSelect:o,disabled:r=!1,...i}=e,s=Ko(o),a=et(kd,o),u=a.disabled||r,d=N(n,a.onTriggerChange),p=Hn(o),f=c.useRef("touch"),[l,h,v]=Xo(b=>{const S=p().filter(C=>!C.disabled),y=qo(S,b,S.find(C=>C.value===a.value));y!==void 0&&a.onUserSelect(y.value)}),m=G(b=>{u||(a.onOpenChange(!0),v()),b&&(a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})},"handleOpen");return(0,g.jsx)(Gt,{asChild:!0,...s,children:(0,g.jsx)(k.button,{type:"button",role:"combobox","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":qt(a.value)?"":void 0,...i,ref:d,onClick:E(i.onClick,b=>{b.currentTarget.focus(),f.current!=="mouse"&&m(b)}),onPointerDown:E(i.onPointerDown,b=>{f.current=b.pointerType;const S=b.target;S.hasPointerCapture(b.pointerId)&&S.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(m(b),b.preventDefault())}),onKeyDown:E(i.onKeyDown,b=>{const S=l.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&(a.hasConsumerStoppedPropagationRef.current=b.isPropagationStopped(),h(b.key)),!(S&&b.key===" ")&&Td.includes(b.key)&&(m(),b.preventDefault())})})})},"SelectTrigger")),jd="SelectValue",fh=c.forwardRef(G(function(e,n){const{__scopeSelect:o,className:r,style:i,children:s,placeholder:a="",...u}=e,d=et(jd,o),{onValueNodeHasChildrenChange:p}=d,f=s!==void 0,l=N(n,d.onValueNodeChange);Z(()=>{p(f)},[p,f]);const h=qt(d.value);return(0,g.jsx)(k.span,{...u,asChild:h?!1:u.asChild,ref:l,style:{pointerEvents:"none"},children:(0,g.jsx)(c.Fragment,{children:h?a:s},h?"placeholder":"value")})},"SelectValue")),ph=c.forwardRef(G(function(e,n){const{__scopeSelect:o,children:r,...i}=e;return(0,g.jsx)(k.span,{"aria-hidden":!0,...i,ref:n,children:r||"▼"})},"SelectIcon")),[Nd,Ld]=ct("SelectPortal",{forceMount:void 0}),hh=G(t=>{const{__scopeSelect:e,forceMount:n,...o}=t;return(0,g.jsx)(Nd,{scope:t.__scopeSelect,forceMount:n,children:(0,g.jsx)(zt,{asChild:!0,...o})})},"SelectPortal"),rt="SelectContent",gh=c.forwardRef(G(function(e,n){const o=Ld(rt,e.__scopeSelect),{forceMount:r=o.forceMount,...i}=e,s=et(rt,e.__scopeSelect),[a,u]=c.useState();return Z(()=>{u(new DocumentFragment)},[]),(0,g.jsx)(ie,{present:r||s.open,children:({present:d})=>d?(0,g.jsx)(Bd,{...i,ref:n}):(0,g.jsx)(Fd,{...i,fragment:a})})},"SelectContent")),Fd=c.forwardRef(G(function(e,n){const{__scopeSelect:o,children:r,fragment:i}=e;return i?Ht.createPortal((0,g.jsx)(Bs,{scope:o,children:(0,g.jsx)(Bn.Slot,{scope:o,children:(0,g.jsx)("div",{ref:n,children:r})})}),i):null},"SelectContentFragment")),xe=10,[Bs,at]=ct(rt),$d=Re("SelectContent.RemoveScroll"),Bd=c.forwardRef(G(function(e,n){const{__scopeSelect:o}=e,{position:r=oi.ItemAligned,onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:a,side:u,sideOffset:d,align:p,alignOffset:f,arrowPadding:l,collisionBoundary:h,collisionPadding:v,sticky:m,hideWhenDetached:b,avoidCollisions:S,...y}=e,C=et(rt,o),[w,P]=c.useState(null),[x,R]=c.useState(null),T=N(n,P),[A,_]=c.useState(null),[D,I]=c.useState(null),j=Hn(o),[F,Y]=c.useState(!1),H=c.useRef(!1),B=c.useRef(!1),O=c.useRef(!1);c.useEffect(()=>{if(w)return Ln(w)},[w]),Et();const L=c.useCallback($=>{const[X,...V]=j().map(fe=>fe.ref.current),[W]=V.slice(-1),q=document.activeElement;for(const fe of $)if(fe===q||(fe?.scrollIntoView({block:"nearest"}),fe===X&&x&&(x.scrollTop=0),fe===W&&x&&(x.scrollTop=x.scrollHeight),fe?.focus(),document.activeElement!==q))return},[j,x]),z=c.useCallback(()=>L([A,w]),[L,A,w]);c.useEffect(()=>{F&&z()},[F,z]);const{onOpenChange:ne,triggerPointerDownPosRef:pe}=C;c.useEffect(()=>{if(w){let $={x:0,y:0};const X=G(W=>{$={x:Math.abs(Math.round(W.pageX)-(pe.current?.x??0)),y:Math.abs(Math.round(W.pageY)-(pe.current?.y??0))}},"handlePointerMove"),V=G(W=>{$.x<=10&&$.y<=10?W.preventDefault():W.composedPath().includes(w)||ne(!1),document.removeEventListener("pointermove",X),pe.current=null},"handlePointerUp");return pe.current!==null&&(document.addEventListener("pointermove",X),document.addEventListener("pointerup",V,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",V,{capture:!0})}}},[w,ne,pe]),c.useEffect(()=>{const $=G(()=>ne(!1),"close");return window.addEventListener("blur",$),window.addEventListener("resize",$),()=>{window.removeEventListener("blur",$),window.removeEventListener("resize",$)}},[ne]);const[Ae,Ne]=Xo($=>{const X=j().filter(W=>!W.disabled),V=qo(X,$,X.find(W=>W.ref.current===document.activeElement));V&&setTimeout(()=>V.ref.current?.focus())}),se=c.useCallback(($,X,V)=>{const W=!B.current;W&&(B.current=!0);const q=!H.current&&!V;C.value!==void 0&&C.value===X||q?(_($),q&&(H.current=!0)):W&&_($)},[C.value]),M=c.useCallback(()=>w?.focus(),[w]),Q=c.useCallback(($,X,V)=>{if(!$)return;const W=!O.current;W&&(O.current=!0);const q=!H.current&&!V;(C.value!==void 0&&C.value===X||q||W)&&I($)},[C.value]),ae=r===oi.Popper?ri:Hd,de=ae===ri?{side:u,sideOffset:d,align:p,alignOffset:f,arrowPadding:l,collisionBoundary:h,collisionPadding:v,sticky:m,hideWhenDetached:b,avoidCollisions:S}:{};return(0,g.jsx)(Bs,{scope:o,content:w,viewport:x,onViewportChange:R,itemRefCallback:se,selectedItem:A,onItemLeave:M,itemTextRefCallback:Q,focusSelectedItem:z,selectedItemText:D,position:r,isPositioned:F,searchRef:Ae,children:(0,g.jsx)(Xt,{as:$d,allowPinchZoom:!0,children:(0,g.jsx)(Pn,{asChild:!0,trapped:C.open,onMountAutoFocus:$=>{$.preventDefault()},onUnmountAutoFocus:E(i,$=>{C.trigger?.focus({preventScroll:!0}),$.preventDefault()}),children:(0,g.jsx)(Ut,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:$=>$.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:(0,g.jsx)(ae,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:$=>$.preventDefault(),...y,...de,onPlaced:()=>Y(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:E(y.onKeyDown,$=>{const X=$.ctrlKey||$.altKey||$.metaKey;if($.key==="Tab"&&$.preventDefault(),!X&&$.key.length===1&&Ne($.key),["ArrowUp","ArrowDown","Home","End"].includes($.key)){let V=j().filter(W=>!W.disabled).map(W=>W.ref.current);if(["ArrowUp","End"].includes($.key)&&(V=V.slice().reverse()),["ArrowUp","ArrowDown"].includes($.key)){const W=$.target,q=V.indexOf(W);V=V.slice(q+1)}setTimeout(()=>L(V)),$.preventDefault()}})})})})})})},"SelectContentImpl")),Hd=c.forwardRef(G(function(e,n){const{__scopeSelect:o,onPlaced:r,...i}=e,s=et(rt,o),a=at(rt,o),[u,d]=c.useState(null),[p,f]=c.useState(null),l=N(n,f),h=Hn(o),v=c.useRef(!1),m=c.useRef(!0),{viewport:b,selectedItem:S,selectedItemText:y,focusSelectedItem:C}=a,w=c.useCallback(()=>{if(s.trigger&&s.valueNode&&u&&p&&b&&S&&y){const T=s.trigger.getBoundingClientRect(),A=p.getBoundingClientRect(),_=s.valueNode.getBoundingClientRect(),D=y.getBoundingClientRect();if(s.dir!==_d.RTL){const X=D.left-A.left,V=_.left-X,W=T.left-V,q=T.width+W,fe=Math.max(q,A.width),Yn=window.innerWidth-xe,Xn=yn(V,[xe,Math.max(xe,Yn-fe)]);u.style.minWidth=q+"px",u.style.left=Xn+"px"}else{const X=A.right-D.right,V=window.innerWidth-_.right-X,W=window.innerWidth-T.right-V,q=T.width+W,fe=Math.max(q,A.width),Yn=window.innerWidth-xe,Xn=yn(V,[xe,Math.max(xe,Yn-fe)]);u.style.minWidth=q+"px",u.style.right=Xn+"px"}const I=h(),j=window.innerHeight-xe*2,F=b.scrollHeight,Y=window.getComputedStyle(p),H=parseInt(Y.borderTopWidth,10),B=parseInt(Y.paddingTop,10),O=parseInt(Y.borderBottomWidth,10),L=parseInt(Y.paddingBottom,10),z=H+B+F+L+O,ne=Math.min(S.offsetHeight*5,z),pe=window.getComputedStyle(b),Ae=parseInt(pe.paddingTop,10),Ne=parseInt(pe.paddingBottom,10),se=T.top+T.height/2-xe,M=j-se,Q=S.offsetHeight/2,ae=S.offsetTop+Q,de=H+B+ae,$=z-de;if(de<=se){const X=I.length>0&&S===I[I.length-1].ref.current;u.style.bottom="0px";const V=p.clientHeight-b.offsetTop-b.offsetHeight,W=de+Math.max(M,Q+(X?Ne:0)+V+O);u.style.height=W+"px"}else{const X=I.length>0&&S===I[0].ref.current;u.style.top="0px";const V=Math.max(se,H+b.offsetTop+(X?Ae:0)+Q)+$;u.style.height=V+"px",b.scrollTop=de-se+b.offsetTop}u.style.margin=`${xe}px 0`,u.style.minHeight=ne+"px",u.style.maxHeight=j+"px",r?.(),requestAnimationFrame(()=>v.current=!0)}},[h,s.trigger,s.valueNode,u,p,b,S,y,s.dir,r]);Z(()=>w(),[w]);const[P,x]=c.useState();Z(()=>{p&&x(window.getComputedStyle(p).zIndex)},[p]);const R=c.useCallback(T=>{T&&m.current===!0&&(w(),C?.(),m.current=!1)},[w,C]);return(0,g.jsx)(Ud,{scope:o,contentWrapper:u,shouldExpandOnScrollRef:v,onScrollButtonChange:R,children:(0,g.jsx)("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P},children:(0,g.jsx)(k.div,{...i,ref:l,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})},"SelectItemAlignedPosition")),ri=c.forwardRef(G(function(e,n){const{__scopeSelect:o,align:r="start",collisionPadding:i=xe,...s}=e,a=Ko(o);return(0,g.jsx)(Mn,{...a,...s,ref:n,align:r,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[Ud,Yo]=ct(rt,{}),ii="SelectViewport",vh=c.forwardRef(G(function(e,n){const{__scopeSelect:o,nonce:r,...i}=e,s=at(ii,o),a=Yo(ii,o),u=N(n,s.onViewportChange),d=c.useRef(0);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),(0,g.jsx)(Bn.Slot,{scope:o,children:(0,g.jsx)(k.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:E(i.onScroll,p=>{const f=p.currentTarget,{contentWrapper:l,shouldExpandOnScrollRef:h}=a;if(h?.current&&l){const v=Math.abs(d.current-f.scrollTop);if(v>0){const m=window.innerHeight-xe*2,b=parseFloat(l.style.minHeight),S=parseFloat(l.style.height),y=Math.max(b,S);if(y<m){const C=y+v,w=Math.min(m,C),P=C-w;l.style.height=w+"px",l.style.bottom==="0px"&&(f.scrollTop=P>0?P:0,l.style.justifyContent="flex-end")}}}d.current=f.scrollTop})})})]})},"SelectViewport")),[mh,bh]=ct("SelectGroup"),xo="SelectItem",[Vd,Hs]=ct(xo),Ch=c.forwardRef(G(function(e,n){const{__scopeSelect:o,value:r,disabled:i=!1,textValue:s,...a}=e,u=et(xo,o),d=at(xo,o),p=u.value===r,[f,l]=c.useState(s??""),[h,v]=c.useState(!1),m=J(w=>d.itemRefCallback?.(w,r,i)),b=N(n,m),S=le(),y=c.useRef("touch");function C(w){u.hasConsumerStoppedPropagationRef.current=w.isPropagationStopped(),u.onUserSelect(r),u.onOpenChange(!1)}return G(C,"handleSelect"),(0,g.jsx)(Vd,{scope:o,value:r,disabled:i,textId:S,isSelected:p,onItemTextChange:c.useCallback(w=>{l(P=>P||(w?.textContent??"").trim())},[]),children:(0,g.jsx)(Bn.ItemSlot,{scope:o,value:r,disabled:i,textValue:f,children:(0,g.jsx)(k.div,{role:"option","aria-labelledby":S,"data-highlighted":h?"":void 0,"aria-selected":p&&h,"data-state":p?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:b,onFocus:E(a.onFocus,()=>v(!0)),onBlur:E(a.onBlur,()=>v(!1)),onClick:E(a.onClick,w=>{i||y.current!=="mouse"&&C(w)}),onPointerUp:E(a.onPointerUp,w=>{i||y.current==="mouse"&&C(w)}),onPointerDown:E(a.onPointerDown,w=>{y.current=w.pointerType}),onPointerMove:E(a.onPointerMove,w=>{y.current=w.pointerType,i?d.onItemLeave?.():y.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:E(a.onPointerLeave,w=>{w.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:E(a.onKeyDown,w=>{i||w.target!==w.currentTarget||d.searchRef?.current!==""&&w.key===" "||(Ad.includes(w.key)&&C(w),w.key===" "&&w.preventDefault())})})})})},"SelectItem")),ln="SelectItemText",wh=c.forwardRef(G(function(e,n){const{__scopeSelect:o,className:r,style:i,...s}=e,a=et(ln,o),u=at(ln,o),d=Hs(ln,o),p=Md(ln,o),[f,l]=c.useState(null),h=J(C=>u.itemTextRefCallback?.(C,d.value,d.disabled)),v=N(n,l,d.onItemTextChange,h),m=f?.textContent,b=c.useMemo(()=>(0,g.jsx)("option",{value:d.value,disabled:d.disabled,children:m},d.value),[d.disabled,d.value,m]),{onNativeOptionAdd:S,onNativeOptionRemove:y}=p;return Z(()=>(S(b),()=>y(b)),[S,y,b]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(k.span,{id:d.textId,...s,ref:v}),d.isSelected&&a.valueNode&&!a.valueNodeHasChildren&&!qt(a.value)?Ht.createPortal(s.children,a.valueNode):null]})},"SelectItemText")),Wd="SelectItemIndicator",Sh=c.forwardRef(G(function(e,n){const{__scopeSelect:o,...r}=e;return Hs(Wd,o).isSelected?(0,g.jsx)(k.span,{"aria-hidden":!0,...r,ref:n}):null},"SelectItemIndicator")),si="SelectScrollUpButton",yh=c.forwardRef(G(function(e,n){const o=at(si,e.__scopeSelect),r=Yo(si,e.__scopeSelect),[i,s]=c.useState(!1),a=N(n,r.onScrollButtonChange);return Z(()=>{if(o.viewport&&o.isPositioned){let u=function(){const p=d.scrollTop>0;s(p)};G(u,"handleScroll");const d=o.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[o.viewport,o.isPositioned]),i?(0,g.jsx)(Us,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=o;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null},"SelectScrollUpButton")),ci="SelectScrollDownButton",xh=c.forwardRef(G(function(e,n){const o=at(ci,e.__scopeSelect),r=Yo(ci,e.__scopeSelect),[i,s]=c.useState(!1),a=N(n,r.onScrollButtonChange);return Z(()=>{if(o.viewport&&o.isPositioned){let u=function(){const p=d.scrollHeight-d.clientHeight,f=Math.ceil(d.scrollTop)<p;s(f)};G(u,"handleScroll");const d=o.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[o.viewport,o.isPositioned]),i?(0,g.jsx)(Us,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=o;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null},"SelectScrollDownButton")),Us=c.forwardRef(G(function(e,n){const{__scopeSelect:o,onAutoScroll:r,...i}=e,s=at("SelectScrollButton",o),a=c.useRef(null),u=Hn(o),d=c.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return c.useEffect(()=>()=>d(),[d]),Z(()=>{u().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),(0,g.jsx)(k.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:E(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:E(i.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:E(i.onPointerLeave,()=>{d()})})},"SelectScrollButtonImpl")),Gd="SelectBubbleInput",zd=c.forwardRef(G(function({__scopeSelect:e,...n},o){const r=et(Gd,e),{value:i,onValueChange:s,required:a,disabled:u,name:d,autoComplete:p,form:f,userSelection:l}=r,{nativeOptions:h,nativeSelectKey:v}=r,m=c.useRef(null),b=N(o,m),S=i??"",y=c.useRef(S),C=c.useRef(l),w=c.useRef(!1),P=Array.from(h).some(x=>(x.props.value??"")==="");return c.useEffect(()=>{const x=m.current;if(!x)return;const R=window.HTMLSelectElement.prototype,T=Object.getOwnPropertyDescriptor(R,"value").set,A=l!==null&&l!==C.current;C.current=l;const _=y.current!==S;y.current=S;const D=A&&_;if(A&&!_&&l.value!==S&&!l.hasConsumerStoppedPropagation&&T){w.current=!0;try{T.call(x,l.value),x.dispatchEvent(new Event("change",{bubbles:!0}))}finally{w.current=!1,T.call(x,S)}return}const I=D&&!l.hasConsumerStoppedPropagation;if(_&&T){const j=new Event("change",{bubbles:I});T.call(x,S),x.dispatchEvent(j)}},[S,l]),(0,g.jsxs)(k.select,{"aria-hidden":!0,required:a,tabIndex:-1,name:d,autoComplete:p,disabled:u,form:f,onChange:x=>{w.current||s(x.target.value)},...n,style:{...as,...n.style},ref:b,defaultValue:S,children:[qt(i)&&!P?(0,g.jsx)("option",{value:""}):null,Array.from(h)]},v)},"SelectBubbleInput"));function Vs(t){return typeof t=="function"}G(Vs,"isFunction");function qt(t){return t===""||t===void 0}G(qt,"shouldShowPlaceholder");function Xo(t){const e=J(t),n=c.useRef(""),o=c.useRef(0),r=c.useCallback(s=>{const a=n.current+s;e(a);function u(d){n.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>u(""),1e3))}G(u,"updateSearch"),u(a)},[e]),i=c.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,i]}G(Xo,"useTypeaheadSearch");function qo(t,e,n){const o=e.length>1&&Array.from(e).every(a=>a===e[0])?e[0]:e,r=n?t.indexOf(n):-1;let i=Ws(t,Math.max(r,0));o.length===1&&(i=i.filter(a=>a!==n));const s=i.find(a=>a.textValue.toLowerCase().startsWith(o.toLowerCase()));return s!==n?s:void 0}G(qo,"findNextItem");function Ws(t,e){return t.map((n,o)=>t[(e+o)%t.length])}G(Ws,"wrapArray");var Kd=Object.defineProperty,Ge=(t,e)=>Kd(t,"name",{value:e,configurable:!0}),[Yd,Ph]=re("AlertDialog",[_s]),ze=_s(),Rh=Ge(t=>{const{__scopeAlertDialog:e,...n}=t,o=ze(e);return(0,g.jsx)(Wu,{...o,...n,modal:!0})},"AlertDialog"),Eh=c.forwardRef(Ge(function(e,n){const{__scopeAlertDialog:o,...r}=e,i=ze(o);return(0,g.jsx)(zu,{...i,...r,ref:n})},"AlertDialogTrigger")),_h=Ge(t=>{const{__scopeAlertDialog:e,...n}=t,o=ze(e);return(0,g.jsx)(Yu,{...o,...n})},"AlertDialogPortal"),Th=c.forwardRef(Ge(function(e,n){const{__scopeAlertDialog:o,...r}=e,i=ze(o);return(0,g.jsx)(Xu,{...i,...r,ref:n})},"AlertDialogOverlay")),[Xd,qd]=Yd("AlertDialogContent"),Ah=c.forwardRef(Ge(function(e,n){const{__scopeAlertDialog:o,children:r,...i}=e,s=ze(o),a=c.useRef(null),u=N(n,a),d=c.useRef(null);return(0,g.jsx)(Xd,{scope:o,cancelRef:d,children:(0,g.jsx)(Qu,{role:"alertdialog",...s,...i,ref:u,onOpenAutoFocus:E(i.onOpenAutoFocus,p=>{p.preventDefault(),d.current?.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:r})})},"AlertDialogContent")),Ih=c.forwardRef(Ge(function(e,n){const{__scopeAlertDialog:o,...r}=e,i=ze(o);return(0,g.jsx)(td,{...i,...r,ref:n})},"AlertDialogTitle")),Oh=c.forwardRef(Ge(function(e,n){const{__scopeAlertDialog:o,...r}=e,i=ze(o);return(0,g.jsx)(nd,{...i,...r,ref:n})},"AlertDialogDescription")),Dh=c.forwardRef(Ge(function(e,n){const{__scopeAlertDialog:o,...r}=e,i=ze(o);return(0,g.jsx)(Os,{...i,...r,ref:n})},"AlertDialogAction")),Zd="AlertDialogCancel",Mh=c.forwardRef(Ge(function(e,n){const{__scopeAlertDialog:o,...r}=e,{cancelRef:i}=qd(Zd,o),s=ze(o),a=N(n,i);return(0,g.jsx)(Os,{...s,...r,ref:a})},"AlertDialogCancel")),Qd=Object.defineProperty,je=(t,e)=>Qd(t,"name",{value:e,configurable:!0}),Zo="Popover",[Gs,kh]=re(Zo,[Je]),Un=Je(),[Jd,lt]=Gs(Zo),jh=je(t=>{const{__scopePopover:e,children:n,open:o,defaultOpen:r,onOpenChange:i,modal:s=!1}=t,a=Un(e),u=c.useRef(null),[d,p]=c.useState(!1),[f,l]=c.useState(0),[h,v]=c.useState(0),[m,b]=ue({prop:o,defaultProp:r??!1,onChange:i,caller:Zo});return(0,g.jsx)(Wt,{...a,children:(0,g.jsx)(Jd,{scope:e,contentId:le(),titleId:le(),descriptionId:le(),titlePresent:f>0,descriptionPresent:h>0,setTitleCount:l,setDescriptionCount:v,triggerRef:u,open:m,onOpenChange:b,onOpenToggle:c.useCallback(()=>b(S=>!S),[b]),hasCustomAnchor:d,onCustomAnchorAdd:c.useCallback(()=>p(!0),[]),onCustomAnchorRemove:c.useCallback(()=>p(!1),[]),modal:s,children:n})})},"Popover"),ef="PopoverAnchor",Nh=c.forwardRef(je(function(e,n){const{__scopePopover:o,...r}=e,i=lt(ef,o),s=Un(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:u}=i;return c.useEffect(()=>(a(),()=>u()),[a,u]),(0,g.jsx)(Gt,{...s,...r,ref:n})},"PopoverAnchor")),tf="PopoverTrigger",Lh=c.forwardRef(je(function(e,n){const{__scopePopover:o,...r}=e,i=lt(tf,o),s=Un(o),a=N(n,i.triggerRef),u=(0,g.jsx)(k.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Qo(i.open),...r,ref:a,onClick:E(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?u:(0,g.jsx)(Gt,{asChild:!0,...s,children:u})},"PopoverTrigger")),zs="PopoverPortal",[nf,of]=Gs(zs,{forceMount:void 0}),Fh=je(t=>{const{__scopePopover:e,forceMount:n,children:o,container:r}=t,i=lt(zs,e);return(0,g.jsx)(nf,{scope:e,forceMount:n,children:(0,g.jsx)(ie,{present:n||i.open,children:(0,g.jsx)(zt,{asChild:!0,container:r,children:o})})})},"PopoverPortal"),Nt="PopoverContent",$h=c.forwardRef(je(function(e,n){const o=of(Nt,e.__scopePopover),{forceMount:r=o.forceMount,...i}=e,s=lt(Nt,e.__scopePopover);return(0,g.jsx)(ie,{present:r||s.open,children:s.modal?(0,g.jsx)(sf,{...i,ref:n}):(0,g.jsx)(cf,{...i,ref:n})})},"PopoverContent")),rf=Re("PopoverContent.RemoveScroll"),sf=c.forwardRef(je(function(e,n){const o=lt(Nt,e.__scopePopover),r=c.useRef(null),i=N(n,r),s=c.useRef(!1),{nodes:a,registry:u}=En();return c.useEffect(()=>{const d=r.current;if(d)return Ln(d)},[]),(0,g.jsx)(Xt,{as:rf,allowPinchZoom:!0,shards:c.useMemo(()=>[r,...a.map(d=>({current:d}))],[r,a]),children:(0,g.jsx)(Ks,{...e,ref:i,branchNodes:a,branchRegistry:u,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:E(e.onCloseAutoFocus,d=>{d.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:E(e.onPointerDownOutside,d=>{const p=d.detail.originalEvent,f=p.button===0&&p.ctrlKey===!0,l=p.button===2||f;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:E(e.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),cf=c.forwardRef(je(function(e,n){const o=lt(Nt,e.__scopePopover),r=c.useRef(!1),i=c.useRef(!1);return(0,g.jsx)(Ks,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})},"PopoverContentNonModal")),Ks=c.forwardRef(je(function(e,n){const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:f,"aria-describedby":l,branchNodes:h,branchRegistry:v,...m}=e,b=lt(Nt,o),S=Un(o),[y,C]=c.useState(null),w=N(n,C);return _n(y),Et(),(0,g.jsx)(Rn,{registry:v,children:(0,g.jsx)(Pn,{asChild:!0,loop:!0,trapped:r,branches:h,onMountAutoFocus:i,onUnmountAutoFocus:s,children:(0,g.jsx)(Ut,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onDismiss:()=>b.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,g.jsx)(Mn,{"data-state":Qo(b.open),role:"dialog",id:b.contentId,"aria-labelledby":b.titlePresent?b.titleId:void 0,"aria-describedby":b.descriptionPresent?Ys(l,b.descriptionId):l,...S,...m,ref:w,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})},"PopoverContentImpl"));function Qo(t){return t?"open":"closed"}je(Qo,"getState");function Ys(...t){const e=new Set;for(const n of t)if(typeof n=="string")for(const o of String(n).trim().split(/\s+/))o&&e.add(o);return e.size>0?Array.from(e).join(" "):void 0}je(Ys,"concatAriaDescribedby");var af=Object.defineProperty,Ve=(t,e)=>af(t,"name",{value:e,configurable:!0}),Jo="Checkbox",[lf,Bh]=re(Jo),[uf,er]=lf(Jo);function Xs(t){const{__scopeCheckbox:e,checked:n,children:o,defaultChecked:r,disabled:i,form:s,name:a,onCheckedChange:u,required:d,value:p="on",internal_do_not_use_render:f}=t,[l,h]=ue({prop:n,defaultProp:r??!1,onChange:u,caller:Jo}),[v,m]=c.useState(null),[b,S]=c.useState(null),[y,C]=c.useState(null),w=v?!!s||!!v.closest("form"):!0,P={checked:l,disabled:i,setChecked:h,control:v,setControl:m,name:a,form:s,value:p,userClick:y,onUserClick:C,required:d,defaultChecked:we(r)?!1:r,isFormControl:w,bubbleInput:b,setBubbleInput:S};return(0,g.jsx)(uf,{scope:e,...P,children:qs(f)?f(P):o})}Ve(Xs,"CheckboxProvider");var df="CheckboxTrigger",ff=c.forwardRef(Ve(function({__scopeCheckbox:e,onKeyDown:n,onClick:o,...r},i){const{control:s,value:a,disabled:u,checked:d,required:p,setControl:f,setChecked:l,onUserClick:h,isFormControl:v,bubbleInput:m}=er(df,e),b=N(i,f),S=c.useRef(d);return c.useEffect(()=>{const y=s?.form;if(y){const C=Ve(()=>l(S.current),"reset");return y.addEventListener("reset",C),()=>y.removeEventListener("reset",C)}},[s,l]),(0,g.jsx)(k.button,{type:"button",role:"checkbox","aria-checked":we(d)?"mixed":d,"aria-required":p,"data-state":tr(d),"data-disabled":u?"":void 0,disabled:u,value:a,...r,ref:b,onKeyDown:E(n,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:E(o,y=>{const C=y.isPropagationStopped();h({requestedChecked:we(d)?!0:!d,hasConsumerStoppedPropagation:C}),l(w=>we(w)?!0:!w),m&&v&&(C||y.stopPropagation())})})},"CheckboxTrigger")),Hh=c.forwardRef(Ve(function(e,n){const{__scopeCheckbox:o,name:r,checked:i,defaultChecked:s,required:a,disabled:u,value:d,onCheckedChange:p,form:f,...l}=e;return(0,g.jsx)(Xs,{__scopeCheckbox:o,checked:i,defaultChecked:s,disabled:u,required:a,onCheckedChange:p,name:r,form:f,value:d,internal_do_not_use_render:({isFormControl:h})=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(ff,{...l,ref:n,__scopeCheckbox:o}),h&&(0,g.jsx)(gf,{__scopeCheckbox:o})]})})},"Checkbox")),pf="CheckboxIndicator",Uh=c.forwardRef(Ve(function(e,n){const{__scopeCheckbox:o,forceMount:r,...i}=e,s=er(pf,o);return(0,g.jsx)(ie,{present:r||we(s.checked)||s.checked===!0,children:(0,g.jsx)(k.span,{"data-state":tr(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:n,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator")),hf="CheckboxBubbleInput",gf=c.forwardRef(Ve(function({__scopeCheckbox:e,onClick:n,...o},r){const{control:i,userClick:s,checked:a,defaultChecked:u,required:d,disabled:p,name:f,value:l,form:h,bubbleInput:v,setBubbleInput:m}=er(hf,e),b=N(r,m),S=Dn(i),y=c.useRef(!1),C=c.useRef(a),w=c.useRef(s),P=c.useRef(null);c.useEffect(()=>{const R=v;if(!R)return;const T=window.HTMLInputElement.prototype,A=Object.getOwnPropertyDescriptor(T,"checked").set;if(!A)return;const _=C.current!==a;C.current=a;const D=s!==null&&s!==w.current;if(w.current=s,D)P.current=_?null:s,_&&(R.indeterminate=we(a),A.call(R,we(a)?!1:a)),R.dispatchEvent(new Event("click",{bubbles:!s.hasConsumerStoppedPropagation}));else if(_){const I=P.current;P.current=null;const j=I?.requestedChecked===a;y.current=!0,R.indeterminate=we(a),A.call(R,we(a)?!1:a),R.dispatchEvent(new Event("click",{bubbles:!(j&&I.hasConsumerStoppedPropagation)})),y.current=!1}},[v,a,s]);const x=c.useRef(we(a)?!1:a);return(0,g.jsx)(k.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??x.current,required:d,disabled:p,name:f,value:l,form:h,...o,tabIndex:-1,ref:b,onClick:E(n,R=>{y.current&&R.stopPropagation()}),style:{...o.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function qs(t){return typeof t=="function"}Ve(qs,"isFunction");function we(t){return t==="indeterminate"}Ve(we,"isIndeterminate");function tr(t){return we(t)?"indeterminate":t?"checked":"unchecked"}Ve(tr,"getState");var vf=Object.defineProperty,nr=(t,e)=>vf(t,"name",{value:e,configurable:!0}),io=!1;function Zs(){const[t,e]=c.useState(io);return c.useEffect(()=>{io||(io=!0,e(!0))},[]),t}nr(Zs,"useIsHydrated");var Qs=c[" useSyncExternalStore ".trim().toString()];function Js(){return()=>{}}nr(Js,"subscribe");function ec(){return Qs(Js,()=>!0,()=>!1)}nr(ec,"useIsHydratedModern");var mf=typeof Qs=="function"?ec:Zs,bf=Object.defineProperty,ut=(t,e)=>bf(t,"name",{value:e,configurable:!0}),so="rovingFocusGroup.onEntryFocus",Cf={bubbles:!1,cancelable:!0},Vn="RovingFocusGroup",[Po,tc,wf]=$n(Vn),[Sf,_t]=re(Vn,[wf]),ai={Vertical:"vertical",Horizontal:"horizontal"},yf={LTR:"ltr",RTL:"rtl"},[xf,Pf]=Sf(Vn),or=c.forwardRef(ut(function(e,n){return(0,g.jsx)(Po.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)(Po.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)(Rf,{...e,ref:n})})})},"RovingFocusGroup")),Rf=c.forwardRef(ut(function(e,n){const{__scopeRovingFocusGroup:o,orientation:r,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:p,preventScrollOnEntryFocus:f=!1,...l}=e,h=c.useRef(null),v=N(n,h),m=st(s),[b,S]=ue({prop:a,defaultProp:u??null,onChange:d,caller:Vn}),[y,C]=c.useState(!1),w=J(p),P=tc(o),x=c.useRef(!1),[R,T]=c.useState(0);return c.useEffect(()=>{const A=h.current;if(A)return A.addEventListener(so,w),()=>A.removeEventListener(so,w)},[w]),(0,g.jsx)(xf,{scope:o,orientation:r,dir:m,loop:i,currentTabStopId:b,onItemFocus:c.useCallback(A=>S(A),[S]),onItemShiftTab:c.useCallback(()=>C(!0),[]),onFocusableItemAdd:c.useCallback(()=>T(A=>A+1),[]),onFocusableItemRemove:c.useCallback(()=>T(A=>A-1),[]),children:(0,g.jsx)(k.div,{tabIndex:y||R===0?-1:0,"data-orientation":r,...l,ref:v,style:{outline:"none",...e.style},onMouseDown:E(e.onMouseDown,()=>{x.current=!0}),onFocus:E(e.onFocus,A=>{const _=!x.current;if(A.target===A.currentTarget&&_&&!y){const D=new CustomEvent(so,Cf);if(A.currentTarget.dispatchEvent(D),!D.defaultPrevented){const I=P().filter(j=>j.focusable);ir([I.find(j=>j.active),I.find(j=>j.id===b),...I].filter(Boolean).map(j=>j.ref.current),f)}}x.current=!1}),onBlur:E(e.onBlur,()=>C(!1))})})},"RovingFocusGroupImpl")),Ef="RovingFocusGroupItem",rr=c.forwardRef(ut(function(e,n){const{__scopeRovingFocusGroup:o,focusable:r=!0,active:i=!1,tabStopId:s,children:a,...u}=e,d=le(),p=s||d,f=Pf(Ef,o),l=f.currentTabStopId===p,h=tc(o),{onFocusableItemAdd:v,onFocusableItemRemove:m,currentTabStopId:b}=f,S=mf();return Z(()=>{if(!(!S||!r))return v(),()=>m()},[S,r,v,m]),c.useEffect(()=>{if(!(S||!r))return v(),()=>m()},[S,r,v,m]),(0,g.jsx)(Po.ItemSlot,{scope:o,id:p,focusable:r,active:i,children:(0,g.jsx)(k.span,{tabIndex:l?0:-1,"data-orientation":f.orientation,...u,ref:n,onMouseDown:E(e.onMouseDown,y=>{r?f.onItemFocus(p):y.preventDefault()}),onFocus:E(e.onFocus,()=>f.onItemFocus(p)),onKeyDown:E(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){f.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const C=oc(y,f.orientation,f.dir);if(C!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let w=h().filter(P=>P.focusable).map(P=>P.ref.current);if(C==="last")w.reverse();else if(C==="prev"||C==="next"){C==="prev"&&w.reverse();const P=w.indexOf(y.currentTarget);w=f.loop?rc(w,P+1):w.slice(P+1)}setTimeout(()=>ir(w))}}),children:typeof a=="function"?a({isCurrentTabStop:l,hasTabStop:b!=null}):a})})},"RovingFocusGroupItem")),_f={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function nc(t,e){return e!==yf.RTL?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}ut(nc,"getDirectionAwareKey");function oc(t,e,n){const o=nc(t.key,n);if(!(e===ai.Vertical&&["ArrowLeft","ArrowRight"].includes(o))&&!(e===ai.Horizontal&&["ArrowUp","ArrowDown"].includes(o)))return _f[o]}ut(oc,"getFocusIntent");function ir(t,e=!1){const n=document.activeElement;for(const o of t)if(o===n||(o.focus({preventScroll:e}),document.activeElement!==n))return}ut(ir,"focusFirst");function rc(t,e){return t.map((n,o)=>t[(e+o)%t.length])}ut(rc,"wrapArray");var Tf=Object.defineProperty,K=(t,e)=>Tf(t,"name",{value:e,configurable:!0}),Af={LTR:"ltr",RTL:"rtl"},Ro=["Enter"," "],If=["ArrowDown","PageUp","Home"],ic=["ArrowUp","PageDown","End"],Of=[...If,...ic],Df={ltr:[...Ro,"ArrowRight"],rtl:[...Ro,"ArrowLeft"]},Mf={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Wn="Menu",[Lt,kf,jf]=$n(Wn),[dt,Gn]=re(Wn,[jf,Je,_t]),zn=Je(),sc=_t(),[cc,tt]=dt(Wn),[Nf,Zt]=dt(Wn),ac=K(t=>{const{__scopeMenu:e,open:n=!1,children:o,dir:r,onOpenChange:i,modal:s=!0}=t,a=zn(e),[u,d]=c.useState(null),p=c.useRef(!1),f=J(i),l=st(r);return c.useEffect(()=>{const h=K(()=>{p.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},"handleKeyDown"),v=K(()=>p.current=!1,"handlePointer");return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),c.useEffect(()=>{if(!n)return;const h=K(()=>f(!1),"handleBlur");return window.addEventListener("blur",h),()=>window.removeEventListener("blur",h)},[n,f]),(0,g.jsx)(Wt,{...a,children:(0,g.jsx)(cc,{scope:e,open:n,onOpenChange:f,content:u,onContentChange:d,children:(0,g.jsx)(Nf,{scope:e,onClose:c.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:p,dir:l,modal:s,children:o})})})},"Menu"),sr=c.forwardRef(K(function(e,n){const{__scopeMenu:o,...r}=e,i=zn(o);return(0,g.jsx)(Gt,{...i,...r,ref:n})},"MenuAnchor")),lc="MenuPortal",[Lf,uc]=dt(lc,{forceMount:void 0}),dc=K(t=>{const{__scopeMenu:e,forceMount:n,children:o,container:r}=t,i=tt(lc,e);return(0,g.jsx)(Lf,{scope:e,forceMount:n,children:(0,g.jsx)(ie,{present:n||i.open,children:(0,g.jsx)(zt,{asChild:!0,container:r,children:o})})})},"MenuPortal"),Pe="MenuContent",[Ff,cr]=dt(Pe),fc=c.forwardRef(K(function(e,n){const o=uc(Pe,e.__scopeMenu),{forceMount:r=o.forceMount,...i}=e,s=tt(Pe,e.__scopeMenu),a=Zt(Pe,e.__scopeMenu);return(0,g.jsx)(Lt.Provider,{scope:e.__scopeMenu,children:(0,g.jsx)(ie,{present:r||s.open,children:(0,g.jsx)(Lt.Slot,{scope:e.__scopeMenu,children:a.modal?(0,g.jsx)($f,{...i,ref:n}):(0,g.jsx)(Bf,{...i,ref:n})})})})},"MenuContent")),$f=c.forwardRef(K(function(e,n){const o=tt(Pe,e.__scopeMenu),r=c.useRef(null),i=N(n,r);return c.useEffect(()=>{const s=r.current;if(s)return Ln(s)},[]),(0,g.jsx)(ar,{...e,ref:i,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:E(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})},"MenuRootContentModal")),Bf=c.forwardRef(K(function(e,n){const o=tt(Pe,e.__scopeMenu);return(0,g.jsx)(ar,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})},"MenuRootContentNonModal")),Hf=Re("MenuContent.ScrollLock"),ar=c.forwardRef(K(function(e,n){const{__scopeMenu:o,loop:r=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:h,onDismiss:v,disableOutsideScroll:m,...b}=e,S=tt(Pe,o),y=Zt(Pe,o),C=zn(o),w=sc(o),P=kf(o),[x,R]=c.useState(null),T=c.useRef(null),[A,_]=c.useState(null);_n(A);const{nodes:D,registry:I}=En(),j=!!(i||m),F=N(n,T,S.onContentChange,_),Y=c.useRef(0),H=c.useRef(""),B=c.useRef(0),O=c.useRef(null),L=c.useRef("right"),z=c.useRef(0),ne=c.useMemo(()=>m?[T,...D.map(M=>({current:M}))]:[],[T,D,m]),pe=m?Xt:c.Fragment,Ae=m?{as:Hf,allowPinchZoom:!0,shards:ne}:void 0,Ne=K(M=>{const Q=H.current+M,ae=P().filter(q=>!q.disabled),de=document.activeElement,$=ae.find(q=>q.ref.current===de)?.textValue,X=wc(ae.map(q=>q.textValue),Q,$),V=ae.find(q=>q.textValue===X)?.ref.current;function W(q){H.current=q,window.clearTimeout(Y.current),q!==""&&(Y.current=window.setTimeout(()=>W(""),1e3))}K(W,"updateSearch"),W(Q),V&&setTimeout(()=>V.focus())},"handleTypeaheadSearch");c.useEffect(()=>()=>window.clearTimeout(Y.current),[]),Et();const se=c.useCallback(M=>L.current===O.current?.side&&yc(M,O.current?.area),[]);return(0,g.jsx)(Ff,{scope:o,searchRef:H,onItemEnter:c.useCallback(M=>{se(M)&&M.preventDefault()},[se]),onItemLeave:c.useCallback(M=>{se(M)||(T.current?.focus(),R(null))},[se]),onTriggerLeave:c.useCallback(M=>{se(M)&&M.preventDefault()},[se]),pointerGraceTimerRef:B,onPointerGraceIntentChange:c.useCallback(M=>{O.current=M},[]),children:(0,g.jsx)(Rn,{registry:j?I:null,children:(0,g.jsx)(pe,{...Ae,children:(0,g.jsx)(Pn,{asChild:!0,trapped:i,branches:D,onMountAutoFocus:E(s,M=>{M.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:(0,g.jsx)(Ut,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:h,onDismiss:v,children:(0,g.jsx)(or,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:R,onEntryFocus:E(d,M=>{y.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,g.jsx)(Mn,{role:"menu","aria-orientation":"vertical","data-state":ur(S.open),"data-radix-menu-content":"",dir:y.dir,...C,...b,ref:F,style:{outline:"none",...b.style},onKeyDown:E(b.onKeyDown,M=>{const Q=M.target.closest("[data-radix-menu-content]")===M.currentTarget,ae=M.ctrlKey||M.altKey||M.metaKey,de=M.key.length===1;Q&&(M.key==="Tab"&&M.preventDefault(),!ae&&de&&Ne(M.key));const $=T.current;if(M.target!==$||!Of.includes(M.key))return;M.preventDefault();const X=P().filter(V=>!V.disabled).map(V=>V.ref.current);ic.includes(M.key)&&X.reverse(),bc(X)}),onBlur:E(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(Y.current),H.current="")}),onPointerMove:E(e.onPointerMove,yt(M=>{const Q=M.target,ae=z.current!==M.clientX;if(M.currentTarget.contains(Q)&&ae){const de=M.clientX>z.current?"right":"left";L.current=de,z.current=M.clientX}}))})})})})})})})},"MenuContentImpl")),Uf=c.forwardRef(K(function(e,n){const{__scopeMenu:o,...r}=e;return(0,g.jsx)(k.div,{role:"group",...r,ref:n})},"MenuGroup")),Eo="MenuItem",li="menu.itemSelect",lr=c.forwardRef(K(function(e,n){const{disabled:o=!1,onSelect:r,...i}=e,s=c.useRef(null),a=Zt(Eo,e.__scopeMenu),u=cr(Eo,e.__scopeMenu),d=N(n,s),p=c.useRef(!1),f=K(()=>{const l=s.current;if(!o&&l){const h=new CustomEvent(li,{bubbles:!0,cancelable:!0});l.addEventListener(li,v=>r?.(v),{once:!0}),Mo(l,h),h.defaultPrevented?p.current=!1:a.onClose()}},"handleSelect");return(0,g.jsx)(pc,{...i,ref:d,disabled:o,onClick:E(e.onClick,f),onPointerDown:l=>{e.onPointerDown?.(l),p.current=!0},onPointerUp:E(e.onPointerUp,l=>{p.current||l.currentTarget?.click()}),onKeyDown:E(e.onKeyDown,l=>{o||l.target!==l.currentTarget||u.searchRef.current!==""&&l.key===" "||Ro.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})},"MenuItem")),pc=c.forwardRef(K(function(e,n){const{__scopeMenu:o,disabled:r=!1,textValue:i,...s}=e,a=cr(Eo,o),u=sc(o),d=c.useRef(null),p=N(n,d),[f,l]=c.useState(!1),[h,v]=c.useState("");return c.useEffect(()=>{const m=d.current;m&&v((m.textContent??"").trim())},[s.children]),(0,g.jsx)(Lt.ItemSlot,{scope:o,disabled:r,textValue:i??h,children:(0,g.jsx)(rr,{asChild:!0,...u,focusable:!r,children:(0,g.jsx)(k.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:p,onPointerMove:E(e.onPointerMove,yt(m=>{r?a.onItemLeave(m):(a.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:E(e.onPointerLeave,yt(m=>a.onItemLeave(m))),onFocus:E(e.onFocus,()=>l(!0)),onBlur:E(e.onBlur,()=>l(!1))})})})},"MenuItemImpl")),Vf=c.forwardRef(K(function(e,n){const{checked:o=!1,onCheckedChange:r,...i}=e;return(0,g.jsx)(Wf,{scope:e.__scopeMenu,checked:o,children:(0,g.jsx)(lr,{role:"menuitemcheckbox","aria-checked":Ft(o)?"mixed":o,...i,ref:n,"data-state":dr(o),onSelect:E(i.onSelect,()=>r?.(Ft(o)?!0:!o),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),[Vh,Wh]=dt("MenuRadioGroup",{value:void 0,onValueChange:K(()=>{},"onValueChange")}),hc="MenuItemIndicator",[Wf,Gf]=dt(hc,{checked:!1}),zf=c.forwardRef(K(function(e,n){const{__scopeMenu:o,forceMount:r,...i}=e,s=Gf(hc,o);return(0,g.jsx)(ie,{present:r||Ft(s.checked)||s.checked===!0,children:(0,g.jsx)(k.span,{...i,ref:n,"data-state":dr(s.checked)})})},"MenuItemIndicator")),gc=c.forwardRef(K(function(e,n){const{__scopeMenu:o,...r}=e;return(0,g.jsx)(k.div,{role:"separator","aria-orientation":"horizontal",...r,ref:n})},"MenuSeparator")),vc="MenuSub",[Kf,mc]=dt(vc),Yf=K(t=>{const{__scopeMenu:e,children:n,open:o=!1,onOpenChange:r}=t,i=tt(vc,e),s=zn(e),[a,u]=c.useState(null),[d,p]=c.useState(null),f=J(r);return c.useEffect(()=>(i.open===!1&&f(!1),()=>f(!1)),[i.open,f]),(0,g.jsx)(Wt,{...s,children:(0,g.jsx)(cc,{scope:e,open:o,onOpenChange:f,content:d,onContentChange:p,children:(0,g.jsx)(Kf,{scope:e,contentId:le(),triggerId:le(),trigger:a,onTriggerChange:u,children:n})})})},"MenuSub"),un="MenuSubTrigger",Xf=c.forwardRef(K(function(e,n){const o=tt(un,e.__scopeMenu),r=Zt(un,e.__scopeMenu),i=mc(un,e.__scopeMenu),s=cr(un,e.__scopeMenu),a=c.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=s,p={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);c.useEffect(()=>f,[f]),c.useEffect(()=>{const h=u.current;return()=>{window.clearTimeout(h),d(null)}},[u,d]);const l=N(n,i.onTriggerChange);return(0,g.jsx)(sr,{asChild:!0,...p,children:(0,g.jsx)(pc,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?i.contentId:void 0,"data-state":ur(o.open),...e,ref:l,onClick:h=>{e.onClick?.(h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:E(e.onPointerMove,yt(h=>{s.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!o.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{o.onOpenChange(!0),f()},100))})),onPointerLeave:E(e.onPointerLeave,yt(h=>{f();const v=o.content?.getBoundingClientRect();if(v){const m=o.content?.dataset.side,b=m==="right",S=b?-5:5,y=v[b?"left":"right"],C=v[b?"right":"left"];s.onPointerGraceIntentChange({area:[{x:h.clientX+S,y:h.clientY},{x:y,y:v.top},{x:C,y:v.top},{x:C,y:v.bottom},{x:y,y:v.bottom}],side:m}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(h),h.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:E(e.onKeyDown,h=>{e.disabled||h.target!==h.currentTarget||s.searchRef.current!==""&&h.key===" "||Df[r.dir].includes(h.key)&&(o.onOpenChange(!0),o.content?.focus(),h.preventDefault())})})})},"MenuSubTrigger")),qf="MenuSubContent",Zf=c.forwardRef(K(function(e,n){const o=uc(Pe,e.__scopeMenu),{forceMount:r=o.forceMount,align:i="start",...s}=e,a=tt(Pe,e.__scopeMenu),u=Zt(Pe,e.__scopeMenu),d=mc(qf,e.__scopeMenu),p=c.useRef(null),f=N(n,p);return(0,g.jsx)(Lt.Provider,{scope:e.__scopeMenu,children:(0,g.jsx)(ie,{present:r||a.open,children:(0,g.jsx)(Lt.Slot,{scope:e.__scopeMenu,children:(0,g.jsx)(ar,{id:d.contentId,"aria-labelledby":d.triggerId,...s,ref:f,align:i,side:u.dir===Af.RTL?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:l=>{u.isUsingKeyboardRef.current&&p.current?.focus(),l.preventDefault()},onCloseAutoFocus:l=>l.preventDefault(),onFocusOutside:E(e.onFocusOutside,l=>{l.target!==d.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:E(e.onEscapeKeyDown,l=>{u.onClose(),l.preventDefault()}),onKeyDown:E(e.onKeyDown,l=>{const h=l.currentTarget.contains(l.target),v=Mf[u.dir].includes(l.key);h&&v&&(a.onOpenChange(!1),d.trigger?.focus(),l.preventDefault())})})})})})},"MenuSubContent"));function ur(t){return t?"open":"closed"}K(ur,"getOpenState");function Ft(t){return t==="indeterminate"}K(Ft,"isIndeterminate");function dr(t){return Ft(t)?"indeterminate":t?"checked":"unchecked"}K(dr,"getCheckedState");function bc(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}K(bc,"focusFirst");function Cc(t,e){return t.map((n,o)=>t[(e+o)%t.length])}K(Cc,"wrapArray");function wc(t,e,n){const o=e.length>1&&Array.from(e).every(a=>a===e[0])?e[0]:e,r=n?t.indexOf(n):-1;let i=Cc(t,Math.max(r,0));o.length===1&&(i=i.filter(a=>a!==n));const s=i.find(a=>a.toLowerCase().startsWith(o.toLowerCase()));return s!==n?s:void 0}K(wc,"getNextMatch");function Sc(t,e){const{x:n,y:o}=t;let r=!1;for(let i=0,s=e.length-1;i<e.length;s=i++){const a=e[i],u=e[s],d=a.x,p=a.y,f=u.x,l=u.y;p>o!=l>o&&n<(f-d)*(o-p)/(l-p)+d&&(r=!r)}return r}K(Sc,"isPointInPolygon");function yc(t,e){return e?Sc({x:t.clientX,y:t.clientY},e):!1}K(yc,"isPointerInGraceArea");function yt(t){return e=>e.pointerType==="mouse"?t(e):void 0}K(yt,"whenMouse");var Qf=Object.defineProperty,Se=(t,e)=>Qf(t,"name",{value:e,configurable:!0}),fr="DropdownMenu",[Jf,Gh]=re(fr,[Gn]),ye=Gn(),[ep,xc]=Jf(fr),zh=Se(t=>{const{__scopeDropdownMenu:e,children:n,dir:o,open:r,defaultOpen:i,onOpenChange:s,modal:a=!0}=t,u=ye(e),d=c.useRef(null),[p,f]=ue({prop:r,defaultProp:i??!1,onChange:s,caller:fr});return(0,g.jsx)(ep,{scope:e,triggerId:le(),triggerRef:d,contentId:le(),open:p,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(l=>!l),[f]),modal:a,children:(0,g.jsx)(ac,{...u,open:p,onOpenChange:f,dir:o,modal:a,children:n})})},"DropdownMenu"),tp="DropdownMenuTrigger",Kh=c.forwardRef(Se(function(e,n){const{__scopeDropdownMenu:o,disabled:r=!1,...i}=e,s=xc(tp,o),a=ye(o),u=N(n,s.triggerRef);return(0,g.jsx)(sr,{asChild:!0,...a,children:(0,g.jsx)(k.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:u,onPointerDown:E(e.onPointerDown,d=>{!r&&d.button===0&&d.ctrlKey===!1&&(s.onOpenToggle(),s.open||d.preventDefault())}),onKeyDown:E(e.onKeyDown,d=>{r||(["Enter"," "].includes(d.key)&&s.onOpenToggle(),d.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})},"DropdownMenuTrigger")),Yh=Se(t=>{const{__scopeDropdownMenu:e,...n}=t,o=ye(e);return(0,g.jsx)(dc,{...o,...n})},"DropdownMenuPortal"),np="DropdownMenuContent",Xh=c.forwardRef(Se(function(e,n){const{__scopeDropdownMenu:o,...r}=e,i=xc(np,o),s=ye(o),a=c.useRef(!1);return(0,g.jsx)(fc,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...r,ref:n,onCloseAutoFocus:E(e.onCloseAutoFocus,u=>{a.current||i.triggerRef.current?.focus(),a.current=!1,u.preventDefault()}),onInteractOutside:E(e.onInteractOutside,u=>{const d=u.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0,f=d.button===2||p;(!i.modal||f)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),qh=c.forwardRef(Se(function(e,n){const{__scopeDropdownMenu:o,...r}=e,i=ye(o);return(0,g.jsx)(Uf,{...i,...r,ref:n})},"DropdownMenuGroup")),Zh=c.forwardRef(Se(function(e,n){const{__scopeDropdownMenu:o,...r}=e,i=ye(o);return(0,g.jsx)(lr,{...i,...r,ref:n})},"DropdownMenuItem")),Qh=c.forwardRef(Se(function(e,n){const{__scopeDropdownMenu:o,...r}=e,i=ye(o);return(0,g.jsx)(Vf,{...i,...r,ref:n})},"DropdownMenuCheckboxItem")),Jh=c.forwardRef(Se(function(e,n){const{__scopeDropdownMenu:o,...r}=e,i=ye(o);return(0,g.jsx)(zf,{...i,...r,ref:n})},"DropdownMenuItemIndicator")),eg=c.forwardRef(Se(function(e,n){const{__scopeDropdownMenu:o,...r}=e,i=ye(o);return(0,g.jsx)(gc,{...i,...r,ref:n})},"DropdownMenuSeparator")),tg=Se(t=>{const{__scopeDropdownMenu:e,children:n,open:o,onOpenChange:r,defaultOpen:i}=t,s=ye(e),[a,u]=ue({prop:o,defaultProp:i??!1,onChange:r,caller:"DropdownMenuSub"});return(0,g.jsx)(Yf,{...s,open:a,onOpenChange:u,children:n})},"DropdownMenuSub"),ng=c.forwardRef(Se(function(e,n){const{__scopeDropdownMenu:o,...r}=e,i=ye(o);return(0,g.jsx)(Xf,{...i,...r,ref:n})},"DropdownMenuSubTrigger")),og=c.forwardRef(Se(function(e,n){const{__scopeDropdownMenu:o,...r}=e,i=ye(o);return(0,g.jsx)(Zf,{...i,...r,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent")),op=Object.defineProperty,U=(t,e)=>op(t,"name",{value:e,configurable:!0});function Pc(t,e){return c.useReducer((n,o)=>e[n][o]??n,t)}U(Pc,"useStateMachine");var mt={Auto:"auto",Always:"always",Scroll:"scroll",Hover:"hover"},Ct={Vertical:"vertical",Horizontal:"horizontal"},Me={LTR:"ltr",RTL:"rtl"},Rc="ScrollArea",[Ec,rg]=re(Rc),[rp,be]=Ec(Rc),ig=c.forwardRef(U(function(e,n){const{__scopeScrollArea:o,type:r=mt.Hover,dir:i,scrollHideDelay:s=600,...a}=e,[u,d]=c.useState(null),[p,f]=c.useState(null),[l,h]=c.useState(null),[v,m]=c.useState(null),[b,S]=c.useState(null),[y,C]=c.useState(0),[w,P]=c.useState(0),[x,R]=c.useState(!1),[T,A]=c.useState(!1),_=N(n,d),D=st(i);return(0,g.jsx)(rp,{scope:o,type:r,dir:D,scrollHideDelay:s,scrollArea:u,viewport:p,onViewportChange:f,content:l,onContentChange:h,scrollbarX:v,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:R,scrollbarY:b,onScrollbarYChange:S,scrollbarYEnabled:T,onScrollbarYEnabledChange:A,onCornerWidthChange:C,onCornerHeightChange:P,children:(0,g.jsx)(k.div,{dir:D,...a,ref:_,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})},"ScrollArea")),_c="ScrollAreaViewport",ui=Oo(_c),sg=c.forwardRef(U(function(e,n){const{__scopeScrollArea:o,children:r,nonce:i,disableImplicitContentElement:s,...a}=e,u=be(_c,o),d=c.useRef(null),p=N(n,d,u.onViewportChange),f=c.isValidElement(r);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(ip,{nonce:i}),(0,g.jsx)(k.div,{"data-radix-scroll-area-viewport":"",...a,ref:p,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:s?r:f?(0,g.jsx)(ui,{child:r,children:l=>(0,g.jsx)(di,{__scopeScrollArea:o,children:l})}):(0,g.jsx)(ui,{children:(0,g.jsx)(di,{__scopeScrollArea:o,children:r})})})]})},"ScrollAreaViewport")),ip=c.memo(U(function({nonce:e}){return(0,g.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e})},"ScrollAreaViewportStyle"),(t,e)=>t.nonce===e.nonce),sp="ScrollAreaContent",di=c.forwardRef(U(function(e,n){const{__scopeScrollArea:o,children:r,...i}=e,s=be(sp,o),a=N(n,s.onContentChange);return(0,g.jsx)(k.div,{...i,ref:a,style:{minWidth:"100%",display:"table",...e.style},children:r})},"ScrollAreaContent")),Ke="ScrollAreaScrollbar",cg=c.forwardRef(U(function(e,n){const{forceMount:o,...r}=e,i=be(Ke,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:a}=i,u=e.orientation===Ct.Horizontal;return c.useEffect(()=>(u?s(!0):a(!0),()=>{u?s(!1):a(!1)}),[u,s,a]),i.type===mt.Hover?(0,g.jsx)(cp,{...r,ref:n,forceMount:o}):i.type===mt.Scroll?(0,g.jsx)(ap,{...r,ref:n,forceMount:o}):i.type===mt.Auto?(0,g.jsx)(Tc,{...r,ref:n,forceMount:o}):i.type===mt.Always?(0,g.jsx)(pr,{...r,ref:n,"data-state":"visible"}):null},"ScrollAreaScrollbar")),cp=c.forwardRef(U(function(e,n){const{forceMount:o,...r}=e,i=be(Ke,e.__scopeScrollArea),[s,a]=c.useState(!1);return c.useEffect(()=>{const u=i.scrollArea;let d=0;if(u){const p=U(()=>{window.clearTimeout(d),a(!0)},"handlePointerEnter"),f=U(()=>{d=window.setTimeout(()=>a(!1),i.scrollHideDelay)},"handlePointerLeave");return u.addEventListener("pointerenter",p),u.addEventListener("pointerleave",f),()=>{window.clearTimeout(d),u.removeEventListener("pointerenter",p),u.removeEventListener("pointerleave",f)}}},[i.scrollArea,i.scrollHideDelay]),(0,g.jsx)(ie,{present:o||s,children:(0,g.jsx)(Tc,{"data-state":s?"visible":"hidden",...r,ref:n})})},"ScrollAreaScrollbarHover")),ap=c.forwardRef(U(function(e,n){const{forceMount:o,...r}=e,i=be(Ke,e.__scopeScrollArea),s=e.orientation===Ct.Horizontal,a=Jt(()=>d("SCROLL_END"),100),[u,d]=Pc("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return c.useEffect(()=>{if(u==="idle"){const p=window.setTimeout(()=>d("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(p)}},[u,i.scrollHideDelay,d]),c.useEffect(()=>{const p=i.viewport,f=s?"scrollLeft":"scrollTop";if(p){let l=p[f];const h=U(()=>{const v=p[f];l!==v&&(d("SCROLL"),a()),l=v},"handleScroll");return p.addEventListener("scroll",h),()=>p.removeEventListener("scroll",h)}},[i.viewport,s,d,a]),(0,g.jsx)(ie,{present:o||u!=="hidden",children:(0,g.jsx)(pr,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:n,onPointerEnter:E(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:E(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),Tc=c.forwardRef(U(function(e,n){const o=be(Ke,e.__scopeScrollArea),{forceMount:r,...i}=e,[s,a]=c.useState(!1),u=e.orientation===Ct.Horizontal,d=Jt(()=>{if(o.viewport){const p=o.viewport.offsetWidth<o.viewport.scrollWidth,f=o.viewport.offsetHeight<o.viewport.scrollHeight;a(u?p:f)}},10);return it(o.viewport,d),it(o.content,d),(0,g.jsx)(ie,{present:r||s,children:(0,g.jsx)(pr,{"data-state":s?"visible":"hidden",...i,ref:n})})},"ScrollAreaScrollbarAuto")),pr=c.forwardRef(U(function(e,n){const{orientation:o=Ct.Vertical,...r}=e,i=be(Ke,e.__scopeScrollArea),s=c.useRef(null),a=c.useRef(0),[u,d]=c.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=hr(u.viewport,u.content),f={...r,sizes:u,onSizesChange:d,hasThumb:p>0&&p<1,onThumbChange:U(h=>s.current=h,"onThumbChange"),onThumbPointerUp:U(()=>a.current=0,"onThumbPointerUp"),onThumbPointerDown:U(h=>a.current=h,"onThumbPointerDown")};function l(h,v){return Dc(h,a.current,u,v)}return U(l,"getScrollPosition"),o===Ct.Horizontal?(0,g.jsx)(lp,{...f,ref:n,onThumbPositionChange:()=>{if(i.viewport&&s.current){const h=i.viewport.scrollLeft,v=To(h,u,i.dir);s.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollLeft=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollLeft=l(h,i.dir))}}):o===Ct.Vertical?(0,g.jsx)(up,{...f,ref:n,onThumbPositionChange:()=>{if(i.viewport&&s.current){const h=i.viewport.scrollTop,v=To(h,u);s.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollTop=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollTop=l(h))}}):null},"ScrollAreaScrollbarVisible")),lp=c.forwardRef(U(function(e,n){const{sizes:o,onSizesChange:r,...i}=e,s=be(Ke,e.__scopeScrollArea),[a,u]=c.useState(),d=c.useRef(null),p=N(n,d,s.onScrollbarXChange);return c.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),(0,g.jsx)(Ic,{"data-orientation":"horizontal",...i,ref:p,sizes:o,style:{bottom:0,left:s.dir===Me.RTL?"var(--radix-scroll-area-corner-width)":0,right:s.dir===Me.LTR?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Qt(o)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,l)=>{if(s.viewport){const h=s.viewport.scrollLeft+f.deltaX;e.onWheelScroll(h),vr(h,l)&&f.preventDefault()}},onResize:()=>{d.current&&s.viewport&&a&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:$t(a.paddingLeft),paddingEnd:$t(a.paddingRight)}})}})},"ScrollAreaScrollbarX")),up=c.forwardRef(U(function(e,n){const{sizes:o,onSizesChange:r,...i}=e,s=be(Ke,e.__scopeScrollArea),[a,u]=c.useState(),d=c.useRef(null),p=N(n,d,s.onScrollbarYChange);return c.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),(0,g.jsx)(Ic,{"data-orientation":"vertical",...i,ref:p,sizes:o,style:{top:0,right:s.dir===Me.LTR?0:void 0,left:s.dir===Me.RTL?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Qt(o)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,l)=>{if(s.viewport){const h=s.viewport.scrollTop+f.deltaY;e.onWheelScroll(h),vr(h,l)&&f.preventDefault()}},onResize:()=>{d.current&&s.viewport&&a&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:$t(a.paddingTop),paddingEnd:$t(a.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[dp,Ac]=Ec(Ke),Ic=c.forwardRef(U(function(e,n){const{__scopeScrollArea:o,sizes:r,hasThumb:i,onThumbChange:s,onThumbPointerUp:a,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:p,onWheelScroll:f,onResize:l,...h}=e,v=be(Ke,o),[m,b]=c.useState(null),S=N(n,b),y=c.useRef(null),C=c.useRef(""),w=v.viewport,P=r.content-r.viewport,x=J(f),R=J(d),T=Jt(l,10);function A(_){if(y.current){const D=_.clientX-y.current.left,I=_.clientY-y.current.top;p({x:D,y:I})}}return U(A,"handleDragScroll"),c.useEffect(()=>{const _=U(D=>{const I=D.target;m?.contains(I)&&x(D,P)},"handleWheel");return document.addEventListener("wheel",_,{passive:!1}),()=>document.removeEventListener("wheel",_,{passive:!1})},[w,m,P,x]),c.useEffect(R,[r,R]),it(m,T),it(v.content,T),(0,g.jsx)(dp,{scope:o,scrollbar:m,hasThumb:i,onThumbChange:J(s),onThumbPointerUp:J(a),onThumbPositionChange:R,onThumbPointerDown:J(u),children:(0,g.jsx)(k.div,{...h,ref:S,style:{position:"absolute",...h.style},onPointerDown:E(e.onPointerDown,_=>{_.button===0&&(_.target.setPointerCapture(_.pointerId),y.current=m.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),A(_))}),onPointerMove:E(e.onPointerMove,A),onPointerUp:E(e.onPointerUp,_=>{const D=_.target;D.hasPointerCapture(_.pointerId)&&D.releasePointerCapture(_.pointerId),document.body.style.webkitUserSelect=C.current,v.viewport&&(v.viewport.style.scrollBehavior=""),y.current=null})})})},"ScrollAreaScrollbarImpl")),_o="ScrollAreaThumb",ag=c.forwardRef(U(function(e,n){const{forceMount:o,...r}=e,i=Ac(_o,e.__scopeScrollArea);return(0,g.jsx)(ie,{present:o||i.hasThumb,children:(0,g.jsx)(fp,{ref:n,...r})})},"ScrollAreaThumb")),fp=c.forwardRef(U(function(e,n){const{__scopeScrollArea:o,style:r,...i}=e,s=be(_o,o),a=Ac(_o,o),{onThumbPositionChange:u}=a,d=N(n,a.onThumbChange),p=c.useRef(void 0),f=Jt(()=>{p.current&&(p.current(),p.current=void 0)},100);return c.useEffect(()=>{const l=s.viewport;if(l){const h=U(()=>{if(f(),!p.current){const v=hp(l,u);p.current=v,u()}},"handleScroll");return u(),l.addEventListener("scroll",h),()=>l.removeEventListener("scroll",h)}},[s.viewport,f,u]),(0,g.jsx)(k.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:E(e.onPointerDownCapture,l=>{const h=l.target.getBoundingClientRect(),v=l.clientX-h.left,m=l.clientY-h.top;a.onThumbPointerDown({x:v,y:m})}),onPointerUp:E(e.onPointerUp,a.onThumbPointerUp)})},"ScrollAreaThumbImpl")),Oc="ScrollAreaCorner",lg=c.forwardRef(U(function(e,n){const o=be(Oc,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!==mt.Scroll&&r?(0,g.jsx)(pp,{...e,ref:n}):null},"ScrollAreaCorner")),pp=c.forwardRef(U(function(e,n){const{__scopeScrollArea:o,...r}=e,i=be(Oc,o),[s,a]=c.useState(0),[u,d]=c.useState(0),p=!!(s&&u),{onCornerWidthChange:f,onCornerHeightChange:l}=i;return it(i.scrollbarX,()=>{const h=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(h),d(h)}),it(i.scrollbarY,()=>{const h=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(h),a(h)}),c.useEffect(()=>()=>{f(0),l(0)},[f,l]),p?(0,g.jsx)(k.div,{...r,ref:n,style:{width:s,height:u,position:"absolute",right:i.dir===Me.LTR?0:void 0,left:i.dir===Me.RTL?0:void 0,bottom:0,...e.style}}):null},"ScrollAreaCornerImpl"));function $t(t){return t?parseInt(t,10):0}U($t,"toInt");function hr(t,e){const n=t/e;return isNaN(n)?0:n}U(hr,"getThumbRatio");function Qt(t){const e=hr(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=(t.scrollbar.size-n)*e;return Math.max(o,18)}U(Qt,"getThumbSize");function Dc(t,e,n,o=Me.LTR){const r=Qt(n),i=r/2,s=e||i,a=r-s,u=n.scrollbar.paddingStart+s,d=n.scrollbar.size-n.scrollbar.paddingEnd-a,p=n.content-n.viewport,f=o===Me.LTR?[0,p]:[p*-1,0];return gr([u,d],f)(t)}U(Dc,"getScrollPositionFromPointer");function To(t,e,n=Me.LTR){const o=Qt(e),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=e.scrollbar.size-r,s=e.content-e.viewport,a=i-o,u=n===Me.LTR?[0,s]:[s*-1,0],d=yn(t,u);return gr([0,s],[0,a])(d)}U(To,"getThumbOffsetFromScroll");function gr(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const o=(e[1]-e[0])/(t[1]-t[0]);return e[0]+o*(n-t[0])}}U(gr,"linearScale");function vr(t,e){return t>0&&t<e}U(vr,"isScrollingWithinScrollbarBounds");var hp=U((t,e=()=>{})=>{let n={left:t.scrollLeft,top:t.scrollTop},o=0;function r(){const i={left:t.scrollLeft,top:t.scrollTop},s=n.left!==i.left,a=n.top!==i.top;(s||a)&&e(),n=i,o=window.requestAnimationFrame(r)}return U(r,"loop"),r(),()=>window.cancelAnimationFrame(o)},"addUnlinkedScrollListener");function Jt(t,e){const n=J(t),o=c.useRef(0);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),c.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(n,e)},[n,e])}U(Jt,"useDebounceCallback");function it(t,e){const n=J(e);Z(()=>{let o=0;if(t){const r=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(n)});return r.observe(t),()=>{window.cancelAnimationFrame(o),r.unobserve(t)}}},[t,n])}U(it,"useResizeObserver");var gp=Object.defineProperty,Ze=(t,e)=>gp(t,"name",{value:e,configurable:!0}),mr="Switch",[vp,ug]=re(mr),[mp,br]=vp(mr);function Mc(t){const{__scopeSwitch:e,checked:n,children:o,defaultChecked:r,disabled:i,form:s,name:a,onCheckedChange:u,required:d,value:p="on",internal_do_not_use_render:f}=t,[l,h]=ue({prop:n,defaultProp:r??!1,onChange:u,caller:mr}),[v,m]=c.useState(null),[b,S]=c.useState(null),[y,C]=c.useState(null),w={checked:l,setChecked:h,disabled:i,control:v,setControl:m,name:a,form:s,value:p,userClick:y,onUserClick:C,required:d,defaultChecked:r,isFormControl:v?!!s||!!v.closest("form"):!0,bubbleInput:b,setBubbleInput:S};return(0,g.jsx)(mp,{scope:e,...w,children:kc(f)?f(w):o})}Ze(Mc,"SwitchProvider");var bp="SwitchTrigger",Cp=c.forwardRef(Ze(function({__scopeSwitch:e,onClick:n,...o},r){const{control:i,form:s,value:a,disabled:u,checked:d,required:p,setControl:f,setChecked:l,onUserClick:h,isFormControl:v,bubbleInput:m}=br(bp,e),b=N(r,f),S=c.useRef(d);return c.useEffect(()=>{const y=s?i?.ownerDocument.getElementById(s):i?.form;if(y instanceof HTMLFormElement){const C=Ze(()=>l(S.current),"reset");return y.addEventListener("reset",C),()=>y.removeEventListener("reset",C)}},[i,s,l]),(0,g.jsx)(k.button,{type:"button",role:"switch","aria-checked":d,"aria-required":p,"data-state":Cr(d),"data-disabled":u?"":void 0,disabled:u,value:a,...o,ref:b,onClick:E(n,y=>{const C=y.isPropagationStopped();h({requestedChecked:!d,hasConsumerStoppedPropagation:C}),l(w=>!w),m&&v&&(C||y.stopPropagation())})})},"SwitchTrigger")),dg=c.forwardRef(Ze(function(e,n){const{__scopeSwitch:o,name:r,checked:i,defaultChecked:s,required:a,disabled:u,value:d,onCheckedChange:p,form:f,...l}=e;return(0,g.jsx)(Mc,{__scopeSwitch:o,checked:i,defaultChecked:s,disabled:u,required:a,onCheckedChange:p,name:r,form:f,value:d,internal_do_not_use_render:({isFormControl:h})=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(Cp,{...l,ref:n,__scopeSwitch:o}),h&&(0,g.jsx)(yp,{__scopeSwitch:o})]})})},"Switch")),wp="SwitchThumb",fg=c.forwardRef(Ze(function(e,n){const{__scopeSwitch:o,...r}=e,i=br(wp,o);return(0,g.jsx)(k.span,{"data-state":Cr(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:n})},"SwitchThumb")),Sp="SwitchBubbleInput",yp=c.forwardRef(Ze(function({__scopeSwitch:e,onClick:n,...o},r){const{control:i,userClick:s,checked:a,defaultChecked:u,required:d,disabled:p,name:f,value:l,form:h,bubbleInput:v,setBubbleInput:m}=br(Sp,e),b=N(r,m),S=Dn(i),y=c.useRef(!1),C=c.useRef(a),w=c.useRef(s),P=c.useRef(null);c.useEffect(()=>{const R=v;if(!R)return;const T=window.HTMLInputElement.prototype,A=Object.getOwnPropertyDescriptor(T,"checked").set;if(!A)return;const _=C.current!==a;C.current=a;const D=s!==null&&s!==w.current;if(w.current=s,D)P.current=_?null:s,_&&A.call(R,a),R.dispatchEvent(new Event("click",{bubbles:!s.hasConsumerStoppedPropagation}));else if(_){const I=P.current;P.current=null;const j=I?.requestedChecked===a;y.current=!0,A.call(R,a),R.dispatchEvent(new Event("click",{bubbles:!(j&&I.hasConsumerStoppedPropagation)})),y.current=!1}},[v,a,s]);const x=c.useRef(a);return(0,g.jsx)(k.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??x.current,required:d,disabled:p,name:f,value:l,form:h,...o,tabIndex:-1,ref:b,onClick:E(n,R=>{y.current&&R.stopPropagation()}),style:{...o.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function kc(t){return typeof t=="function"}Ze(kc,"isFunction");function Cr(t){return t?"checked":"unchecked"}Ze(Cr,"getState");var xp=Object.defineProperty,Tt=(t,e)=>xp(t,"name",{value:e,configurable:!0}),jc={Automatic:"automatic",Manual:"manual"},wr="Tabs",[Pp,pg]=re(wr,[_t]),Nc=_t(),[Rp,Sr]=Pp(wr),hg=c.forwardRef(Tt(function(e,n){const{__scopeTabs:o,value:r,onValueChange:i,defaultValue:s,orientation:a="horizontal",dir:u,activationMode:d=jc.Automatic,...p}=e,f=st(u),[l,h]=ue({prop:r,onChange:i,defaultProp:s??"",caller:wr});return(0,g.jsx)(Rp,{scope:o,baseId:le(),value:l,onValueChange:h,orientation:a,dir:f,activationMode:d,children:(0,g.jsx)(k.div,{dir:f,"data-orientation":a,...p,ref:n})})},"Tabs")),Ep="TabsList",gg=c.forwardRef(Tt(function(e,n){const{__scopeTabs:o,loop:r=!0,...i}=e,s=Sr(Ep,o),a=Nc(o);return(0,g.jsx)(or,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:r,children:(0,g.jsx)(k.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:n})})},"TabsList")),_p="TabsTrigger",vg=c.forwardRef(Tt(function(e,n){const{__scopeTabs:o,value:r,disabled:i=!1,...s}=e,a=Sr(_p,o),u=Nc(o),d=yr(a.baseId,r),p=xr(a.baseId,r),f=r===a.value;return(0,g.jsx)(rr,{asChild:!0,...u,focusable:!i,active:f,children:(0,g.jsx)(k.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":p,"data-state":f?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:d,...s,ref:n,onMouseDown:E(e.onMouseDown,l=>{!i&&l.button===0&&l.ctrlKey===!1?(l.currentTarget.focus(),a.onValueChange(r)):l.preventDefault()}),onKeyDown:E(e.onKeyDown,l=>{i||l.target!==l.currentTarget||[" ","Enter"].includes(l.key)&&a.onValueChange(r)}),onFocus:E(e.onFocus,()=>{const l=a.activationMode!==jc.Manual;!f&&!i&&l&&a.onValueChange(r)})})})},"TabsTrigger")),Tp="TabsContent",mg=c.forwardRef(Tt(function(e,n){const{__scopeTabs:o,value:r,forceMount:i,children:s,...a}=e,u=Sr(Tp,o),d=yr(u.baseId,r),p=xr(u.baseId,r),f=r===u.value,l=c.useRef(f);return c.useEffect(()=>{const h=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(h)},[]),(0,g.jsx)(ie,{present:i||f,children:({present:h})=>(0,g.jsx)(k.div,{"data-state":f?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":d,hidden:!h,id:p,tabIndex:0,...a,ref:n,style:{...e.style,animationDuration:l.current?"0s":void 0},children:h&&s})})},"TabsContent"));function yr(t,e){return`${t}-trigger-${e}`}Tt(yr,"makeTriggerId");function xr(t,e){return`${t}-content-${e}`}Tt(xr,"makeContentId");var Ap=Object.defineProperty,Lc=(t,e)=>Ap(t,"name",{value:e,configurable:!0}),Pr={Horizontal:"horizontal",Vertical:"vertical"},fi=Pr.Horizontal,Ip=Object.values(Pr),bg=c.forwardRef(Lc(function(e,n){const{decorative:o,orientation:r=fi,...i}=e,s=Fc(r)?r:fi,a=s===Pr.Vertical?s:void 0,u=o?{role:"none"}:{"aria-orientation":a,role:"separator"};return(0,g.jsx)(k.div,{"data-orientation":s,...u,...i,ref:n})},"Separator"));function Fc(t){return Ip.includes(t)}Lc(Fc,"isValidOrientation");var Op=Object.defineProperty,$e=(t,e)=>Op(t,"name",{value:e,configurable:!0}),Rr="ContextMenu",[Dp,Cg]=re(Rr,[Gn]),At=Gn(),[Mp,$c]=Dp(Rr),wg=$e(t=>{const{__scopeContextMenu:e,children:n,onOpenChange:o,open:r,dir:i,modal:s=!0}=t,a=c.useRef(!1),[u,d]=ue({prop:r,defaultProp:!1,onChange:o,caller:Rr}),p=At(e);return(0,g.jsx)(Mp,{scope:e,open:u,onOpenChange:d,modal:s,hasInteractedRef:a,children:(0,g.jsx)(ac,{...p,dir:i,open:u,onOpenChange:d,modal:s,children:n})})},"ContextMenu"),kp="ContextMenuTrigger",Sg=c.forwardRef($e(function(e,n){const{__scopeContextMenu:o,disabled:r=!1,...i}=e,s=$c(kp,o),a=At(o),[u,d]=c.useState({x:0,y:0}),p=c.useMemo(()=>({current:{getBoundingClientRect:$e(()=>DOMRect.fromRect({width:0,height:0,...u}),"getBoundingClientRect")}}),[u]),f=c.useRef(0),l=c.useCallback(()=>window.clearTimeout(f.current),[]),h=$e(v=>{s.hasInteractedRef.current=!0,d({x:v.clientX,y:v.clientY}),s.onOpenChange(!0)},"handleOpen");return c.useEffect(()=>l,[l]),c.useEffect(()=>{r&&l()},[r,l]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(sr,{...a,virtualRef:p}),(0,g.jsx)(k.span,{"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,...i,ref:n,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:E(e.onContextMenu,v=>{l(),h(v),v.preventDefault()}),onPointerDown:r?e.onPointerDown:E(e.onPointerDown,Ot(v=>{l(),s.open&&s.onOpenChange(!1),f.current=window.setTimeout(()=>h(v),700)})),onPointerMove:r?e.onPointerMove:E(e.onPointerMove,Ot(l)),onPointerCancel:r?e.onPointerCancel:E(e.onPointerCancel,Ot(l)),onPointerUp:r?e.onPointerUp:E(e.onPointerUp,Ot(l))})]})},"ContextMenuTrigger")),yg=$e(t=>{const{__scopeContextMenu:e,...n}=t,o=At(e);return(0,g.jsx)(dc,{...o,...n})},"ContextMenuPortal"),jp="ContextMenuContent",xg=c.forwardRef($e(function(e,n){const{__scopeContextMenu:o,...r}=e,i=$c(jp,o),s=At(o),a=c.useRef(!1);return(0,g.jsx)(fc,{...s,side:"right",sideOffset:2,align:"start",...r,ref:n,onCloseAutoFocus:u=>{e.onCloseAutoFocus?.(u),!u.defaultPrevented&&a.current&&u.preventDefault(),a.current=!1},onInteractOutside:u=>{e.onInteractOutside?.(u),!u.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"ContextMenuContent")),Pg=c.forwardRef($e(function(e,n){const{__scopeContextMenu:o,...r}=e,i=At(o);return(0,g.jsx)(lr,{...i,...r,ref:n})},"ContextMenuItem")),Rg=c.forwardRef($e(function(e,n){const{__scopeContextMenu:o,...r}=e,i=At(o);return(0,g.jsx)(gc,{...i,...r,ref:n})},"ContextMenuSeparator"));function Ot(t){return e=>e.pointerType!=="mouse"?t(e):void 0}$e(Ot,"whenTouchOrPen");var Np=Object.defineProperty,Lp=(t,e)=>Np(t,"name",{value:e,configurable:!0}),Fp="Toggle",$p=c.forwardRef(Lp(function(e,n){const{pressed:o,defaultPressed:r,onPressedChange:i,...s}=e,[a,u]=ue({prop:o,onChange:i,defaultProp:r??!1,caller:Fp});return(0,g.jsx)(k.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:n,onClick:E(e.onClick,()=>{e.disabled||u(!a)})})},"Toggle")),Bp=Object.defineProperty,Qe=(t,e)=>Bp(t,"name",{value:e,configurable:!0}),It="ToggleGroup",Bt={Single:"single",Multiple:"multiple"},[Bc,Eg]=re(It,[_t]),Hc=_t(),_g=c.forwardRef(Qe(function(e,n){const{type:o,...r}=e;if(o===Bt.Single)return(0,g.jsx)(Hp,{role:"radiogroup",...r,ref:n});if(o===Bt.Multiple)return(0,g.jsx)(Up,{role:"toolbar",...r,ref:n});throw new Error(`Missing prop \`type\` expected on \`${It}\``)},"ToggleGroup")),[Uc,Vc]=Bc(It),Hp=c.forwardRef(Qe(function(e,n){const{value:o,defaultValue:r,onValueChange:i=Qe(()=>{},"onValueChange"),...s}=e,[a,u]=ue({prop:o,defaultProp:r??"",onChange:i,caller:It});return(0,g.jsx)(Uc,{scope:e.__scopeToggleGroup,type:Bt.Single,value:c.useMemo(()=>a?[a]:[],[a]),onItemActivate:u,onItemDeactivate:c.useCallback(()=>u(""),[u]),children:(0,g.jsx)(Wc,{...s,ref:n})})},"ToggleGroupImplSingle")),Up=c.forwardRef(Qe(function(e,n){const{value:o,defaultValue:r,onValueChange:i=Qe(()=>{},"onValueChange"),...s}=e,[a,u]=ue({prop:o,defaultProp:r??[],onChange:i,caller:It}),d=c.useCallback(f=>u((l=[])=>[...l,f]),[u]),p=c.useCallback(f=>u((l=[])=>l.filter(h=>h!==f)),[u]);return(0,g.jsx)(Uc,{scope:e.__scopeToggleGroup,type:Bt.Multiple,value:a,onItemActivate:d,onItemDeactivate:p,children:(0,g.jsx)(Wc,{...s,ref:n})})},"ToggleGroupImplMultiple")),[Vp,Wp]=Bc(It),Wc=c.forwardRef(Qe(function(e,n){const{__scopeToggleGroup:o,disabled:r=!1,rovingFocus:i=!0,orientation:s,dir:a,loop:u=!0,...d}=e,p=Hc(o),f=st(a),l={dir:f,...d};return(0,g.jsx)(Vp,{scope:o,rovingFocus:i,disabled:r,children:i?(0,g.jsx)(or,{asChild:!0,...p,orientation:s,dir:f,loop:u,children:(0,g.jsx)(k.div,{...l,ref:n})}):(0,g.jsx)(k.div,{...l,ref:n})})},"ToggleGroupImpl")),Ao="ToggleGroupItem",Tg=c.forwardRef(Qe(function(e,n){const o=Vc(Ao,e.__scopeToggleGroup),r=Wp(Ao,e.__scopeToggleGroup),i=Hc(e.__scopeToggleGroup),s=o.value.includes(e.value),a=r.disabled||e.disabled,u={...e,pressed:s,disabled:a},d=c.useRef(null);return r.rovingFocus?(0,g.jsx)(rr,{asChild:!0,...i,focusable:!a,active:s,ref:d,children:(0,g.jsx)(pi,{...u,ref:n})}):(0,g.jsx)(pi,{...u,ref:n})},"ToggleGroupItem")),pi=c.forwardRef(Qe(function(e,n){const{__scopeToggleGroup:o,value:r,...i}=e,s=Vc(Ao,o),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},u=s.type===Bt.Single?a:void 0;return(0,g.jsx)($p,{...u,...i,ref:n,onPressedChange:d=>{d?s.onItemActivate(r):s.onItemDeactivate(r)}})},"ToggleGroupItemImpl")),Gp=Object.defineProperty,en=(t,e)=>Gp(t,"name",{value:e,configurable:!0}),Er="Collapsible",[zp,Ag]=re(Er),[Kp,_r]=zp(Er),Ig=c.forwardRef(en(function(e,n){const{__scopeCollapsible:o,open:r,defaultOpen:i,disabled:s,onOpenChange:a,...u}=e,[d,p]=ue({prop:r,defaultProp:i??!1,onChange:a,caller:Er});return(0,g.jsx)(Kp,{scope:o,disabled:s,contentId:le(),open:d,onOpenToggle:c.useCallback(()=>p(f=>!f),[p]),children:(0,g.jsx)(k.div,{"data-state":Kn(d),"data-disabled":s?"":void 0,...u,ref:n})})},"Collapsible")),Yp="CollapsibleTrigger",Og=c.forwardRef(en(function(e,n){const{__scopeCollapsible:o,...r}=e,i=_r(Yp,o);return(0,g.jsx)(k.button,{type:"button","aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":Kn(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:n,onClick:E(e.onClick,i.onOpenToggle)})},"CollapsibleTrigger")),Gc="CollapsibleContent",Dg=c.forwardRef(en(function(e,n){const{forceMount:o,...r}=e,i=_r(Gc,e.__scopeCollapsible);return(0,g.jsx)(ie,{present:o||i.open,children:({present:s})=>(0,g.jsx)(Xp,{...r,ref:n,present:s})})},"CollapsibleContent")),Xp=c.forwardRef(en(function(e,n){const{__scopeCollapsible:o,present:r,children:i,...s}=e,a=_r(Gc,o),[u,d]=c.useState(r),p=c.useRef(null),f=N(n,p),l=c.useRef(0),h=l.current,v=c.useRef(0),m=v.current,b=a.open||u,S=c.useRef(b),y=c.useRef(void 0);return c.useEffect(()=>{const C=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(C)},[]),Z(()=>{const C=p.current;if(C){y.current=y.current||{transitionDuration:C.style.transitionDuration,animationName:C.style.animationName},C.style.transitionDuration="0s",C.style.animationName="none";const w=C.getBoundingClientRect();l.current=w.height,v.current=w.width,S.current||(C.style.transitionDuration=y.current.transitionDuration,C.style.animationName=y.current.animationName),d(r)}},[a.open,r]),(0,g.jsx)(k.div,{"data-state":Kn(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!b,...s,ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:b&&i})},"CollapsibleContentImpl"));function Kn(t){return t?"open":"closed"}en(Kn,"getState");export{gh as $,Jh as A,Xc as At,Nh as B,ag as C,ih as Ct,Xh as D,nh as Dt,Qh as E,eh as Et,ng as F,Dh as G,Fh as H,Kh as I,Oh as J,Mh as K,Hh as L,eg as M,tg as N,qh as O,ue as Ot,og as P,uh as Q,Uh as R,cg as S,th as St,zh as T,oh as Tt,Lh as U,$h as V,Rh as W,_h as X,Th as Y,Ih as Z,vg as _,nd as _t,Tg as a,xh as at,ig as b,td as bt,xg as c,fh as ct,Rg as d,ch as dt,ph as et,Sg as f,sh as ft,gg as g,Qu as gt,mg as h,Os as ht,_g as i,hh as it,Yh as j,Kc as jt,Zh as k,Qp as kt,Pg as l,vh as lt,hg as m,Wu as mt,Dg as n,Sh as nt,$p as o,yh as ot,bg as p,rd as pt,Ah as q,Og as r,wh as rt,wg as s,dh as st,Ig as t,Ch as tt,yg as u,ah as ut,dg as v,Xu as vt,sg as w,rh as wt,lg as x,zu as xt,fg as y,Yu as yt,jh as z};