@lunora/studio 1.0.0-alpha.35 → 1.0.0-alpha.351

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 (475) hide show
  1. package/LICENSE.md +6 -0
  2. package/README.md +4 -4
  3. package/dist/index.d.mts +1621 -0
  4. package/dist/index.d.ts +1013 -809
  5. package/dist/index.mjs +1 -0
  6. package/dist/mount.d.mts +23 -0
  7. package/dist/mount.d.ts +13 -11
  8. package/dist/mount.mjs +1 -0
  9. package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -0
  10. package/dist/packem_chunks/ApiTab.mjs +1 -0
  11. package/dist/packem_chunks/AuditPanel.mjs +1 -0
  12. package/dist/packem_chunks/DeploymentHealthPanel.mjs +1 -0
  13. package/dist/packem_chunks/ExportImportPanel.mjs +8 -0
  14. package/dist/packem_chunks/FileBrowser.mjs +4 -0
  15. package/dist/packem_chunks/FunctionRunner.mjs +1 -0
  16. package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -0
  17. package/dist/packem_chunks/HealthPanel.mjs +1 -0
  18. package/dist/packem_chunks/InsightsPanel.mjs +1 -0
  19. package/dist/packem_chunks/LogsPanel.mjs +1 -0
  20. package/dist/packem_chunks/MailPanel.mjs +2 -0
  21. package/dist/packem_chunks/MetricsPanel.mjs +1 -0
  22. package/dist/packem_chunks/NotificationsPanel.mjs +1 -0
  23. package/dist/packem_chunks/PitrPanel.mjs +1 -0
  24. package/dist/packem_chunks/SchemaViewer.mjs +1 -0
  25. package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -0
  26. package/dist/packem_chunks/SettingsPanel.mjs +1 -0
  27. package/dist/packem_chunks/SqlEditorPanel.mjs +10 -0
  28. package/dist/packem_chunks/TableEditor.mjs +1 -0
  29. package/dist/packem_chunks/agents-panel.mjs +1 -0
  30. package/dist/packem_chunks/ai-usage-panel.mjs +1 -0
  31. package/dist/packem_chunks/analytics-panel.mjs +1 -0
  32. package/dist/packem_chunks/architecture-panel.mjs +1 -0
  33. package/dist/packem_chunks/auth-audit-panel.mjs +1 -0
  34. package/dist/packem_chunks/auth-config-panel.mjs +1 -0
  35. package/dist/packem_chunks/auth-sessions-panel.mjs +1 -0
  36. package/dist/packem_chunks/containers-panel.mjs +1 -0
  37. package/dist/packem_chunks/dashboards-panel.mjs +1 -0
  38. package/dist/packem_chunks/evals-panel.mjs +1 -0
  39. package/dist/packem_chunks/fanout-panel.mjs +1 -0
  40. package/dist/packem_chunks/flags-panel.mjs +1 -0
  41. package/dist/packem_chunks/issues-panel.mjs +1 -0
  42. package/dist/packem_chunks/kv-browser.mjs +1 -0
  43. package/dist/packem_chunks/log-drains-panel.mjs +4 -0
  44. package/dist/packem_chunks/migrations-route.mjs +1 -0
  45. package/dist/packem_chunks/organizations-panel.mjs +1 -0
  46. package/dist/packem_chunks/payments-panel.mjs +1 -0
  47. package/dist/packem_chunks/permissions-panel.mjs +1 -0
  48. package/dist/packem_chunks/privacy-requests-panel.mjs +1 -0
  49. package/dist/packem_chunks/queues-panel.mjs +1 -0
  50. package/dist/packem_chunks/reactors-panel.mjs +1 -0
  51. package/dist/packem_chunks/rls-panel.mjs +1 -0
  52. package/dist/packem_chunks/schedule-panel.mjs +1 -0
  53. package/dist/packem_chunks/storage-rules-panel.mjs +1 -0
  54. package/dist/packem_chunks/subscriptions-panel.mjs +1 -0
  55. package/dist/packem_chunks/sync-client-panel.mjs +1 -0
  56. package/dist/packem_chunks/theme-indicator.mjs +1 -0
  57. package/dist/packem_chunks/traces-panel.mjs +1 -0
  58. package/dist/packem_chunks/users-panel.mjs +1 -0
  59. package/dist/packem_chunks/vector-browser.mjs +1 -0
  60. package/dist/packem_chunks/workflows-panel.mjs +1 -0
  61. package/dist/packem_shared/ADMIN_FUNCTIONS-4aGsMs95.mjs +1 -0
  62. package/dist/packem_shared/ApiDocsPanel-E4Vr-8zW.mjs +2 -0
  63. package/dist/packem_shared/ApiReferencePanel-u9Rrljdf.mjs +1 -0
  64. package/dist/packem_shared/CommandPalette-5OsK8PNe.mjs +1 -0
  65. package/dist/packem_shared/ConfirmButton-CIXYF6Mg.mjs +1 -0
  66. package/dist/packem_shared/ConnectionBadge-BfcoN-VE.mjs +1 -0
  67. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-CG7Q45ZS.mjs +1 -0
  68. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs +1 -0
  69. package/dist/packem_shared/DEFAULT_LOCALE-BQ3jRT74.mjs +1 -0
  70. package/dist/packem_shared/DataBrowser-C5HbI4TH.mjs +4 -0
  71. package/dist/packem_shared/DataFilters--ocFTVT2.mjs +1 -0
  72. package/dist/packem_shared/ErrorBoundary-BWNF98VF.mjs +1 -0
  73. package/dist/packem_shared/GlobalDataBrowser-D0H2yJSl.mjs +1 -0
  74. package/dist/packem_shared/HomePanel-CcYkDlR-.mjs +1 -0
  75. package/dist/packem_shared/MigrationsPanel-YyCO_T-3.mjs +1 -0
  76. package/dist/packem_shared/OpenRpcReferencePanel-E9cDfHRv.mjs +1 -0
  77. package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.mjs +1 -0
  78. package/dist/packem_shared/ScheduledJobs-D4CUj7aX.mjs +1 -0
  79. package/dist/packem_shared/ShardInput-CoySruKZ.mjs +1 -0
  80. package/dist/packem_shared/Studio-4vJzwwNa.mjs +1 -0
  81. package/dist/packem_shared/StudioApp-px2FMPDS.mjs +1 -0
  82. package/dist/packem_shared/StudioI18nProvider-CGXCPnQn.mjs +1 -0
  83. package/dist/packem_shared/advisor-view-fNcNYW2Q.mjs +1 -0
  84. package/dist/packem_shared/aggregateMetrics-DKFJc-o5.mjs +1 -0
  85. package/dist/packem_shared/alert-PB5W11MM.mjs +1 -0
  86. package/dist/packem_shared/app.d-D425h1XO.d.mts +352 -0
  87. package/dist/packem_shared/app.d-D425h1XO.d.ts +352 -0
  88. package/dist/packem_shared/auth-pager-DW77WeZw.mjs +1 -0
  89. package/dist/packem_shared/badge-r_5B4LHP.mjs +1 -0
  90. package/dist/packem_shared/bar-chart-BCsEIQoQ.mjs +6 -0
  91. package/dist/packem_shared/browser-storage-BH1MxLZs.mjs +1 -0
  92. package/dist/packem_shared/button-q0UYSmrn.mjs +1 -0
  93. package/dist/packem_shared/card-By2O8ULa.mjs +1 -0
  94. package/dist/packem_shared/cf-links-CBJ5SywP.mjs +1 -0
  95. package/dist/packem_shared/checkbox-CnS9cyCz.mjs +1 -0
  96. package/dist/packem_shared/control-button-BOZ5K-FC.mjs +1 -0
  97. package/dist/packem_shared/data-grid-r3isM8Nq.mjs +1 -0
  98. package/dist/packem_shared/data-view-params-C-_G-biH.mjs +1 -0
  99. package/dist/packem_shared/diagram-export-panel-aBDQdX4e.mjs +2 -0
  100. package/dist/packem_shared/dropdown-menu-jLZenfWH.mjs +2 -0
  101. package/dist/packem_shared/empty-state-D7jEML_T.mjs +1 -0
  102. package/dist/packem_shared/error-alert-54TiaMvZ.mjs +1 -0
  103. package/dist/packem_shared/grid-features-2c5SaBtH.mjs +6 -0
  104. package/dist/packem_shared/grid-pagination-DY2erU65.mjs +1 -0
  105. package/dist/packem_shared/home-panel-DPiMVQZ2.mjs +3 -0
  106. package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
  107. package/dist/packem_shared/internal-BXEjuLPN.mjs +2 -0
  108. package/dist/packem_shared/label-DKFzyHq6.mjs +1 -0
  109. package/dist/packem_shared/live-status-D1GasNsH.mjs +1 -0
  110. package/dist/packem_shared/log-fields-BolUoZ9g.mjs +1 -0
  111. package/dist/packem_shared/log-line-BWDt_F56.mjs +1 -0
  112. package/dist/packem_shared/metrics-format-1sNGG47R.mjs +1 -0
  113. package/dist/packem_shared/modal-shell-CDztwLnv.mjs +1 -0
  114. package/dist/packem_shared/operation-console-provider-DoloEvon.mjs +1 -0
  115. package/dist/packem_shared/recording-client-MbGZ28I0.mjs +1 -0
  116. package/dist/packem_shared/reference-view-DCEC5kjY.mjs +13 -0
  117. package/dist/packem_shared/schema-diagram-k7cFl7Wp.mjs +2 -0
  118. package/dist/packem_shared/scroll-area-CXCQH7VT.mjs +2 -0
  119. package/dist/packem_shared/select-DPyS18Vy.mjs +2 -0
  120. package/dist/packem_shared/shard-history-CaO3C4KQ.mjs +1 -0
  121. package/dist/packem_shared/shortcuts-B9gDaXmw.mjs +1 -0
  122. package/dist/packem_shared/skeleton-DX1gfixl.mjs +1 -0
  123. package/dist/packem_shared/sparkline-B_sPPO_8.mjs +1 -0
  124. package/dist/packem_shared/sql-result-table-CatgdmMh.mjs +1 -0
  125. package/dist/packem_shared/stat-card-BAv73QtB.mjs +1 -0
  126. package/dist/packem_shared/storage-tier-C2mKwYRj.mjs +1 -0
  127. package/dist/packem_shared/studio-DIUgH7k0.mjs +2 -0
  128. package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
  129. package/dist/packem_shared/table-list-sidebar-CCRB_iYz.mjs +1 -0
  130. package/dist/packem_shared/textarea--40GKAyz.mjs +1 -0
  131. package/dist/packem_shared/trace-handoff-BV3EWqy_.mjs +1 -0
  132. package/dist/packem_shared/use-admin-query-BW9IuacC.mjs +1 -0
  133. package/dist/packem_shared/use-admin-spec-BdNLZbTO.mjs +1 -0
  134. package/dist/packem_shared/use-async-submit-2eBBD0-m.mjs +1 -0
  135. package/dist/packem_shared/use-auth-config-KO9tnI39.mjs +1 -0
  136. package/dist/packem_shared/use-mirrored-ref-CVDf2z1M.mjs +1 -0
  137. package/dist/packem_shared/use-open-trace-B_0LbTD7.mjs +1 -0
  138. package/dist/packem_shared/use-shard-key-BsP3o5wT.mjs +1 -0
  139. package/dist/packem_shared/use-sql-assistant-BMVlguKF.mjs +1 -0
  140. package/dist/packem_shared/use-studio-client-DCA50tF2.mjs +1 -0
  141. package/dist/packem_shared/useDebounced-DVeQ5-oW.mjs +1 -0
  142. package/dist/packem_shared/utils-bhneXptQ.mjs +1 -0
  143. package/dist/packem_shared/virtual-rect-D_j7aLxX.mjs +1 -0
  144. package/dist/standalone/chunk-22O2JDWR.js +1 -0
  145. package/dist/standalone/chunk-2DV455PX.js +1 -0
  146. package/dist/standalone/chunk-2EMNPL3B.js +1 -0
  147. package/dist/standalone/chunk-2O6KKVH2.js +1 -0
  148. package/dist/standalone/chunk-35BGGOWV.js +1 -0
  149. package/dist/standalone/chunk-3GXPALXG.js +1 -0
  150. package/dist/standalone/chunk-3MQ477EE.js +1 -0
  151. package/dist/standalone/chunk-3Y5K3IQO.js +1 -0
  152. package/dist/standalone/chunk-453GHHZ4.js +1 -0
  153. package/dist/standalone/chunk-4C4THJUD.js +1 -0
  154. package/dist/standalone/chunk-4CITH2NU.js +1 -0
  155. package/dist/standalone/chunk-4EDOPHLM.js +5 -0
  156. package/dist/standalone/chunk-4IEMXFUB.js +1 -0
  157. package/dist/standalone/chunk-4QRVJDM4.js +1 -0
  158. package/dist/standalone/chunk-4SQBAPY6.js +1 -0
  159. package/dist/standalone/chunk-4UWYDYM5.js +1 -0
  160. package/dist/standalone/chunk-57ZNR6IA.js +1 -0
  161. package/dist/standalone/chunk-5DNGK3NT.js +1 -0
  162. package/dist/standalone/chunk-6DYXTEU7.js +1 -0
  163. package/dist/standalone/chunk-6GPEHYCG.js +1 -0
  164. package/dist/standalone/chunk-6GRI2HXU.js +1 -0
  165. package/dist/standalone/chunk-6I42AM75.js +1 -0
  166. package/dist/standalone/chunk-6M7FLLMT.js +1 -0
  167. package/dist/standalone/chunk-6QBK3Z7A.js +1 -0
  168. package/dist/standalone/chunk-6QEXGYWH.js +1 -0
  169. package/dist/standalone/chunk-6UTZXEW3.js +1 -0
  170. package/dist/standalone/chunk-7EAHHRJR.js +1 -0
  171. package/dist/standalone/chunk-7RGYCU6F.js +1 -0
  172. package/dist/standalone/chunk-A566HCBX.js +1 -0
  173. package/dist/standalone/chunk-ACNWZIAH.js +15 -0
  174. package/dist/standalone/chunk-ANACHJRU.js +1 -0
  175. package/dist/standalone/chunk-AOHKAKKL.js +1 -0
  176. package/dist/standalone/chunk-AP4PC2M4.js +1 -0
  177. package/dist/standalone/chunk-BAGJYLSU.js +8 -0
  178. package/dist/standalone/chunk-BCOOULSO.js +1 -0
  179. package/dist/standalone/chunk-BKH2NALB.js +1 -0
  180. package/dist/standalone/chunk-BTOOJXUL.js +59 -0
  181. package/dist/standalone/chunk-C6FNBKCO.js +1 -0
  182. package/dist/standalone/chunk-CTE6RPXC.js +1 -0
  183. package/dist/standalone/chunk-CW57Q264.js +1 -0
  184. package/dist/standalone/chunk-DBVJ5VLI.js +1 -0
  185. package/dist/standalone/chunk-DS7HZKZ2.js +6 -0
  186. package/dist/standalone/chunk-DSTNWB4N.js +1 -0
  187. package/dist/standalone/chunk-DTW4E5AB.js +1 -0
  188. package/dist/standalone/chunk-DX55P3KZ.js +1 -0
  189. package/dist/standalone/chunk-E26OT26O.js +1 -0
  190. package/dist/standalone/chunk-FLVDICZL.js +1 -0
  191. package/dist/standalone/chunk-FNWRS4VQ.js +1 -0
  192. package/dist/standalone/chunk-FST24UXA.js +1 -0
  193. package/dist/standalone/chunk-FXGYX2V6.js +1 -0
  194. package/dist/standalone/chunk-HKLF627N.js +1 -0
  195. package/dist/standalone/chunk-HKPDPKXD.js +1 -0
  196. package/dist/standalone/chunk-HWTX54JM.js +8 -0
  197. package/dist/standalone/chunk-HZCLLEWP.js +1 -0
  198. package/dist/standalone/chunk-IBJVVHV5.js +1 -0
  199. package/dist/standalone/chunk-IH2CJZF2.js +1 -0
  200. package/dist/standalone/chunk-IRCUXARN.js +1 -0
  201. package/dist/standalone/chunk-IVQKQBKK.js +1 -0
  202. package/dist/standalone/chunk-JTGGWF7R.js +1 -0
  203. package/dist/standalone/chunk-K7FZTYAY.js +1 -0
  204. package/dist/standalone/chunk-KNX3KB7E.js +1 -0
  205. package/dist/standalone/chunk-KRPXOSBL.js +1 -0
  206. package/dist/standalone/chunk-KYONGQQ4.js +1 -0
  207. package/dist/standalone/chunk-LIGOLZND.js +1 -0
  208. package/dist/standalone/chunk-LKCO3E2B.js +1 -0
  209. package/dist/standalone/chunk-LPINY2IJ.js +19 -0
  210. package/dist/standalone/chunk-LRXCL6IA.js +1 -0
  211. package/dist/standalone/chunk-LUHXNZI4.js +2 -0
  212. package/dist/standalone/chunk-LYHEBMM6.js +1 -0
  213. package/dist/standalone/chunk-M2RIGPGL.js +1 -0
  214. package/dist/standalone/chunk-MD67S53Z.js +1 -0
  215. package/dist/standalone/chunk-MDAXV2XH.js +4 -0
  216. package/dist/standalone/chunk-MKVZXGJQ.js +1 -0
  217. package/dist/standalone/chunk-NGVP66OH.js +1 -0
  218. package/dist/standalone/chunk-NMVFSJM7.js +1 -0
  219. package/dist/standalone/chunk-OIDFWEJX.js +21 -0
  220. package/dist/standalone/chunk-OJG65AG4.js +1 -0
  221. package/dist/standalone/chunk-OSJ7HV7B.js +1 -0
  222. package/dist/standalone/chunk-OUFWXYEF.js +1 -0
  223. package/dist/standalone/chunk-OXFKZ4BM.js +1 -0
  224. package/dist/standalone/chunk-P6L6ABWO.js +1 -0
  225. package/dist/standalone/chunk-PZZWUL5U.js +1 -0
  226. package/dist/standalone/chunk-Q4N3TJPV.js +1 -0
  227. package/dist/standalone/chunk-QEVFVWGC.js +2 -0
  228. package/dist/standalone/chunk-R36QXQZX.js +1 -0
  229. package/dist/standalone/chunk-RHOQJNDW.js +1 -0
  230. package/dist/standalone/chunk-RQDSPVVH.js +1 -0
  231. package/dist/standalone/chunk-S5S2YICJ.js +1 -0
  232. package/dist/standalone/chunk-S6JFSLBK.js +1 -0
  233. package/dist/standalone/chunk-SDQH4HR6.js +3 -0
  234. package/dist/standalone/chunk-SDTHCM5H.js +1 -0
  235. package/dist/standalone/chunk-SFY646MC.js +1 -0
  236. package/dist/standalone/chunk-SJLEEYCR.js +1 -0
  237. package/dist/standalone/chunk-SLIDAWNX.js +1 -0
  238. package/dist/standalone/chunk-SM2IQWCJ.js +1 -0
  239. package/dist/standalone/{chunk-BJGBHGK3.js → chunk-SYGCASPT.js} +1 -1
  240. package/dist/standalone/chunk-T2QAOXUO.js +14 -0
  241. package/dist/standalone/chunk-T4VAXHRL.js +4 -0
  242. package/dist/standalone/chunk-TBDJVYCB.js +1 -0
  243. package/dist/standalone/chunk-TDVDZ7XQ.js +1 -0
  244. package/dist/standalone/chunk-TRZTGE4R.js +1 -0
  245. package/dist/standalone/chunk-TTD7BKB6.js +1 -0
  246. package/dist/standalone/chunk-UCK6ITED.js +1 -0
  247. package/dist/standalone/chunk-UKKZJRJT.js +1 -0
  248. package/dist/standalone/chunk-UYEZR3BI.js +1 -0
  249. package/dist/standalone/chunk-V74BXQXC.js +1 -0
  250. package/dist/standalone/chunk-VEWQWS3J.js +1 -0
  251. package/dist/standalone/chunk-VHMA6YPT.js +1 -0
  252. package/dist/standalone/chunk-W2BCSK5S.js +1 -0
  253. package/dist/standalone/chunk-W4X4J7BU.js +1 -0
  254. package/dist/standalone/chunk-W6ZKEW5M.js +1 -0
  255. package/dist/standalone/chunk-W7MRISE3.js +1 -0
  256. package/dist/standalone/chunk-WIYDA4XT.js +1 -0
  257. package/dist/standalone/chunk-WS36BO4R.js +1 -0
  258. package/dist/standalone/chunk-WZTY3ZYI.js +1 -0
  259. package/dist/standalone/chunk-X5KWBDTF.js +1 -0
  260. package/dist/standalone/chunk-X74GEPSG.js +1 -0
  261. package/dist/standalone/chunk-X7GSROPX.js +1 -0
  262. package/dist/standalone/chunk-XBZUJDHD.js +1 -0
  263. package/dist/standalone/chunk-XYR5NST4.js +1 -0
  264. package/dist/standalone/chunk-Y7SN6CTX.js +1 -0
  265. package/dist/standalone/chunk-YHTHRYP5.js +1 -0
  266. package/dist/standalone/chunk-YJWR6ZWC.js +1 -0
  267. package/dist/standalone/chunk-YRQHFMEY.js +1 -0
  268. package/dist/standalone/chunk-Z5EV64KS.js +1 -0
  269. package/dist/standalone/chunk-ZBON5T5A.js +1 -0
  270. package/dist/standalone/chunk-ZGSL4DPP.js +1 -0
  271. package/dist/standalone/chunk-ZKPRORLI.js +1 -0
  272. package/dist/standalone/chunk-ZLSNET6H.js +1 -0
  273. package/dist/standalone/chunk-ZM4K2ETZ.js +3 -0
  274. package/dist/standalone/chunk-ZTOREMGH.js +1 -0
  275. package/dist/standalone/chunk-ZWDORIZY.js +1 -0
  276. package/dist/standalone/studio.js +9 -214
  277. package/dist/styles.css +2 -2
  278. package/package.json +26 -22
  279. package/dist/index.js +0 -41
  280. package/dist/mount.js +0 -27
  281. package/dist/packem_chunks/ApiTab.js +0 -251
  282. package/dist/packem_chunks/AuditPanel.js +0 -200
  283. package/dist/packem_chunks/ExportImportPanel.js +0 -198
  284. package/dist/packem_chunks/FileBrowser.js +0 -2932
  285. package/dist/packem_chunks/FunctionRunner.js +0 -343
  286. package/dist/packem_chunks/FunctionStatsPanel.js +0 -377
  287. package/dist/packem_chunks/HealthPanel.js +0 -648
  288. package/dist/packem_chunks/InsightsPanel.js +0 -462
  289. package/dist/packem_chunks/LogsPanel.js +0 -827
  290. package/dist/packem_chunks/MailPanel.js +0 -353
  291. package/dist/packem_chunks/MetricsPanel.js +0 -1344
  292. package/dist/packem_chunks/MigrationsPanel.js +0 -239
  293. package/dist/packem_chunks/PitrPanel.js +0 -252
  294. package/dist/packem_chunks/SchemaViewer.js +0 -2513
  295. package/dist/packem_chunks/SecurityAdvisorPanel.js +0 -95
  296. package/dist/packem_chunks/SettingsPanel.js +0 -391
  297. package/dist/packem_chunks/SqlEditorPanel.js +0 -2323
  298. package/dist/packem_chunks/TableEditor.js +0 -313
  299. package/dist/packem_chunks/analytics-panel.js +0 -261
  300. package/dist/packem_chunks/auth-config-panel.js +0 -179
  301. package/dist/packem_chunks/auth-sessions-panel.js +0 -175
  302. package/dist/packem_chunks/containers-panel.js +0 -247
  303. package/dist/packem_chunks/dashboards-panel.js +0 -780
  304. package/dist/packem_chunks/fanout-panel.js +0 -482
  305. package/dist/packem_chunks/flags-panel.js +0 -176
  306. package/dist/packem_chunks/kv-browser.js +0 -1896
  307. package/dist/packem_chunks/log-drains-panel.js +0 -273
  308. package/dist/packem_chunks/organizations-panel.js +0 -670
  309. package/dist/packem_chunks/payments-panel.js +0 -186
  310. package/dist/packem_chunks/permissions-panel.js +0 -805
  311. package/dist/packem_chunks/queues-panel.js +0 -1052
  312. package/dist/packem_chunks/rls-panel.js +0 -315
  313. package/dist/packem_chunks/schedule-panel.js +0 -831
  314. package/dist/packem_chunks/sparkline.js +0 -79
  315. package/dist/packem_chunks/storage-rules-panel.js +0 -140
  316. package/dist/packem_chunks/subscriptions-panel.js +0 -238
  317. package/dist/packem_chunks/users-panel.js +0 -1265
  318. package/dist/packem_chunks/vector-browser.js +0 -281
  319. package/dist/packem_chunks/workflows-panel.js +0 -562
  320. package/dist/packem_shared/ADMIN_FUNCTIONS-BHHJi3Gb.js +0 -52
  321. package/dist/packem_shared/ApiDocsPanel-D4CJf2ad.js +0 -842
  322. package/dist/packem_shared/ApiReferencePanel-Co_wpRF2.js +0 -230
  323. package/dist/packem_shared/CommandPalette-BUPpbpMc.js +0 -373
  324. package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
  325. package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
  326. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
  327. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
  328. package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
  329. package/dist/packem_shared/DataBrowser-BeVNxSVm.js +0 -4493
  330. package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
  331. package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
  332. package/dist/packem_shared/GlobalDataBrowser-ErfvIs1S.js +0 -289
  333. package/dist/packem_shared/HomePanel-D9MQk8I7.js +0 -14
  334. package/dist/packem_shared/OpenRpcReferencePanel-DLWzrIx9.js +0 -192
  335. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
  336. package/dist/packem_shared/ScheduledJobs-ClaNpZsg.js +0 -262
  337. package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
  338. package/dist/packem_shared/Studio-C48P1K5W.js +0 -16
  339. package/dist/packem_shared/StudioApp-Cqh-SYm2.js +0 -657
  340. package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
  341. package/dist/packem_shared/advisor-view-D3-U4kRR.js +0 -159
  342. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
  343. package/dist/packem_shared/alert-CdAET2K_.js +0 -68
  344. package/dist/packem_shared/app.d-CNLRTrWw.d.ts +0 -300
  345. package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
  346. package/dist/packem_shared/bar-chart-DSwcWIRy.js +0 -3246
  347. package/dist/packem_shared/browser-storage-tLOxkIHd.js +0 -185
  348. package/dist/packem_shared/button-BhsN2uZH.js +0 -49
  349. package/dist/packem_shared/card-DURq3ElK.js +0 -175
  350. package/dist/packem_shared/cf-links-BZfRdxSE.js +0 -8
  351. package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
  352. package/dist/packem_shared/data-grid-Jz8FqQ2C.js +0 -183
  353. package/dist/packem_shared/data-view-params-Cd6yRVbv.js +0 -96
  354. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
  355. package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
  356. package/dist/packem_shared/error-alert-BBT6D22d.js +0 -114
  357. package/dist/packem_shared/grid-features-CUr8Z1_O.js +0 -745
  358. package/dist/packem_shared/home-panel-CoGxi-oj.js +0 -1639
  359. package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
  360. package/dist/packem_shared/internal-DTsYVn-g.js +0 -97
  361. package/dist/packem_shared/label-D8ykjn5J.js +0 -46
  362. package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
  363. package/dist/packem_shared/modal-shell-hyaJvIJ6.js +0 -100
  364. package/dist/packem_shared/reference-view-CSKyUyPl.js +0 -2141
  365. package/dist/packem_shared/scroll-area-DLhcy-ml.js +0 -93
  366. package/dist/packem_shared/select-UkNYCT3s.js +0 -273
  367. package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
  368. package/dist/packem_shared/skeleton-CGhL0p20.js +0 -45
  369. package/dist/packem_shared/sparkline-BnA1kC9X.js +0 -93
  370. package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
  371. package/dist/packem_shared/studio-CPHA_-3I.js +0 -4015
  372. package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
  373. package/dist/packem_shared/table-list-sidebar-B5psdSV1.js +0 -832
  374. package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
  375. package/dist/packem_shared/use-admin-query-BHPKmPuj.js +0 -106
  376. package/dist/packem_shared/use-auth-capabilities-C-VH0oJJ.js +0 -32
  377. package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
  378. package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
  379. package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
  380. package/dist/standalone/chunk-25VHPD2I.js +0 -1
  381. package/dist/standalone/chunk-2GGMGPEP.js +0 -1
  382. package/dist/standalone/chunk-2K47A3P6.js +0 -1
  383. package/dist/standalone/chunk-2NGUNNGW.js +0 -1
  384. package/dist/standalone/chunk-3CJW6NWG.js +0 -4
  385. package/dist/standalone/chunk-3OA7PECS.js +0 -6
  386. package/dist/standalone/chunk-46K3NKPA.js +0 -1
  387. package/dist/standalone/chunk-474C2O7W.js +0 -1
  388. package/dist/standalone/chunk-4H2OJBXO.js +0 -1
  389. package/dist/standalone/chunk-4QHKBC77.js +0 -1
  390. package/dist/standalone/chunk-55YA7ZZI.js +0 -76
  391. package/dist/standalone/chunk-5OH3VPZF.js +0 -1
  392. package/dist/standalone/chunk-5OIBXYZM.js +0 -1
  393. package/dist/standalone/chunk-6GFEVKJP.js +0 -1
  394. package/dist/standalone/chunk-6UGM5IHN.js +0 -4
  395. package/dist/standalone/chunk-6WRZP62V.js +0 -1
  396. package/dist/standalone/chunk-764T6X6X.js +0 -1
  397. package/dist/standalone/chunk-7TJJXVSE.js +0 -1
  398. package/dist/standalone/chunk-7VF3IAAW.js +0 -2
  399. package/dist/standalone/chunk-7WNJ4Q7Z.js +0 -8
  400. package/dist/standalone/chunk-AHILM3ZP.js +0 -1
  401. package/dist/standalone/chunk-AJIUI7DD.js +0 -1
  402. package/dist/standalone/chunk-BACPICH6.js +0 -1
  403. package/dist/standalone/chunk-BI35RXKQ.js +0 -1
  404. package/dist/standalone/chunk-BOXSWNXZ.js +0 -1
  405. package/dist/standalone/chunk-BQUQS7QN.js +0 -1
  406. package/dist/standalone/chunk-CKSHCYGC.js +0 -2
  407. package/dist/standalone/chunk-DORBUITF.js +0 -1
  408. package/dist/standalone/chunk-DVC6YWVP.js +0 -1
  409. package/dist/standalone/chunk-DVKPRFIJ.js +0 -1
  410. package/dist/standalone/chunk-DWDILV2E.js +0 -1
  411. package/dist/standalone/chunk-DWTBY343.js +0 -1
  412. package/dist/standalone/chunk-EIQW6ACH.js +0 -1
  413. package/dist/standalone/chunk-EUIHTPKI.js +0 -1
  414. package/dist/standalone/chunk-FCSPAJW4.js +0 -1
  415. package/dist/standalone/chunk-FKO3HO6I.js +0 -4
  416. package/dist/standalone/chunk-GMSGZDDH.js +0 -13
  417. package/dist/standalone/chunk-GTM65MVX.js +0 -1
  418. package/dist/standalone/chunk-HV7G6DFP.js +0 -5
  419. package/dist/standalone/chunk-ILCTSAOB.js +0 -1
  420. package/dist/standalone/chunk-IODYGARQ.js +0 -1
  421. package/dist/standalone/chunk-J6J54MBP.js +0 -1
  422. package/dist/standalone/chunk-JE2YOAB7.js +0 -4
  423. package/dist/standalone/chunk-JFSZIUZT.js +0 -4
  424. package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
  425. package/dist/standalone/chunk-K3GNLVYK.js +0 -1
  426. package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
  427. package/dist/standalone/chunk-KZ6INM5M.js +0 -1
  428. package/dist/standalone/chunk-LD2R263D.js +0 -1
  429. package/dist/standalone/chunk-LI43EKM6.js +0 -1
  430. package/dist/standalone/chunk-M55U7NHO.js +0 -1
  431. package/dist/standalone/chunk-MPTM7ZU3.js +0 -3
  432. package/dist/standalone/chunk-MPYFGAOW.js +0 -1
  433. package/dist/standalone/chunk-NJFMWO6P.js +0 -1
  434. package/dist/standalone/chunk-O3NAGRTR.js +0 -1
  435. package/dist/standalone/chunk-O77VNUFD.js +0 -1
  436. package/dist/standalone/chunk-OCHNCAXJ.js +0 -1
  437. package/dist/standalone/chunk-PACH5AHG.js +0 -1
  438. package/dist/standalone/chunk-PN5NCZDX.js +0 -1
  439. package/dist/standalone/chunk-PVZI3CXP.js +0 -19
  440. package/dist/standalone/chunk-PZ7HD5T2.js +0 -1
  441. package/dist/standalone/chunk-QAFAJBAW.js +0 -1
  442. package/dist/standalone/chunk-QBAT52GB.js +0 -1
  443. package/dist/standalone/chunk-QLM6FYZW.js +0 -2
  444. package/dist/standalone/chunk-RRAFQ5G2.js +0 -1
  445. package/dist/standalone/chunk-RRCPZMC2.js +0 -22
  446. package/dist/standalone/chunk-RSEEHNFI.js +0 -1
  447. package/dist/standalone/chunk-SEU5V7I6.js +0 -1
  448. package/dist/standalone/chunk-SLKF2L74.js +0 -1
  449. package/dist/standalone/chunk-SVR644RF.js +0 -1
  450. package/dist/standalone/chunk-TAD43CG5.js +0 -1
  451. package/dist/standalone/chunk-TBMYIZIO.js +0 -1
  452. package/dist/standalone/chunk-TDL7NEWA.js +0 -1
  453. package/dist/standalone/chunk-TO4JQX7W.js +0 -1
  454. package/dist/standalone/chunk-TQ36RWOP.js +0 -1
  455. package/dist/standalone/chunk-U4OAQPBT.js +0 -1
  456. package/dist/standalone/chunk-UII66UVF.js +0 -1
  457. package/dist/standalone/chunk-UK64ZSUW.js +0 -1
  458. package/dist/standalone/chunk-VLXV72QE.js +0 -1
  459. package/dist/standalone/chunk-VSHUSN6T.js +0 -1
  460. package/dist/standalone/chunk-VTGBPW24.js +0 -1
  461. package/dist/standalone/chunk-WXPWVBIY.js +0 -1
  462. package/dist/standalone/chunk-X6F22DBL.js +0 -1
  463. package/dist/standalone/chunk-X7MMBSNW.js +0 -1
  464. package/dist/standalone/chunk-XGMIDFUK.js +0 -1
  465. package/dist/standalone/chunk-XNJNSCLM.js +0 -1
  466. package/dist/standalone/chunk-XUGSA2NG.js +0 -1
  467. package/dist/standalone/chunk-XZE2RNDA.js +0 -1
  468. package/dist/standalone/chunk-Y2ZPNDL7.js +0 -4
  469. package/dist/standalone/chunk-YAECF5LW.js +0 -1
  470. package/dist/standalone/chunk-YEVCU7TB.js +0 -13
  471. package/dist/standalone/chunk-YV43BOP7.js +0 -1
  472. package/dist/standalone/chunk-ZHVTQ37P.js +0 -1
  473. package/dist/standalone/chunk-ZPP2KOR4.js +0 -1
  474. package/dist/standalone/chunk-ZPUO7FNI.js +0 -1
  475. package/dist/standalone/chunk-ZU4DZ6NK.js +0 -1
@@ -1 +0,0 @@
1
- import{a as Ln}from"./chunk-ZPUO7FNI.js";import{a as oo,b as so,c as ro,d as Tn,e as is}from"./chunk-764T6X6X.js";import{A as Wo,B as vn,C as Gt,E as xn,F as j,G as bn,H as yn,K as Kt,N as ft,O as Zo,P as Qt,R as qo,S as Pn,T as Rn,U as Go,V as Yt,W as Jt,X as Xt,Y as eo,Z as Ko,_ as to,aa as Cn,b as sn,ba as Sn,ca as Qo,da as Yo,ga as Jo,ha as tt,i as dn,ia as Nn,j as cn,ja as no,k as pn,ka as En,la as ue,n as Gs,na as Xo,o as $o,pa as es,q as jo,qa as ts,r as un,ra as os,s as zo,sa as ss,ta as rs,u as fn,ua as ns,va as wn,w as mn,wa as kn,x as gn,xa as as,y as hn,ya as On,z as Uo}from"./chunk-XUGSA2NG.js";import{f as Jr}from"./chunk-UII66UVF.js";import{a as Bn}from"./chunk-7TJJXVSE.js";import{a as $r,b as jr,d as zr,e as pt,f as Fo,g as Ur,h as Wr,i as Zr,j as qr,k as Gr}from"./chunk-SVR644RF.js";import{a as ls}from"./chunk-KZ6INM5M.js";import{c as Mn,h as In,k as Ks}from"./chunk-4QHKBC77.js";import{B as rn,C as nn,I as He,J as an,K as qt,O as A,P as Y,R as ln,e as ye,p as ho,q as on}from"./chunk-3CJW6NWG.js";import{b as mt,c as Qs}from"./chunk-UK64ZSUW.js";import{a as ut,c as en,h as Ho,i as tn}from"./chunk-O3NAGRTR.js";import{a as Hr}from"./chunk-HV7G6DFP.js";import{a as Ct}from"./chunk-BOXSWNXZ.js";import{a as Dn}from"./chunk-TAD43CG5.js";import{b as ao}from"./chunk-DVKPRFIJ.js";import{a as gt,e as Ys}from"./chunk-SEU5V7I6.js";import{a as qs,b as go}from"./chunk-ZPP2KOR4.js";import{a as it,i as Rt,j as F}from"./chunk-CKSHCYGC.js";import{f as Zs}from"./chunk-X7MMBSNW.js";import{a as Xr}from"./chunk-ZHVTQ37P.js";import{a as be}from"./chunk-3OA7PECS.js";import{a as Kr,b as Qr,c as Yr,d as ie,e as _n,f as An,k as $e,m as Vn}from"./chunk-PVZI3CXP.js";import{b as Ws}from"./chunk-GMSGZDDH.js";import{a,d as Us,e as C,f as M,g as Lo,h as mo,j as U}from"./chunk-RRCPZMC2.js";var B=C(Lo(),1);var ct=C(M(),1),q=C(M(),1);var i=C(mo(),1);var Fn=C(M(),1),ht=C(mo(),1);var gi={border:"1px solid var(--destructive)",color:"var(--destructive)",padding:12},hi={overflow:"auto",whiteSpace:"pre-wrap"},ds=class extends Fn.Component{static{a(this,"ErrorBoundary")}static getDerivedStateFromError(e){return{error:e}}state={error:null};componentDidCatch(e,o){console.error("[lunora-studio] panel error",e,o.componentStack)}reset=a(()=>{this.setState({error:null})},"reset");render(){let{children:e,fallbackTitle:o,label:s,retryLabel:r}=this.props,{error:n}=this.state;if(n===null)return(0,ht.jsxDEV)(ht.Fragment,{children:e},void 0,!1);let l=o??(s===void 0?"Something went wrong":`${s} failed`);return(0,ht.jsxDEV)("div",{"data-testid":"dash-error-boundary",role:"alert",style:gi,children:[(0,ht.jsxDEV)("strong",{children:l},void 0,!1),(0,ht.jsxDEV)("pre",{"data-testid":"dash-error-message",style:hi,children:n.message},void 0,!1),(0,ht.jsxDEV)("button",{"data-testid":"dash-error-retry",onClick:this.reset,type:"button",children:r??"Try again"},void 0,!1)]},void 0,!0)}};var yt={};Us(yt,{Arrow:()=>nr,Backdrop:()=>ar,Close:()=>dr,Description:()=>lr,Handle:()=>xo,Popup:()=>rr,Portal:()=>er,Positioner:()=>tr,Root:()=>jn,Title:()=>ir,Trigger:()=>Js,Viewport:()=>cr,createHandle:()=>oa});var lt=C(M(),1);var cs=C(M(),1);var ps=cs.createContext(void 0);ps.displayName="PopoverRootContext";function oe(t){let e=cs.useContext(ps);if(e===void 0&&!t)throw new Error("Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.");return e}a(oe,"usePopoverRootContext");var vt=C(M(),1),Hn=C(Hr(),1);function vi(){return{...oo(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}a(vi,"createInitialState");var xi={...ro,disabled:j(t=>t.disabled),instantType:j(t=>t.instantType),openMethod:j(t=>t.openMethod),openChangeReason:j(t=>t.openChangeReason),modal:j(t=>t.modal),focusManagerModal:j(t=>t.focusManagerModal),stickIfOpen:j(t=>t.stickIfOpen),titleElementId:j(t=>t.titleElementId),descriptionElementId:j(t=>t.descriptionElementId),openOnHover:j(t=>t.openOnHover),closeDelay:j(t=>t.closeDelay),hasViewport:j(t=>t.hasViewport)},io=class t extends Kt{static{a(this,"PopoverStore")}constructor(e,o,s=!1){let r={...vi(),...e},n=new to;r.open&&e?.mounted===void 0&&(r.mounted=!0),r.floatingRootContext=so(n,o,s),super(r,{popupRef:vt.createRef(),backdropRef:vt.createRef(),internalBackdropRef:vt.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:vt.createRef(),beforeContentFocusGuardRef:vt.createRef(),stickIfOpenTimeout:new rn,triggerElements:n},xi)}setOpen=a((e,o)=>{let s=o.reason===A.triggerHover,r=o.reason===A.triggerPress&&o.event.detail===0,n=!e&&(o.reason===A.escapeKey||o.reason==null),l=Pn(o),c=this.select("activeTriggerId");if(!e&&o.reason===A.closePress&&o.trigger==null&&c!=null&&(o.trigger=this.context.triggerElements.getById(c)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let p=a(()=>{let d={open:e,openChangeReason:o.reason};qo(d,e,o.trigger,l()),this.update(d)},"changeState");s?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set("stickIfOpen",!1)}),Hn.flushSync(p)):p(),r||n?this.set("instantType",r?"click":"dismiss"):o.reason===A.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)},"setOpen");static useStore(e,o){let{store:s,internalStore:r}=Qt(e,(n,l)=>new t(o,n,l));return vt.useEffect(()=>r?.disposeEffect(),[r]),s}disposeEffect=a(()=>this.context.stickIfOpenTimeout.disposeEffect(),"disposeEffect")};var St=C(be(),1);function $n({props:t}){let{children:e,open:o,defaultOpen:s=!1,onOpenChange:r,onOpenChangeComplete:n,modal:l=!1,handle:c,triggerId:p,defaultTriggerId:d=null}=t,u=io.useStore(c?.store,{modal:l,open:s,openProp:o,activeTriggerId:d,triggerIdProp:p});Go(u,o,s,d),u.useControlledProp("openProp",o),u.useControlledProp("triggerIdProp",p);let g=u.useState("open"),m=u.useState("mounted"),h=u.useState("payload"),f=fn()!=null;u.useContextCallback("onOpenChange",r),u.useContextCallback("onOpenChangeComplete",n),Ko(u,g),Jt(u);let{forceUnmount:v}=Xt(g,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:l,nested:f}),lt.useEffect(()=>{g||u.context.stickIfOpenTimeout.clear()},[u,g]);let x=lt.useCallback(()=>{u.setOpen(!1,Y(A.imperativeAction))},[u]);lt.useImperativeHandle(t.actionsRef,()=>({unmount:v,close:x}),[v,x]);let b=g||m,R=lt.useMemo(()=>({store:u}),[u]);return(0,St.jsxs)(ps.Provider,{value:R,children:[b&&(0,St.jsx)(bi,{store:u,modal:l}),typeof e=="function"?e({payload:h}):e]})}a($n,"PopoverRootComponent");function jn(t){return oe(!0)?(0,St.jsx)($n,{props:t}):(0,St.jsx)(hn,{children:(0,St.jsx)($n,{props:t})})}a(jn,"PopoverRoot");function bi({store:t,modal:e}){let o=t.useState("floatingRootContext"),s=Gt(o,{outsidePressEvent:{mouse:e==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),r=s.reference??Rt,n=s.trigger??Rt,l=lt.useMemo(()=>it(ft,s.floating),[s.floating]);return eo(t,{activeTriggerProps:r,inactiveTriggerProps:n,popupProps:l}),null}a(bi,"PopoverInteractions");var xt=C(M(),1);var Nt=C(be(),1);var Js=xt.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:c=!0,handle:p,payload:d,openOnHover:u=!1,delay:g=300,closeDelay:m=0,id:h,...f}=e,v=oe(!0),x=p?.store??v?.store;if(!x)throw new Error("Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.");let b=ye(h),R=x.useState("isTriggerActive",b),P=x.useState("floatingRootContext"),N=x.useState("isOpenedByTrigger",b),S=x.useState("triggerPopupId",b),E=xt.useRef(null),{registerTrigger:T,isMountedByThisTrigger:k}=Yt(b,E,x,{payload:d,disabled:l,openOnHover:u,closeDelay:m}),w=x.useState("openChangeReason"),O=x.useState("stickIfOpen"),V=x.useState("openMethod"),W=x.useState("focusManagerModal"),_=Yo(P,{enabled:!l&&P!=null&&u&&(V!=="touch"||w!==A.triggerPress),mouseOnly:!0,move:!1,handleClose:Jo(),restMs:g,delay:{close:m},triggerElementRef:E,isActiveTrigger:R,isClosing:a(()=>x.select("transitionStatus")==="ending","isClosing")}),H=Wo(P,{enabled:P!=null,stickIfOpen:O}),$=Xo(()=>x.select("open"),ee=>{x.set("openMethod",ee)}),Z=x.useState("triggerProps",k),{getButtonProps:K,buttonRef:D}=mt({disabled:l,native:c}),I={open(ee){return ee&&w===A.triggerPress?En.open(ee):no.open(ee)}},{preFocusGuardRef:z,handlePreFocusGuardFocus:te,handleFocusTargetFocus:re}=Tn(x,E),J=F("button",e,{state:{disabled:l,open:N},ref:[D,o,T,E],props:[H.reference,_,Z,$,{[$o]:"",id:b,"aria-haspopup":"dialog","aria-expanded":N,"aria-controls":S},f,K],stateAttributesMapping:I});return k&&!W?(0,Nt.jsxs)(xt.Fragment,{children:[(0,Nt.jsx)(Gs,{ref:z,onFocus:te}),(0,Nt.jsx)(xt.Fragment,{children:J},b),(0,Nt.jsx)(Gs,{ref:x.context.triggerFocusTargetRef,onFocus:re})]}):(0,Nt.jsx)(xt.Fragment,{children:J},b)},"PopoverTrigger"));Js.displayName="PopoverTrigger";var Un=C(M(),1);var us=C(M(),1);var fs=us.createContext(void 0);fs.displayName="PopoverPortalContext";function zn(){let t=us.useContext(fs);if(t===void 0)throw new Error("Base UI: <Popover.Portal> is missing.");return t}a(zn,"usePopoverPortalContext");var Xs=C(be(),1);var er=Un.forwardRef(a(function(e,o){let{keepMounted:s=!1,...r}=e,{store:n}=oe();return n.useState("mounted")||s?(0,Xs.jsx)(fs.Provider,{value:s,children:(0,Xs.jsx)(zo,{ref:o,...r})}):null},"PopoverPortal"));er.displayName="PopoverPortal";var co=C(M(),1);var ms=C(M(),1);var gs=ms.createContext(void 0);gs.displayName="PopoverPositionerContext";function lo(){let t=ms.useContext(gs);if(!t)throw new Error("Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.");return t}a(lo,"usePopoverPositionerContext");var vo=C(be(),1);var tr=co.forwardRef(a(function(e,o){let{render:s,className:r,style:n,anchor:l,positionMethod:c="absolute",side:p="bottom",align:d="center",sideOffset:u=0,alignOffset:g=0,collisionBoundary:m="clipping-ancestors",collisionPadding:h=5,arrowPadding:f=5,sticky:v=!1,disableAnchorTracking:x=!1,collisionAvoidance:b=jo,...R}=e,{store:P}=oe(),N=zn(),S=mn(),E=P.useState("floatingRootContext"),T=P.useState("mounted"),k=P.useState("open"),w=P.useState("openChangeReason"),O=P.useState("activeTriggerElement"),V=P.useState("modal"),W=P.useState("openMethod"),_=P.useState("positionerElement"),H=P.useState("instantType"),$=P.useState("transitionStatus"),Z=P.useState("hasViewport"),K=co.useRef(null),D=an(_,!1,!1),I=os({anchor:l,floatingRootContext:E,positionMethod:c,mounted:T,side:p,sideOffset:u,align:d,alignOffset:g,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:v,disableAnchorTracking:x,keepMounted:N,nodeId:S,collisionAvoidance:b,adaptiveOrigin:Z?ts:void 0}),z=E.useState("domReferenceElement");ut(()=>{let J=z,ee=K.current;if(J&&(K.current=J),ee&&J&&J!==ee){P.set("instantType",void 0);let ae=new AbortController;return D(()=>{P.set("instantType","trigger-change")},ae.signal),()=>{ae.abort()}}},[z,D,P]),kn(k&&V===!0&&w!==A.triggerHover,W==="touch",_,O);let te=co.useCallback(J=>{P.set("positionerElement",J)},[P]),re={open:k,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:H},ne=ns(e,re,{styles:I.positionerStyles,transitionStatus:$,props:R,refs:[o,te],hidden:!T,inert:!k});return(0,vo.jsxs)(gs.Provider,{value:I,children:[T&&V===!0&&w!==A.triggerHover&&(0,vo.jsx)(ss,{ref:P.context.internalBackdropRef,inert:es(!k),cutout:O}),(0,vo.jsx)(gn,{id:S,children:ne})]})},"PopoverPositioner"));tr.displayName="PopoverPositioner";var hs=C(M(),1);var bt=C(M(),1);var Wn=C(be(),1);var or=bt.createContext(void 0);or.displayName="ClosePartContext";function Zn(){let[t,e]=bt.useState(0),o=en(()=>(e(r=>r+1),()=>{e(r=>Math.max(0,r-1))}));return{context:bt.useMemo(()=>({register:o}),[o]),hasClosePart:t>0}}a(Zn,"useClosePartCount");function qn(t){let{value:e,children:o}=t;return(0,Wn.jsx)(or.Provider,{value:e,children:o})}a(qn,"ClosePartProvider");function Gn(){let t=bt.useContext(or);ut(()=>t?.register(),[t])}a(Gn,"useClosePartRegistration");var sr=C(be(),1);var yi={...ue,...He},rr=hs.forwardRef(a(function(e,o){let{render:s,className:r,style:n,initialFocus:l,finalFocus:c,...p}=e,{store:d}=oe(),u=lo(),g=On(!0)!=null,{context:m,hasClosePart:h}=Zn(),f=d.useState("open"),v=d.useState("openMethod"),x=d.useState("instantType"),b=d.useState("transitionStatus"),R=d.useState("popupProps"),P=d.useState("titleElementId"),N=d.useState("descriptionElementId"),S=d.useState("modal"),E=d.useState("mounted"),T=d.useState("openChangeReason"),k=d.useState("activeTriggerElement"),w=d.useState("floatingRootContext"),O=w.useState("floatingId"),V=d.useState("disabled"),W=d.useState("openOnHover"),_=d.useState("closeDelay"),H=p.id??O;qt({open:f,ref:d.context.popupRef,onComplete(){f&&d.context.onOpenChangeComplete?.(!0)}}),Qo(w,{enabled:W&&!V,closeDelay:_});let $=l===void 0?Zo(d.context.popupRef):l,Z=S!==!1&&h;d.useSyncedValue("focusManagerModal",Z);let K=hs.useCallback(z=>{d.set("popupElement",z)},[d]),D={open:f,side:u.side,align:u.align,instant:x,transitionStatus:b},I=F("div",e,{state:D,ref:[o,d.context.popupRef,K],props:[R,{id:H,role:"dialog",...ft,"aria-labelledby":P,"aria-describedby":N,onKeyDown(z){g&&as.has(z.key)&&z.stopPropagation()}},rs(b),p],stateAttributesMapping:yi});return(0,sr.jsx)(Uo,{context:w,openInteractionType:v,modal:Z,disabled:!E||T===A.triggerHover,initialFocus:$,returnFocus:c,restoreFocus:"popup",previousFocusableElement:tn(k)?k:void 0,nextFocusableElement:d.context.triggerFocusTargetRef,beforeContentFocusGuardRef:d.context.beforeContentFocusGuardRef,children:(0,sr.jsx)(qn,{value:m,children:I})})},"PopoverPopup"));rr.displayName="PopoverPopup";var Kn=C(M(),1);var nr=Kn.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:c}=oe(),p=c.useState("open"),{arrowRef:d,side:u,align:g,arrowUncentered:m,arrowStyles:h}=lo();return F("div",e,{state:{open:p,side:u,align:g,uncentered:m},ref:[o,d],props:[{style:h,"aria-hidden":!0},l],stateAttributesMapping:ue})},"PopoverArrow"));nr.displayName="PopoverArrow";var Qn=C(M(),1);var Pi={...ue,...He},ar=Qn.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:c}=oe(),p=c.useState("open"),d=c.useState("mounted"),u=c.useState("transitionStatus"),g=c.useState("openChangeReason");return F("div",e,{state:{open:p,transitionStatus:u},ref:[c.context.backdropRef,o],props:[{role:"presentation",hidden:!d,style:{pointerEvents:g===A.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:Pi})},"PopoverBackdrop"));ar.displayName="PopoverBackdrop";var Yn=C(M(),1);var ir=Yn.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:c}=oe(),p=ye(l.id);return c.useSyncedValueWithCleanup("titleElementId",p),F("h2",e,{ref:o,props:[{id:p},l]})},"PopoverTitle"));ir.displayName="PopoverTitle";var Jn=C(M(),1);var lr=Jn.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:c}=oe(),p=ye(l.id);return c.useSyncedValueWithCleanup("descriptionElementId",p),F("p",e,{ref:o,props:[{id:p},l]})},"PopoverDescription"));lr.displayName="PopoverDescription";var Xn=C(M(),1);var dr=Xn.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:c=!0,...p}=e,{buttonRef:d,getButtonProps:u}=mt({disabled:l,focusableWhenDisabled:!1,native:c}),{store:g}=oe();return Gn(),F("button",e,{ref:[o,d],props:[{onClick(h){g.setOpen(!1,Y(A.closePress,h.nativeEvent))}},p,u]})},"PopoverClose"));dr.displayName="PopoverClose";var ta=C(M(),1);var ea=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var Ri={activationDirection:a(t=>t?{"data-activation-direction":t}:null,"activationDirection")},cr=ta.forwardRef(a(function(e,o){let{render:s,className:r,style:n,children:l,...c}=e,{store:p}=oe(),{side:d}=lo(),u=p.useState("instantType"),{children:g,state:m}=is({store:p,side:d,cssVars:ea,children:l}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:u};return F("div",e,{state:h,ref:o,props:[c,{children:g}],stateAttributesMapping:Ri})},"PopoverViewport"));cr.displayName="PopoverViewport";var xo=class{static{a(this,"PopoverHandle")}constructor(){this.store=new io}open(e){let o=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!o)throw new Error(`Base UI: PopoverHandle.open: No trigger found with id "${e}".`);this.store.setOpen(!0,Y(A.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(A.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function oa(){return new xo}a(oa,"createPopoverHandle");var fe={};Us(fe,{Backdrop:()=>pr,Close:()=>ur,Description:()=>fr,Handle:()=>Co,Popup:()=>mr,Portal:()=>gr,Root:()=>ha,Title:()=>xr,Trigger:()=>br,Viewport:()=>vr,createHandle:()=>ba});var sa=C(M(),1);var bo=C(M(),1);var yo=bo.createContext(!1);yo.displayName="IsDrawerContext";var vs=bo.createContext(void 0);vs.displayName="DialogRootContext";function le(t){let e=bo.useContext(vs);if(t===!1&&e===void 0)throw new Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");return e}a(le,"useDialogRootContext");var Ci={...ue,...He},pr=sa.forwardRef(a(function(e,o){let{render:s,className:r,style:n,forceRender:l=!1,...c}=e,{store:p}=le(),d=p.useState("open"),u=p.useState("nested"),g=p.useState("mounted"),m=p.useState("transitionStatus");return F("div",e,{state:{open:d,transitionStatus:m},ref:[p.context.backdropRef,o],stateAttributesMapping:Ci,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},c],enabled:l||!u})},"DialogBackdrop"));pr.displayName="DialogBackdrop";var ra=C(M(),1);var ur=ra.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:c=!0,...p}=e,{store:d}=le(),u=d.useState("open"),{getButtonProps:g,buttonRef:m}=mt({disabled:l,native:c}),h={disabled:l};function f(v){u&&d.setOpen(!1,Y(A.closePress,v.nativeEvent))}return a(f,"handleClick"),F("button",e,{state:h,ref:[o,m],props:[{onClick:f},p,g]})},"DialogClose"));ur.displayName="DialogClose";var na=C(M(),1);var fr=na.forwardRef(a(function(e,o){let{render:s,className:r,style:n,id:l,...c}=e,{store:p}=le(),d=ye(l);return p.useSyncedValueWithCleanup("descriptionElementId",d),F("p",e,{ref:o,props:[{id:d},c]})},"DialogDescription"));fr.displayName="DialogDescription";var la=C(M(),1);var aa=(function(t){return t.nestedDialogs="--nested-dialogs",t})({});var ia=(function(t){return t[t.open=tt.open]="open",t[t.closed=tt.closed]="closed",t[t.startingStyle=tt.startingStyle]="startingStyle",t[t.endingStyle=tt.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var xs=C(M(),1);var bs=xs.createContext(void 0);bs.displayName="DialogPortalContext";function ys(){let t=xs.useContext(bs);if(t===void 0)throw new Error("Base UI: <Dialog.Portal> is missing.");return t}a(ys,"useDialogPortalContext");var da=C(be(),1);var Si={...ue,...He,nestedDialogOpen(t){return t?{[ia.nestedDialogOpen]:""}:null}},mr=la.forwardRef(a(function(e,o){let{render:s,className:r,style:n,finalFocus:l,initialFocus:c,...p}=e,{store:d}=le(),u=d.useState("descriptionElementId"),g=d.useState("disablePointerDismissal"),m=d.useState("floatingRootContext"),h=d.useState("popupProps"),f=d.useState("modal"),v=d.useState("mounted"),x=d.useState("nested"),b=d.useState("nestedOpenDialogCount"),R=d.useState("open"),P=d.useState("openMethod"),N=d.useState("titleElementId"),S=d.useState("transitionStatus"),E=d.useState("role"),T=m.useState("floatingId"),k=p.id??T;ys(),qt({open:R,ref:d.context.popupRef,onComplete(){R&&d.context.onOpenChangeComplete?.(!0)}});let w=c===void 0?Zo(d.context.popupRef):c,O=b>0,V=d.useStateSetter("popupElement"),_=F("div",e,{state:{open:R,nested:x,transitionStatus:S,nestedDialogOpen:O},props:[h,{id:k,"aria-labelledby":N??void 0,"aria-describedby":u??void 0,role:E,...ft,hidden:!v,onKeyDown(H){as.has(H.key)&&H.stopPropagation()},style:{[aa.nestedDialogs]:b}},p],ref:[o,d.context.popupRef,V],stateAttributesMapping:Si});return(0,da.jsx)(Uo,{context:m,openInteractionType:P,disabled:!v,closeOnFocusOut:!g,initialFocus:w,returnFocus:l,modal:f!==!1,restoreFocus:"popup",children:_})},"DialogPopup"));mr.displayName="DialogPopup";var ca=C(M(),1);var Po=C(be(),1);var gr=ca.forwardRef(a(function(e,o){let{keepMounted:s=!1,...r}=e,{store:n}=le(),l=n.useState("mounted"),c=n.useState("modal"),p=n.useState("open");return l||s?(0,Po.jsx)(bs.Provider,{value:s,children:(0,Po.jsxs)(zo,{ref:o,...r,children:[l&&c===!0&&(0,Po.jsx)(ss,{ref:n.context.internalBackdropRef,inert:es(!p)}),e.children]})}):null},"DialogPortal"));gr.displayName="DialogPortal";var ga=C(M(),1);var fa=C(M(),1);var dt=C(M(),1);function pa(t){let{store:e,actionsRef:o}=t,s=e.useState("open");Ko(e,s),Jt(e);let{forceUnmount:r}=Xt(s,e),n=dt.useCallback(()=>{e.setOpen(!1,Y(A.imperativeAction))},[e]);dt.useImperativeHandle(o,()=>({unmount:r,close:n}),[r,n])}a(pa,"useDialogRoot");function ua({store:t,parentContext:e,isDrawer:o}){let s=t.useState("open"),r=t.useState("disablePointerDismissal"),n=t.useState("modal"),l=t.useState("popupElement"),c=t.useState("floatingRootContext"),[p,d]=dt.useState(0),[u,g]=dt.useState(0),m=p===0,h=Gt(c,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:n==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(b){if(!t.context.outsidePressEnabledRef.current||"button"in b&&b.button!==0||"touches"in b&&b.touches.length!==1)return!1;let R=on(b);return m&&!r?n&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===R||t.context.backdropRef.current===R||ho(R,l)&&!R?.hasAttribute("data-base-ui-portal"):!0:!1},escapeKey:m});wn(s&&n===!0,l),t.useContextCallback("onNestedDialogOpen",(b,R)=>{d(b),g(R)}),t.useContextCallback("onNestedDialogClose",()=>{d(0),g(0)}),dt.useEffect(()=>(e?.onNestedDialogOpen&&s&&e.onNestedDialogOpen(p+1,u+(o?1:0)),e?.onNestedDialogClose&&!s&&e.onNestedDialogClose(),()=>{e?.onNestedDialogClose&&s&&e.onNestedDialogClose()}),[o,s,p,u,e]);let f=h.reference??Rt,v=h.trigger??Rt,x=h.floating??Rt;return eo(t,{activeTriggerProps:f,inactiveTriggerProps:v,popupProps:x,nestedOpenDialogCount:p,nestedOpenDrawerCount:u}),null}a(ua,"DialogInteractions");var Ps=C(M(),1);var Ni={...ro,modal:j(t=>t.modal),nested:j(t=>t.nested),nestedOpenDialogCount:j(t=>t.nestedOpenDialogCount),nestedOpenDrawerCount:j(t=>t.nestedOpenDrawerCount),disablePointerDismissal:j(t=>t.disablePointerDismissal),openMethod:j(t=>t.openMethod),descriptionElementId:j(t=>t.descriptionElementId),titleElementId:j(t=>t.titleElementId),viewportElement:j(t=>t.viewportElement),role:j(t=>t.role)},po=class t extends Kt{static{a(this,"DialogStore")}constructor(e,o,s=!1){let r=new to,n=Ei(e);n.floatingRootContext=so(r,o,s),super(n,{popupRef:Ps.createRef(),backdropRef:Ps.createRef(),internalBackdropRef:Ps.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},Ni)}setOpen=a((e,o)=>{if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!e&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let s={open:e};qo(s,e,o.trigger),this.update(s)},"setOpen");static useStore(e,o){return Qt(e,(r,n)=>new t(o,r,n),!0).store}};function Ei(t={}){return{...oo(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...t}}a(Ei,"createInitialState");var Ro=C(be(),1);function ma(t,e="dialog"){let{children:o,open:s,defaultOpen:r=!1,onOpenChange:n,onOpenChangeComplete:l,disablePointerDismissal:c=!1,modal:p=!0,actionsRef:d,handle:u,triggerId:g,defaultTriggerId:m=null}=t,h=e==="drawer",f=e==="alert-dialog",v=f?!0:p,x=f||c,b=f?"alertdialog":"dialog",R=le(!0),N={modal:v,disablePointerDismissal:x,nested:!!R,role:b},S=po.useStore(u?.store,{open:r,openProp:s,activeTriggerId:m,triggerIdProp:g,...N});xn(()=>{let V=s===void 0&&S.state.open===!1&&r===!0?{open:!0,activeTriggerId:m}:null;f?S.update(V?{...N,...V}:N):V&&S.update(V)}),S.useControlledProp("openProp",s),S.useControlledProp("triggerIdProp",g),S.useSyncedValues(N),S.useContextCallback("onOpenChange",n),S.useContextCallback("onOpenChangeComplete",l);let E=S.useState("open"),T=S.useState("mounted"),k=S.useState("payload");pa({store:S,actionsRef:d});let w=E||T,O=fa.useMemo(()=>({store:S}),[S]);return(0,Ro.jsx)(yo.Provider,{value:!1,children:(0,Ro.jsxs)(vs.Provider,{value:O,children:[w&&(0,Ro.jsx)(ua,{store:S,parentContext:R?.store.context,isDrawer:h}),typeof o=="function"?o({payload:k}):o]})})}a(ma,"useRenderDialogRoot");function ha(t){let e=ga.useContext(yo)?"drawer":"dialog";return ma(t,e)}a(ha,"DialogRoot");var va=C(M(),1);var hr=(function(t){return t[t.open=tt.open]="open",t[t.closed=tt.closed]="closed",t[t.startingStyle=tt.startingStyle]="startingStyle",t[t.endingStyle=tt.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var Ti={...ue,...He,nested(t){return t?{[hr.nested]:""}:null},nestedDialogOpen(t){return t?{[hr.nestedDialogOpen]:""}:null}},vr=va.forwardRef(a(function(e,o){let{render:s,className:r,style:n,children:l,...c}=e,p=ys(),{store:d}=le(),u=d.useState("open"),g=d.useState("nested"),m=d.useState("transitionStatus"),h=d.useState("nestedOpenDialogCount"),f=d.useState("mounted"),v=d.useStateSetter("viewportElement"),x=h>0;return F("div",e,{enabled:p||f,state:{open:u,nested:g,transitionStatus:m,nestedDialogOpen:x},ref:[o,v],stateAttributesMapping:Ti,props:[{role:"presentation",hidden:!f,style:{pointerEvents:u?void 0:"none"},children:l},c]})},"DialogViewport"));vr.displayName="DialogViewport";var xa=C(M(),1);var xr=xa.forwardRef(a(function(e,o){let{render:s,className:r,style:n,id:l,...c}=e,{store:p}=le(),d=ye(l);return p.useSyncedValueWithCleanup("titleElementId",d),F("h2",e,{ref:o,props:[{id:d},c]})},"DialogTitle"));xr.displayName="DialogTitle";var Rs=C(M(),1);var br=Rs.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:c=!0,id:p,payload:d,handle:u,...g}=e,m=le(!0),h=u?.store??m?.store;if(!h)throw new Error("Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.");let f=ye(p),v=h.useState("floatingRootContext"),x=h.useState("isOpenedByTrigger",f),b=h.useState("triggerPopupId",f),R=Rs.useRef(null),{registerTrigger:P,isMountedByThisTrigger:N}=Yt(f,R,h,{payload:d}),{getButtonProps:S,buttonRef:E}=mt({disabled:l,native:c}),T=Wo(v,{enabled:v!=null}),k=Xo(()=>h.select("open"),V=>{h.set("openMethod",V)}),w={disabled:l,open:x},O=h.useState("triggerProps",N);return F("button",e,{state:w,ref:[E,o,P,R],props:[T.reference,O,k,{[$o]:"",id:f,"aria-haspopup":"dialog","aria-expanded":x,"aria-controls":b},g,S],stateAttributesMapping:no})},"DialogTrigger"));br.displayName="DialogTrigger";var Co=class{static{a(this,"DialogHandle")}constructor(e){this.store=e??new po}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;e&&!o&&console.warn(`Base UI: DialogHandle.open: No trigger found with id "${e}". The dialog will open, but the trigger will not be associated with the dialog.`),this.store.setOpen(!0,Y(A.imperativeAction,void 0,o))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,Y(A.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,Y(A.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function ba(){return new Co}a(ba,"createDialogHandle");var st={};Us(st,{Arrow:()=>Tr,Handle:()=>So,Popup:()=>Er,Portal:()=>Sr,Positioner:()=>Nr,Provider:()=>Or,Root:()=>yr,Trigger:()=>Pr,Viewport:()=>Mr,createHandle:()=>_a});var ot=C(M(),1);var Cs=C(M(),1);var Ss=Cs.createContext(void 0);Ss.displayName="TooltipRootContext";function je(t){let e=Cs.useContext(Ss);if(e===void 0&&!t)throw new Error("Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.");return e}a(je,"useTooltipRootContext");var ya=C(M(),1);var wi={...ro,disabled:j(t=>t.disabled),instantType:j(t=>t.instantType),isInstantPhase:j(t=>t.isInstantPhase),trackCursorAxis:j(t=>t.trackCursorAxis),disableHoverablePopup:j(t=>t.disableHoverablePopup),lastOpenChangeReason:j(t=>t.openChangeReason),closeOnClick:j(t=>t.closeOnClick),closeDelay:j(t=>t.closeDelay),hasViewport:j(t=>t.hasViewport)},uo=class t extends Kt{static{a(this,"TooltipStore")}constructor(e,o,s=!1){let r=new to,n={...ki(),...e};n.floatingRootContext=so(r,o,s),super(n,{popupRef:ya.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r},wi)}setOpen=a((e,o)=>{Rn(this,e,o,{extraState:{openChangeReason:o.reason}})},"setOpen");cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Y(A.triggerPress,e))}static useStore(e,o){return Qt(e,(r,n)=>new t(o,r,n)).store}};function ki(){return{...oo(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}a(ki,"createInitialState");var Ns=C(be(),1);var yr=bn(a(function(e){let{disabled:o=!1,defaultOpen:s=!1,open:r,disableHoverablePopup:n=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:p,onOpenChangeComplete:d,handle:u,triggerId:g,defaultTriggerId:m=null,children:h}=e,f=uo.useStore(u?.store,{open:s,openProp:r,activeTriggerId:m,triggerIdProp:g});Go(f,r,s,m),f.useControlledProp("openProp",r),f.useControlledProp("triggerIdProp",g),f.useContextCallback("onOpenChange",p),f.useContextCallback("onOpenChangeComplete",d);let v=f.useState("open"),x=!o&&v,b=f.useState("activeTriggerId"),R=f.useState("mounted"),P=f.useState("payload");f.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:n}),f.useSyncedValue("disabled",o),Jt(f,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:N,transitionStatus:S}=Xt(x,f),E=f.useState("isInstantPhase"),T=f.useState("instantType"),k=f.useState("lastOpenChangeReason"),w=ot.useRef(null);ut(()=>{v&&o&&f.setOpen(!1,Y(A.disabled))},[v,o,f]),ut(()=>{S==="ending"&&k===A.none||S!=="ending"&&E?(T!=="delay"&&(w.current=T),f.set("instantType","delay")):w.current!==null&&(f.set("instantType",w.current),w.current=null)},[S,E,k,T,f]),ut(()=>{x&&b==null&&f.set("payload",void 0)},[f,b,x]);let O=ot.useCallback(()=>{f.setOpen(!1,Y(A.imperativeAction))},[f]);ot.useImperativeHandle(c,()=>({unmount:N,close:O}),[N,O]);let V=x||R||!o&&l!=="none";return(0,Ns.jsxs)(Ss.Provider,{value:f,children:[V&&(0,Ns.jsx)(Oi,{store:f,disabled:o,trackCursorAxis:l}),typeof h=="function"?h({payload:P}):h]})},"TooltipRoot"));yr.displayName="TooltipRoot";function Oi({store:t,disabled:e,trackCursorAxis:o}){let s=t.useState("floatingRootContext"),r=Gt(s,{enabled:!e,referencePress:a(()=>t.select("closeOnClick"),"referencePress")}),n=vn(s,{enabled:!e&&o!=="none",axis:o==="none"?void 0:o}),l=ot.useMemo(()=>it(n.reference,r.reference),[n.reference,r.reference]),c=ot.useMemo(()=>it(n.trigger,r.trigger),[n.trigger,r.trigger]),p=ot.useMemo(()=>it(ft,n.floating,r.floating),[n.floating,r.floating]);return eo(t,{activeTriggerProps:l,inactiveTriggerProps:c,popupProps:p}),null}a(Oi,"TooltipInteractions");var ws=C(M(),1);var Es=C(M(),1);var Ts=Es.createContext(void 0);Ts.displayName="TooltipProviderContext";function Pa(){return Es.useContext(Ts)}a(Pa,"useTooltipProviderContext");var Ra=(function(t){return t[t.popupOpen=Nn.popupOpen]="popupOpen",t.triggerDisabled="data-trigger-disabled",t})({});var Sa="data-base-ui-tooltip-trigger";function Ca(t){if("composedPath"in t){let o=t.composedPath();for(let s=0;s<o.length;s+=1){let r=o[s];if(Ho(r))return r}}let e=t.target;return Ho(e)?e:null}a(Ca,"getTargetElement");function Mi(t){let e=t;for(;e;){if(e.hasAttribute(Sa))return e;let o=e.parentElement;if(o){e=o;continue}let s=e.getRootNode();e="host"in s&&Ho(s.host)?s.host:null}return null}a(Mi,"closestEnabledTooltipTrigger");var Pr=yn(a(function(e,o){let{render:s,className:r,style:n,handle:l,payload:c,disabled:p,delay:d,closeOnClick:u=!0,closeDelay:g,id:m,...h}=e,f=je(!0),v=l?.store??f;if(!v)throw new Error("Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.");let x=ye(m),b=v.useState("isTriggerActive",x),R=v.useState("isOpenedByTrigger",x),P=v.useState("floatingRootContext"),N=ws.useRef(null),S=d??600,E=g??0,{registerTrigger:T,isMountedByThisTrigger:k}=Yt(x,N,v,{payload:c,closeOnClick:u,closeDelay:E}),w=Pa(),{delayRef:O,isInstantPhase:V,hasProvider:W}=cn(P,{open:R}),_=Sn(P);v.useSyncedValue("isInstantPhase",V);let H=v.useState("disabled"),$=p??H,Z=pn($),K=v.useState("trackCursorAxis"),D=v.useState("disableHoverablePopup"),I=ws.useRef(!1),z=nn(),te=ws.useRef(void 0);function re(){let L=w?.delay,Q=typeof O.current=="object"?O.current.open:void 0,X=S;return W&&(Q!==0?X=d??L??S:X=0),X}a(re,"getOpenDelay");function ne(L){let Q=N.current;if(!Q||!L)return!1;let X=Mi(L);return X!==null&&X!==Q&&ho(Q,X)}a(ne,"isEnabledNestedTriggerTarget");function J(L){let Q=ne(L);return I.current=Q,Q&&(_.openChangeTimeout.clear(),_.restTimeout.clear(),_.restTimeoutPending=!1,z.clear()),Q}a(J,"detectNestedTriggerHover");let ee=Yo(P,{enabled:!$,mouseOnly:!0,move:!1,handleClose:!D&&K!=="both"?Jo():null,restMs:re,delay(){let L=typeof O.current=="object"?O.current.close:void 0,Q=E;return g==null&&W&&(Q=L),{close:Q}},triggerElementRef:N,isActiveTrigger:b,isClosing:a(()=>v.select("transitionStatus")==="ending","isClosing"),shouldOpen(){return!I.current}}),ae=Cn(P,{enabled:!$}).reference,Be=a(L=>{let Q=I.current,X=Ca(L),xe=J(X),se=N.current,Fe=se&&X&&ho(se,X);if(xe&&v.select("open")&&v.select("lastOpenChangeReason")===A.triggerHover){v.setOpen(!1,Y(A.triggerHover,L));return}if(Q&&!xe&&Fe&&!Z.current&&!v.select("open")&&se&&sn(te.current)){let ce=a(()=>{!I.current&&!Z.current&&!v.select("open")&&v.setOpen(!0,Y(A.triggerHover,L,se))},"open"),pe=re();pe===0?(z.clear(),ce()):z.start(pe,ce)}},"handleNestedTriggerHover"),me=v.useState("triggerProps",k);return F("button",e,{state:{open:R},ref:[o,T,N],props:[ee,ae,k||K!=="none"?me:void 0,{onMouseOver(L){Be(L.nativeEvent)},onFocus(L){ne(Ca(L.nativeEvent))&&L.preventBaseUIHandler()},onMouseLeave(){I.current=!1,z.clear(),te.current=void 0},onPointerEnter(L){te.current=L.pointerType},onPointerDown(L){te.current=L.pointerType,v.set("closeOnClick",u),u&&!v.select("open")&&v.cancelPendingOpen(L.nativeEvent)},onClick(L){u&&!v.select("open")&&v.cancelPendingOpen(L.nativeEvent)},id:x,[Ra.triggerDisabled]:$?"":void 0,[Sa]:$?void 0:""},h],stateAttributesMapping:no})},"TooltipTrigger"));Pr.displayName="TooltipTrigger";var wa=C(M(),1);var ks=C(M(),1);var Os=ks.createContext(void 0);Os.displayName="TooltipPortalContext";function Na(){let t=ks.useContext(Os);if(t===void 0)throw new Error("Base UI: <Tooltip.Portal> is missing.");return t}a(Na,"useTooltipPortalContext");var Ms=C(M(),1),Ea=C(Hr(),1);var Ta=C(be(),1);var Rr=Ms.forwardRef(a(function(e,o){let{children:s,container:r,className:n,render:l,style:c,...p}=e,{portalNode:d,portalSubtree:u}=un({container:r,ref:o,componentProps:e,elementProps:p});return!u&&!d?null:(0,Ta.jsxs)(Ms.Fragment,{children:[u,d&&Ea.createPortal(s,d)]})},"FloatingPortalLite"));Rr.displayName="FloatingPortalLite";var Cr=C(be(),1);var Sr=wa.forwardRef(a(function(e,o){let{keepMounted:s=!1,...r}=e;return je().useState("mounted")||s?(0,Cr.jsx)(Os.Provider,{value:s,children:(0,Cr.jsx)(Rr,{ref:o,...r})}):null},"TooltipPortal"));Sr.displayName="TooltipPortal";var _s=C(M(),1);var Is=C(M(),1);var Ds=Is.createContext(void 0);Ds.displayName="TooltipPositionerContext";function fo(){let t=Is.useContext(Ds);if(t===void 0)throw new Error("Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.");return t}a(fo,"useTooltipPositionerContext");var ka=C(be(),1);var Nr=_s.forwardRef(a(function(e,o){let{render:s,className:r,anchor:n,positionMethod:l="absolute",side:c="top",align:p="center",sideOffset:d=0,alignOffset:u=0,collisionBoundary:g="clipping-ancestors",collisionPadding:m=5,arrowPadding:h=5,sticky:f=!1,disableAnchorTracking:v=!1,collisionAvoidance:x=jo,style:b,...R}=e,P=je(),N=Na(),S=P.useState("open"),E=P.useState("mounted"),T=P.useState("trackCursorAxis"),k=P.useState("disableHoverablePopup"),w=P.useState("floatingRootContext"),O=P.useState("instantType"),V=P.useState("transitionStatus"),W=P.useState("hasViewport"),_=os({anchor:n,positionMethod:l,floatingRootContext:w,mounted:E,side:c,sideOffset:d,align:p,alignOffset:u,collisionBoundary:g,collisionPadding:m,sticky:f,arrowPadding:h,disableAnchorTracking:v,keepMounted:N,collisionAvoidance:x,adaptiveOrigin:W?ts:void 0}),H=_s.useMemo(()=>({open:S,side:_.side,align:_.align,anchorHidden:_.anchorHidden,instant:T!=="none"?"tracking-cursor":O}),[S,_.side,_.align,_.anchorHidden,T,O]),$=ns(e,H,{styles:_.positionerStyles,transitionStatus:V,props:R,refs:[o,P.useStateSetter("positionerElement")],hidden:!E,inert:!S||T==="both"||k});return(0,ka.jsx)(Ds.Provider,{value:_,children:$})},"TooltipPositioner"));Nr.displayName="TooltipPositioner";var Oa=C(M(),1);var Ii={...ue,...He},Er=Oa.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,c=je(),{side:p,align:d}=fo(),u=c.useState("open"),g=c.useState("instantType"),m=c.useState("transitionStatus"),h=c.useState("popupProps"),f=c.useState("floatingRootContext"),v=c.useState("disabled"),x=c.useState("closeDelay");qt({open:u,ref:c.context.popupRef,onComplete(){u&&c.context.onOpenChangeComplete?.(!0)}}),Qo(f,{enabled:!v,closeDelay:x});let b=c.useStateSetter("popupElement");return F("div",e,{state:{open:u,side:p,align:d,instant:g,transitionStatus:m},ref:[o,c.context.popupRef,b],props:[h,rs(m),l],stateAttributesMapping:Ii})},"TooltipPopup"));Er.displayName="TooltipPopup";var Ma=C(M(),1);var Tr=Ma.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,c=je(),{arrowRef:p,side:d,align:u,arrowUncentered:g,arrowStyles:m}=fo(),h=c.useState("open"),f=c.useState("instantType");return F("div",e,{state:{open:h,side:d,align:u,uncentered:g,instant:f},ref:[o,p],props:[{style:m,"aria-hidden":!0},l],stateAttributesMapping:ue})},"TooltipArrow"));Tr.displayName="TooltipArrow";var wr=C(M(),1);var kr=C(be(),1);var Or=a(function(e){let{delay:o,closeDelay:s,timeout:r=400}=e,n=wr.useMemo(()=>({delay:o,closeDelay:s}),[o,s]),l=wr.useMemo(()=>({open:o,close:s}),[o,s]);return(0,kr.jsx)(Ts.Provider,{value:n,children:(0,kr.jsx)(dn,{delay:l,timeoutMs:r,children:e.children})})},"TooltipProvider");Or.displayName="TooltipProvider";var Da=C(M(),1);var Ia=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var Di={activationDirection:a(t=>t?{"data-activation-direction":t}:null,"activationDirection")},Mr=Da.forwardRef(a(function(e,o){let{render:s,className:r,style:n,children:l,...c}=e,p=je(),d=fo(),u=p.useState("instantType"),{children:g,state:m}=is({store:p,side:d.side,cssVars:Ia,children:l}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:u};return F("div",e,{state:h,ref:o,props:[c,{children:g}],stateAttributesMapping:Di})},"TooltipViewport"));Mr.displayName="TooltipViewport";var So=class{static{a(this,"TooltipHandle")}constructor(){this.store=new uo}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!o)throw new Error(`Base UI: TooltipHandle.open: No trigger found with id "${e}".`);this.store.setOpen(!0,Y(A.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(A.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function _a(){return new So}a(_a,"createTooltipHandle");var Ve=C(Lo(),1);var rt=C(M(),1);var y=C(mo(),1);var _i=_n(Ct.studioFeatures),Fa={analytics:!0,auth:!0,containers:!0,flags:!0,kv:!0,mail:!0,payments:!0,queues:!0,scheduler:!0,storage:!0,vectors:!0,workflows:!0},Ai=a(t=>{if(t===null||typeof t!="object")return Fa;let e=t,o=a(s=>typeof e[s]=="boolean"?e[s]:!0,"flag");return{analytics:o("analytics"),auth:o("auth"),containers:o("containers"),flags:o("flags"),kv:o("kv"),mail:o("mail"),payments:o("payments"),queues:o("queues"),scheduler:o("scheduler"),storage:o("storage"),vectors:o("vectors"),workflows:o("workflows")}},"coerceFeatures"),_r=a(()=>{let t=(0,Ve.c)(3),e=Zs(),[o,s]=(0,rt.useState)(Fa),r,n;return t[0]!==e?(r=a(()=>{$e((async()=>{try{s(Ai(await e.query(_i,{},An(""))))}catch{}})())},"t0"),n=[e],t[0]=e,t[1]=r,t[2]=n):(r=t[1],n=t[2]),(0,rt.useEffect)(r,n),o},"useStudioFeatures"),Vi=a(()=>{let t=(0,Ve.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,y.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,y.jsxDEV)("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1)},void 0,!1),t[0]=e):e=t[0],e},"ChevronRight$1"),Bi=a(t=>{let e=(0,Ve.c)(24),{group:o}=t,s=ie(),r=pt(),n;e[0]!==o.tab||e[1]!==r?(n=a(()=>{$e(r({to:`/${o.tab}`}))},"t1"),e[0]=o.tab,e[1]=r,e[2]=n):n=e[2];let l=n,c=o.bindings.length,p;e[3]!==o.label?(p=(0,y.jsxDEV)("span",{className:"text-sm font-medium text-foreground",children:o.label},void 0,!1),e[3]=o.label,e[4]=p):p=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=(0,y.jsxDEV)(Vi,{},void 0,!1),e[5]=d):d=e[5];let u;e[6]!==p?(u=(0,y.jsxDEV)("div",{className:"flex items-center justify-between",children:[p,d]},void 0,!0),e[6]=p,e[7]=u):u=e[7];let g;e[8]!==c||e[9]!==s?(g=c===1?s("1 binding"):s("{count} bindings",{count:c}),e[8]=c,e[9]=s,e[10]=g):g=e[10];let m;e[11]!==g?(m=(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:g},void 0,!1),e[11]=g,e[12]=m):m=e[12];let h;e[13]!==c||e[14]!==o.bindings?(h=c>0&&(0,y.jsxDEV)("div",{className:"flex flex-wrap gap-1.5",children:o.bindings.map(Hi)},void 0,!1),e[13]=c,e[14]=o.bindings,e[15]=h):h=e[15];let f;e[16]!==u||e[17]!==m||e[18]!==h?(f=(0,y.jsxDEV)(Ys,{className:"flex flex-col gap-2 py-4",children:[u,m,h]},void 0,!0),e[16]=u,e[17]=m,e[18]=h,e[19]=f):f=e[19];let v;return e[20]!==o.testId||e[21]!==l||e[22]!==f?(v=(0,y.jsxDEV)(gt,{className:"cursor-pointer gap-0 py-0 transition-colors hover:bg-muted/40","data-testid":o.testId,onClick:l,children:f},void 0,!1),e[20]=o.testId,e[21]=l,e[22]=f,e[23]=v):v=e[23],v},"BindingCard"),Aa=["kv","files","vectors"],Li=a((t,e)=>[...t.filter(o=>o.tab!==e.tab),e].toSorted((o,s)=>Aa.indexOf(o.tab)-Aa.indexOf(s.tab)),"upsertCard"),Fi=a(()=>{let t=(0,Ve.c)(19),e=Zs(),o=_r(),s=ie(),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=[],t[0]=r):r=t[0];let[n,l]=(0,rt.useState)(r),c,p;if(t[1]!==e||t[2]!==o.kv||t[3]!==o.storage||t[4]!==o.vectors||t[5]!==s?(c=a(()=>{let f={cancelled:!1},v=[{enabled:o.kv,label:s("KV Namespaces"),load:a(async()=>(await e.listKvNamespaces()).map($i),"load"),tab:"kv",testId:"home-binding-kv"},{enabled:o.storage,label:s("R2 Buckets"),load:a(()=>e.listStorageBuckets(),"load"),tab:"files",testId:"home-binding-r2"},{enabled:o.vectors,label:s("Vectorize Indexes"),load:a(async()=>(await e.listVectorIndexes()).map(ji),"load"),tab:"vectors",testId:"home-binding-vectors"}];for(let x of v)x.enabled&&$e((async()=>{try{let b=await x.load();if(!f.cancelled){let R={bindings:b,label:x.label,tab:x.tab,testId:x.testId};l(P=>Li(P,R))}}catch{}})());return()=>{f.cancelled=!0}},"t1"),p=[e,o.kv,o.storage,o.vectors,s],t[1]=e,t[2]=o.kv,t[3]=o.storage,t[4]=o.vectors,t[5]=s,t[6]=c,t[7]=p):(c=t[6],p=t[7]),(0,rt.useEffect)(c,p),n.length===0)return null;let d;t[8]!==s?(d=s("Bindings"),t[8]=s,t[9]=d):d=t[9];let u;t[10]!==d?(u=(0,y.jsxDEV)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:d},void 0,!1),t[10]=d,t[11]=u):u=t[11];let g;t[12]!==n?(g=n.map(zi),t[12]=n,t[13]=g):g=t[13];let m;t[14]!==g?(m=(0,y.jsxDEV)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:g},void 0,!1),t[14]=g,t[15]=m):m=t[15];let h;return t[16]!==u||t[17]!==m?(h=(0,y.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"home-bindings",children:[u,m]},void 0,!0),t[16]=u,t[17]=m,t[18]=h):h=t[18],h},"BindingsOverview");function Hi(t){return(0,y.jsxDEV)(go,{variant:"secondary",children:t},t,!1)}a(Hi,"_temp$1");function $i(t){return t.binding}a($i,"_temp2$1");function ji(t){return t.name}a(ji,"_temp3$1");function zi(t){return(0,y.jsxDEV)(Bi,{group:t},t.tab,!1)}a(zi,"_temp4");var Ui=(0,rt.lazy)(()=>import("./chunk-VSHUSN6T.js").then(t=>({default:t.Sparkline}))),Dr=a(t=>{if(t<1e3)return`${String(Math.round(t))}ms`;let e=t>=1e4?0:1;return`${(t/1e3).toFixed(e)}s`},"formatMs"),Wi=a((t,e)=>{let o=Math.max(0,Math.round((e-t)/1e3));if(o<60)return`${String(o)}s ago`;let s=Math.round(o/60);if(s<60)return`${String(s)}m ago`;let r=Math.round(s/60);return r<24?`${String(r)}h ago`:`${String(Math.round(r/24))}d ago`},"relativeTime"),Va=a((t,e)=>{if(t===void 0||t.length===0)return[];let o=new Map;for(let s of t)o.set(s.bucketMs,(o.get(s.bucketMs)??0)+s[e]);return[...o.entries()].toSorted(([s],[r])=>s-r).map(([,s])=>s)},"bucketSeries"),Ba=a((t,e=!0)=>{if(t.length<4)return null;let o=Math.floor(t.length/2),s=t.slice(0,o).reduce((l,c)=>l+c,0),r=t.slice(o).reduce((l,c)=>l+c,0);if(s===0)return null;let n=(r-s)/s*100;return{positive:e?n>=0:n<=0,text:`${n>=0?"+":""}${n.toFixed(1)}%`}},"seriesDelta"),As=a(t=>{let e=(0,Ve.c)(24),{delta:o,footer:s,label:r,trend:n,unit:l,value:c}=t,p=ie(),d;e[0]!==r?(d=(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r},void 0,!1),e[0]=r,e[1]=d):d=e[1];let u;e[2]!==c?(u=(0,y.jsxDEV)("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:c},void 0,!1),e[2]=c,e[3]=u):u=e[3];let g;e[4]!==l?(g=l!==void 0&&(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:l},void 0,!1),e[4]=l,e[5]=g):g=e[5];let m;e[6]!==u||e[7]!==g?(m=(0,y.jsxDEV)("span",{className:"flex items-baseline gap-1.5",children:[u,g]},void 0,!0),e[6]=u,e[7]=g,e[8]=m):m=e[8];let h;e[9]!==n?(h=n!==void 0&&(0,y.jsxDEV)(rt.Suspense,{fallback:(0,y.jsxDEV)("div",{"aria-hidden":"true",className:"h-8 w-28"},void 0,!1),children:(0,y.jsxDEV)(Ui,{data:n},void 0,!1)},void 0,!1),e[9]=n,e[10]=h):h=e[10];let f;e[11]!==m||e[12]!==h?(f=(0,y.jsxDEV)("div",{className:"flex items-center justify-between gap-3",children:[m,h]},void 0,!0),e[11]=m,e[12]=h,e[13]=f):f=e[13];let v;e[14]!==d||e[15]!==f?(v=(0,y.jsxDEV)("div",{className:"flex flex-col gap-2.5 p-4",children:[d,f]},void 0,!0),e[14]=d,e[15]=f,e[16]=v):v=e[16];let x;e[17]!==o||e[18]!==s||e[19]!==p?(x=o==null?s!=null&&(0,y.jsxDEV)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:s},void 0,!1):(0,y.jsxDEV)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px]",children:[(0,y.jsxDEV)("span",{className:U("font-semibold",o.positive?"text-success":"text-destructive"),children:o.text},void 0,!1)," ",(0,y.jsxDEV)("span",{className:"text-muted-foreground",children:p("vs. prev.")},void 0,!1)]},void 0,!0),e[17]=o,e[18]=s,e[19]=p,e[20]=x):x=e[20];let b;return e[21]!==v||e[22]!==x?(b=(0,y.jsxDEV)(gt,{className:"justify-between gap-0 py-0",children:[v,x]},void 0,!0),e[21]=v,e[22]=x,e[23]=b):b=e[23],b},"StatCard"),Zi=a(()=>{let t=(0,Ve.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,y.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,y.jsxDEV)("path",{d:"m9 6 6 6-6 6"},void 0,!1)},void 0,!1),t[0]=e):e=t[0],e},"ChevronRight"),Ir=a(t=>{let e=(0,Ve.c)(7),{command:o,label:s}=t,r;e[0]!==s?(r=(0,y.jsxDEV)("div",{className:"p-4",children:(0,y.jsxDEV)("span",{className:"text-sm font-medium text-foreground",children:s},void 0,!1)},void 0,!1),e[0]=s,e[1]=r):r=e[1];let n;e[2]!==o?(n=(0,y.jsxDEV)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5",children:(0,y.jsxDEV)("code",{className:"font-mono text-xs text-muted-foreground",children:o},void 0,!1)},void 0,!1),e[2]=o,e[3]=n):n=e[3];let l;return e[4]!==r||e[5]!==n?(l=(0,y.jsxDEV)(gt,{className:"justify-between gap-0 py-0",children:[r,n]},void 0,!0),e[4]=r,e[5]=n,e[6]=l):l=e[6],l},"ConnectCard"),La=a(t=>{let e=(0,Ve.c)(18),{count:o,onView:s,testId:r,title:n}=t,l=ie(),c;e[0]!==n?(c=(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:n},void 0,!1),e[0]=n,e[1]=c):c=e[1];let p;e[2]!==o||e[3]!==l?(p=o===null?(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:l("No data yet")},void 0,!1):(0,y.jsxDEV)(go,{variant:o>0?"destructive":"success",children:o>0?o:l("All clear")},void 0,!1),e[2]=o,e[3]=l,e[4]=p):p=e[4];let d;e[5]!==c||e[6]!==p?(d=(0,y.jsxDEV)("div",{className:"flex items-start justify-between gap-2 p-4",children:[c,p]},void 0,!0),e[5]=c,e[6]=p,e[7]=d):d=e[7];let u;e[8]!==l?(u=l("View"),e[8]=l,e[9]=u):u=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=(0,y.jsxDEV)(Zi,{},void 0,!1),e[10]=g):g=e[10];let m;e[11]!==s||e[12]!==u?(m=(0,y.jsxDEV)("button",{className:"flex items-center gap-1 border-t border-border bg-muted/50 px-4 py-2.5 text-[12px] font-medium text-foreground outline-none transition-colors hover:bg-muted focus-visible:bg-muted",onClick:s,type:"button",children:[u,g]},void 0,!0),e[11]=s,e[12]=u,e[13]=m):m=e[13];let h;return e[14]!==d||e[15]!==m||e[16]!==r?(h=(0,y.jsxDEV)(gt,{className:"justify-between gap-0 py-0","data-testid":r,children:[d,m]},void 0,!0),e[14]=d,e[15]=m,e[16]=r,e[17]=h):h=e[17],h},"AdvisorCard"),qi=a(t=>{let e=(0,Ve.c)(7),{functions:o}=t,s=ie(),r;if(e[0]!==o||e[1]!==s){let n=[...o].toSorted(Yi).slice(0,5),l;e[3]!==s?(l=s("Top functions"),e[3]=s,e[4]=l):l=e[4];let c;e[5]!==l?(c=(0,y.jsxDEV)("div",{className:"border-b border-border px-4 py-3",children:(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l},void 0,!1)},void 0,!1),e[5]=l,e[6]=c):c=e[6],r=(0,y.jsxDEV)(gt,{className:"gap-0 py-0","data-testid":"home-top-functions",children:[c,n.length===0?(0,y.jsxDEV)("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:s("No functions called yet.")},void 0,!1):(0,y.jsxDEV)("div",{className:"divide-y divide-border",children:[(0,y.jsxDEV)("div",{className:"grid grid-cols-[1fr_auto_auto_auto] gap-4 px-4 py-1.5 font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:[(0,y.jsxDEV)("span",{children:s("Function")},void 0,!1),(0,y.jsxDEV)("span",{className:"text-end",children:s("Calls")},void 0,!1),(0,y.jsxDEV)("span",{className:"w-12 text-end",children:s("Avg")},void 0,!1),(0,y.jsxDEV)("span",{className:"w-8 text-end",children:s("Err")},void 0,!1)]},void 0,!0),n.map(Ji)]},void 0,!0)]},void 0,!0),e[0]=o,e[1]=s,e[2]=r}else r=e[2];return r},"TopFunctionsCard"),Gi=a(t=>{let e=(0,Ve.c)(26),{subs:o}=t,s=ie(),r;e[0]!==s?(r=s("Live connections"),e[0]=s,e[1]=r):r=e[1];let n;e[2]!==r?(n=(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r},void 0,!1),e[2]=r,e[3]=n):n=e[3];let l=o?.totalConnections??0,c;e[4]!==l?(c=l.toLocaleString(),e[4]=l,e[5]=c):c=e[5];let p;e[6]!==c?(p=(0,y.jsxDEV)("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:c},void 0,!1),e[6]=c,e[7]=p):p=e[7];let d;e[8]!==s?(d=s("sockets"),e[8]=s,e[9]=d):d=e[9];let u;e[10]!==d?(u=(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:d},void 0,!1),e[10]=d,e[11]=u):u=e[11];let g;e[12]!==p||e[13]!==u?(g=(0,y.jsxDEV)("span",{className:"flex items-baseline gap-1.5",children:[p,u]},void 0,!0),e[12]=p,e[13]=u,e[14]=g):g=e[14];let m=o?.totalSubscriptions??0,h;e[15]!==m?(h=m.toLocaleString(),e[15]=m,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("active subscriptions"),e[17]=s,e[18]=f):f=e[18];let v;e[19]!==h||e[20]!==f?(v=(0,y.jsxDEV)("span",{className:"text-[11px] text-muted-foreground",children:[h," ",f]},void 0,!0),e[19]=h,e[20]=f,e[21]=v):v=e[21];let x;return e[22]!==v||e[23]!==n||e[24]!==g?(x=(0,y.jsxDEV)(gt,{"data-testid":"home-live-connections",children:(0,y.jsxDEV)(Ys,{className:"flex flex-col gap-2.5 py-4",children:[n,g,v]},void 0,!0)},void 0,!1),e[22]=v,e[23]=n,e[24]=g,e[25]=x):x=e[25],x},"LiveConnectionsCard"),Ki=a(t=>{let e=(0,Ve.c)(7),{entries:o}=t,s=ie(),r;if(e[0]!==o||e[1]!==s){let n=Date.now(),l;e[3]!==s?(l=s("Recent activity"),e[3]=s,e[4]=l):l=e[4];let c;e[5]!==l?(c=(0,y.jsxDEV)("div",{className:"border-b border-border px-4 py-3",children:(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l},void 0,!1)},void 0,!1),e[5]=l,e[6]=c):c=e[6],r=(0,y.jsxDEV)(gt,{className:"gap-0 py-0","data-testid":"home-recent-activity",children:[c,o.length===0?(0,y.jsxDEV)("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:s("No recent activity.")},void 0,!1):(0,y.jsxDEV)("ul",{className:"divide-y divide-border",children:o.slice(0,5).map(p=>(0,y.jsxDEV)("li",{className:"flex items-center justify-between gap-3 px-4 py-2 text-[13px]",children:[(0,y.jsxDEV)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,y.jsxDEV)("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-muted-foreground/40"},void 0,!1),(0,y.jsxDEV)("span",{className:"truncate text-foreground",children:[p.op,p.table!==void 0&&(0,y.jsxDEV)("span",{className:"text-muted-foreground",children:[" \xB7 ",p.table,p.id===void 0?"":`#${p.id}`]},void 0,!0)]},void 0,!0)]},void 0,!0),(0,y.jsxDEV)("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:Wi(p.ts,n)},void 0,!1)]},p.seq,!0))},void 0,!1)]},void 0,!0),e[0]=o,e[1]=s,e[2]=r}else r=e[2];return r},"RecentActivityCard"),Qi=a(t=>{let e=t.reduce((o,s)=>o+s.calls,0);return e===0?null:t.reduce((o,s)=>o+s.totalDurationMs,0)/e},"averageLatencyMs"),Ha=a(t=>{let e=(0,Ve.c)(150),{initialShardKey:o}=t,s=ie(),r=pt(),n=o??"",l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={},e[0]=l):l=e[0];let c;e[1]!==n?(c={shardKey:n},e[1]=n,e[2]=c):c=e[2];let p=ao(Ct.getMetrics,l,c),d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={},e[3]=d):d=e[3];let u;e[4]!==n?(u={shardKey:n},e[4]=n,e[5]=u):u=e[5];let g=ao(Ct.getFunctionStats,d,u),m,h;e[6]===Symbol.for("react.memo_cache_sentinel")?(m={},h={shardKey:""},e[6]=m,e[7]=h):(m=e[6],h=e[7]);let f=ao(Ct.getSecurityAudit,m,h),v;e[8]===Symbol.for("react.memo_cache_sentinel")?(v={},e[8]=v):v=e[8];let x;e[9]!==n?(x={shardKey:n},e[9]=n,e[10]=x):x=e[10];let b=ao(Ct.listSubscriptions,v,x),R;e[11]===Symbol.for("react.memo_cache_sentinel")?(R={},e[11]=R):R=e[11];let P;e[12]!==n?(P={shardKey:n},e[12]=n,e[13]=P):P=e[13];let N=ao(Ct.getAuditLog,R,P),S=p.data??null,E,T,k,w,O,V,W,_,H,$,Z,K,D,I,z,te,re,ne;if(e[14]!==N.data||e[15]!==f.data||e[16]!==S||e[17]!==p.data||e[18]!==r||e[19]!==g.data||e[20]!==b.data||e[21]!==s){w=Array.isArray(g.data?.functions)?g.data.functions:[],W=b.data??null;let Ue;e[40]!==N.data?(Ue=Array.isArray(N.data?.entries)?N.data.entries:[],e[40]=N.data,e[41]=Ue):Ue=e[41],T=Ue,O=p.data===void 0||g.data===void 0?null:Bn(S,w).length,V=Array.isArray(f.data?.findings)?f.data.findings.length:null;let We;e[42]!==r?(We=a(()=>{$e(r({to:"/security"}))},"t212"),e[42]=r,e[43]=We):We=e[43],ne=We;let Ze;e[44]!==r?(Ze=a(()=>{$e(r({to:"/insights"}))},"t222"),e[44]=r,e[45]=Ze):Ze=e[45],re=Ze;let qe=Va(S?.history,"calls"),Ge=Va(S?.history,"errors"),nt=Qi(w),Ke=Math.max(0,...w.map(Xi)),ge=S?.cache,Qe;e[46]!==ge?(Qe=ge!=null&&ge.hits+ge.misses>0?Math.round(ge.hits/(ge.hits+ge.misses)*100):null,e[46]=ge,e[47]=Qe):Qe=e[47],k=Qe,z="flex flex-col gap-6",te="lunora-home",Z="grid gap-3 sm:grid-cols-2 xl:grid-cols-4",K="home-health";let Ye=Ba(qe),Ie;e[48]!==s?(Ie=s("Requests"),e[48]=s,e[49]=Ie):Ie=e[49];let Je=S?.requests??0,De;e[50]!==Je?(De=Je.toLocaleString(),e[50]=Je,e[51]=De):De=e[51],e[52]!==qe||e[53]!==Ye||e[54]!==Ie||e[55]!==De?(D=(0,y.jsxDEV)(As,{delta:Ye,label:Ie,trend:qe,value:De},void 0,!1),e[52]=qe,e[53]=Ye,e[54]=Ie,e[55]=De,e[56]=D):D=e[56];let Xe=Ba(Ge,!1),_e;e[57]!==s?(_e=s("Errors"),e[57]=s,e[58]=_e):_e=e[58];let et=S?.errors??0,Ae;e[59]!==et?(Ae=et.toLocaleString(),e[59]=et,e[60]=Ae):Ae=e[60],e[61]!==Ge||e[62]!==Xe||e[63]!==_e||e[64]!==Ae?(I=(0,y.jsxDEV)(As,{delta:Xe,label:_e,trend:Ge,value:Ae},void 0,!1),e[61]=Ge,e[62]=Xe,e[63]=_e,e[64]=Ae,e[65]=I):I=e[65],E=As,e[66]!==Ke||e[67]!==s?(_=Ke>0?`${s("max")} ${Dr(Ke)}`:void 0,e[66]=Ke,e[67]=s,e[68]=_):_=e[68],e[69]!==s?(H=s("Avg latency"),e[69]=s,e[70]=H):H=e[70],$=nt===null?"\u2014":Dr(nt),e[14]=N.data,e[15]=f.data,e[16]=S,e[17]=p.data,e[18]=r,e[19]=g.data,e[20]=b.data,e[21]=s,e[22]=E,e[23]=T,e[24]=k,e[25]=w,e[26]=O,e[27]=V,e[28]=W,e[29]=_,e[30]=H,e[31]=$,e[32]=Z,e[33]=K,e[34]=D,e[35]=I,e[36]=z,e[37]=te,e[38]=re,e[39]=ne}else E=e[22],T=e[23],k=e[24],w=e[25],O=e[26],V=e[27],W=e[28],_=e[29],H=e[30],$=e[31],Z=e[32],K=e[33],D=e[34],I=e[35],z=e[36],te=e[37],re=e[38],ne=e[39];let J;e[71]!==E||e[72]!==_||e[73]!==H||e[74]!==$?(J=(0,y.jsxDEV)(E,{footer:_,label:H,value:$},void 0,!1),e[71]=E,e[72]=_,e[73]=H,e[74]=$,e[75]=J):J=e[75];let ee;e[76]!==k||e[77]!==s?(ee=k===null?void 0:`${String(k)}% ${s("cache hit")}`,e[76]=k,e[77]=s,e[78]=ee):ee=e[78];let ae;e[79]!==s?(ae=s("Database size"),e[79]=s,e[80]=ae):ae=e[80];let Be=S?.databaseSize??null,me;e[81]!==Be?(me=Vn(Be),e[81]=Be,e[82]=me):me=e[82];let he;e[83]!==ee||e[84]!==ae||e[85]!==me?(he=(0,y.jsxDEV)(As,{footer:ee,label:ae,value:me},void 0,!1),e[83]=ee,e[84]=ae,e[85]=me,e[86]=he):he=e[86];let ve;e[87]!==Z||e[88]!==K||e[89]!==D||e[90]!==I||e[91]!==J||e[92]!==he?(ve=(0,y.jsxDEV)("div",{className:Z,"data-testid":K,children:[D,I,J,he]},void 0,!0),e[87]=Z,e[88]=K,e[89]=D,e[90]=I,e[91]=J,e[92]=he,e[93]=ve):ve=e[93];let Le;e[94]===Symbol.for("react.memo_cache_sentinel")?(Le=(0,y.jsxDEV)(Fi,{},void 0,!1),e[94]=Le):Le=e[94];let L;e[95]!==w?(L=(0,y.jsxDEV)("div",{className:"lg:col-span-2",children:(0,y.jsxDEV)(qi,{functions:w},void 0,!1)},void 0,!1),e[95]=w,e[96]=L):L=e[96];let Q;e[97]!==W?(Q=(0,y.jsxDEV)(Gi,{subs:W},void 0,!1),e[97]=W,e[98]=Q):Q=e[98];let X;e[99]!==T?(X=(0,y.jsxDEV)(Ki,{entries:T},void 0,!1),e[99]=T,e[100]=X):X=e[100];let xe;e[101]!==Q||e[102]!==X?(xe=(0,y.jsxDEV)("div",{className:"flex flex-col gap-3",children:[Q,X]},void 0,!0),e[101]=Q,e[102]=X,e[103]=xe):xe=e[103];let se;e[104]!==L||e[105]!==xe?(se=(0,y.jsxDEV)("div",{className:"grid gap-3 lg:grid-cols-3",children:[L,xe]},void 0,!0),e[104]=L,e[105]=xe,e[106]=se):se=e[106];let Fe;e[107]!==s?(Fe=s("Advisors"),e[107]=s,e[108]=Fe):Fe=e[108];let ce;e[109]!==Fe?(ce=(0,y.jsxDEV)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:Fe},void 0,!1),e[109]=Fe,e[110]=ce):ce=e[110];let pe;e[111]!==O||e[112]!==V||e[113]!==s||e[114]!==re||e[115]!==ne?(pe=V===0&&O===0?(0,y.jsxDEV)(Dn,{description:s("No security or performance issues detected."),icon:(0,y.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,y.jsxDEV)("path",{d:"M12 3 4 6v5c0 5 3.4 8.5 8 10 4.6-1.5 8-5 8-10V6l-8-3Z"},void 0,!1),(0,y.jsxDEV)("path",{d:"m9 12 2 2 4-4"},void 0,!1)]},void 0,!0),testId:"home-advisors-clear",title:s("No issues found")},void 0,!1):(0,y.jsxDEV)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,y.jsxDEV)(La,{count:V,onView:ne,testId:"home-security",title:s("Security findings")},void 0,!1),(0,y.jsxDEV)(La,{count:O,onView:re,testId:"home-performance",title:s("Performance issues")},void 0,!1)]},void 0,!0),e[111]=O,e[112]=V,e[113]=s,e[114]=re,e[115]=ne,e[116]=pe):pe=e[116];let Pe;e[117]!==ce||e[118]!==pe?(Pe=(0,y.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"home-advisors",children:[ce,pe]},void 0,!0),e[117]=ce,e[118]=pe,e[119]=Pe):Pe=e[119];let Re;e[120]!==s?(Re=s("Get connected"),e[120]=s,e[121]=Re):Re=e[121];let Ce;e[122]!==Re?(Ce=(0,y.jsxDEV)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:Re},void 0,!1),e[122]=Re,e[123]=Ce):Ce=e[123];let Se;e[124]!==s?(Se=s("Client SDK"),e[124]=s,e[125]=Se):Se=e[125];let Ne;e[126]!==Se?(Ne=(0,y.jsxDEV)(Ir,{command:"npm i @lunora/client",label:Se},void 0,!1),e[126]=Se,e[127]=Ne):Ne=e[127];let Ee;e[128]!==s?(Ee=s("React"),e[128]=s,e[129]=Ee):Ee=e[129];let Te;e[130]!==Ee?(Te=(0,y.jsxDEV)(Ir,{command:"npm i @lunora/react",label:Ee},void 0,!1),e[130]=Ee,e[131]=Te):Te=e[131];let we;e[132]!==s?(we=s("CLI"),e[132]=s,e[133]=we):we=e[133];let ke;e[134]!==we?(ke=(0,y.jsxDEV)(Ir,{command:"lunora dev",label:we},void 0,!1),e[134]=we,e[135]=ke):ke=e[135];let Oe;e[136]!==Ne||e[137]!==Te||e[138]!==ke?(Oe=(0,y.jsxDEV)("div",{className:"grid gap-3 sm:grid-cols-3",children:[Ne,Te,ke]},void 0,!0),e[136]=Ne,e[137]=Te,e[138]=ke,e[139]=Oe):Oe=e[139];let Me;e[140]!==Ce||e[141]!==Oe?(Me=(0,y.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"home-get-connected",children:[Ce,Oe]},void 0,!0),e[140]=Ce,e[141]=Oe,e[142]=Me):Me=e[142];let ze;return e[143]!==z||e[144]!==te||e[145]!==ve||e[146]!==se||e[147]!==Pe||e[148]!==Me?(ze=(0,y.jsxDEV)("div",{className:z,"data-testid":te,children:[ve,Le,se,Pe,Me]},void 0,!0),e[143]=z,e[144]=te,e[145]=ve,e[146]=se,e[147]=Pe,e[148]=Me,e[149]=ze):ze=e[149],ze},"HomePanel");function Yi(t,e){return e.calls-t.calls}a(Yi,"_temp");function Ji(t){return(0,y.jsxDEV)("div",{className:"grid grid-cols-[1fr_auto_auto_auto] items-center gap-4 px-4 py-2 text-[13px]",children:[(0,y.jsxDEV)("span",{className:"truncate font-mono text-xs text-foreground",children:t.path},void 0,!1),(0,y.jsxDEV)("span",{className:"text-end tabular-nums",children:t.calls.toLocaleString()},void 0,!1),(0,y.jsxDEV)("span",{className:"w-12 text-end tabular-nums text-muted-foreground",children:Dr(t.calls>0?t.totalDurationMs/t.calls:0)},void 0,!1),(0,y.jsxDEV)("span",{className:U("w-8 text-end tabular-nums",t.errors>0?"text-destructive":"text-muted-foreground"),children:t.errors},void 0,!1)]},t.path,!0)}a(Ji,"_temp2");function Xi(t){return t.maxDurationMs}a(Xi,"_temp3");var $a=C(Lo(),1);var ja=C(mo(),1);var el=a((t,e,o)=>t!==void 0?t:e===void 0&&o===void 0?Qr:Kr(e,o),"resolveInstance"),za=a(t=>{let e=(0,$a.c)(7),{catalogs:o,children:s,i18n:r,locale:n}=t,l;e[0]!==o||e[1]!==r||e[2]!==n?(l=el(r,n,o),e[0]=o,e[1]=r,e[2]=n,e[3]=l):l=e[3];let c=l,p;return e[4]!==s||e[5]!==c?(p=(0,ja.jsxDEV)(Yr,{value:c,children:s},void 0,!1),e[4]=s,e[5]=c,e[6]=p):p=e[6],p},"StudioI18nProvider");var Vr=C(Lo(),1);var Pt=C(M(),1);var de=C(mo(),1);var Ar="lunora:command-palette",Ua=a(()=>{"window"in globalThis&&globalThis.dispatchEvent(new Event(Ar))},"openCommandPalette"),tl=a(t=>{let e=(0,Vr.c)(18),{active:o,index:s,item:r,onActivate:n,onSelect:l}=t,c;e[0]!==r||e[1]!==l?(c=a(()=>{l(r)},"t1"),e[0]=r,e[1]=l,e[2]=c):c=e[2];let p=c,d;e[3]!==s||e[4]!==n?(d=a(()=>{n(s)},"t2"),e[3]=s,e[4]=n,e[5]=d):d=e[5];let u=d,g=o?"bg-accent text-accent-foreground":"text-foreground",m;e[6]!==g?(m=U("flex w-full items-center justify-between gap-3 rounded-md px-3 py-2 text-start text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground",g),e[6]=g,e[7]=m):m=e[7];let h;e[8]!==r.label?(h=(0,de.jsxDEV)("span",{children:r.label},void 0,!1),e[8]=r.label,e[9]=h):h=e[9];let f;e[10]!==r.group?(f=(0,de.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:r.group},void 0,!1),e[10]=r.group,e[11]=f):f=e[11];let v;return e[12]!==p||e[13]!==u||e[14]!==m||e[15]!==h||e[16]!==f?(v=(0,de.jsxDEV)("li",{children:(0,de.jsxDEV)("button",{className:m,onClick:p,onMouseEnter:u,type:"button",children:[h,f]},void 0,!0)},void 0,!1),e[12]=p,e[13]=u,e[14]=m,e[15]=h,e[16]=f,e[17]=v):v=e[17],v},"CommandRow"),Wa=a(t=>{let e=(0,Vr.c)(39),{items:o}=t,s=ie(),r=pt(),[n,l]=(0,Pt.useState)(!1),[c,p]=(0,Pt.useState)(""),[d,u]=(0,Pt.useState)(0),g=(0,Pt.useRef)(null),m,h;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=a(()=>{let D=a(z=>{(z.metaKey||z.ctrlKey)&&z.key.toLowerCase()==="k"&&(z.preventDefault(),l(!0))},"onKeyDown"),I=a(()=>{l(!0)},"onOpen");return globalThis.addEventListener("keydown",D),globalThis.addEventListener(Ar,I),()=>{globalThis.removeEventListener("keydown",D),globalThis.removeEventListener(Ar,I)}},"t1"),h=[],e[0]=m,e[1]=h):(m=e[0],h=e[1]),(0,Pt.useEffect)(m,h);let f;if(e[2]!==o||e[3]!==c){e:{let D=c.trim().toLowerCase();if(D===""){f=o;break e}f=o.filter(I=>I.label.toLowerCase().includes(D)||I.group.toLowerCase().includes(D))}e[2]=o,e[3]=c,e[4]=f}else f=e[4];let v=f,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=a(D=>{l(D),D||(p(""),u(0))},"t4"),e[5]=x):x=e[5];let b=x,R;e[6]!==r?(R=a(D=>{b(!1),$e(r({to:D.to}))},"t5"),e[6]=r,e[7]=R):R=e[7];let P=R,N;e[8]===Symbol.for("react.memo_cache_sentinel")?(N=a(D=>{p(D.target.value),u(0)},"t6"),e[8]=N):N=e[8];let S=N,E;e[9]!==d||e[10]!==v||e[11]!==P?(E=a(D=>{e:switch(D.key){case"ArrowDown":{D.preventDefault(),u(I=>v.length===0?0:(I+1)%v.length);break e}case"ArrowUp":{D.preventDefault(),u(I=>v.length===0?0:(I-1+v.length)%v.length);break e}case"Enter":{D.preventDefault();let I=v[d];I!==void 0&&P(I);break e}}},"t7"),e[9]=d,e[10]=v,e[11]=P,e[12]=E):E=e[12];let T=E,k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=(0,de.jsxDEV)(fe.Backdrop,{className:"fixed inset-0 z-50 bg-black/40 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"},void 0,!1),e[13]=k):k=e[13];let w;e[14]!==s?(w=s("Command palette"),e[14]=s,e[15]=w):w=e[15];let O;e[16]!==w?(O=(0,de.jsxDEV)(fe.Title,{className:"sr-only",children:w},void 0,!1),e[16]=w,e[17]=O):O=e[17];let V;e[18]===Symbol.for("react.memo_cache_sentinel")?(V=(0,de.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,de.jsxDEV)("circle",{cx:"11",cy:"11",r:"7"},void 0,!1),(0,de.jsxDEV)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"},void 0,!1)]},void 0,!0),e[18]=V):V=e[18];let W;e[19]!==s?(W=s("Search\u2026"),e[19]=s,e[20]=W):W=e[20];let _;e[21]!==T||e[22]!==c||e[23]!==W?(_=(0,de.jsxDEV)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[V,(0,de.jsxDEV)("input",{className:"h-11 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground","data-testid":"dash-command-input",onChange:S,onKeyDown:T,placeholder:W,ref:g,type:"text",value:c},void 0,!1)]},void 0,!0),e[21]=T,e[22]=c,e[23]=W,e[24]=_):_=e[24];let H;e[25]!==d||e[26]!==v||e[27]!==P||e[28]!==s?(H=v.length===0?(0,de.jsxDEV)("li",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:s("No results.")},void 0,!1):v.map((D,I)=>(0,de.jsxDEV)(tl,{active:I===d,index:I,item:D,onActivate:u,onSelect:P},D.to,!1)),e[25]=d,e[26]=v,e[27]=P,e[28]=s,e[29]=H):H=e[29];let $;e[30]!==H?($=(0,de.jsxDEV)("ul",{className:"max-h-80 overflow-y-auto p-1.5","data-testid":"dash-command-list",children:H},void 0,!1),e[30]=H,e[31]=$):$=e[31];let Z;e[32]!==O||e[33]!==_||e[34]!==$?(Z=(0,de.jsxDEV)(fe.Portal,{children:[k,(0,de.jsxDEV)(fe.Popup,{className:"fixed start-1/2 top-24 z-50 w-[36rem] max-w-[90vw] -translate-x-1/2 overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-lg outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95","data-testid":"dash-command-palette",initialFocus:g,children:[O,_,$]},void 0,!0)]},void 0,!0),e[32]=O,e[33]=_,e[34]=$,e[35]=Z):Z=e[35];let K;return e[36]!==n||e[37]!==Z?(K=(0,de.jsxDEV)(fe.Root,{onOpenChange:b,open:n,children:Z},void 0,!1),e[36]=n,e[37]=Z,e[38]=K):K=e[38],K},"CommandPalette");var Ya="(prefers-color-scheme: dark)",Ja=a(()=>{try{return globalThis.localStorage}catch{return}},"store"),ol=a(t=>t==="system"||t==="light"||t==="dark","isPreference"),Xa=a(()=>globalThis.matchMedia,"matchMedia"),ei="lunora-studio-theme",Br=["system","light","dark"],sl=a((t="system")=>{try{let e=Ja()?.getItem(ei);return ol(e)?e:t}catch{return t}},"loadThemePreference"),Za=a(t=>{let e=Ja();if(e!==void 0)try{e.setItem(ei,t)}catch{}},"saveThemePreference"),rl=a(()=>{try{return Xa()?.(Ya).matches?"dark":"light"}catch{return"light"}},"getSystemTheme"),nl=a((t,e)=>t==="system"?e:t,"resolveTheme"),al=a(t=>{let e;try{e=Xa()?.(Ya)}catch{e=void 0}if(e===void 0)return()=>{};let o=a(s=>{t(s.matches?"dark":"light")},"handler");return e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}},"subscribeSystemTheme"),ti=(0,q.createContext)(null),h0=a(({children:t,defaultTheme:e="system"})=>{let[o,s]=(0,q.useState)(()=>sl(e)),[r,n]=(0,q.useState)(()=>rl());(0,q.useEffect)(()=>al(n),[]);let l=a(d=>{Za(d),s(d)},"setTheme"),p={cycleTheme:a(()=>{s(d=>{let u=Br[(Br.indexOf(d)+1)%Br.length]??d;return Za(u),u})},"cycleTheme"),resolvedTheme:nl(o,r),setTheme:l,systemTheme:r,theme:o};return(0,i.jsxDEV)(ti,{value:p,children:t},void 0,!1)},"ThemeProvider"),il=a(()=>{let t=(0,q.use)(ti);if(t===null)throw new Ws("INTERNAL","useTheme must be used within a <ThemeProvider>");return t},"useTheme");function v0({delay:t=0,...e}){return(0,i.jsxDEV)(st.Provider,{"data-slot":"tooltip-provider",delay:t,...e},void 0,!1)}a(v0,"TooltipProvider");function ll(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(st.Root,{"data-slot":"tooltip",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(ll,"Tooltip");function dl(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(st.Trigger,{"data-slot":"tooltip-trigger",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(dl,"TooltipTrigger");function cl({className:t,side:e="top",sideOffset:o=4,align:s="center",alignOffset:r=0,children:n,...l}){return(0,i.jsxDEV)(st.Portal,{children:(0,i.jsxDEV)(st.Positioner,{align:s,alignOffset:r,side:e,sideOffset:o,className:"isolate z-50",children:(0,i.jsxDEV)(st.Popup,{"data-slot":"tooltip-content",className:U("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-md data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...l,children:[n,(0,i.jsxDEV)(st.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-md bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-start-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-end-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1)}a(cl,"TooltipContent");var pl=a(t=>{let e=(0,B.c)(5),{className:o}=t,s;e[0]!==o?(s=U("h-full w-full text-foreground",o),e[0]=o,e[1]=s):s=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.jsxDEV)("path",{d:"M 259.500 10.552 C 220.080 15.859, 182.424 32.566, 152.500 58.025 C 110.179 94.031, 85.380 137.183, 77.518 188.500 C 75.410 202.255, 74.569 225.677, 75.796 236.466 C 76.757 244.917, 76.683 245.692, 74.518 249.966 C 63.118 272.466, 53.141 303.876, 51.382 322.799 L 50.718 329.943 71.960 320.471 C 83.643 315.262, 93.326 311, 93.478 311 C 93.630 311, 96.547 316.063, 99.959 322.250 C 103.371 328.438, 107.249 334.850, 108.577 336.500 L 110.990 339.500 110.981 336 C 110.977 334.075, 111.499 324.991, 112.143 315.813 L 113.312 299.127 121.406 293.336 C 132.495 285.403, 149.593 271.554, 161 261.268 C 171.556 251.748, 189.116 235, 188.540 235 C 188.337 235, 183.069 238.648, 176.835 243.106 C 142.318 267.789, 68.537 314, 63.646 314 C 61.843 314, 72.791 281.179, 80.905 262.259 C 92.233 235.845, 107.473 212.389, 132.106 183.453 L 138.451 176 148.268 176 C 176.192 176, 197.512 187.154, 212.868 209.797 C 216.470 215.108, 217.035 216.595, 216.477 219.297 C 211.386 243.968, 202.359 274.496, 193.797 296 C 183.898 320.861, 167.147 352.101, 152.395 373.215 L 147.004 380.930 152.891 385.830 C 161.400 392.911, 165.563 396, 166.594 395.998 C 167.092 395.998, 168.772 391.641, 170.327 386.317 C 176.279 365.934, 188.422 338.749, 200.942 317.778 C 223.060 280.731, 256.432 244.369, 294.500 215.836 C 309.956 204.252, 313.937 201.603, 314.719 202.385 C 315.116 202.783, 315.449 213.096, 315.460 225.304 C 315.474 241.855, 315.021 250.405, 313.680 258.924 C 307.009 301.272, 291.175 336.677, 263.112 372 C 255.259 381.883, 227.182 410.673, 218.516 417.727 L 213.532 421.783 223.439 424.880 C 281.705 443.093, 349.165 436.018, 398.616 406.508 C 446.728 377.797, 483.322 331.466, 497.366 281.481 C 503.381 260.075, 504.480 250.741, 504.491 221 C 504.501 191.997, 503.598 184.047, 497.987 163.732 C 484.768 115.871, 452.505 72.708, 407.718 42.964 C 381.051 25.254, 352.818 14.828, 319.695 10.460 C 305.932 8.645, 273.298 8.695, 259.500 10.552",fillRule:"evenodd"},void 0,!1),e[2]=r):r=e[2];let n;return e[3]!==s?(n=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:s,fill:"currentColor",viewBox:"0 0 543 446",children:r},void 0,!1),e[3]=s,e[4]=n):n=e[4],n},"BrandMark"),oi="lunora.studio.rulesBannerDismissed",ul=a(()=>{try{return globalThis.localStorage.getItem(oi)==="1"}catch{return!1}},"readBannerDismissed"),fl=a(()=>{try{globalThis.localStorage.setItem(oi,"1")}catch{}},"writeBannerDismissed"),ml=a(()=>{let t=(0,B.c)(18),e=ie(),[o,s]=(0,q.useState)(gl),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=a(()=>{s(!0),fl()},"t0"),t[0]=r):r=t[0];let n=r;if(o)return null;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,i.jsxDEV)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"},void 0,!1),t[1]=l):l=t[1];let c;t[2]!==e?(c=e("Lunora AI rules aren't installed."),t[2]=e,t[3]=c):c=t[3];let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=(0,i.jsxDEV)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[11px]",children:"lunora rules install"},void 0,!1),t[4]=p):p=t[4];let d;t[5]!==e?(d=e("lets your coding agent use Lunora correctly."),t[5]=e,t[6]=d):d=t[6];let u;t[7]!==c||t[8]!==d?(u=(0,i.jsxDEV)("span",{children:[c," ",p," ",d]},void 0,!0),t[7]=c,t[8]=d,t[9]=u):u=t[9];let g;t[10]!==e?(g=e("Dismiss"),t[10]=e,t[11]=g):g=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"M18 6 6 18M6 6l12 12"},void 0,!1)},void 0,!1),t[12]=m):m=t[12];let h;t[13]!==g?(h=(0,i.jsxDEV)("button",{"aria-label":g,className:"ms-auto flex size-5 items-center justify-center rounded text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent","data-testid":"dash-app-rules-banner-dismiss",onClick:n,type:"button",children:m},void 0,!1),t[13]=g,t[14]=h):h=t[14];let f;return t[15]!==u||t[16]!==h?(f=(0,i.jsxDEV)("div",{className:"flex shrink-0 items-center gap-2 border-b border-warning/30 bg-warning/10 px-6 py-2 text-[12px] text-foreground","data-testid":"dash-app-rules-banner",role:"note",children:[l,u,h]},void 0,!0),t[15]=u,t[16]=h,t[17]=f):f=t[17],f},"RulesBanner");function gl(){return ul()}a(gl,"_temp$1");var hl=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,i.jsxDEV)("rect",{height:"14",rx:"2",width:"20",x:"2",y:"3"},void 0,!1),(0,i.jsxDEV)("path",{d:"M8 21h8M12 17v4"},void 0,!1)]},void 0,!0),t[0]=e):e=t[0],e},"MonitorIcon"),vl=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,i.jsxDEV)("circle",{cx:"12",cy:"12",r:"4"},void 0,!1),(0,i.jsxDEV)("path",{d:"M12 2v2m0 16v2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M2 12h2m16 0h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"},void 0,!1)]},void 0,!0),t[0]=e):e=t[0],e},"SunIcon"),xl=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"},void 0,!1)},void 0,!1),t[0]=e):e=t[0],e},"MoonIcon"),bl=[{Icon:hl,value:"system"},{Icon:vl,value:"light"},{Icon:xl,value:"dark"}],yl=a(()=>{let t=(0,B.c)(19),{theme:e,setTheme:o}=il(),s=ie(),r;t[0]!==s?(r=s("Dark theme"),t[0]=s,t[1]=r):r=t[1];let n;t[2]!==s?(n=s("Light theme"),t[2]=s,t[3]=n):n=t[3];let l;t[4]!==s?(l=s("System theme"),t[4]=s,t[5]=l):l=t[5];let c;t[6]!==r||t[7]!==n||t[8]!==l?(c={dark:r,light:n,system:l},t[6]=r,t[7]=n,t[8]=l,t[9]=c):c=t[9];let p=c,d;t[10]!==s?(d=s("Theme"),t[10]=s,t[11]=d):d=t[11];let u;t[12]!==p||t[13]!==o||t[14]!==e?(u=bl.map(m=>{let{Icon:h,value:f}=m,v=e===f;return(0,i.jsxDEV)("button",{"aria-checked":v,"aria-label":p[f],className:U("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",v?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${f}`,onClick:a(()=>{o(f)},"onClick"),role:"radio",title:p[f],type:"button",children:[v&&(0,i.jsxDEV)(Jr.span,{className:"absolute inset-0 rounded-md border border-muted-foreground/40 bg-background/40",layoutId:"studio-theme-active",transition:{bounce:.1,duration:.45,type:"spring"}},void 0,!1),(0,i.jsxDEV)("span",{className:"relative",children:(0,i.jsxDEV)(h,{},void 0,!1)},void 0,!1)]},f,!0)}),t[12]=p,t[13]=o,t[14]=e,t[15]=u):u=t[15];let g;return t[16]!==d||t[17]!==u?(g=(0,i.jsxDEV)("div",{"aria-label":d,className:"inline-flex items-center gap-0.5 overflow-hidden rounded-md border border-border bg-muted/60 p-0.5","data-testid":"dash-app-theme",role:"radiogroup",children:u},void 0,!1),t[16]=d,t[17]=u,t[18]=g):g=t[18],g},"ThemeToggle");function si(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(yt.Root,{"data-slot":"popover",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(si,"Popover");function ri(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(yt.Trigger,{"data-slot":"popover-trigger",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(ri,"PopoverTrigger");function ni({align:t="end",alignOffset:e=0,className:o,keepMounted:s=!1,side:r="bottom",sideOffset:n=6,...l}){return(0,i.jsxDEV)(yt.Portal,{keepMounted:s,children:(0,i.jsxDEV)(yt.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:r,sideOffset:n,children:(0,i.jsxDEV)(yt.Popup,{className:U("z-50 w-72 origin-(--transform-origin) rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-md outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o),"data-slot":"popover-content",...l},void 0,!1)},void 0,!1)},void 0,!1)}a(ni,"PopoverContent");var Lr=768;function Pl(){let t=(0,B.c)(2),[e,o]=(0,q.useState)(void 0),s,r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=a(()=>{let n=globalThis.matchMedia(`(max-width: ${Lr-1}px)`),l=a(()=>{o(globalThis.innerWidth<Lr)},"onChange");return n.addEventListener("change",l),o(globalThis.innerWidth<Lr),()=>{n.removeEventListener("change",l)}},"t0"),r=[],t[0]=s,t[1]=r):(s=t[0],r=t[1]),(0,q.useEffect)(s,r),!!e}a(Pl,"useIsMobile");function Rl(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(fe.Root,{"data-slot":"sheet",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(Rl,"Sheet");function Cl(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(fe.Portal,{"data-slot":"sheet-portal",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(Cl,"SheetPortal");function Sl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=U("fixed inset-0 z-50 bg-black/10 text-xs/relaxed transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)(fe.Backdrop,{"data-slot":"sheet-overlay",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Sl,"SheetOverlay");function Nl({className:t,children:e,side:o="right",showCloseButton:s=!0,...r}){return(0,i.jsxDEV)(Cl,{children:[(0,i.jsxDEV)(Sl,{},void 0,!1),(0,i.jsxDEV)(fe.Popup,{"data-slot":"sheet-content","data-side":o,className:U("fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=left]:data-ending-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-ending-style:-translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-starting-style:-translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=right]:data-ending-style:translate-x-[2.5rem] rtl:data-[side=right]:data-ending-style:-translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] rtl:data-[side=right]:data-starting-style:-translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",t),...r,children:[e,s&&(0,i.jsxDEV)(fe.Close,{"data-slot":"sheet-close",render:(0,i.jsxDEV)(Qs,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"},void 0,!1),children:[(0,i.jsxDEV)(Ks,{icon:Mn,strokeWidth:2},void 0,!1),(0,i.jsxDEV)("span",{className:"sr-only",children:"Close"},void 0,!1)]},void 0,!0)]},void 0,!0)]},void 0,!0)}a(Nl,"SheetContent");function El(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=U("flex flex-col gap-0.5 p-4",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sheet-header",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(El,"SheetHeader");function Tl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=U("text-sm font-medium text-foreground",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)(fe.Title,{"data-slot":"sheet-title",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Tl,"SheetTitle");function wl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=U("text-xs/relaxed text-muted-foreground",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)(fe.Description,{"data-slot":"sheet-description",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(wl,"SheetDescription");var kl="sidebar_state",Ol=3600*24*7,Ml="16rem",Il="18rem",Dl="3rem",_l="b",ai=ct.createContext(null);function Vs(){let t=ct.useContext(ai);if(!t)throw new Ws("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}a(Vs,"useSidebar");function Al({defaultOpen:t=!0,open:e,onOpenChange:o,className:s,style:r,children:n,...l}){let c=Pl(),[p,d]=ct.useState(!1),[u,g]=ct.useState(t),m=e??u,h=a(b=>{let R=typeof b=="function"?b(m):b;o?o(R):g(R),document.cookie=`${kl}=${R}; path=/; max-age=${Ol}`},"setOpen"),f=a(()=>c?d(b=>!b):h(b=>!b),"toggleSidebar");ct.useEffect(()=>{let b=a(R=>{R.key===_l&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),f())},"handleKeyDown");return globalThis.addEventListener("keydown",b),()=>globalThis.removeEventListener("keydown",b)},[f]);let x={state:m?"expanded":"collapsed",open:m,setOpen:h,isMobile:c,openMobile:p,setOpenMobile:d,toggleSidebar:f};return(0,i.jsxDEV)(ai.Provider,{value:x,children:(0,i.jsxDEV)("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Ml,"--sidebar-width-icon":Dl,...r},className:U("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",s),...l,children:n},void 0,!1)},void 0,!1)}a(Al,"SidebarProvider");function Vl({side:t="left",variant:e="sidebar",collapsible:o="offcanvas",className:s,children:r,dir:n,...l}){let{isMobile:c,state:p,openMobile:d,setOpenMobile:u}=Vs();return o==="none"?(0,i.jsxDEV)("div",{"data-slot":"sidebar",className:U("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",s),...l,children:r},void 0,!1):c?(0,i.jsxDEV)(Rl,{open:d,onOpenChange:u,...l,children:(0,i.jsxDEV)(Nl,{dir:n,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Il},side:t,children:[(0,i.jsxDEV)(El,{className:"sr-only",children:[(0,i.jsxDEV)(Tl,{children:"Sidebar"},void 0,!1),(0,i.jsxDEV)(wl,{children:"Displays the mobile sidebar."},void 0,!1)]},void 0,!0),(0,i.jsxDEV)("div",{className:"flex h-full w-full flex-col",children:r},void 0,!1)]},void 0,!0)},void 0,!1):(0,i.jsxDEV)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":p,"data-collapsible":p==="collapsed"?o:"","data-variant":e,"data-side":t,"data-slot":"sidebar",children:[(0,i.jsxDEV)("div",{"data-slot":"sidebar-gap",className:U("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")},void 0,!1),(0,i.jsxDEV)("div",{"data-slot":"sidebar-container","data-side":t,className:U("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e group-data-[side=right]:border-s",s),...l,children:(0,i.jsxDEV)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-none group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:r},void 0,!1)},void 0,!1)]},void 0,!0)}a(Vl,"Sidebar");function Bl(t){let e=(0,B.c)(15),o,s,r;e[0]!==t?({className:o,onClick:s,...r}=t,e[0]=t,e[1]=o,e[2]=s,e[3]=r):(o=e[1],s=e[2],r=e[3]);let{toggleSidebar:n}=Vs(),l;e[4]!==o?(l=U(o),e[4]=o,e[5]=l):l=e[5];let c;e[6]!==s||e[7]!==n?(c=a(g=>{s?.(g),n()},"t2"),e[6]=s,e[7]=n,e[8]=c):c=e[8];let p,d;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=(0,i.jsxDEV)(Ks,{icon:In,strokeWidth:2,className:"rtl:rotate-180"},void 0,!1),d=(0,i.jsxDEV)("span",{className:"sr-only",children:"Toggle Sidebar"},void 0,!1),e[9]=p,e[10]=d):(p=e[9],d=e[10]);let u;return e[11]!==r||e[12]!==l||e[13]!==c?(u=(0,i.jsxDEV)(Qs,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:l,onClick:c,...r,children:[p,d]},void 0,!0),e[11]=r,e[12]=l,e[13]=c,e[14]=u):u=e[14],u}a(Bl,"SidebarTrigger");function Ll(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=U("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-none md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("main",{"data-slot":"sidebar-inset",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Ll,"SidebarInset");function Fl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=U("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Fl,"SidebarHeader");function Hl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=U("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Hl,"SidebarFooter");function $l(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=U("flex min-h-0 flex-1 flex-col gap-0 overflow-x-hidden overflow-y-auto [scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_25%,transparent)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/25 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5 hover:[scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_50%,transparent)_transparent] hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/50",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a($l,"SidebarContent");function jl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=U("relative flex w-full min-w-0 flex-col p-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(jl,"SidebarGroup");function zl(t){let e=(0,B.c)(10),o,s,r,n;if(e[0]!==t){let{className:p,render:d,...u}=t;o=d,n=qs,s="div",r=it({className:U("flex h-8 shrink-0 items-center rounded-none px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",p)},u),e[0]=t,e[1]=o,e[2]=s,e[3]=r,e[4]=n}else o=e[1],s=e[2],r=e[3],n=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=l):l=e[5];let c;return e[6]!==o||e[7]!==s||e[8]!==r?(c={defaultTagName:s,props:r,render:o,state:l},e[6]=o,e[7]=s,e[8]=r,e[9]=c):c=e[9],n(c)}a(zl,"SidebarGroupLabel");function Ul(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=U("w-full text-xs",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Ul,"SidebarGroupContent");function qa(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=U("flex w-full min-w-0 flex-col gap-0",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(qa,"SidebarMenu");function Ga(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=U("group/menu-item relative",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Ga,"SidebarMenuItem");var Wl=Xr("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-none p-2 text-start text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ii({render:t,isActive:e=!1,variant:o="default",size:s="default",tooltip:r,className:n,...l}){let{isMobile:c,state:p}=Vs(),d=qs({defaultTagName:"button",props:it({className:U(Wl({variant:o,size:s}),n)},l),render:r?(0,i.jsxDEV)(dl,{render:t},void 0,!1):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:s,active:e}});return r?(typeof r=="string"&&(r={children:r}),(0,i.jsxDEV)(ll,{children:[d,(0,i.jsxDEV)(cl,{side:"right",align:"center",hidden:p!=="collapsed"||c,...r},void 0,!1)]},void 0,!0)):d}a(ii,"SidebarMenuButton");var G=a((t,e)=>(0,q.lazy)(()=>t().then(o=>({default:o[e]}))),"lazyNamed"),Zl=G(()=>import("./chunk-NJFMWO6P.js"),"InsightsPanel"),ql=(0,q.lazy)(()=>import("./chunk-6WRZP62V.js")),Gl=(0,q.lazy)(()=>import("./chunk-OCHNCAXJ.js")),Kl=G(()=>import("./chunk-FCSPAJW4.js"),"AnalyticsPanel"),Ql=(0,q.lazy)(()=>import("./chunk-YEVCU7TB.js")),Yl=G(()=>import("./chunk-RSEEHNFI.js"),"AuthConfigPanel"),Jl=G(()=>import("./chunk-U4OAQPBT.js"),"AuthSessionsPanel"),Xl=G(()=>import("./chunk-2GGMGPEP.js"),"OrganizationsPanel"),ed=G(()=>import("./chunk-DORBUITF.js"),"UsersPanel"),td=G(()=>import("./chunk-RRAFQ5G2.js"),"ContainersPanel"),od=G(()=>import("./chunk-6UGM5IHN.js"),"TableEditor"),sd=G(()=>import("./chunk-MPTM7ZU3.js"),"ExportImportPanel"),rd=G(()=>import("./chunk-M55U7NHO.js"),"MigrationsPanel"),nd=G(()=>import("./chunk-BI35RXKQ.js"),"PitrPanel"),ad=G(()=>import("./chunk-TO4JQX7W.js"),"FlagsPanel"),id=G(()=>import("./chunk-DWTBY343.js"),"FunctionRunner"),ld=G(()=>import("./chunk-ZU4DZ6NK.js"),"FunctionStatsPanel"),dd=G(()=>import("./chunk-474C2O7W.js"),"AuditPanel"),cd=G(()=>import("./chunk-Y2ZPNDL7.js"),"LogDrainsPanel"),pd=(0,q.lazy)(()=>import("./chunk-XZE2RNDA.js").then(t=>({default:t.LogsPanel}))),ud=G(()=>import("./chunk-QLM6FYZW.js"),"MailPanel"),fd=G(()=>import("./chunk-5OH3VPZF.js"),"SchedulePanel"),md=(0,q.lazy)(()=>import("./chunk-PACH5AHG.js")),gd=G(()=>import("./chunk-YV43BOP7.js"),"KvBrowser"),hd=G(()=>import("./chunk-SLKF2L74.js"),"PaymentsPanel"),vd=G(()=>import("./chunk-DVC6YWVP.js"),"PermissionsPanel"),xd=(0,q.lazy)(()=>import("./chunk-EUIHTPKI.js")),bd=(0,q.lazy)(()=>import("./chunk-X6F22DBL.js")),yd=(0,q.lazy)(()=>import("./chunk-46K3NKPA.js")),Pd=G(()=>import("./chunk-IODYGARQ.js"),"HealthPanel"),Rd=G(()=>import("./chunk-XGMIDFUK.js"),"MetricsPanel"),Cd=G(()=>import("./chunk-7WNJ4Q7Z.js"),"SchemaViewer"),Sd=G(()=>import("./chunk-ILCTSAOB.js"),"SettingsPanel"),Nd=G(()=>import("./chunk-JFSZIUZT.js"),"SqlEditorPanel"),Ed=G(()=>import("./chunk-JE2YOAB7.js"),"FileBrowser"),Td=G(()=>import("./chunk-VTGBPW24.js"),"StorageRulesPanel"),wd=G(()=>import("./chunk-BQUQS7QN.js"),"VectorBrowser"),kd=(0,q.lazy)(()=>import("./chunk-LD2R263D.js")),li=(0,q.createContext)(null),Od={analytics:(0,i.jsxDEV)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"},void 0,!1),api:(0,i.jsxDEV)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4M13 5l-2 14"},void 0,!1),audit:(0,i.jsxDEV)("path",{d:"M7 4h7l4 4v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm6 0v5h5M9 13h6M9 16h6M9 10h2"},void 0,!1),authConfig:(0,i.jsxDEV)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6h-3.6l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"},void 0,!1),authSessions:(0,i.jsxDEV)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"},void 0,!1),containers:(0,i.jsxDEV)("path",{d:"M3 7.5 12 3l9 4.5v9L12 21l-9-4.5v-9Zm0 0 9 4.5m0 0 9-4.5m-9 4.5V21"},void 0,!1),dashboards:(0,i.jsxDEV)("path",{d:"M4 5h7v6H4V5Zm9 0h7v4h-7V5ZM4 14h7v5H4v-5Zm9-1h7v6h-7v-6Z"},void 0,!1),drains:(0,i.jsxDEV)("path",{d:"M5 5h14M7 5v6a5 5 0 0 0 10 0V5M10 16h4v3h-4zM12 19v2"},void 0,!1),data:(0,i.jsxDEV)("path",{d:"M5 6c0-1.4 3.1-2.5 7-2.5s7 1.1 7 2.5-3.1 2.5-7 2.5S5 7.4 5 6Zm0 0v12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5V6M5 12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5"},void 0,!1),export:(0,i.jsxDEV)("path",{d:"M12 3v11m0 0 4-4m-4 4-4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"},void 0,!1),fanout:(0,i.jsxDEV)("path",{d:"M12 5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm-7 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm14 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 7v3.5M12 10.5 6 17m6-6.5 6 6.5"},void 0,!1),files:(0,i.jsxDEV)("path",{d:"M4 7a2 2 0 0 1 2-2h3l2 2.5h7a2 2 0 0 1 2 2V18a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7Z"},void 0,!1),flags:(0,i.jsxDEV)("path",{d:"M6 21V4m0 0h11l-2 3 2 3H6"},void 0,!1),functions:(0,i.jsxDEV)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4"},void 0,!1),health:(0,i.jsxDEV)("path",{d:"M3 12h4l2 6 4-14 2 8h6"},void 0,!1),home:(0,i.jsxDEV)("path",{d:"M3 11.5 12 4l9 7.5M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9"},void 0,!1),insights:(0,i.jsxDEV)("path",{d:"M12 3a6 6 0 0 0-3.6 10.8c.5.4.8.9.9 1.5l.2 1.2h5l.2-1.2c.1-.6.4-1.1.9-1.5A6 6 0 0 0 12 3ZM9.5 20.5h5M10 18h4"},void 0,!1),kv:(0,i.jsxDEV)("path",{d:"M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"},void 0,!1),logs:(0,i.jsxDEV)("path",{d:"M5 6h14M5 10h14M5 14h9M5 18h11"},void 0,!1),mail:(0,i.jsxDEV)("path",{d:"M4 5h16v14H4V5Zm0 1.5 8 6 8-6"},void 0,!1),payments:(0,i.jsxDEV)("path",{d:"M3 7h18v10H3V7Zm0 3h18M7 14h4"},void 0,!1),metrics:(0,i.jsxDEV)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"},void 0,!1),migrations:(0,i.jsxDEV)("path",{d:"M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"},void 0,!1),organizations:(0,i.jsxDEV)("path",{d:"M3 21V8l6-4 6 4v13M9 21v-5h2v5M15 11h6v10M18 14v.01M18 17v.01M6 9v.01M6 12v.01M6 15v.01"},void 0,!1),permissions:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2.2 2.2L15 9.5M8.5 16h7"},void 0,!1),pitr:(0,i.jsxDEV)("path",{d:"M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"},void 0,!1),queues:(0,i.jsxDEV)("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"},void 0,!1),realtime:(0,i.jsxDEV)("path",{d:"M5 12a7 7 0 0 1 14 0M8 12a4 4 0 0 1 8 0M12 12v8m0-8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"},void 0,!1),rls:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3ZM8.5 10h7M8.5 13h7"},void 0,!1),schedule:(0,i.jsxDEV)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"},void 0,!1),schema:(0,i.jsxDEV)("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"},void 0,!1),sql:(0,i.jsxDEV)("path",{d:"M4 5h16v14H4V5Zm3 4 3 3-3 3m6 0h4"},void 0,!1),storageRules:(0,i.jsxDEV)("path",{d:"M7 10V7a5 5 0 0 1 10 0v3m-11 0h12a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1Zm6 4v2"},void 0,!1),security:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-2.5 8.5 2 2 4-4"},void 0,!1),settings:(0,i.jsxDEV)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6H10.5l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"},void 0,!1),users:(0,i.jsxDEV)("path",{d:"M16 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M9.5 10a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm11.5 10v-2a4 4 0 0 0-3-3.85M16 3.13A4 4 0 0 1 16 11"},void 0,!1),vectors:(0,i.jsxDEV)("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"},void 0,!1),workflows:(0,i.jsxDEV)("path",{d:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM7.5 10v2a2 2 0 0 0 2 2H14m2.5-4V8a2 2 0 0 0-2-2H10"},void 0,!1)},Ka=[{key:"overview",tabs:["home","dashboards"]},{key:"database",tabs:["data","sql","schema","migrations","vectors","pitr","export"]},{key:"functions",tabs:["functions","api","workflows","queues","containers"]},{key:"auth",tabs:["users","organizations","authSessions","authConfig"]},{key:"storage",tabs:["files","storageRules","kv"]},{key:"observability",tabs:["logs","audit","realtime","fanout","metrics","analytics","health"]},{key:"advisors",tabs:["security","rls","permissions","insights"]},{key:"operations",tabs:["schedule","mail","drains","payments","flags"]},{key:"settings",tabs:["settings"]}],Md={analytics:"analytics",authConfig:"auth",authSessions:"auth",containers:"containers",files:"storage",flags:"flags",kv:"kv",mail:"mail",organizations:"auth",payments:"payments",queues:"queues",schedule:"scheduler",storageRules:"storage",users:"auth",vectors:"vectors",workflows:"workflows"},Qa=a((t,e)=>{let o=Md[t];return o===void 0||e[o]},"isTabVisible"),Fr=a(t=>{let e=(0,B.c)(2),{tab:o}=t,s=Od[o],r;return e[0]!==s?(r=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 shrink-0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:s},void 0,!1),e[0]=s,e[1]=r):r=e[1],r},"TabIcon"),Id=a(t=>t,"exhaustiveRouteTabs"),di=Id(["home","data","sql","functions","api","workflows","queues","containers","schema","migrations","vectors","export","pitr","users","organizations","authSessions","authConfig","files","storageRules","kv","dashboards","metrics","analytics","health","security","rls","permissions","insights","logs","realtime","fanout","mail","payments","audit","schedule","drains","flags","settings"]),Dd=new Set(["api","data","sql"]),_d=a(t=>{let e=t.split("/").findLast(Boolean)??"";return di.includes(e)?e:"home"},"tabFromPathname"),Ad=a(t=>{let e=(0,B.c)(19),{chrome:o,connected:s}=t,r=ie(),n;e[0]!==r?(n=r("admin token"),e[0]=r,e[1]=n):n=e[1];let l;e[2]!==n?(l=(0,i.jsxDEV)("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:n},void 0,!1),e[2]=n,e[3]=l):l=e[3];let c;e[4]!==o.onTokenChange||e[5]!==o.token?(c=(0,i.jsxDEV)(ln,{className:"h-8","data-testid":"dash-app-token",id:"dash-app-token",onChange:o.onTokenChange,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:o.token},void 0,!1),e[4]=o.onTokenChange,e[5]=o.token,e[6]=c):c=e[6];let p;e[7]!==s||e[8]!==r?(p=s&&(0,i.jsxDEV)("p",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground","data-testid":"dash-app-token-warning",role:"note",children:[(0,i.jsxDEV)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"},void 0,!1),r("Token rides the WebSocket URL \u2014 it can surface in browser DevTools and server logs. Use a dev-only token.")]},void 0,!0),e[7]=s,e[8]=r,e[9]=p):p=e[9];let d;e[10]!==o.clearToken||e[11]!==s||e[12]!==r?(d=s&&(0,i.jsxDEV)("button",{className:"self-start rounded-md border border-border px-2.5 py-1 text-xs font-medium outline-none transition-colors hover:bg-accent focus-visible:bg-accent","data-testid":"dash-app-clear-token",onClick:o.clearToken,type:"button",children:r("Clear")},void 0,!1),e[10]=o.clearToken,e[11]=s,e[12]=r,e[13]=d):d=e[13];let u;return e[14]!==l||e[15]!==c||e[16]!==p||e[17]!==d?(u=(0,i.jsxDEV)("div",{className:"flex flex-col gap-2",children:[l,c,p,d]},void 0,!0),e[14]=l,e[15]=c,e[16]=p,e[17]=d,e[18]=u):u=e[18],u},"ConnectPopoverContent"),Vd=a(t=>{let e=(0,B.c)(25),{current:o,group:s,groupLabel:r,selectTab:n,tabDescription:l,tabLabel:c}=t,p=s.tabs.includes(o)?"page":void 0,d=r[s.key],u=s.tabs[0],g;e[0]!==u?(g=(0,i.jsxDEV)(Fr,{tab:u},void 0,!1),e[0]=u,e[1]=g):g=e[1];let m;e[2]!==p||e[3]!==d||e[4]!==g?(m=(0,i.jsxDEV)(ri,{"aria-current":p,"aria-label":d,className:"mx-auto flex size-8 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent data-[popup-open]:bg-sidebar-accent data-[popup-open]:text-sidebar-accent-foreground data-[popup-open]:shadow-xs aria-[current=page]:bg-sidebar-accent aria-[current=page]:text-sidebar-accent-foreground aria-[current=page]:shadow-xs",delay:120,openOnHover:!0,children:g},void 0,!1),e[2]=p,e[3]=d,e[4]=g,e[5]=m):m=e[5];let h=r[s.key],f;e[6]!==h?(f=(0,i.jsxDEV)("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:h},void 0,!1),e[6]=h,e[7]=f):f=e[7];let v;if(e[8]!==o||e[9]!==s.tabs||e[10]!==n||e[11]!==l||e[12]!==c){let R;e[14]!==o||e[15]!==n||e[16]!==l||e[17]!==c?(R=a(P=>(0,i.jsxDEV)("button",{"aria-current":o===P?"page":void 0,className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-[13px] text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent aria-[current=page]:bg-accent aria-[current=page]:font-medium [&_svg]:opacity-70 aria-[current=page]:[&_svg]:opacity-100","data-tab":P,"data-testid":`dash-tab-${P}`,onClick:n,title:l[P],type:"button",children:[(0,i.jsxDEV)(Fr,{tab:P},void 0,!1),(0,i.jsxDEV)("span",{children:c[P]},void 0,!1)]},P,!0),"t92"),e[14]=o,e[15]=n,e[16]=l,e[17]=c,e[18]=R):R=e[18],v=s.tabs.map(R),e[8]=o,e[9]=s.tabs,e[10]=n,e[11]=l,e[12]=c,e[13]=v}else v=e[13];let x;e[19]!==f||e[20]!==v?(x=(0,i.jsxDEV)(ni,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[f,v]},void 0,!0),e[19]=f,e[20]=v,e[21]=x):x=e[21];let b;return e[22]!==m||e[23]!==x?(b=(0,i.jsxDEV)(si,{children:[m,x]},void 0,!0),e[22]=m,e[23]=x,e[24]=b):b=e[24],b},"CollapsedGroupNav"),Bd=a(t=>{let e=(0,B.c)(45),{chrome:o,collapsed:s,connected:r}=t,n=ie();if(o===null){let P;e[0]!==n?(P=n("Admin"),e[0]=n,e[1]=P):P=e[1];let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=(0,i.jsxDEV)("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"},void 0,!1),e[2]=N):N=e[2];let S;e[3]!==n?(S=n("Admin"),e[3]=n,e[4]=S):S=e[4];let E;e[5]!==S?(E=(0,i.jsxDEV)("span",{className:"truncate text-[13px] font-medium",children:S},void 0,!1),e[5]=S,e[6]=E):E=e[6];let T;e[7]!==n?(T=n("Studio"),e[7]=n,e[8]=T):T=e[8];let k;e[9]!==T?(k=(0,i.jsxDEV)("span",{className:"truncate text-[11px] text-muted-foreground",children:T},void 0,!1),e[9]=T,e[10]=k):k=e[10];let w;e[11]!==E||e[12]!==k?(w=(0,i.jsxDEV)("span",{className:"grid flex-1 text-start leading-tight",children:[E,k]},void 0,!0),e[11]=E,e[12]=k,e[13]=w):w=e[13];let O;return e[14]!==P||e[15]!==w?(O=(0,i.jsxDEV)(ii,{className:"data-active:bg-transparent",size:"lg",tooltip:P,children:[N,w]},void 0,!0),e[14]=P,e[15]=w,e[16]=O):O=e[16],O}let l=s?"mx-auto size-8 justify-center":"w-full p-2",c;e[17]!==l?(c=U("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",l),e[17]=l,e[18]=c):c=e[18];let p;e[19]!==r||e[20]!==n?(p=n(r?"Connected":"Not connected"),e[19]=r,e[20]=n,e[21]=p):p=e[21];let d=r?"bg-success":"bg-muted-foreground/50",u;e[22]!==d?(u=U("absolute -end-0.5 -bottom-0.5 size-2.5 rounded-full border-2 border-sidebar",d),e[22]=d,e[23]=u):u=e[23];let g;e[24]!==u?(g=(0,i.jsxDEV)("span",{className:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:["C",(0,i.jsxDEV)("span",{"aria-hidden":"true",className:u},void 0,!1)]},void 0,!0),e[24]=u,e[25]=g):g=e[25];let m;e[26]!==s||e[27]!==r||e[28]!==n?(m=!s&&(0,i.jsxDEV)(i.Fragment,{children:[(0,i.jsxDEV)("span",{className:"grid flex-1 text-start leading-tight",children:[(0,i.jsxDEV)("span",{className:"truncate text-[13px] font-medium",children:n("Admin")},void 0,!1),(0,i.jsxDEV)("span",{className:"truncate text-[11px] text-muted-foreground",children:n(r?"Connected":"Not connected")},void 0,!1)]},void 0,!0),(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"m8 9 4-4 4 4M8 15l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1)},void 0,!1)]},void 0,!0),e[26]=s,e[27]=r,e[28]=n,e[29]=m):m=e[29];let h;e[30]!==c||e[31]!==p||e[32]!==g||e[33]!==m?(h=(0,i.jsxDEV)(ri,{className:c,"data-testid":"dash-app-connect",title:p,children:[g,m]},void 0,!0),e[30]=c,e[31]=p,e[32]=g,e[33]=m,e[34]=h):h=e[34];let f=s?"end":"start",v=s?"right":"top",x;e[35]!==o||e[36]!==r?(x=(0,i.jsxDEV)(Ad,{chrome:o,connected:r},void 0,!1),e[35]=o,e[36]=r,e[37]=x):x=e[37];let b;e[38]!==v||e[39]!==x||e[40]!==f?(b=(0,i.jsxDEV)(ni,{align:f,keepMounted:!0,side:v,children:x},void 0,!1),e[38]=v,e[39]=x,e[40]=f,e[41]=b):b=e[41];let R;return e[42]!==b||e[43]!==h?(R=(0,i.jsxDEV)(si,{children:[h,b]},void 0,!0),e[42]=b,e[43]=h,e[44]=R):R=e[44],R},"SidebarFooterProfile"),Ld=a(t=>{let e=(0,B.c)(28),{chrome:o,connected:s,current:r,groupLabel:n,groups:l,selectTab:c,tabDescription:p,tabLabel:d}=t,u=ie(),{state:g}=Vs(),m=g==="collapsed",h=m&&"justify-center px-0",f;e[0]!==h?(f=U("flex items-center gap-2.5 px-1.5 py-1",h),e[0]=h,e[1]=f):f=e[1];let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=(0,i.jsxDEV)(pl,{className:"size-9 shrink-0 text-foreground"},void 0,!1),e[2]=v):v=e[2];let x;e[3]!==m||e[4]!==s||e[5]!==u?(x=!m&&(0,i.jsxDEV)(i.Fragment,{children:[(0,i.jsxDEV)("span",{className:"grid flex-1 leading-tight",children:[(0,i.jsxDEV)("span",{className:"truncate text-sm font-semibold text-foreground",children:"lunora"},void 0,!1),(0,i.jsxDEV)("span",{className:"truncate text-[11px] text-muted-foreground",children:u("Studio")},void 0,!1)]},void 0,!0),(0,i.jsxDEV)(go,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:u(s?"Live":"Local")},void 0,!1)]},void 0,!0),e[3]=m,e[4]=s,e[5]=u,e[6]=x):x=e[6];let b;e[7]!==f||e[8]!==x?(b=(0,i.jsxDEV)(Fl,{children:(0,i.jsxDEV)("div",{className:f,children:[v,x]},void 0,!0)},void 0,!1),e[7]=f,e[8]=x,e[9]=b):b=e[9];let R;e[10]!==m||e[11]!==r||e[12]!==n||e[13]!==l||e[14]!==c||e[15]!==p||e[16]!==d?(R=m?l.map(E=>(0,i.jsxDEV)(Vd,{current:r,group:E,groupLabel:n,selectTab:c,tabDescription:p,tabLabel:d},E.key,!1)):l.map(E=>(0,i.jsxDEV)(jl,{children:[(0,i.jsxDEV)(zl,{className:"text-[11px] font-medium tracking-wider uppercase",children:n[E.key]},void 0,!1),(0,i.jsxDEV)(Ul,{children:(0,i.jsxDEV)(qa,{children:E.tabs.map(T=>(0,i.jsxDEV)(Ga,{children:(0,i.jsxDEV)(ii,{className:"data-active:text-foreground dark:data-active:text-royal-amethyst data-active:shadow-[inset_2px_0_0_0_var(--royal-amethyst)]","data-tab":T,"data-testid":`dash-tab-${T}`,isActive:r===T,onClick:c,title:p[T],tooltip:p[T],children:[(0,i.jsxDEV)(Fr,{tab:T},void 0,!1),(0,i.jsxDEV)("span",{children:d[T]},void 0,!1)]},void 0,!0)},T,!1))},void 0,!1)},void 0,!1)]},E.key,!0)),e[10]=m,e[11]=r,e[12]=n,e[13]=l,e[14]=c,e[15]=p,e[16]=d,e[17]=R):R=e[17];let P;e[18]!==R?(P=(0,i.jsxDEV)($l,{children:R},void 0,!1),e[18]=R,e[19]=P):P=e[19];let N;e[20]!==o||e[21]!==m||e[22]!==s?(N=(0,i.jsxDEV)(Hl,{children:(0,i.jsxDEV)(qa,{children:(0,i.jsxDEV)(Ga,{children:(0,i.jsxDEV)(Bd,{chrome:o,collapsed:m,connected:s},void 0,!1)},void 0,!1)},void 0,!1)},void 0,!1),e[20]=o,e[21]=m,e[22]=s,e[23]=N):N=e[23];let S;return e[24]!==b||e[25]!==P||e[26]!==N?(S=(0,i.jsxDEV)(Vl,{collapsible:"icon",variant:"inset",children:[b,P,N]},void 0,!0),e[24]=b,e[25]=P,e[26]=N,e[27]=S):S=e[27],S},"StudioSidebar"),ci=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[(0,i.jsxDEV)("div",{className:"flex items-center gap-2",children:[(0,i.jsxDEV)(ls,{className:"h-8 w-40"},void 0,!1),(0,i.jsxDEV)(ls,{className:"h-8 w-24"},void 0,!1)]},void 0,!0),(0,i.jsxDEV)(ls,{className:"h-72 w-full"},void 0,!1)]},void 0,!0),t[0]=e):e=t[0],e},"RoutePending"),Fd=a(()=>{let t=(0,B.c)(294),e=ie(),o=pt(),s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={select:Ud},t[0]=s):s=t[0];let r=Gr(s),n,l;t[1]!==r?(n=_d(r),l=Dd.has(n),t[1]=r,t[2]=n,t[3]=l):(n=t[2],l=t[3]);let c=l,p=_r(),d;t[4]!==p?(d=a(at=>({...at,tabs:at.tabs.filter(Bo=>Qa(Bo,p))}),"t2"),t[4]=p,t[5]=d):d=t[5];let u=Ka.map(d).filter(Wd),g,m;t[6]!==n||t[7]!==p||t[8]!==o?(g=a(()=>{Qa(n,p)||$e(o({replace:!0,to:"/home"}))},"t3"),m=[n,p,o],t[6]=n,t[7]=p,t[8]=o,t[9]=g,t[10]=m):(g=t[9],m=t[10]),(0,q.useEffect)(g,m);let h;t[11]!==e?(h=e("Analytics"),t[11]=e,t[12]=h):h=t[12];let f;t[13]!==e?(f=e("API"),t[13]=e,t[14]=f):f=t[14];let v;t[15]!==e?(v=e("Audit"),t[15]=e,t[16]=v):v=t[16];let x;t[17]!==e?(x=e("Configuration"),t[17]=e,t[18]=x):x=t[18];let b;t[19]!==e?(b=e("Sessions"),t[19]=e,t[20]=b):b=t[20];let R;t[21]!==e?(R=e("Containers"),t[21]=e,t[22]=R):R=t[22];let P;t[23]!==e?(P=e("Dashboards"),t[23]=e,t[24]=P):P=t[24];let N;t[25]!==e?(N=e("Data"),t[25]=e,t[26]=N):N=t[26];let S;t[27]!==e?(S=e("Log drains"),t[27]=e,t[28]=S):S=t[28];let E;t[29]!==e?(E=e("Export / Import"),t[29]=e,t[30]=E):E=t[30];let T;t[31]!==e?(T=e("Fan-out"),t[31]=e,t[32]=T):T=t[32];let k;t[33]!==e?(k=e("Files"),t[33]=e,t[34]=k):k=t[34];let w;t[35]!==e?(w=e("Flags"),t[35]=e,t[36]=w):w=t[36];let O;t[37]!==e?(O=e("Functions"),t[37]=e,t[38]=O):O=t[38];let V;t[39]!==e?(V=e("Health"),t[39]=e,t[40]=V):V=t[40];let W;t[41]!==e?(W=e("Home"),t[41]=e,t[42]=W):W=t[42];let _;t[43]!==e?(_=e("Performance"),t[43]=e,t[44]=_):_=t[44];let H;t[45]!==e?(H=e("KV"),t[45]=e,t[46]=H):H=t[46];let $;t[47]!==e?($=e("Logs"),t[47]=e,t[48]=$):$=t[48];let Z;t[49]!==e?(Z=e("Metrics"),t[49]=e,t[50]=Z):Z=t[50];let K;t[51]!==e?(K=e("Migrations"),t[51]=e,t[52]=K):K=t[52];let D;t[53]!==e?(D=e("Organizations"),t[53]=e,t[54]=D):D=t[54];let I;t[55]!==e?(I=e("Time Travel"),t[55]=e,t[56]=I):I=t[56];let z;t[57]!==e?(z=e("Mail"),t[57]=e,t[58]=z):z=t[58];let te;t[59]!==e?(te=e("Payments"),t[59]=e,t[60]=te):te=t[60];let re;t[61]!==e?(re=e("Permissions"),t[61]=e,t[62]=re):re=t[62];let ne;t[63]!==e?(ne=e("Queues"),t[63]=e,t[64]=ne):ne=t[64];let J;t[65]!==e?(J=e("Realtime"),t[65]=e,t[66]=J):J=t[66];let ee;t[67]!==e?(ee=e("RLS Policies"),t[67]=e,t[68]=ee):ee=t[68];let ae;t[69]!==e?(ae=e("Scheduled"),t[69]=e,t[70]=ae):ae=t[70];let Be;t[71]!==e?(Be=e("Schema"),t[71]=e,t[72]=Be):Be=t[72];let me;t[73]!==e?(me=e("Security"),t[73]=e,t[74]=me):me=t[74];let he;t[75]!==e?(he=e("Settings"),t[75]=e,t[76]=he):he=t[76];let ve;t[77]!==e?(ve=e("SQL editor"),t[77]=e,t[78]=ve):ve=t[78];let Le;t[79]!==e?(Le=e("Access Rules"),t[79]=e,t[80]=Le):Le=t[80];let L;t[81]!==e?(L=e("Users"),t[81]=e,t[82]=L):L=t[82];let Q;t[83]!==e?(Q=e("Vectors"),t[83]=e,t[84]=Q):Q=t[84];let X;t[85]!==e?(X=e("Workflows"),t[85]=e,t[86]=X):X=t[86];let xe;t[87]!==R||t[88]!==P||t[89]!==N||t[90]!==S||t[91]!==E||t[92]!==T||t[93]!==k||t[94]!==w||t[95]!==O||t[96]!==V||t[97]!==W||t[98]!==_||t[99]!==H||t[100]!==$||t[101]!==Z||t[102]!==K||t[103]!==D||t[104]!==I||t[105]!==z||t[106]!==te||t[107]!==re||t[108]!==ne||t[109]!==J||t[110]!==ee||t[111]!==ae||t[112]!==Be||t[113]!==me||t[114]!==he||t[115]!==ve||t[116]!==Le||t[117]!==L||t[118]!==Q||t[119]!==X||t[120]!==h||t[121]!==f||t[122]!==v||t[123]!==x||t[124]!==b?(xe={analytics:h,api:f,audit:v,authConfig:x,authSessions:b,containers:R,dashboards:P,data:N,drains:S,export:E,fanout:T,files:k,flags:w,functions:O,health:V,home:W,insights:_,kv:H,logs:$,metrics:Z,migrations:K,organizations:D,pitr:I,mail:z,payments:te,permissions:re,queues:ne,realtime:J,rls:ee,schedule:ae,schema:Be,security:me,settings:he,sql:ve,storageRules:Le,users:L,vectors:Q,workflows:X},t[87]=R,t[88]=P,t[89]=N,t[90]=S,t[91]=E,t[92]=T,t[93]=k,t[94]=w,t[95]=O,t[96]=V,t[97]=W,t[98]=_,t[99]=H,t[100]=$,t[101]=Z,t[102]=K,t[103]=D,t[104]=I,t[105]=z,t[106]=te,t[107]=re,t[108]=ne,t[109]=J,t[110]=ee,t[111]=ae,t[112]=Be,t[113]=me,t[114]=he,t[115]=ve,t[116]=Le,t[117]=L,t[118]=Q,t[119]=X,t[120]=h,t[121]=f,t[122]=v,t[123]=x,t[124]=b,t[125]=xe):xe=t[125];let se=xe,Fe={advisors:e("Advisors"),auth:e("Auth"),database:e("Database"),functions:e("Functions"),observability:e("Observability"),operations:e("Operations"),overview:e("Overview"),settings:e("Settings"),storage:e("Storage")},ce;t[126]!==e?(ce=e("Usage and latency from Analytics Engine \u2014 request volume, p50/p95, and hot shards."),t[126]=e,t[127]=ce):ce=t[127];let pe;t[128]!==e?(pe=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[128]=e,t[129]=pe):pe=t[129];let Pe;t[130]!==e?(Pe=e("A durable log of admin state-changing operations."),t[130]=e,t[131]=Pe):Pe=t[131];let Re;t[132]!==e?(Re=e("Enabled plugins and session config (read-only)."),t[132]=e,t[133]=Re):Re=t[133];let Ce;t[134]!==e?(Ce=e("Browse and revoke active sessions across all users."),t[134]=e,t[135]=Ce):Ce=t[135];let Se;t[136]!==e?(Se=e("Live Cloudflare Containers \u2014 current lifecycle state per container from the log stream."),t[136]=e,t[137]=Se):Se=t[137];let Ne;t[138]!==e?(Ne=e("Chart widgets backed by saved read-only SQL queries."),t[138]=e,t[139]=Ne):Ne=t[139];let Ee;t[140]!==e?(Ee=e("Browse and edit rows across your shard and global tables."),t[140]=e,t[141]=Ee):Ee=t[141];let Te;t[142]!==e?(Te=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[142]=e,t[143]=Te):Te=t[143];let we;t[144]!==e?(we=e("Export a shard to NDJSON, or import rows from it."),t[144]=e,t[145]=we):we=t[145];let ke;t[146]!==e?(ke=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[146]=e,t[147]=ke):ke=t[147];let Oe;t[148]!==e?(Oe=e("Browse objects in your R2 storage buckets."),t[148]=e,t[149]=Oe):Oe=t[149];let Me;t[150]!==e?(Me=e("Inspect feature flags and their live evaluation under a targeting context."),t[150]=e,t[151]=Me):Me=t[151];let ze;t[152]!==e?(ze=e("Run registered queries, mutations, and actions."),t[152]=e,t[153]=ze):ze=t[153];let Ue;t[154]!==e?(Ue=e("At-a-glance connection, error, and shard signals."),t[154]=e,t[155]=Ue):Ue=t[155];let We;t[156]!==e?(We=e("Connection, health, and advisor summary for your deployment."),t[156]=e,t[157]=We):We=t[157];let Ze;t[158]!==e?(Ze=e("Surface slow functions, error spikes, and cache problems."),t[158]=e,t[159]=Ze):Ze=t[159];let qe;t[160]!==e?(qe=e("A live stream of recent function logs."),t[160]=e,t[161]=qe):qe=t[161];let Ge;t[162]!==e?(Ge=e("Per-shard health and aggregate metrics."),t[162]=e,t[163]=Ge):Ge=t[163];let nt;t[164]!==e?(nt=e("Review migration status and run them."),t[164]=e,t[165]=nt):nt=t[165];let Ke;t[166]!==e?(Ke=e("Browse and manage organizations, members, and invitations."),t[166]=e,t[167]=Ke):Ke=t[167];let ge;t[168]!==e?(ge=e("Restore a shard to a point in the last 30 days."),t[168]=e,t[169]=ge):ge=t[169];let Qe;t[170]!==e?(Qe=e("Email your app sent, captured in dev."),t[170]=e,t[171]=Qe):Qe=t[171];let Ye;t[172]!==e?(Ye=e("Synced customers, subscriptions, and webhook events."),t[172]=e,t[173]=Ye):Ye=t[173];let Ie;t[174]!==e?(Ie=e("Inspect access policies per table, and probe a function as any identity."),t[174]=e,t[175]=Ie):Ie=t[175];let Je;t[176]!==e?(Je=e("Inspect declared Cloudflare Queues \u2014 their producer bindings, consumer mode, and dead-letter queue."),t[176]=e,t[177]=Je):Je=t[177];let De;t[178]!==e?(De=e("Active WebSocket subscriptions on this shard."),t[178]=e,t[179]=De):De=t[179];let Xe;t[180]!==e?(Xe=e("Inspect row-level-security policies and roles, per table."),t[180]=e,t[181]=Xe):Xe=t[181];let _e;t[182]!==e?(_e=e("Inspect and cancel scheduled jobs."),t[182]=e,t[183]=_e):_e=t[183];let et;t[184]!==e?(et=e("Inspect each table and its columns."),t[184]=e,t[185]=et):et=t[185];let Ae;t[186]!==e?(Ae=e("Review admin gates, credentials, and log redaction."),t[186]=e,t[187]=Ae):Ae=t[187];let Et;t[188]!==e?(Et=e("Read-only deployment config \u2014 vars, secrets, and bindings."),t[188]=e,t[189]=Et):Et=t[189];let Tt;t[190]!==e?(Tt=e("Run read-only SQL against a shard."),t[190]=e,t[191]=Tt):Tt=t[191];let wt;t[192]!==e?(wt=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[192]=e,t[193]=wt):wt=t[193];let kt;t[194]!==e?(kt=e("Inspect storage access rules \u2014 per bucket, operation, and key prefix."),t[194]=e,t[195]=kt):kt=t[195];let Ot;t[196]!==e?(Ot=e("Manage auth users \u2014 roles, bans, sessions, and identity."),t[196]=e,t[197]=Ot):Ot=t[197];let Mt;t[198]!==e?(Mt=e("Browse Vectorize indexes and run similarity searches."),t[198]=e,t[199]=Mt):Mt=t[199];let It;t[200]!==e?(It=e("Inspect declared Cloudflare Workflows and their bindings."),t[200]=e,t[201]=It):It=t[201];let No;t[202]!==ce||t[203]!==pe||t[204]!==Pe||t[205]!==Re||t[206]!==Ce||t[207]!==Se||t[208]!==Ne||t[209]!==Ee||t[210]!==Te||t[211]!==we||t[212]!==ke||t[213]!==Oe||t[214]!==Me||t[215]!==ze||t[216]!==Ue||t[217]!==We||t[218]!==Ze||t[219]!==qe||t[220]!==Ge||t[221]!==nt||t[222]!==Ke||t[223]!==ge||t[224]!==Qe||t[225]!==Ye||t[226]!==Ie||t[227]!==Je||t[228]!==De||t[229]!==Xe||t[230]!==_e||t[231]!==et||t[232]!==Ae||t[233]!==Et||t[234]!==Tt||t[235]!==wt||t[236]!==kt||t[237]!==Ot||t[238]!==Mt||t[239]!==It?(No={analytics:ce,api:pe,audit:Pe,authConfig:Re,authSessions:Ce,containers:Se,dashboards:Ne,data:Ee,drains:Te,export:we,fanout:ke,files:Oe,flags:Me,functions:ze,health:Ue,home:We,insights:Ze,logs:qe,metrics:Ge,migrations:nt,organizations:Ke,pitr:ge,mail:Qe,payments:Ye,permissions:Ie,queues:Je,realtime:De,rls:Xe,schedule:_e,schema:et,security:Ae,settings:Et,sql:Tt,kv:wt,storageRules:kt,users:Ot,vectors:Mt,workflows:It},t[202]=ce,t[203]=pe,t[204]=Pe,t[205]=Re,t[206]=Ce,t[207]=Se,t[208]=Ne,t[209]=Ee,t[210]=Te,t[211]=we,t[212]=ke,t[213]=Oe,t[214]=Me,t[215]=ze,t[216]=Ue,t[217]=We,t[218]=Ze,t[219]=qe,t[220]=Ge,t[221]=nt,t[222]=Ke,t[223]=ge,t[224]=Qe,t[225]=Ye,t[226]=Ie,t[227]=Je,t[228]=De,t[229]=Xe,t[230]=_e,t[231]=et,t[232]=Ae,t[233]=Et,t[234]=Tt,t[235]=wt,t[236]=kt,t[237]=Ot,t[238]=Mt,t[239]=It,t[240]=No):No=t[240];let pi=No,Eo;t[241]!==o?(Eo=a(at=>{$e(o({to:`/${at.currentTarget.dataset.tab??""}`}))},"t83"),t[241]=o,t[242]=Eo):Eo=t[242];let ui=Eo,To,wo;t[243]!==n||t[244]!==se?(To=a(()=>{typeof document<"u"&&(document.title=`${se[n]} \xB7 lunora`)},"t84"),wo=[n,se],t[243]=n,t[244]=se,t[245]=To,t[246]=wo):(To=t[245],wo=t[246]),(0,q.useEffect)(To,wo);let fi=u.find(at=>at.tabs.includes(n))??Ka[0],Bs=u.flatMap(at=>at.tabs.map(Bo=>({group:Fe[at.key],label:se[Bo],to:`/${Bo}`}))),Dt=(0,q.use)(li),mi=Dt!==null&&Dt.token!=="",ko;t[247]!==Bs?(ko=(0,i.jsxDEV)(Wa,{items:Bs},void 0,!1),t[247]=Bs,t[248]=ko):ko=t[248];let Oo;t[249]===Symbol.for("react.memo_cache_sentinel")?(Oo=(0,i.jsxDEV)(Bl,{className:"-ms-1"},void 0,!1),t[249]=Oo):Oo=t[249];let _t;t[250]!==e?(_t=e("Breadcrumb"),t[250]=e,t[251]=_t):_t=t[251];let Ls=Fe[fi.key],At;t[252]!==Ls?(At=(0,i.jsxDEV)("span",{className:"text-muted-foreground",children:Ls},void 0,!1),t[252]=Ls,t[253]=At):At=t[253];let Mo;t[254]===Symbol.for("react.memo_cache_sentinel")?(Mo=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5 text-muted-foreground/60",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1)},void 0,!1),t[254]=Mo):Mo=t[254];let Fs=se[n],Vt;t[255]!==Fs?(Vt=(0,i.jsxDEV)("span",{className:"font-medium text-foreground",children:Fs},void 0,!1),t[255]=Fs,t[256]=Vt):Vt=t[256];let Bt;t[257]!==_t||t[258]!==At||t[259]!==Vt?(Bt=(0,i.jsxDEV)("nav",{"aria-label":_t,className:"flex items-center gap-1.5 text-[13px]",children:[At,Mo,Vt]},void 0,!0),t[257]=_t,t[258]=At,t[259]=Vt,t[260]=Bt):Bt=t[260];let Io;t[261]===Symbol.for("react.memo_cache_sentinel")?(Io=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,i.jsxDEV)("circle",{cx:"11",cy:"11",r:"7"},void 0,!1),(0,i.jsxDEV)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"},void 0,!1)]},void 0,!0),t[261]=Io):Io=t[261];let Lt;t[262]!==e?(Lt=e("Search\u2026"),t[262]=e,t[263]=Lt):Lt=t[263];let Do;t[264]===Symbol.for("react.memo_cache_sentinel")?(Do=(0,i.jsxDEV)("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"\u2318K"},void 0,!1),t[264]=Do):Do=t[264];let Ft;t[265]!==Lt?(Ft=(0,i.jsxDEV)("button",{className:"mx-auto hidden h-8 w-72 items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 text-xs text-muted-foreground transition-colors hover:bg-muted md:flex","data-testid":"dash-app-search",onClick:Ua,type:"button",children:[Io,Lt,Do]},void 0,!0),t[265]=Lt,t[266]=Ft):Ft=t[266];let _o;t[267]===Symbol.for("react.memo_cache_sentinel")?(_o=(0,i.jsxDEV)("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:(0,i.jsxDEV)(yl,{},void 0,!1)},void 0,!1),t[267]=_o):_o=t[267];let Ht;t[268]!==Bt||t[269]!==Ft?(Ht=(0,i.jsxDEV)("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[Oo,Bt,Ft,_o]},void 0,!0),t[268]=Bt,t[269]=Ft,t[270]=Ht):Ht=t[270];let $t;t[271]!==Dt?.rulesInstalled?($t=Dt?.rulesInstalled===!1&&(0,i.jsxDEV)(ml,{},void 0,!1),t[271]=Dt?.rulesInstalled,t[272]=$t):$t=t[272];let Hs=`dash-tab-${n}`,$s=c?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",js=se[n],jt;t[273]!==e||t[274]!==js?(jt=e("{title} failed",{title:js}),t[273]=e,t[274]=js,t[275]=jt):jt=t[275];let zs=se[n],zt;t[276]!==e?(zt=e("Try again"),t[276]=e,t[277]=zt):zt=t[277];let Ao;t[278]===Symbol.for("react.memo_cache_sentinel")?(Ao=(0,i.jsxDEV)(q.Suspense,{fallback:(0,i.jsxDEV)(ci,{},void 0,!1),children:(0,i.jsxDEV)(Wr,{},void 0,!1)},void 0,!1),t[278]=Ao):Ao=t[278];let Ut;t[279]!==n||t[280]!==jt||t[281]!==zs||t[282]!==zt?(Ut=(0,i.jsxDEV)(ds,{fallbackTitle:jt,label:zs,retryLabel:zt,children:Ao},n,!1),t[279]=n,t[280]=jt,t[281]=zs,t[282]=zt,t[283]=Ut):Ut=t[283];let Wt;t[284]!==$s||t[285]!==Ut?(Wt=(0,i.jsxDEV)("div",{className:$s,children:Ut},void 0,!1),t[284]=$s,t[285]=Ut,t[286]=Wt):Wt=t[286];let Zt;t[287]!==Hs||t[288]!==Wt?(Zt=(0,i.jsxDEV)("div",{"aria-labelledby":Hs,className:"flex min-w-0 flex-1 flex-col overflow-hidden","data-testid":"dash-panel",id:"dash-panel",role:"tabpanel",children:Wt},void 0,!1),t[287]=Hs,t[288]=Wt,t[289]=Zt):Zt=t[289];let Vo;return t[290]!==Ht||t[291]!==$t||t[292]!==Zt?(Vo=(0,i.jsxDEV)(Ll,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[Ht,$t,Zt]},void 0,!0),t[290]=Ht,t[291]=$t,t[292]=Zt,t[293]=Vo):Vo=t[293],(0,i.jsxDEV)(Al,{className:"min-h-0 flex-1","data-testid":"lunora-studio",children:[ko,(0,i.jsxDEV)(Ld,{chrome:Dt,connected:mi,current:n,groupLabel:Fe,groups:u,selectTab:ui,tabDescription:pi,tabLabel:se},void 0,!1),Vo]},void 0,!0)},"StudioLayout"),Hd=a(t=>{let e=(0,B.c)(5),{initialShardKey:o,schemaEditable:s}=t,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];let n=zr(r),{table:l}=n,c=typeof l=="string"?l:void 0,p;return e[1]!==o||e[2]!==c||e[3]!==s?(p=(0,i.jsxDEV)(Cd,{initialShardKey:o,initialTable:c,schemaEditable:s},void 0,!1),e[1]=o,e[2]=c,e[3]=s,e[4]=p):p=e[4],p},"SchemaRoutePanel"),$d=a(()=>{let t=(0,B.c)(3),e=pt(),o,s;return t[0]!==e?(o=a(()=>{$e(e({replace:!0,to:"/home"}))},"t0"),s=[e],t[0]=e,t[1]=o,t[2]=s):(o=t[1],s=t[2]),(0,q.useEffect)(o,s),null},"NotFoundRedirect"),jd=a(({basePath:t,dataEditable:e=!1,functions:o,initialShardKey:s,openApiSpec:r,openRpcSpec:n,runAsIdentity:l=!1,schemaEditable:c=!1,scheduledCancel:p,scheduledCron:d,scheduledLoad:u})=>{let g=Ur({component:Fd}),m={analytics:(0,i.jsxDEV)(Kl,{},void 0,!1),api:(0,i.jsxDEV)(Ql,{functions:o,initialShardKey:s,openApiSpec:r,openRpcSpec:n},void 0,!1),audit:(0,i.jsxDEV)(dd,{initialShardKey:s},void 0,!1),authConfig:(0,i.jsxDEV)(Yl,{},void 0,!1),authSessions:(0,i.jsxDEV)(Jl,{},void 0,!1),containers:(0,i.jsxDEV)(td,{},void 0,!1),dashboards:(0,i.jsxDEV)(bd,{initialShardKey:s},void 0,!1),data:(0,i.jsxDEV)(od,{editable:e,initialShardKey:s},void 0,!1),drains:(0,i.jsxDEV)(cd,{},void 0,!1),export:(0,i.jsxDEV)(sd,{initialShardKey:s},void 0,!1),fanout:(0,i.jsxDEV)(yd,{initialShardKey:s},void 0,!1),files:(0,i.jsxDEV)(Ed,{},void 0,!1),kv:(0,i.jsxDEV)(gd,{},void 0,!1),flags:(0,i.jsxDEV)(ad,{initialShardKey:s},void 0,!1),functions:(0,i.jsxDEV)("div",{className:"flex flex-col gap-8",children:[(0,i.jsxDEV)(ld,{functions:o,initialShardKey:s},void 0,!1),(0,i.jsxDEV)(id,{functions:o,runAsIdentity:l},void 0,!1)]},void 0,!0),health:(0,i.jsxDEV)(Pd,{initialShardKey:s},void 0,!1),home:(0,i.jsxDEV)(Ha,{initialShardKey:s},void 0,!1),insights:(0,i.jsxDEV)(Zl,{initialShardKey:s},void 0,!1),logs:(0,i.jsxDEV)(pd,{initialShardKey:s},void 0,!1),metrics:(0,i.jsxDEV)(Rd,{initialShardKey:s},void 0,!1),migrations:(0,i.jsxDEV)(rd,{initialShardKey:s},void 0,!1),organizations:(0,i.jsxDEV)(Xl,{},void 0,!1),permissions:(0,i.jsxDEV)(vd,{functions:o,runAsIdentity:l,schemaEditable:c},void 0,!1),pitr:(0,i.jsxDEV)(nd,{initialShardKey:s},void 0,!1),mail:(0,i.jsxDEV)(ud,{},void 0,!1),payments:(0,i.jsxDEV)(hd,{},void 0,!1),queues:(0,i.jsxDEV)(xd,{},void 0,!1),realtime:(0,i.jsxDEV)(md,{initialShardKey:s},void 0,!1),rls:(0,i.jsxDEV)(ql,{},void 0,!1),schedule:(0,i.jsxDEV)(fd,{loadCronJobs:d,scheduledCancel:p,scheduledLoad:u},void 0,!1),schema:(0,i.jsxDEV)(Hd,{initialShardKey:s,schemaEditable:c},void 0,!1),security:(0,i.jsxDEV)(Gl,{},void 0,!1),settings:(0,i.jsxDEV)(Sd,{initialShardKey:s},void 0,!1),sql:(0,i.jsxDEV)(Nd,{initialShardKey:s},void 0,!1),storageRules:(0,i.jsxDEV)(Td,{},void 0,!1),users:(0,i.jsxDEV)(ed,{},void 0,!1),vectors:(0,i.jsxDEV)(wd,{},void 0,!1),workflows:(0,i.jsxDEV)(kd,{},void 0,!1)},h=Fo({component:a(()=>m.home,"component"),getParentRoute:a(()=>g,"getParentRoute"),path:"/"}),f=di.map(b=>b==="data"?Fo({component:a(()=>m[b],"component"),getParentRoute:a(()=>g,"getParentRoute"),path:`/${b}`,validateSearch:Ln}):Fo({component:a(()=>m[b],"component"),getParentRoute:a(()=>g,"getParentRoute"),path:`/${b}`})),v=g.addChildren([h,...f]),x="window"in globalThis?$r():jr({initialEntries:["/home"]});return Zr({...t===void 0||t==="/"?{}:{basepath:t},defaultNotFoundComponent:$d,defaultPendingComponent:ci,defaultPendingMinMs:0,defaultPendingMs:0,history:x,routeTree:v})},"buildRouter"),zd=a(t=>{let e=(0,B.c)(17),{basePath:o,chrome:s,dataEditable:r,functions:n,initialShardKey:l,openApiSpec:c,openRpcSpec:p,runAsIdentity:d,schemaEditable:u,scheduledCancel:g,scheduledCron:m,scheduledLoad:h}=t,f;e[0]!==o||e[1]!==r||e[2]!==n||e[3]!==l||e[4]!==c||e[5]!==p||e[6]!==d||e[7]!==g||e[8]!==m||e[9]!==h||e[10]!==u?(f=jd({basePath:o,dataEditable:r,functions:n,initialShardKey:l,openApiSpec:c,openRpcSpec:p,runAsIdentity:d,schemaEditable:u,scheduledCancel:g,scheduledCron:m,scheduledLoad:h}),e[0]=o,e[1]=r,e[2]=n,e[3]=l,e[4]=c,e[5]=p,e[6]=d,e[7]=g,e[8]=m,e[9]=h,e[10]=u,e[11]=f):f=e[11];let v=f,x=s??null,b;e[12]!==v?(b=(0,i.jsxDEV)(qr,{router:v},void 0,!1),e[12]=v,e[13]=b):b=e[13];let R;return e[14]!==x||e[15]!==b?(R=(0,i.jsxDEV)(li,{value:x,children:b},void 0,!1),e[14]=x,e[15]=b,e[16]=R):R=e[16],R},"StudioShell"),x0=a(t=>{let e=(0,B.c)(17),{basePath:o,chrome:s,dataEditable:r,functions:n,i18n:l,initialShardKey:c,locale:p,openApiSpec:d,openRpcSpec:u,runAsIdentity:g,schemaEditable:m,scheduledCancel:h,scheduledCron:f,scheduledLoad:v}=t,x;e[0]!==o||e[1]!==s||e[2]!==r||e[3]!==n||e[4]!==c||e[5]!==d||e[6]!==u||e[7]!==g||e[8]!==h||e[9]!==f||e[10]!==v||e[11]!==m?(x=(0,i.jsxDEV)(zd,{basePath:o,chrome:s,dataEditable:r,functions:n,initialShardKey:c,openApiSpec:d,openRpcSpec:u,runAsIdentity:g,scheduledCancel:h,scheduledCron:f,scheduledLoad:v,schemaEditable:m},void 0,!1),e[0]=o,e[1]=s,e[2]=r,e[3]=n,e[4]=c,e[5]=d,e[6]=u,e[7]=g,e[8]=h,e[9]=f,e[10]=v,e[11]=m,e[12]=x):x=e[12];let b=x;if(l===void 0&&p===void 0)return b;let R;return e[13]!==l||e[14]!==p||e[15]!==b?(R=(0,i.jsxDEV)(za,{i18n:l,locale:p,children:b},void 0,!1),e[13]=l,e[14]=p,e[15]=b,e[16]=R):R=e[16],R},"Studio");function Ud(t){return t.location.pathname}a(Ud,"_temp");function Wd(t){return t.tabs.length>0}a(Wd,"_temp2");export{ds as a,za as b,h0 as c,il as d,v0 as e,pl as f,Rl as g,Nl as h,El as i,Tl as j,x0 as k};
@@ -1 +0,0 @@
1
- import{a as He}from"./chunk-YAECF5LW.js";import"./chunk-DWDILV2E.js";import{a as Ve}from"./chunk-J6J54MBP.js";import"./chunk-5OIBXYZM.js";import{a as Ge}from"./chunk-AJIUI7DD.js";import"./chunk-XNJNSCLM.js";import{a as Re,b as $e,c as Oe,d as Y,e as q,f as T}from"./chunk-GTM65MVX.js";import{a as Pe}from"./chunk-VLXV72QE.js";import{R as Fe}from"./chunk-3CJW6NWG.js";import{c as H}from"./chunk-UK64ZSUW.js";import"./chunk-O3NAGRTR.js";import"./chunk-HV7G6DFP.js";import{a as G}from"./chunk-BOXSWNXZ.js";import{a as ue}from"./chunk-TAD43CG5.js";import{b as Le}from"./chunk-DVKPRFIJ.js";import{a as De,e as Be}from"./chunk-SEU5V7I6.js";import{b as ce}from"./chunk-ZPP2KOR4.js";import"./chunk-CKSHCYGC.js";import{f as Je}from"./chunk-X7MMBSNW.js";import"./chunk-ZHVTQ37P.js";import"./chunk-3OA7PECS.js";import{d as z,e as me,f as fe,g as he,k as pe,n as ze}from"./chunk-PVZI3CXP.js";import"./chunk-GMSGZDDH.js";import{a as p,e as we,f as Ke,g as Ze,h as et}from"./chunk-RRCPZMC2.js";var P=we(Ze(),1);var D=we(Ke(),1);var t=we(et(),1);var tt=200,st=me(G.sendQueueMessage),at=me(G.replayQueueMessage),ot=me(G.clearQueueMessages),Ye=96,rt=p(r=>{if(r===void 0)return"\u2014";try{return JSON.stringify(r)}catch{return"[unserializable]"}},"formatBody"),lt=p(r=>r.length>Ye?`${r.slice(0,Ye)}\u2026`:r,"truncate"),nt=p(r=>r==="error"?"destructive":r==="retry"?"outline":"secondary","outcomeVariant"),dt=p((r,e)=>e(r==="messages"?"Messages":r==="send"?"Send":"Declared"),"tabLabel"),it=p(r=>{let e=(0,P.c)(11),{loaded:s,queues:m}=r,l=z(),n;e[0]!==l?(n=l("Queues are declared in code with defineQueue. Enqueue from a mutation or action with ctx.queues.<name>.send(...); push consumers process batches in the worker."),e[0]=l,e[1]=n):n=e[1];let o;e[2]!==n?(o=(0,t.jsxDEV)("p",{className:"text-sm text-muted-foreground",children:n},void 0,!1),e[2]=n,e[3]=o):o=e[3];let a;e[4]!==s||e[5]!==m||e[6]!==l?(a=s&&m.length===0?(0,t.jsxDEV)(ue,{description:l("No defineQueue is declared in lunora/queues.ts in this deployment. Add one to offload async work to a Cloudflare Queue."),testId:"queues-empty",title:l("No queues defined")},void 0,!1):(0,t.jsxDEV)(De,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(Be,{className:"px-0",children:(0,t.jsxDEV)(Re,{"data-testid":"queues-table",children:[(0,t.jsxDEV)($e,{children:(0,t.jsxDEV)(Y,{children:[(0,t.jsxDEV)(q,{children:l("Export")},void 0,!1),(0,t.jsxDEV)(q,{children:l("Queue")},void 0,!1),(0,t.jsxDEV)(q,{children:l("Mode")},void 0,!1),(0,t.jsxDEV)(q,{children:l("Binding")},void 0,!1),(0,t.jsxDEV)(q,{children:l("Dead-letter")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(Oe,{children:m.map(ft)},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1),e[4]=s,e[5]=m,e[6]=l,e[7]=a):a=e[7];let h;return e[8]!==o||e[9]!==a?(h=(0,t.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"queues-declared",children:[o,a]},void 0,!0),e[8]=o,e[9]=a,e[10]=h):h=e[10],h},"QueuesDeclaredTab"),ct=p(r=>{let e=(0,P.c)(67),{message:s,onReplay:m,replayingId:l}=r,n=z(),o,a,h,c,y,g,x,d,u,f;if(e[0]!==s.attempts||e[1]!==s.body||e[2]!==s.deadLettered||e[3]!==s.exportName||e[4]!==s.id||e[5]!==s.messageId||e[6]!==s.outcome||e[7]!==s.queue||e[8]!==n){let w=rt(s.body);a=Y,g=`queues-message-${s.id}`;let R=s.exportName??s.queue;e[19]!==R?(x=(0,t.jsxDEV)(T,{className:"font-mono text-xs",children:R},void 0,!1),e[19]=R,e[20]=x):x=e[20],e[21]!==s.messageId?(d=(0,t.jsxDEV)(T,{className:"max-w-[16ch] truncate font-mono text-xs text-muted-foreground",title:s.messageId,children:s.messageId},void 0,!1),e[21]=s.messageId,e[22]=d):d=e[22],e[23]!==s.attempts?(u=(0,t.jsxDEV)(T,{className:"font-mono text-xs tabular-nums",children:s.attempts},void 0,!1),e[23]=s.attempts,e[24]=u):u=e[24];let A=`queues-outcome-${s.id}`,Q;e[25]!==s.outcome?(Q=nt(s.outcome),e[25]=s.outcome,e[26]=Q):Q=e[26];let E;e[27]!==s.outcome||e[28]!==A||e[29]!==Q?(E=(0,t.jsxDEV)(ce,{"data-testid":A,variant:Q,children:s.outcome},void 0,!1),e[27]=s.outcome,e[28]=A,e[29]=Q,e[30]=E):E=e[30];let M;e[31]!==s.deadLettered||e[32]!==s.id||e[33]!==n?(M=s.deadLettered&&(0,t.jsxDEV)(ce,{"data-testid":`queues-dlq-${s.id}`,variant:"destructive",children:n("DLQ")},void 0,!1),e[31]=s.deadLettered,e[32]=s.id,e[33]=n,e[34]=M):M=e[34],e[35]!==E||e[36]!==M?(f=(0,t.jsxDEV)(T,{children:(0,t.jsxDEV)("span",{className:"inline-flex items-center gap-1",children:[E,M]},void 0,!0)},void 0,!1),e[35]=E,e[36]=M,e[37]=f):f=e[37],o=T,h="max-w-[32ch] truncate font-mono text-xs text-muted-foreground",c=w,y=lt(w),e[0]=s.attempts,e[1]=s.body,e[2]=s.deadLettered,e[3]=s.exportName,e[4]=s.id,e[5]=s.messageId,e[6]=s.outcome,e[7]=s.queue,e[8]=n,e[9]=o,e[10]=a,e[11]=h,e[12]=c,e[13]=y,e[14]=g,e[15]=x,e[16]=d,e[17]=u,e[18]=f}else o=e[9],a=e[10],h=e[11],c=e[12],y=e[13],g=e[14],x=e[15],d=e[16],u=e[17],f=e[18];let v;e[38]!==o||e[39]!==h||e[40]!==c||e[41]!==y?(v=(0,t.jsxDEV)(o,{className:h,title:c,children:y},void 0,!1),e[38]=o,e[39]=h,e[40]=c,e[41]=y,e[42]=v):v=e[42];let N;e[43]!==s.capturedAt?(N=ze(s.capturedAt,"\u2014"),e[43]=s.capturedAt,e[44]=N):N=e[44];let b;e[45]!==N?(b=(0,t.jsxDEV)(T,{className:"text-xs text-muted-foreground tabular-nums",children:N},void 0,!1),e[45]=N,e[46]=b):b=e[46];let C=`queues-replay-${s.id}`,B=l!==null,_;e[47]!==s.id||e[48]!==l||e[49]!==n?(_=l===s.id?n("Replaying\u2026"):n("Replay"),e[47]=s.id,e[48]=l,e[49]=n,e[50]=_):_=e[50];let I;e[51]!==s.id||e[52]!==m||e[53]!==C||e[54]!==B||e[55]!==_?(I=(0,t.jsxDEV)(T,{children:(0,t.jsxDEV)(H,{"data-id":s.id,"data-testid":C,disabled:B,onClick:m,size:"xs",type:"button",variant:"outline",children:_},void 0,!1)},void 0,!1),e[51]=s.id,e[52]=m,e[53]=C,e[54]=B,e[55]=_,e[56]=I):I=e[56];let L;return e[57]!==a||e[58]!==b||e[59]!==I||e[60]!==g||e[61]!==x||e[62]!==d||e[63]!==u||e[64]!==f||e[65]!==v?(L=(0,t.jsxDEV)(a,{"data-testid":g,children:[x,d,u,f,v,b,I]},void 0,!0),e[57]=a,e[58]=b,e[59]=I,e[60]=g,e[61]=x,e[62]=d,e[63]=u,e[64]=f,e[65]=v,e[66]=L):L=e[66],L},"QueueLogRow"),ut=p(r=>{let e=(0,P.c)(26),{hasError:s,messages:m,onClear:l,onReplay:n,replayingId:o}=r,a=z(),h;e[0]!==a?(h=a("Cloudflare Queues have no peek API, so this is what push consumers actually processed \u2014 not pending depth."),e[0]=a,e[1]=h):h=e[1];let c;e[2]!==h?(c=(0,t.jsxDEV)("p",{className:"text-sm text-muted-foreground",children:h},void 0,!1),e[2]=h,e[3]=c):c=e[3];let y=m.length===0,g;e[4]!==a?(g=a("Clear log"),e[4]=a,e[5]=g):g=e[5];let x;e[6]!==l||e[7]!==y||e[8]!==g?(x=(0,t.jsxDEV)(H,{className:"ml-auto","data-testid":"queues-clear",disabled:y,onClick:l,size:"sm",type:"button",variant:"outline",children:g},void 0,!1),e[6]=l,e[7]=y,e[8]=g,e[9]=x):x=e[9];let d;e[10]!==m.length||e[11]!==a?(d=m.length>0&&(0,t.jsxDEV)(ce,{"data-testid":"queues-count",variant:"secondary",children:a("{count} messages",{count:m.length})},void 0,!1),e[10]=m.length,e[11]=a,e[12]=d):d=e[12];let u;e[13]!==c||e[14]!==x||e[15]!==d?(u=(0,t.jsxDEV)("div",{className:"flex flex-wrap items-center gap-2",children:[c,x,d]},void 0,!0),e[13]=c,e[14]=x,e[15]=d,e[16]=u):u=e[16];let f;e[17]!==s||e[18]!==m||e[19]!==n||e[20]!==o||e[21]!==a?(f=!s&&m.length===0?(0,t.jsxDEV)(ue,{description:a("Consumed messages appear here once a push consumer processes a batch in dev. Send one from the Send tab to see it captured."),testId:"queues-messages-empty",title:a("No consumed messages yet.")},void 0,!1):(0,t.jsxDEV)(De,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(Be,{className:"px-0",children:(0,t.jsxDEV)(He,{className:"max-h-[32rem]","data-testid":"queues-messages-scroll",children:(0,t.jsxDEV)(Re,{"data-testid":"queues-messages-table",children:[(0,t.jsxDEV)($e,{children:(0,t.jsxDEV)(Y,{children:[(0,t.jsxDEV)(q,{children:a("Export")},void 0,!1),(0,t.jsxDEV)(q,{children:a("Message")},void 0,!1),(0,t.jsxDEV)(q,{children:a("Attempts")},void 0,!1),(0,t.jsxDEV)(q,{children:a("Outcome")},void 0,!1),(0,t.jsxDEV)(q,{children:a("Body")},void 0,!1),(0,t.jsxDEV)(q,{children:a("Captured")},void 0,!1),(0,t.jsxDEV)(q,{},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(Oe,{children:m.map(N=>(0,t.jsxDEV)(ct,{message:N,onReplay:n,replayingId:o},N.id,!1))},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1)},void 0,!1),e[17]=s,e[18]=m,e[19]=n,e[20]=o,e[21]=a,e[22]=f):f=e[22];let v;return e[23]!==u||e[24]!==f?(v=(0,t.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"queues-messages",children:[u,f]},void 0,!0),e[23]=u,e[24]=f,e[25]=v):v=e[25],v},"QueuesMessagesTab"),mt=p(r=>{let e=(0,P.c)(20),{batchMode:s,bodyText:m,delayText:l,onBatchModeChange:n,onBodyChange:o,onDelayChange:a,onSelectExport:h,onSend:c,queues:y,selectedExportName:g,sending:x}=r,d=z(),u;e[0]!==d?(u=d("Enqueue a JSON message to a declared producer to exercise its consumer. Nothing is captured until the consumer processes it."),e[0]=d,e[1]=u):u=e[1];let f;e[2]!==u?(f=(0,t.jsxDEV)("p",{className:"text-sm text-muted-foreground",children:u},void 0,!1),e[2]=u,e[3]=f):f=e[3];let v;e[4]!==s||e[5]!==m||e[6]!==l||e[7]!==n||e[8]!==o||e[9]!==a||e[10]!==h||e[11]!==c||e[12]!==y||e[13]!==g||e[14]!==x||e[15]!==d?(v=y.length===0?(0,t.jsxDEV)(ue,{description:d("Declare a queue with defineQueue in lunora/queues.ts to enqueue a test message."),testId:"queues-send-empty",title:d("No queues to send to")},void 0,!1):(0,t.jsxDEV)(t.Fragment,{children:[(0,t.jsxDEV)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxDEV)("select",{"aria-label":d("Queue"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"queues-send-select",onChange:h,value:g,children:y.map(ht)},void 0,!1),(0,t.jsxDEV)(Fe,{"aria-label":d("Delay (seconds)"),className:"max-w-36","data-testid":"queues-send-delay",min:0,onChange:a,placeholder:d("Delay (s)"),type:"number",value:l},void 0,!1),(0,t.jsxDEV)("label",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",htmlFor:"queues-send-batch",children:[(0,t.jsxDEV)("input",{checked:s,"data-testid":"queues-send-batch",id:"queues-send-batch",onChange:n,type:"checkbox"},void 0,!1),d("Send as batch (JSON array)")]},void 0,!0),(0,t.jsxDEV)(H,{className:"ml-auto","data-testid":"queues-send-button",disabled:x||g==="",onClick:c,type:"button",children:d(x?"Sending\u2026":"Send message")},void 0,!1)]},void 0,!0),(0,t.jsxDEV)(Pe,{"aria-label":d("Message body (JSON)"),className:"font-mono","data-testid":"queues-send-body",onChange:o,placeholder:s?'[ { "hello": "world" } ]':'{ "hello": "world" }',value:m},void 0,!1)]},void 0,!0),e[4]=s,e[5]=m,e[6]=l,e[7]=n,e[8]=o,e[9]=a,e[10]=h,e[11]=c,e[12]=y,e[13]=g,e[14]=x,e[15]=d,e[16]=v):v=e[16];let N;return e[17]!==f||e[18]!==v?(N=(0,t.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"queues-send",children:[f,v]},void 0,!0),e[17]=f,e[18]=v,e[19]=N):N=e[19],N},"QueuesSendTab"),wt=p(r=>{let e=(0,P.c)(74),{limit:s}=r,m=s??tt,l=Je(),n=z(),[o,a]=(0,D.useState)("declared"),[h,c]=(0,D.useState)(null),y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y={},e[0]=y):y=e[0];let{data:g,error:x,errorSource:d}=Le(G.listQueues,y),u;e[1]!==m?(u={limit:m},e[1]=m,e[2]=u):u=e[2];let{data:f,error:v,errorSource:N,refetch:b}=Le(G.getQueueMessages,u),C=Array.isArray(g?.queues)?[...g.queues].toSorted(pt):[],B;e[3]!==f?.entries?(B=f?.entries??[],e[3]=f?.entries,e[4]=B):B=e[4];let _=B,[I,L]=(0,D.useState)(""),[w,R]=(0,D.useState)(""),[A,Q]=(0,D.useState)(""),[E,M]=(0,D.useState)(!1),[ge,j]=(0,D.useState)(!1),[ve,W]=(0,D.useState)(null),$=C.some(i=>i.exportName===I)?I:C[0]?.exportName??"",ke=o==="messages"?v:x,je=o==="messages"?N:d,xe=ke??h,ye=ke===null?h:je,X;e[5]!==b?(X=p(()=>{b()},"t4"),e[5]=b,e[6]=X):X=e[6],Ve(X,o==="messages");let K;e[7]!==E||e[8]!==w||e[9]!==l||e[10]!==A||e[11]!==b||e[12]!==$||e[13]!==j||e[14]!==n?(K=p(async()=>{c(null);let i=$;if(i==="")return;let S=null,Me=w.trim();if(Me!=="")try{S=JSON.parse(Me)}catch{c(n("Body must be valid JSON."));return}let Ie,Ue=A.trim();if(Ue!==""){let V=Number(Ue);if(!Number.isFinite(V)||V<0){c(n("Delay must be a non-negative number of seconds."));return}Ie=V}if(E&&!Array.isArray(S)){c(n("Batch mode needs a JSON array body \u2014 each element is enqueued as one message."));return}j(!0);let Xe=E?{batch:S,delaySeconds:Ie,exportName:i}:{body:S,delaySeconds:Ie,exportName:i};try{await l.query(st,Xe,fe("")),b()}catch(V){c(he(V))}j(!1)},"t5"),e[7]=E,e[8]=w,e[9]=l,e[10]=A,e[11]=b,e[12]=$,e[13]=j,e[14]=n,e[15]=K):K=e[15];let be=K,Z;e[16]!==l||e[17]!==b||e[18]!==W?(Z=p(async i=>{c(null),W(i);try{await l.query(at,{id:i},fe("")),b()}catch(S){c(he(S))}W(null)},"t6"),e[16]=l,e[17]=b,e[18]=W,e[19]=Z):Z=e[19];let Ne=Z,ee;e[20]!==l||e[21]!==b?(ee=p(async()=>{c(null);try{await l.query(ot,{},fe("")),b()}catch(i){c(he(i))}},"t7"),e[20]=l,e[21]=b,e[22]=ee):ee=e[22];let Se=ee,te;e[23]===Symbol.for("react.memo_cache_sentinel")?(te=p(i=>{let S=i.currentTarget.dataset.tab;(S==="declared"||S==="messages"||S==="send")&&a(S)},"t8"),e[23]=te):te=e[23];let We=te,se;e[24]!==L?(se=p(i=>{L(i.currentTarget.value)},"t9"),e[24]=L,e[25]=se):se=e[25];let Ee=se,ae;e[26]!==R?(ae=p(i=>{R(i.currentTarget.value)},"t10"),e[26]=R,e[27]=ae):ae=e[27];let qe=ae,oe;e[28]!==Q?(oe=p(i=>{Q(i.currentTarget.value)},"t11"),e[28]=Q,e[29]=oe):oe=e[29];let Te=oe,re;e[30]!==M?(re=p(i=>{M(i.currentTarget.checked)},"t12"),e[30]=M,e[31]=re):re=e[31];let Ce=re,le;e[32]!==be?(le=p(()=>{pe(be())},"t13"),e[32]=be,e[33]=le):le=e[33];let _e=le,ne;e[34]!==Ne?(ne=p(i=>{let{id:S}=i.currentTarget.dataset;S!==void 0&&pe(Ne(S))},"t14"),e[34]=Ne,e[35]=ne):ne=e[35];let Ae=ne,de;e[36]!==Se?(de=p(()=>{pe(Se())},"t15"),e[36]=Se,e[37]=de):de=e[37];let Qe=de,O;e[38]!==n||e[39]!==o?(O=(0,t.jsxDEV)("div",{className:"flex items-center gap-1","data-testid":"queues-tabs",role:"tablist",children:["declared","messages","send"].map(i=>(0,t.jsxDEV)(H,{"aria-selected":o===i,"data-tab":i,"data-testid":`queues-tab-${i}`,onClick:We,role:"tab",size:"sm",type:"button",variant:o===i?"secondary":"ghost",children:dt(i,n)},i,!1))},void 0,!1),e[38]=n,e[39]=o,e[40]=O):O=e[40];let k;e[41]!==xe||e[42]!==ye?(k=xe!==null&&(0,t.jsxDEV)(Ge,{error:ye,testId:"queues-error"},void 0,!1),e[41]=xe,e[42]=ye,e[43]=k):k=e[43];let U;e[44]!==C||e[45]!==g||e[46]!==o?(U=o==="declared"&&(0,t.jsxDEV)(it,{loaded:g!==void 0,queues:C},void 0,!1),e[44]=C,e[45]=g,e[46]=o,e[47]=U):U=e[47];let J;e[48]!==_||e[49]!==v||e[50]!==Qe||e[51]!==Ae||e[52]!==ve||e[53]!==o?(J=o==="messages"&&(0,t.jsxDEV)(ut,{hasError:v!==null,messages:_,onClear:Qe,onReplay:Ae,replayingId:ve},void 0,!1),e[48]=_,e[49]=v,e[50]=Qe,e[51]=Ae,e[52]=ve,e[53]=o,e[54]=J):J=e[54];let F;e[55]!==E||e[56]!==w||e[57]!==A||e[58]!==Ce||e[59]!==qe||e[60]!==Te||e[61]!==Ee||e[62]!==_e||e[63]!==C||e[64]!==$||e[65]!==ge||e[66]!==o?(F=o==="send"&&(0,t.jsxDEV)(mt,{batchMode:E,bodyText:w,delayText:A,onBatchModeChange:Ce,onBodyChange:qe,onDelayChange:Te,onSelectExport:Ee,onSend:_e,queues:C,selectedExportName:$,sending:ge},void 0,!1),e[55]=E,e[56]=w,e[57]=A,e[58]=Ce,e[59]=qe,e[60]=Te,e[61]=Ee,e[62]=_e,e[63]=C,e[64]=$,e[65]=ge,e[66]=o,e[67]=F):F=e[67];let ie;return e[68]!==O||e[69]!==k||e[70]!==U||e[71]!==J||e[72]!==F?(ie=(0,t.jsxDEV)("div",{className:"flex flex-col gap-6","data-testid":"lunora-queues-panel",children:[O,k,U,J,F]},void 0,!0),e[68]=O,e[69]=k,e[70]=U,e[71]=J,e[72]=F,e[73]=ie):ie=e[73],ie},"QueuesPanel");function ft(r){return(0,t.jsxDEV)(Y,{"data-testid":`queues-row-${r.exportName}`,children:[(0,t.jsxDEV)(T,{className:"font-mono text-xs",children:r.exportName},void 0,!1),(0,t.jsxDEV)(T,{className:"font-mono text-xs text-muted-foreground",children:r.name},void 0,!1),(0,t.jsxDEV)(T,{className:"font-mono text-xs text-muted-foreground",children:r.mode},void 0,!1),(0,t.jsxDEV)(T,{className:"font-mono text-xs text-muted-foreground",children:r.binding},void 0,!1),(0,t.jsxDEV)(T,{className:"font-mono text-xs text-muted-foreground",children:r.deadLetterQueue??"\u2014"},void 0,!1)]},r.exportName,!0)}p(ft,"_temp");function ht(r){return(0,t.jsxDEV)("option",{value:r.exportName,children:r.exportName},r.exportName,!1)}p(ht,"_temp2");function pt(r,e){return r.exportName.localeCompare(e.exportName)}p(pt,"_temp3");export{wt as default};
@@ -1 +0,0 @@
1
- import{a as k,b as N,c as O,d as x,e as q,f as D}from"./chunk-GTM65MVX.js";import{a as C}from"./chunk-TAD43CG5.js";import{a as g}from"./chunk-SEU5V7I6.js";import{d as T,g as I,j as _,k as w}from"./chunk-PVZI3CXP.js";import{b as L}from"./chunk-GMSGZDDH.js";import{a as d,e as b,f as U,g as Y,h as F}from"./chunk-RRCPZMC2.js";var M=b(Y(),1);var H="https://api.cloudflare.com/client/v4/accounts",E=class extends L{static{d(this,"AnalyticsSqlError")}constructor(e,f){super("ANALYTICS_SQL_ERROR",`Analytics Engine SQL API returned ${String(e)}: ${f}`,{name:"AnalyticsSqlError",status:e})}},v=d(t=>{let e=t.fetch??globalThis.fetch,f=`${H}/${encodeURIComponent(t.accountId)}/analytics_engine/sql`;return{query:d(async s=>{let l=await e(f,{body:s,headers:{Authorization:`Bearer ${t.apiToken}`,"Content-Type":"text/plain"},method:"POST"});if(!l.ok)throw new E(l.status,await l.text());let n;try{n=await l.json()}catch{throw new E(l.status,"Analytics Engine SQL API returned a non-JSON body.")}let o=n,a=o.data??[];return{columns:o.meta??[],rowCount:o.rows??a.length,rows:a}},"query")}},"createAnalyticsSqlClient");var m=b(U(),1);var r=b(F(),1);var W="ANALYTICS",P=[{key:"volume",sql:d(t=>`SELECT blob2 AS fn, count() AS calls FROM ${t} WHERE blob1 = 'function_call' GROUP BY fn ORDER BY calls DESC LIMIT 25`,"sql"),title:"Request volume per function"},{key:"latency",sql:d(t=>`SELECT blob2 AS fn, quantileWeighted(0.50)(double1, _sample_interval) AS p50, quantileWeighted(0.95)(double1, _sample_interval) AS p95 FROM ${t} WHERE blob1 = 'function_call' GROUP BY fn ORDER BY p95 DESC LIMIT 25`,"sql"),title:"Latency p50 / p95 per function"},{key:"hotShards",sql:d(t=>`SELECT blob3 AS shard, count() AS calls FROM ${t} WHERE blob1 = 'function_call' GROUP BY shard ORDER BY calls DESC LIMIT 25`,"sql"),title:"Hot shards"}],j={error:null,loading:!0,result:null},G=d(t=>{let e=(0,M.c)(27),{state:f,title:p}=t,s=T(),{error:l,loading:n,result:o}=f,a=`analytics-panel-${p}`,i;e[0]!==s||e[1]!==p?(i=s(p),e[0]=s,e[1]=p,e[2]=i):i=e[2];let c;e[3]!==i?(c=(0,r.jsxDEV)("header",{className:"border-b border-border px-4 py-3",children:(0,r.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:i},void 0,!1)},void 0,!1),e[3]=i,e[4]=c):c=e[4];let u;e[5]!==n||e[6]!==s?(u=n&&(0,r.jsxDEV)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-loading",children:s("Loading\u2026")},void 0,!1),e[5]=n,e[6]=s,e[7]=u):u=e[7];let y;e[8]!==l||e[9]!==n?(y=!n&&l!==null&&(0,r.jsxDEV)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"analytics-error",role:"alert",children:l},void 0,!1),e[8]=l,e[9]=n,e[10]=y):y=e[10];let h;e[11]!==l||e[12]!==n||e[13]!==o||e[14]!==s?(h=!n&&l===null&&o!==null&&o.rows.length===0&&(0,r.jsxDEV)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-empty-rows",children:s("No data points yet.")},void 0,!1),e[11]=l,e[12]=n,e[13]=o,e[14]=s,e[15]=h):h=e[15];let A;e[16]!==l||e[17]!==n||e[18]!==o?(A=!n&&l===null&&o!==null&&o.rows.length>0&&(0,r.jsxDEV)(k,{children:[(0,r.jsxDEV)(N,{children:(0,r.jsxDEV)(x,{children:o.columns.map(Q)},void 0,!1)},void 0,!1),(0,r.jsxDEV)(O,{children:o.rows.map((B,$)=>(0,r.jsxDEV)(x,{children:o.columns.map(R=>(0,r.jsxDEV)(D,{className:"font-mono text-xs",children:_(B[R.name])},R.name,!1))},$,!1))},void 0,!1)]},void 0,!0),e[16]=l,e[17]=n,e[18]=o,e[19]=A):A=e[19];let S;return e[20]!==a||e[21]!==c||e[22]!==u||e[23]!==y||e[24]!==h||e[25]!==A?(S=(0,r.jsxDEV)(g,{className:"gap-0 py-0","data-testid":a,children:[c,u,y,h,A]},void 0,!0),e[20]=a,e[21]=c,e[22]=u,e[23]=y,e[24]=h,e[25]=A,e[26]=S):S=e[26],S},"PanelResult"),re=d(({config:t,dataset:e=W,runQuery:f}={})=>{let p=T(),[s,l]=(0,m.useState)({}),n=(0,m.useMemo)(()=>{if(f!==void 0)return f;if(t===void 0)return null;let a=v({accountId:t.accountId,apiToken:t.apiToken});return i=>a.query(i)},[t,f]),o=(0,m.useCallback)(async a=>{if(n!==null)for(let i of P){if(a.cancelled)return;l(c=>({...c,[i.key]:{error:null,loading:!0,result:null}}));try{let c=await n(i.sql(e));a.cancelled||l(u=>({...u,[i.key]:{error:null,loading:!1,result:c}}))}catch(c){a.cancelled||l(u=>({...u,[i.key]:{error:I(c),loading:!1,result:null}}))}}},[n,e]);return(0,m.useEffect)(()=>{let a={cancelled:!1};return w(o(a)),()=>{a.cancelled=!0}},[o]),n===null?(0,r.jsxDEV)(C,{description:p("Set CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN (Analytics Read) in your .dev.vars to enable usage panels."),icon:(0,r.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,r.jsxDEV)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"},void 0,!1)},void 0,!1),testId:"analytics-not-configured",title:p("Analytics is not configured.")},void 0,!1):(0,r.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"lunora-analytics-panel",children:P.map(a=>(0,r.jsxDEV)(G,{state:s[a.key]??j,title:a.title},a.key,!1))},void 0,!1)},"AnalyticsPanel");function Q(t){return(0,r.jsxDEV)(q,{children:t.name},t.name,!1)}d(Q,"_temp");export{re as AnalyticsPanel};
@@ -1,4 +0,0 @@
1
- import{a as H}from"./chunk-HV7G6DFP.js";import{a as f,e as D,f as B}from"./chunk-RRCPZMC2.js";function k(r,u,t){let e=new Array(r);return new Proxy(e,{get(s,n,i){if(typeof n=="string"){let o=n.charCodeAt(0);if(o>=48&&o<=57){let l=+n;if(Number.isInteger(l)&&l>=0&&l<r){let h=s[l];if(!h){let c=u[l*2];h=s[l]={index:l,key:t(l),start:c,size:u[l*2+1],end:c+u[l*2+1],lane:0}}return h}}if(n==="length")return r}return Reflect.get(s,n,i)}})}f(k,"createLazyMeasurementsView");function w(r,u,t){let e=t.initialDeps??[],s,n=!0;function i(){var o;let l=!!t.key&&!!((o=t.debug)!=null&&o.call(t)),h=0;l&&(h=Date.now());let c=r();if(!(c.length!==e.length||c.some((p,d)=>e[d]!==p)))return s;e=c;let a=0;if(l&&(a=Date.now()),s=u(...c),l){let p=Math.round((Date.now()-h)*100)/100,d=Math.round((Date.now()-a)*100)/100,E=d/16,v=f((g,b)=>{for(g=String(g);g.length<b;)g=" "+g;return g},"pad");console.info(`%c\u23F1 ${v(d,5)} /${v(p,5)} ms`,`
2
- font-size: .6rem;
3
- font-weight: bold;
4
- color: hsl(${Math.max(0,Math.min(120-120*E,120))}deg 100% 31%);`,t?.key)}return t?.onChange&&!(n&&t.skipInitialOnChange)&&t.onChange(s),n=!1,s}return f(i,"memoizedFunction"),i.updateDeps=o=>{e=o},i}f(w,"memo");function C(r,u){if(r===void 0)throw new Error(`Unexpected undefined${u?`: ${u}`:""}`);return r}f(C,"notUndefined");var W=f((r,u)=>Math.abs(r-u)<1.01,"approxEqual"),L=f((r,u,t)=>{let e;return function(...s){r.clearTimeout(e),e=r.setTimeout(()=>u.apply(this,s),t)}},"debounce");var I,A=f(()=>{if(I!==void 0)return I;if(typeof navigator>"u")return I=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return I=!0;let r=navigator.maxTouchPoints;return I=navigator.platform==="MacIntel"&&r!==void 0&&r>0},"isIOSWebKit");var V=f(r=>{let{offsetWidth:u,offsetHeight:t}=r;return{width:u,height:t}},"getRect"),J=f(r=>r,"defaultKeyExtractor"),q=f(r=>{let u=Math.max(r.startIndex-r.overscan,0),e=Math.min(r.endIndex+r.overscan,r.count-1)-u+1,s=new Array(e);for(let n=0;n<e;n++)s[n]=u+n;return s},"defaultRangeExtractor"),j=f((r,u)=>{let t=r.scrollElement;if(!t)return;let e=r.targetWindow;if(!e)return;let s=f(i=>{let{width:o,height:l}=i;u({width:Math.round(o),height:Math.round(l)})},"handler");if(s(V(t)),!e.ResizeObserver)return()=>{};let n=new e.ResizeObserver(i=>{let o=f(()=>{let l=i[0];if(l?.borderBoxSize){let h=l.borderBoxSize[0];if(h){s({width:h.inlineSize,height:h.blockSize});return}}s(V(t))},"run");r.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return n.observe(t,{box:"border-box"}),()=>{n.unobserve(t)}},"observeElementRect"),_={passive:!0};var U=typeof window>"u"?!0:"onscrollend"in window,X=f((r,u,t)=>{let e=r.scrollElement;if(!e)return;let s=r.targetWindow;if(!s)return;let n=r.options.useScrollendEvent&&U,i=0,o=n?null:L(s,()=>u(i,!1),r.options.isScrollingResetDelay),l=f(m=>()=>{i=t(e),o?.(),u(i,m)},"createHandler"),h=l(!0),c=l(!1);return e.addEventListener("scroll",h,_),n&&e.addEventListener("scrollend",c,_),()=>{e.removeEventListener("scroll",h),n&&e.removeEventListener("scrollend",c)}},"observeOffset"),N=f((r,u)=>X(r,u,t=>{let{horizontal:e,isRtl:s}=r.options;return e?t.scrollLeft*(s&&-1||1):t.scrollTop}),"observeElementOffset");var Y=f((r,u,t)=>{if(t.options.useCachedMeasurements){let e=t.indexFromElement(r),s=t.options.getItemKey(e);return t.itemSizeCache.get(s)??t.options.estimateSize(e)}if(u?.borderBoxSize){let e=u.borderBoxSize[0];if(e)return Math.round(e[t.options.horizontal?"inlineSize":"blockSize"])}if(!u){let e=t.indexFromElement(r),s=t.options.getItemKey(e),n=t.itemSizeCache.get(s);if(n!==void 0)return n}return r[t.options.horizontal?"offsetWidth":"offsetHeight"]},"measureElement"),G=f((r,{adjustments:u=0,behavior:t},e)=>{var s,n;(n=(s=e.scrollElement)==null?void 0:s.scrollTo)==null||n.call(s,{[e.options.horizontal?"left":"top"]:r+u,behavior:t})},"scrollWithAdjustments");var K=G,T=class{static{f(this,"Virtualizer")}constructor(u){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var t,e,s;return((s=(e=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:e.now)==null?void 0:s.call(e))??Date.now()},this.observer=(()=>{let t=null,e=f(()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(n=>{let i=f(()=>{let o=n.target,l=this.indexFromElement(o);if(!o.isConnected){this.observer.unobserve(o);for(let[h,c]of this.elementsCache)if(c===o){this.elementsCache.delete(h);break}return}this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(o,n,this))},"run");this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})})),"get");return{disconnect:f(()=>{var s;(s=e())==null||s.disconnect(),t=null},"disconnect"),observe:f(s=>{var n;return(n=e())==null?void 0:n.observe(s,{box:"border-box"})},"observe"),unobserve:f(s=>{var n;return(n=e())==null?void 0:n.unobserve(s)},"unobserve")}})(),this.range=null,this.setOptions=t=>{var e,s;let n={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:J,rangeExtractor:q,onChange:f(()=>{},"onChange"),measureElement:Y,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(let a in t){let p=t[a];p!==void 0&&(n[a]=p)}let i=this.options,o=null,l=null,h=!1;if(i!==void 0&&i.enabled&&n.enabled&&n.anchorTo==="end"&&this.scrollElement!==null){let a=i.count,p=n.count,d=this.getMeasurements(),E=a>0?((e=d[0])==null?void 0:e.key)??i.getItemKey(0):null,v=a>0?((s=d[a-1])==null?void 0:s.key)??i.getItemKey(a-1):null;if(p!==a||a>0&&p>0&&(n.getItemKey(0)!==E||n.getItemKey(p-1)!==v)){h=!0;let S=a>0?this.getVirtualItemForOffset(this.getScrollOffset())??d[0]:null;S&&(o=[S.key,this.getScrollOffset()-S.start]);let x=n.followOnAppend===!0?"auto":n.followOnAppend||null;x&&p>a&&this.isAtEnd(i.scrollEndThreshold)&&(a===0||n.getItemKey(p-1)!==v)&&(l=x)}}this.options=n,h&&(this.pendingMin=0,this.itemSizeCacheVersion++);let c=!1,m=0;if(o&&this.scrollOffset!==null){let[a,p]=o,d=this.getMeasurements(),{count:E,getItemKey:v}=this.options,g=0;for(;g<E&&v(g)!==a;)g++;if(g<E){let b=d[g];if(b){let S=b.start+p;S!==this.scrollOffset&&(m=S-this.scrollOffset,this.scrollOffset=S,c=!0)}}}(c||l)&&(this.pendingScrollAnchor=[c?o[0]:null,c?o[1]:0,l,m])},this.notify=t=>{var e,s;(s=(e=this.options).onChange)==null||s.call(e,this,t)},this.maybeNotify=w(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:"maybeNotify",debug:f(()=>this.options.debug,"debug"),initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(n=>{this.observer.observe(n)}),this.unsubs.push(this.options.observeElementRect(this,n=>{this.scrollRect=n,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(n,i)=>{i&&this._intendedScrollOffset===null&&n===this.scrollOffset||(this._intendedScrollOffset!==null&&Math.abs(n-this._intendedScrollOffset)<1.5&&(n=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<n?"forward":"backward":null,this.scrollOffset=n,this.isScrolling=i,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify())})),"addEventListener"in this.scrollElement){let n=this.scrollElement,i=f(()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},"onTouchStart"),o=f(()=>{this._iosTouching=!1,!(!A()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))},"onTouchEnd");n.addEventListener("touchstart",i,_),n.addEventListener("touchend",o,_),this.unsubs.push(()=>{n.removeEventListener("touchstart",i),n.removeEventListener("touchend",o),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){let[n,i,o,l]=s;n!==null&&!o&&(A()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?l!==0&&(this._iosDeferredAdjustment+=l):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),o&&this.scrollToEnd({behavior:o})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let t=this.getScrollOffset(),e=this.getMaxScrollOffset();if(t<0||t>e)return;let s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,e)=>{let s=new Map,n=new Map;for(let i=e-1;i>=0;i--){let o=t[i];if(s.has(o.lane))continue;let l=n.get(o.lane);if(l==null||o.end>l.end?n.set(o.lane,o):o.end<l.end&&s.set(o.lane,!0),s.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort((i,o)=>i.end===o.end?i.index-o.index:i.end-o.end)[0]:void 0},this.getMeasurementOptions=w(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(t,e,s,n,i,o,l)=>(this.prevLanes!==void 0&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMin=null,{count:t,paddingStart:e,scrollMargin:s,getItemKey:n,enabled:i,lanes:o,laneAssignmentMode:l}),{key:!1}),this.getMeasurements=w(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:e,scrollMargin:s,getItemKey:n,enabled:i,lanes:o,laneAssignmentMode:l},h)=>{let c=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(let d of this.laneAssignments.keys())d>=t&&this.laneAssignments.delete(d);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(d=>{this.itemSizeCache.set(d.key,d.size)}));let m=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),o===1){let d=this.options.gap,E=t*2,v=this._flatMeasurements;if(!v||v.length<E){let S=new Float64Array(E);v&&m>0&&S.set(v.subarray(0,m*2)),v=S,this._flatMeasurements=v}let g;if(m===0)g=e+s;else{let S=m-1;g=v[S*2]+v[S*2+1]+d}for(let S=m;S<t;S++){let x=n(S),y=c.get(x),M=typeof y=="number"?y:this.options.estimateSize(S);v[S*2]=g,v[S*2+1]=M,g+=M+d}let b=k(t,v,n);return this.measurementsCache=b,b}let a=this.measurementsCache.slice(0,m),p=new Array(o).fill(void 0);for(let d=0;d<m;d++){let E=a[d];E&&(p[E.lane]=d)}for(let d=m;d<t;d++){let E=n(d),v=this.laneAssignments.get(d),g,b,S=l==="estimate"||c.has(E);if(v!==void 0&&this.options.lanes>1){g=v;let z=p[g],F=z!==void 0?a[z]:void 0;b=F?F.end+this.options.gap:e+s}else{let z=this.options.lanes===1?a[d-1]:this.getFurthestMeasurement(a,d);b=z?z.end+this.options.gap:e+s,g=z?z.lane:d%this.options.lanes,this.options.lanes>1&&S&&this.laneAssignments.set(d,g)}let x=c.get(E),y=typeof x=="number"?x:this.options.estimateSize(d),M=b+y;a[d]={index:d,start:b,size:y,end:M,key:E,lane:g},p[g]=d}return this.measurementsCache=a,a},{key:"getMeasurements",debug:f(()=>this.options.debug,"debug")}),this.calculateRange=w(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,e,s,n)=>this.range=t.length>0&&e>0?Q({measurements:t,outerSize:e,scrollOffset:s,lanes:n,flat:n===1&&this._flatMeasurements!=null?this._flatMeasurements:null}):null,{key:"calculateRange",debug:f(()=>this.options.debug,"debug")}),this.getVirtualIndexes=w(()=>{let t=null,e=null,s=this.calculateRange();return s&&(t=s.startIndex,e=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,e]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,e]},(t,e,s,n,i)=>n===null||i===null?[]:t({startIndex:n,endIndex:i,overscan:e,count:s}),{key:"getVirtualIndexes",debug:f(()=>this.options.debug,"debug")}),this.indexFromElement=t=>{let e=this.options.indexAttribute,s=t.getAttribute(e);return s?parseInt(s,10):(console.warn(`Missing attribute name '${e}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var e;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;let s=this.scrollState.index??((e=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:e.index);if(s!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),i=Math.max(0,s-n),o=Math.min(this.options.count-1,s+n);return t>=i&&t<=o}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((i,o)=>{i.isConnected||(this.observer.unobserve(i),this.elementsCache.delete(o))});return}let e=this.indexFromElement(t),s=this.options.getItemKey(e),n=this.elementsCache.get(s);n!==t&&(n&&this.observer.unobserve(n),this.observer.observe(t),this.elementsCache.set(s,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(e)&&this.resizeItem(e,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,e)=>{var s,n;if(t<0||t>=this.options.count)return;let i,o,l,h=this._flatMeasurements;if(this.options.lanes===1&&h!==null)l=this.options.getItemKey(t),o=h[t*2],i=h[t*2+1];else{let a=this.measurementsCache[t];if(!a)return;l=a.key,o=a.start,i=a.size}let c=this.itemSizeCache.get(l)??i,m=e-c;if(m!==0){let a=this.options.anchorTo==="end"&&((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,p=a?this.getTotalSize():0,d=((n=this.scrollState)==null?void 0:n.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[t]??{index:t,key:l,start:o,size:i,end:o+i,lane:0},m,this):o<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(l)||this.scrollDirection!=="backward"));(this.pendingMin===null||t<this.pendingMin)&&(this.pendingMin=t),this.itemSizeCache.set(l,e),this.itemSizeCacheVersion++,a?this.applyScrollAdjustment(this.getTotalSize()-p):d&&this.applyScrollAdjustment(m),this.notify(!1)}},this.getVirtualItems=w(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,e)=>{let s=[];for(let n=0,i=t.length;n<i;n++){let o=t[n],l=e[o];s.push(l)}return s},{key:"getVirtualItems",debug:f(()=>this.options.debug,"debug")}),this.getVirtualItemForOffset=t=>{let e=this.getMeasurements();if(e.length===0)return;let s=this._flatMeasurements,n=this.options.lanes===1&&s!=null,i=P(0,e.length-1,n?o=>s[o*2]:o=>C(e[o]).start,t);return C(e[i])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,e,s=0)=>{if(!this.scrollElement)return 0;let n=this.getSize(),i=this.getScrollOffset();e==="auto"&&(e=t>=i+n?"end":"start"),e==="center"?t+=(s-n)/2:e==="end"&&(t-=n);let o=this.getMaxScrollOffset();return Math.max(Math.min(o,t),0)},this.getOffsetForIndex=(t,e="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));let s=this.getSize(),n=this.getScrollOffset(),i=this.measurementsCache[t];if(!i)return;if(e==="auto")if(i.end>=n+s-this.options.scrollPaddingEnd)e="end";else if(i.start<=n+this.options.scrollPaddingStart)e="start";else return[n,e];if(e==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),e];let o=e==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,e,i.size),e]},this.scrollToOffset=(t,{align:e="start",behavior:s="auto"}={})=>{let n=this.getOffsetForAlignment(t,e),i=this.now();this.scrollState={index:null,align:e,behavior:s,startedAt:i,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:e="auto",behavior:s="auto"}={})=>{t=Math.max(0,Math.min(t,this.options.count-1));let n=this.getOffsetForIndex(t,e);if(!n)return;let[i,o]=n,l=this.now();this.scrollState={index:t,align:o,behavior:s,startedAt:l,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:e="auto"}={})=>{let s=this.getScrollOffset()+t,n=this.now();this.scrollState={index:null,align:"start",behavior:e,startedAt:n,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:e}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t;let e=this.getMeasurements(),s;if(e.length===0)s=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,i=this._flatMeasurements;i!=null?s=i[n*2]+i[n*2+1]:s=((t=e[n])==null?void 0:t.end)??0}else{let n=Array(this.options.lanes).fill(null),i=e.length-1;for(;i>=0&&n.some(o=>o===null);){let o=e[i];n[o.lane]===null&&(n[o.lane]=o.end),i--}s=Math.max(...n.filter(o=>o!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let t=[];if(this.itemSizeCache.size===0)return t;let e=this.getMeasurements();for(let s of e)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:e,behavior:s})=>{this._intendedScrollOffset=t+(e??0),this.options.scrollToFn(t,{behavior:s,adjustments:e},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(u)}applyScrollAdjustment(u,t){u!==0&&(this.options.debug&&console.info("correction",u),A()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=u:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=u,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=e?e[0]:this.scrollState.lastTargetOffset,n=1,i=s!==this.scrollState.lastTargetOffset;if(!i&&W(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=n){this.getScrollOffset()!==s&&this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,i){let o=this.getSize()||600,l=Math.abs(s-this.getScrollOffset()),h=this.scrollState.behavior==="smooth"&&l>o;this.scrollState.lastTargetOffset=s,h||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:h?"smooth":"auto"})}this.scheduleScrollReconcile()}},P=f((r,u,t,e)=>{for(;r<=u;){let s=(r+u)/2|0,n=t(s);if(n<e)r=s+1;else if(n>e)u=s-1;else return s}return r>0?r-1:0},"findNearestBinarySearch");function Q({measurements:r,outerSize:u,scrollOffset:t,lanes:e,flat:s}){let n=r.length-1,i=s?c=>s[c*2]:c=>r[c].start,o=s?c=>s[c*2]+s[c*2+1]:c=>r[c].end;if(r.length<=e)return{startIndex:0,endIndex:n};let l=P(0,n,i,t),h=l;if(e===1)for(;h<n&&o(h)<t+u;)h++;else if(e>1){let c=Array(e).fill(0);for(;h<n&&c.some(a=>a<t+u);){let a=r[h];c[a.lane]=a.end,h++}let m=Array(e).fill(t+u);for(;l>=0&&m.some(a=>a>=t);){let a=r[l];m[a.lane]=a.start,l--}l=Math.max(0,l-l%e),h=Math.min(n,h+(e-1-h%e))}return{startIndex:l,endIndex:h}}f(Q,"calculateRange");var O=D(B(),1),$=D(H(),1);var R=typeof document<"u"?O.useLayoutEffect:O.useEffect;function Z({useFlushSync:r=!0,directDomUpdates:u=!1,directDomUpdatesMode:t="transform",...e}){let s=O.useReducer(h=>h+1,0)[1],n=O.useRef({enabled:u,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});n.current.enabled=u,n.current.mode=t;let i=f(h=>{let c=n.current;if(!c.enabled||!c.container)return;let m=h.getTotalSize();if(m!==c.lastSize){c.lastSize=m;let g=h.options.horizontal?"width":"height";c.container.style[g]=`${m}px`}let a=!!h.options.horizontal,p=c.mode==="transform",d=a?"left":"top",E=h.options.scrollMargin,v=h.getVirtualItems();for(let g of v){let b=g.start-E,S=h.elementsCache.get(g.key);S&&c.lastPositions.get(S)!==b&&(c.lastPositions.set(S,b),p?S.style.transform=a?`translate3d(${b}px, 0, 0)`:`translate3d(0, ${b}px, 0)`:S.style[d]=`${b}px`)}},"applyDirectStyles"),o={...e,onChange:f((h,c)=>{var m;let a=n.current,p=!0;if(a.enabled){i(h);let d=h.range,E=a.prevRange;p=!E||E.isScrolling!==h.isScrolling||E.startIndex!==d?.startIndex||E.endIndex!==d?.endIndex,p&&(a.prevRange=d?{startIndex:d.startIndex,endIndex:d.endIndex,isScrolling:h.isScrolling}:null)}p&&(r&&c?(0,$.flushSync)(s):s()),(m=e.onChange)==null||m.call(e,h,c)},"onChange")},[l]=O.useState(()=>{let h=new T(o);return Object.assign(h,{containerRef:f(c=>{let m=n.current;if(m.container=c,m.lastSize=null,c&&m.enabled){let a=h.getTotalSize();m.lastSize=a;let p=h.options.horizontal?"width":"height";c.style[p]=`${a}px`}},"containerRef")})});return l.setOptions(o),R(()=>l._didMount(),[]),R(()=>l._willUpdate()),R(()=>{i(l)}),l}f(Z,"useVirtualizerBase");function dt(r){return Z({observeElementRect:j,observeElementOffset:N,scrollToFn:K,...r})}f(dt,"useVirtualizer");export{j as a,dt as b};
@@ -1,13 +0,0 @@
1
- import{a as t}from"./chunk-RRCPZMC2.js";var a={BAD_REQUEST:{status:400,title:"Bad request"},UNAUTHORIZED:{status:401,title:"Unauthorized"},FORBIDDEN:{status:403,title:"Forbidden"},NOT_FOUND:{status:404,title:"Not found"},CONFLICT:{hint:["Another write changed this row while your mutation was running (optimistic concurrency conflict).","","Re-read the row and retry the mutation with the fresh value. Lunora serializes a DO's mutations, so a persistent conflict usually means the handler conflicts **with itself** (e.g. a trigger or cascade touching the same row) \u2014 split that work rather than adding a retry loop."],status:409,title:"Conflict"},NOT_UNIQUE:{hint:["A row with the same value already exists in a `unique` index.","","- If you meant to upsert, use `ctx.db.<table>().upsert(...)` (or `.patch(...)` an existing row) instead of `.insert(...)`.",`- Otherwise pick a value that isn't already taken, and consider surfacing a friendly "already exists" message to the user.`],status:400,title:"Unique constraint violation"},VALIDATION_ERROR:{status:400,title:"Validation failed"},TOO_MANY_REQUESTS:{status:429,title:"Too many requests"},UNPROCESSABLE:{status:422,title:"Unprocessable"},NOT_IMPLEMENTED:{status:501,title:"Not implemented"},FUNCTION_NOT_FOUND:{status:404,title:"Function not found"},METHOD_NOT_ALLOWED:{status:405,title:"Method not allowed"},PAYLOAD_TOO_LARGE:{status:413,title:"Payload too large"},INTERNAL:{internal:!0,status:500,title:"Internal error"},INTERNAL_SERVER_ERROR:{internal:!0,status:500,title:"Internal error"},RPC_FAILED:{internal:!0,status:500,title:"Internal error"},COUNT_RLS_UNSUPPORTED:{status:422,title:"count() is unsupported under an RLS policy"},MASK_UNSUPPORTED:{status:422,title:"Aggregation over a masked column is unsupported"},RELATION_PREDICATE_UNSUPPORTED:{status:422,title:"Relation predicate is unsupported in a write policy"},RLS_REQUIRED:{hint:["This table is secure-by-default: it has no `.public()` marker and no RLS policy resolved for the caller, so the read fails closed.","","Add a read policy with `.rls(...)`, or mark the table `.public()` if it is intentionally world-readable."],status:403,title:"RLS policy required"},SHARD_ERROR:{status:503,title:"Shard error"},SHARD_UNAVAILABLE:{status:503,title:"Shard unavailable"},OFFLINE_IDENTITY_CHANGED:{status:409,title:"Offline identity changed"},CODEGEN_DIAGNOSTIC:{status:500,title:"Codegen diagnostic"},SCHEMA_SNAPSHOT_PARSE:{status:500,title:"Schema snapshot parse error"},ENV_INVALID:{status:500,title:"Invalid environment"},AUTH_HEADERS_MISSING:{status:500,title:"Auth headers missing"},ANALYTICS_SQL_ERROR:{status:502,title:"Analytics Engine SQL API error"},R2_SQL_ERROR:{status:502,title:"R2 SQL API error"},WORKFLOWS_REST_ERROR:{status:502,title:"Cloudflare Workflows REST API error"}};var l=[{body:["Lunora codegen couldn't find a schema to generate from.","","Create `lunora/schema.ts` exporting a `defineSchema(...)` call:","","```ts",'import { defineSchema, defineTable, v } from "@lunora/server";',"","export default defineSchema({"," messages: defineTable({ body: v.string() }),","});","```","","Or run `lunora init` to scaffold Lunora (a sample `lunora/schema.ts` included) into your app."].join(`
2
- `),header:"No Lunora schema found",id:"lunora-schema-missing",test:t(e=>e.includes("defineSchema() not found")||e.includes("schema.ts not found at"),"test")},{body:["`defineSchema(...)` must be called with an **inline object literal** mapping table names to `defineTable(...)`:","","```ts","export default defineSchema({"," todos: defineTable({ title: v.string(), done: v.boolean() }),","});","```","","Codegen reads the schema statically, so it can't follow a variable or a spread \u2014 pass the object literal directly."].join(`
3
- `),header:"`defineSchema()` needs an inline object literal",id:"lunora-schema-not-object-literal",test:t(e=>e.includes("defineSchema() expects an object literal"),"test")},{body:["This table name collides with a built-in `ctx.db` member, so the generated client can't expose it.","","Rename the table to anything that isn't a reserved name (the error lists them) \u2014 e.g. `userAccounts` instead of `insert`."].join(`
4
- `),header:"Table name is reserved",id:"lunora-table-reserved",test:t(e=>e.includes("is reserved")&&e.includes("ctx.db"),"test")},{body:["Two tables resolve to the same name \u2014 usually a base table and a schema **extension** both defining it.","","Rename one of them, or drop the duplicate from the extension. Each table name must be unique across `defineSchema(...)` and every `.extend(...)`."].join(`
5
- `),header:"Duplicate table name",id:"lunora-table-duplicate",test:t(e=>e.includes("already exists")&&e.includes(".extend("),"test")},{body:['`.jurisdiction(...)` accepts only a **string literal** of `"eu"`, `"us"`, or `"fedramp"`:',"","```ts",'defineSchema({ /* \u2026 */ }).jurisdiction("eu");',"```"].join(`
6
- `),header:"Invalid `.jurisdiction(...)` value",id:"lunora-jurisdiction",test:t(e=>e.includes("unknown jurisdiction")||e.includes("jurisdiction")&&e.includes('"eu", "us", or "fedramp"'),"test")},{body:["The `unique` flag on an index must be a **literal** `true` or `false`, not a computed value \u2014 codegen needs to read it statically:","","```ts",'defineTable({ email: v.string() }).index("by_email", ["email"], { unique: true });',"```"].join(`
7
- `),header:"`unique` must be a literal",id:"lunora-unique-literal",test:t(e=>e.includes("must be a literal")&&e.includes("unique"),"test")},{body:["A declared container/workflow class isn't re-exported by your worker entry, so `wrangler deploy` would reject it.","","Add the generated re-export shown in the error to your worker entry (e.g. `src/index.ts`):","","```ts",'export * from "./lunora/_generated/containers";',"```"].join(`
8
- `),header:"Binding not exported by your worker entry",id:"lunora-worker-entry-export-gap",test:t(e=>e.includes("not exported by your worker entry"),"test")},{body:a.NOT_UNIQUE.hint.join(`
9
- `),header:"Unique constraint violation",id:"lunora-runtime-unique",test:t(e=>e.includes("unique constraint violation on"),"test")},{body:a.CONFLICT.hint.join(`
10
- `),header:"Optimistic concurrency conflict",id:"lunora-runtime-occ",test:t(e=>e.includes("optimistic concurrency conflict"),"test")}],d=t(e=>(Array.isArray(e)?e.join(`
11
- `):e).split(`
12
- `).filter(n=>!n.startsWith("```")).join(`
13
- `).replaceAll(/\*\*(.+?)\*\*/gu,"$1").replaceAll(/`([^`]+)`/gu,"$1"),"flattenHint");var o=class extends Error{static{t(this,"LunoraError")}type="VisulimaError";hint;title;loc;code;status;docsUrl;data;constructor(n,s,i={}){let r=a[n];super(s??n,{cause:i.cause}),this.name=i.name??"LunoraError",this.hint=i.hint??r?.hint,this.title=i.title??r?.title,this.loc=i.location,this.code=n,this.status=i.status??r?.status??500,this.docsUrl=i.docsUrl??r?.docsUrl,this.data=i.data}};export{d as a,o as b};
@@ -1 +0,0 @@
1
- import{a as i,e as n,f,g as b,h as p,j as d}from"./chunk-RRCPZMC2.js";var c=n(b(),1),m=n(f(),1);var r=n(p(),1);function h(o){let e=(0,c.c)(8),t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=d("w-full caption-bottom text-xs",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=(0,r.jsxDEV)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto overflow-y-clip",children:(0,r.jsxDEV)("table",{"data-slot":"table",className:a,...l},void 0,!1)},void 0,!1),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}i(h,"Table");function x(o){let e=(0,c.c)(8),t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=d("bg-muted/50 [&_tr]:border-b",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=(0,r.jsxDEV)("thead",{"data-slot":"table-header",className:a,...l},void 0,!1),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}i(x,"TableHeader");function N(o){let e=(0,c.c)(8),t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=d("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=(0,r.jsxDEV)("tbody",{"data-slot":"table-body",className:a,...l},void 0,!1),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}i(N,"TableBody");function v(o){let e=(0,c.c)(8),t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=d("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=(0,r.jsxDEV)("tr",{"data-slot":"table-row",className:a,...l},void 0,!1),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}i(v,"TableRow");function w(o){let e=(0,c.c)(8),t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=d("h-9 border-e border-border px-3 text-start align-middle font-mono text-[11px] font-medium tracking-wide whitespace-nowrap text-muted-foreground uppercase last:border-e-0 [&:has([role=checkbox])]:pe-0",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=(0,r.jsxDEV)("th",{"data-slot":"table-head",className:a,...l},void 0,!1),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}i(w,"TableHead");function g(o){let e=(0,c.c)(8),t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=d("border-e border-border px-3 py-1.5 align-middle whitespace-nowrap last:border-e-0 [&:has([role=checkbox])]:pe-0",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=(0,r.jsxDEV)("td",{"data-slot":"table-cell",className:a,...l},void 0,!1),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}i(g,"TableCell");export{h as a,x as b,N as c,v as d,w as e,g as f};
@@ -1,5 +0,0 @@
1
- import{a as s,c as m,f as S}from"./chunk-RRCPZMC2.js";var O=m(o=>{"use strict";(function(){function c(){}s(c,"noop");function y(t){return""+t}s(y,"testStringCoercion");function _(t,e,r){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{y(a);var l=!1}catch{l=!0}return l&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&a[Symbol.toStringTag]||a.constructor.name||"Object"),y(a)),{$$typeof:E,key:a==null?null:""+a,children:t,containerInfo:e,implementation:r}}s(_,"createPortal$1");function d(t,e){if(t==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}s(d,"getCrossOriginStringAs");function i(t){return t===null?"`null`":t===void 0?"`undefined`":t===""?"an empty string":'something with type "'+typeof t+'"'}s(i,"getValueDescriptorExpectingObjectForWarning");function u(t){return t===null?"`null`":t===void 0?"`undefined`":t===""?"an empty string":typeof t=="string"?JSON.stringify(t):typeof t=="number"?"`"+t+"`":'something with type "'+typeof t+'"'}s(u,"getValueDescriptorExpectingEnumForWarning");function p(){var t=f.H;return t===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
2
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
3
- 2. You might be breaking the Rules of Hooks
4
- 3. You might have more than one copy of React in the same app
5
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),t}s(p,"resolveDispatcher"),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var v=S(),n={d:{f:c,r:s(function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},"r"),D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},E=Symbol.for("react.portal"),f=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,o.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error("Target container is not a DOM element.");return _(t,e,null,r)},o.flushSync=function(t){var e=f.T,r=n.p;try{if(f.T=null,n.p=2,t)return t()}finally{f.T=e,n.p=r,n.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},o.preconnect=function(t,e){typeof t=="string"&&t?e!=null&&typeof e!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",u(e)):e!=null&&typeof e.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",i(e.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",i(t)),typeof t=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,n.d.C(t,e))},o.prefetchDNS=function(t){if(typeof t!="string"||!t)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",i(t));else if(1<arguments.length){var e=arguments[1];typeof e=="object"&&e.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",u(e)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",u(e))}typeof t=="string"&&n.d.D(t)},o.preinit=function(t,e){if(typeof t=="string"&&t?e==null||typeof e!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",u(e)):e.as!=="style"&&e.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',u(e.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",i(t)),typeof t=="string"&&e&&typeof e.as=="string"){var r=e.as,a=d(r,e.crossOrigin),l=typeof e.integrity=="string"?e.integrity:void 0,g=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;r==="style"?n.d.S(t,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:a,integrity:l,fetchPriority:g}):r==="script"&&n.d.X(t,{crossOrigin:a,integrity:l,fetchPriority:g,nonce:typeof e.nonce=="string"?e.nonce:void 0})}},o.preinitModule=function(t,e){var r="";typeof t=="string"&&t||(r+=" The `href` argument encountered was "+i(t)+"."),e!==void 0&&typeof e!="object"?r+=" The `options` argument encountered was "+i(e)+".":e&&"as"in e&&e.as!=="script"&&(r+=" The `as` option encountered was "+u(e.as)+"."),r?console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",r):(r=e&&typeof e.as=="string"?e.as:"script",r)==="script"||(r=u(r),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',r,t)),typeof t=="string"&&(typeof e=="object"&&e!==null?(e.as==null||e.as==="script")&&(r=d(e.as,e.crossOrigin),n.d.M(t,{crossOrigin:r,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})):e==null&&n.d.M(t))},o.preload=function(t,e){var r="";if(typeof t=="string"&&t||(r+=" The `href` argument encountered was "+i(t)+"."),e==null||typeof e!="object"?r+=" The `options` argument encountered was "+i(e)+".":typeof e.as=="string"&&e.as||(r+=" The `as` option encountered was "+i(e.as)+"."),r&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',r),typeof t=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){r=e.as;var a=d(r,e.crossOrigin);n.d.L(t,r,{crossOrigin:a,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}},o.preloadModule=function(t,e){var r="";typeof t=="string"&&t||(r+=" The `href` argument encountered was "+i(t)+"."),e!==void 0&&typeof e!="object"?r+=" The `options` argument encountered was "+i(e)+".":e&&"as"in e&&typeof e.as!="string"&&(r+=" The `as` option encountered was "+i(e.as)+"."),r&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',r),typeof t=="string"&&(e?(r=d(e.as,e.crossOrigin),n.d.m(t,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:r,integrity:typeof e.integrity=="string"?e.integrity:void 0})):n.d.m(t))},o.requestFormReset=function(t){n.d.r(t)},o.unstable_batchedUpdates=function(t,e){return t(e)},o.useFormState=function(t,e,r){return p().useFormState(t,e,r)},o.useFormStatus=function(){return p().useHostTransitionStatus()},o.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var b=m((R,h)=>{"use strict";h.exports=O()});export{b as a};
@@ -1 +0,0 @@
1
- import{b as $}from"./chunk-TQ36RWOP.js";import{a as M}from"./chunk-AJIUI7DD.js";import"./chunk-XNJNSCLM.js";import{a as P,b as Q,c as W,d as V,e as C,f as E}from"./chunk-GTM65MVX.js";import{a as j}from"./chunk-BOXSWNXZ.js";import{b as H}from"./chunk-DVKPRFIJ.js";import{a as K,e as O}from"./chunk-SEU5V7I6.js";import{b as F}from"./chunk-ZPP2KOR4.js";import"./chunk-CKSHCYGC.js";import"./chunk-X7MMBSNW.js";import"./chunk-ZHVTQ37P.js";import"./chunk-3OA7PECS.js";import{d as B}from"./chunk-PVZI3CXP.js";import"./chunk-GMSGZDDH.js";import{a as U,e as L,f as G,g as J,h as X}from"./chunk-RRCPZMC2.js";var q=L(J(),1),te=L(G(),1);var r=L(X(),1);var Y={binding:"outline",secret:"destructive",var:"secondary"},me=U(a=>{let e=(0,q.c)(68),{initialShardKey:z}=a,t=B(),N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N={},e[0]=N):N=e[0];let R=z??"",T;e[1]!==R?(T={shardKey:R},e[1]=R,e[2]=T):T=e[2];let{data:k,error:d,errorSource:S,isLoading:A}=H(j.getSettings,N,T),D;e:{let s=k?.deploy;if(s===void 0){let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[3]=l):l=e[3],D=l;break e}let o;if(e[4]!==s.deploymentId||e[5]!==s.environment||e[6]!==s.versionTag||e[7]!==s.workerUrl||e[8]!==t){if(o=[],s.workerUrl!==void 0){let l;e[10]!==t?(l=t("URL"),e[10]=t,e[11]=l):l=e[11];let i;e[12]!==s.workerUrl||e[13]!==l?(i={label:l,value:s.workerUrl},e[12]=s.workerUrl,e[13]=l,e[14]=i):i=e[14],o.push(i)}if(s.environment!==void 0){let l;e[15]!==t?(l=t("Environment"),e[15]=t,e[16]=l):l=e[16];let i;e[17]!==s.environment||e[18]!==l?(i={label:l,value:s.environment},e[17]=s.environment,e[18]=l,e[19]=i):i=e[19],o.push(i)}if(s.deploymentId!==void 0){let l;e[20]!==t?(l=t("Deployment"),e[20]=t,e[21]=l):l=e[21];let i;e[22]!==s.deploymentId||e[23]!==l?(i={label:l,value:s.deploymentId},e[22]=s.deploymentId,e[23]=l,e[24]=i):i=e[24],o.push(i)}if(s.versionTag!==void 0){let l;e[25]!==t?(l=t("Version"),e[25]=t,e[26]=l):l=e[26];let i;e[27]!==s.versionTag||e[28]!==l?(i={label:l,value:s.versionTag},e[27]=s.versionTag,e[28]=l,e[29]=i):i=e[29],o.push(i)}e[4]=s.deploymentId,e[5]=s.environment,e[6]=s.versionTag,e[7]=s.workerUrl,e[8]=t,e[9]=o}else o=e[9];D=o}let w=D,_;e[30]!==k?.settings?(_=k?.settings??[],e[30]=k?.settings,e[31]=_):_=e[31];let n=_,m;e[32]!==t?(m=t("Open in Cloudflare"),e[32]=t,e[33]=m):m=e[33];let f;e[34]!==m?(f=(0,r.jsxDEV)("div",{className:"flex flex-wrap items-center gap-3",children:(0,r.jsxDEV)("a",{className:"text-sm text-primary underline-offset-4 hover:underline","data-testid":"set-cf-link",href:$,rel:"noreferrer",target:"_blank",children:m},void 0,!1)},void 0,!1),e[34]=m,e[35]=f):f=e[35];let c;e[36]!==t?(c=t("View-only \u2014 values are masked. Edit vars, secrets, and bindings in wrangler or the Cloudflare dashboard."),e[36]=t,e[37]=c):c=e[37];let v;e[38]!==c?(v=(0,r.jsxDEV)("p",{className:"text-sm text-muted-foreground","data-testid":"set-readonly-note",children:c},void 0,!1),e[38]=c,e[39]=v):v=e[39];let p;e[40]!==d||e[41]!==S?(p=d!==null&&(0,r.jsxDEV)(M,{error:S,testId:"set-error"},void 0,!1),e[40]=d,e[41]=S,e[42]=p):p=e[42];let u;e[43]!==w||e[44]!==t?(u=w.length>0&&(0,r.jsxDEV)(K,{className:"py-0","data-testid":"set-deploy",children:[(0,r.jsxDEV)("header",{className:"border-b border-border px-4 py-3",children:(0,r.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:t("Deployment")},void 0,!1)},void 0,!1),(0,r.jsxDEV)(O,{className:"py-3",children:(0,r.jsxDEV)("dl",{className:"grid grid-cols-[8rem_minmax(0,1fr)] gap-x-4 gap-y-1 text-sm",children:w.map(Z)},void 0,!1)},void 0,!1)]},void 0,!0),e[43]=w,e[44]=t,e[45]=u):u=e[45];let h;e[46]!==t?(h=t("Environment & bindings"),e[46]=t,e[47]=h):h=e[47];let g;e[48]!==h?(g=(0,r.jsxDEV)("header",{className:"border-b border-border px-4 py-3",children:(0,r.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:h},void 0,!1)},void 0,!1),e[48]=h,e[49]=g):g=e[49];let x;e[50]!==d||e[51]!==A||e[52]!==n.length||e[53]!==t?(x=d===null&&!A&&n.length===0&&(0,r.jsxDEV)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"set-empty",children:t("No environment variables or bindings.")},void 0,!1),e[50]=d,e[51]=A,e[52]=n.length,e[53]=t,e[54]=x):x=e[54];let b;e[55]!==n||e[56]!==t?(b=n.length>0&&(0,r.jsxDEV)(O,{className:"px-0 py-0",children:(0,r.jsxDEV)(P,{"data-testid":"set-table",children:[(0,r.jsxDEV)(Q,{children:(0,r.jsxDEV)(V,{children:[(0,r.jsxDEV)(C,{children:t("name")},void 0,!1),(0,r.jsxDEV)(C,{children:t("kind")},void 0,!1),(0,r.jsxDEV)(C,{children:t("value")},void 0,!1)]},void 0,!0)},void 0,!1),(0,r.jsxDEV)(W,{children:n.map(ee)},void 0,!1)]},void 0,!0)},void 0,!1),e[55]=n,e[56]=t,e[57]=b):b=e[57];let y;e[58]!==g||e[59]!==x||e[60]!==b?(y=(0,r.jsxDEV)(K,{className:"py-0",children:[g,x,b]},void 0,!0),e[58]=g,e[59]=x,e[60]=b,e[61]=y):y=e[61];let I;return e[62]!==p||e[63]!==u||e[64]!==y||e[65]!==f||e[66]!==v?(I=(0,r.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"lunora-settings",children:[f,v,p,u,y]},void 0,!0),e[62]=p,e[63]=u,e[64]=y,e[65]=f,e[66]=v,e[67]=I):I=e[67],I},"SettingsPanel");function Z(a){return(0,r.jsxDEV)("div",{className:"contents","data-testid":"set-deploy-row",children:[(0,r.jsxDEV)("dt",{className:"text-muted-foreground",children:a.label},void 0,!1),(0,r.jsxDEV)("dd",{className:"truncate font-mono text-xs",title:a.value,children:a.value},void 0,!1)]},a.label,!0)}U(Z,"_temp");function ee(a){return(0,r.jsxDEV)(V,{"data-testid":"set-row",children:[(0,r.jsxDEV)(E,{className:"font-mono text-xs font-medium",children:a.name},void 0,!1),(0,r.jsxDEV)(E,{children:(0,r.jsxDEV)(F,{variant:Y[a.kind],children:a.bindingType??a.kind},void 0,!1)},void 0,!1),(0,r.jsxDEV)(E,{className:"max-w-[28ch] truncate font-mono text-xs text-muted-foreground",children:a.value??(0,r.jsxDEV)("span",{className:"text-muted-foreground",children:"\u2014"},void 0,!1)},void 0,!1)]},a.name,!0)}U(ee,"_temp2");export{me as SettingsPanel};