@lunora/studio 1.0.0-alpha.361 → 1.0.0-alpha.362

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 (327) hide show
  1. package/dist/index.d.mts +4 -1
  2. package/dist/index.d.ts +4 -1
  3. package/dist/index.mjs +1 -1
  4. package/dist/mount.mjs +1 -1
  5. package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -1
  6. package/dist/packem_chunks/ApiTab.mjs +1 -1
  7. package/dist/packem_chunks/AuditPanel.mjs +1 -1
  8. package/dist/packem_chunks/ExportImportPanel.mjs +1 -1
  9. package/dist/packem_chunks/FileBrowser.mjs +1 -1
  10. package/dist/packem_chunks/FunctionRunner.mjs +1 -1
  11. package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -1
  12. package/dist/packem_chunks/HealthPanel.mjs +1 -1
  13. package/dist/packem_chunks/InsightsPanel.mjs +1 -1
  14. package/dist/packem_chunks/LogsPanel.mjs +1 -1
  15. package/dist/packem_chunks/MailPanel.mjs +1 -1
  16. package/dist/packem_chunks/MetricsPanel.mjs +1 -1
  17. package/dist/packem_chunks/NotificationsPanel.mjs +1 -1
  18. package/dist/packem_chunks/PitrPanel.mjs +1 -1
  19. package/dist/packem_chunks/SchemaViewer.mjs +1 -1
  20. package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -1
  21. package/dist/packem_chunks/SettingsPanel.mjs +1 -1
  22. package/dist/packem_chunks/SqlEditorPanel.mjs +24 -9
  23. package/dist/packem_chunks/TableEditor.mjs +1 -1
  24. package/dist/packem_chunks/agents-panel.mjs +1 -1
  25. package/dist/packem_chunks/ai-knowledge.mjs +1 -0
  26. package/dist/packem_chunks/ai-usage-panel.mjs +1 -1
  27. package/dist/packem_chunks/assistant-panel.mjs +3 -0
  28. package/dist/packem_chunks/auth-audit-panel.mjs +1 -1
  29. package/dist/packem_chunks/containers-panel.mjs +1 -1
  30. package/dist/packem_chunks/dashboards-panel.mjs +1 -1
  31. package/dist/packem_chunks/evals-panel.mjs +1 -1
  32. package/dist/packem_chunks/fanout-panel.mjs +1 -1
  33. package/dist/packem_chunks/flags-panel.mjs +1 -1
  34. package/dist/packem_chunks/issues-panel.mjs +1 -1
  35. package/dist/packem_chunks/kv-browser.mjs +1 -1
  36. package/dist/packem_chunks/log-drains-panel.mjs +1 -1
  37. package/dist/packem_chunks/migrations-route.mjs +1 -1
  38. package/dist/packem_chunks/payments-panel.mjs +1 -1
  39. package/dist/packem_chunks/permissions-panel.mjs +1 -1
  40. package/dist/packem_chunks/privacy-requests-panel.mjs +1 -1
  41. package/dist/packem_chunks/queues-panel.mjs +1 -1
  42. package/dist/packem_chunks/reactors-panel.mjs +1 -1
  43. package/dist/packem_chunks/rls-panel.mjs +1 -1
  44. package/dist/packem_chunks/schedule-panel.mjs +1 -1
  45. package/dist/packem_chunks/storage-rules-panel.mjs +1 -1
  46. package/dist/packem_chunks/subscriptions-panel.mjs +1 -1
  47. package/dist/packem_chunks/traces-panel.mjs +1 -1
  48. package/dist/packem_chunks/workflows-panel.mjs +1 -1
  49. package/dist/packem_shared/ADMIN_FUNCTIONS-DUXsXId1.mjs +1 -0
  50. package/dist/packem_shared/{ApiDocsPanel-DD2Uns6b.mjs → ApiDocsPanel-B9S9l1Ce.mjs} +1 -1
  51. package/dist/packem_shared/{DataBrowser-CVRWnNWu.mjs → DataBrowser-Dm-jhIUP.mjs} +2 -2
  52. package/dist/packem_shared/{GlobalDataBrowser-DC47T6Zl.mjs → GlobalDataBrowser-C1Y8GUhe.mjs} +1 -1
  53. package/dist/packem_shared/{HomePanel-D12HxHQo.mjs → HomePanel-B5ytwPIo.mjs} +1 -1
  54. package/dist/packem_shared/{MigrationsPanel-DMkxSXNl.mjs → MigrationsPanel-CwLikxDT.mjs} +1 -1
  55. package/dist/packem_shared/Studio-B89ZNMOD.mjs +1 -0
  56. package/dist/packem_shared/{StudioApp-isdWpF9P.mjs → StudioApp-C9l1a3A8.mjs} +1 -1
  57. package/dist/packem_shared/advisor-view-CzieqKMe.mjs +5 -0
  58. package/dist/packem_shared/assistant-provider-Bp72uWsq.mjs +1 -0
  59. package/dist/packem_shared/assistant-reason-D6EwMCxT.mjs +1 -0
  60. package/dist/packem_shared/{cf-links-CBJ5SywP.mjs → cf-links-C4DVTr8A.mjs} +1 -1
  61. package/dist/packem_shared/error-alert-DKXm5h19.mjs +6 -0
  62. package/dist/packem_shared/{home-panel-CDVTuTF8.mjs → home-panel-5fGktYeD.mjs} +1 -1
  63. package/dist/packem_shared/recording-client-z4CBi0y8.mjs +1 -0
  64. package/dist/packem_shared/studio-gZfpz1wC.mjs +2 -0
  65. package/dist/packem_shared/{table-list-sidebar-CNadcIgG.mjs → table-list-sidebar-kpHaDWjy.mjs} +1 -1
  66. package/dist/packem_shared/use-assistant-rpc-GCUK2zPa.mjs +1 -0
  67. package/dist/standalone/chunk-2DT3QG6Q.js +1 -0
  68. package/dist/standalone/chunk-2EB7FN5S.js +1 -0
  69. package/dist/standalone/chunk-2FTGLXYA.js +1 -0
  70. package/dist/standalone/chunk-2H6VLY2M.js +1 -0
  71. package/dist/standalone/chunk-2NGKUO32.js +1 -0
  72. package/dist/standalone/chunk-2SNHKJXK.js +1 -0
  73. package/dist/standalone/chunk-2W4UO5BC.js +1 -0
  74. package/dist/standalone/{chunk-SLIDAWNX.js → chunk-3D67ZJRW.js} +1 -1
  75. package/dist/standalone/chunk-3RZD6VJ7.js +1 -0
  76. package/dist/standalone/chunk-3X3NXJBR.js +1 -0
  77. package/dist/standalone/chunk-4EPW63HS.js +1 -0
  78. package/dist/standalone/{chunk-WS36BO4R.js → chunk-4NKJV7YX.js} +1 -1
  79. package/dist/standalone/chunk-4PI2OSSP.js +1 -0
  80. package/dist/standalone/chunk-53CGUTRT.js +1 -0
  81. package/dist/standalone/chunk-5EWIOOBI.js +1 -0
  82. package/dist/standalone/chunk-5GYHGDIF.js +8 -0
  83. package/dist/standalone/chunk-5NIQHOPN.js +1 -0
  84. package/dist/standalone/chunk-5O7ICPWV.js +1 -0
  85. package/dist/standalone/chunk-5PEAXTYQ.js +1 -0
  86. package/dist/standalone/{chunk-O2NMPIV2.js → chunk-5WNGRT7N.js} +1 -1
  87. package/dist/standalone/chunk-66BMMNUR.js +1 -0
  88. package/dist/standalone/chunk-66LYVBXB.js +1 -0
  89. package/dist/standalone/chunk-6FPV3EK2.js +1 -0
  90. package/dist/standalone/chunk-6G3E4PJ2.js +1 -0
  91. package/dist/standalone/chunk-6KE7ILEZ.js +1 -0
  92. package/dist/standalone/chunk-7KJCRT4B.js +1 -0
  93. package/dist/standalone/chunk-7O5SGABV.js +1 -0
  94. package/dist/standalone/chunk-7QEZ2SFW.js +1 -0
  95. package/dist/standalone/chunk-7WV3EPE6.js +1 -0
  96. package/dist/standalone/chunk-A2Q3TGIQ.js +1 -0
  97. package/dist/standalone/chunk-ABMHWBYA.js +1 -0
  98. package/dist/standalone/chunk-AEU3EF4T.js +1 -0
  99. package/dist/standalone/chunk-ALQHMFOC.js +1 -0
  100. package/dist/standalone/chunk-AZIKM5BA.js +1 -0
  101. package/dist/standalone/chunk-BCUOQNI2.js +1 -0
  102. package/dist/standalone/chunk-BG2CJOVS.js +1 -0
  103. package/dist/standalone/chunk-BKI3JMXQ.js +1 -0
  104. package/dist/standalone/chunk-BO5NNWMO.js +1 -0
  105. package/dist/standalone/chunk-BX7TFVCC.js +1 -0
  106. package/dist/standalone/chunk-CKEQX655.js +1 -0
  107. package/dist/standalone/{chunk-DX55P3KZ.js → chunk-CL3JOU6F.js} +1 -1
  108. package/dist/standalone/chunk-COLSZPCE.js +1 -0
  109. package/dist/standalone/chunk-CVSIFPI5.js +1 -0
  110. package/dist/standalone/chunk-D65UVZIA.js +1 -0
  111. package/dist/standalone/{chunk-DBVJ5VLI.js → chunk-DA2CAFXI.js} +1 -1
  112. package/dist/standalone/chunk-DB6QX4X6.js +1 -0
  113. package/dist/standalone/{chunk-7ZIYHKLX.js → chunk-E2FFHKGI.js} +3 -3
  114. package/dist/standalone/chunk-EE2COWFF.js +1 -0
  115. package/dist/standalone/chunk-ELSQ4FVH.js +1 -0
  116. package/dist/standalone/chunk-EXFERMUT.js +1 -0
  117. package/dist/standalone/chunk-FACXM2UB.js +7 -0
  118. package/dist/standalone/chunk-FBDIQ67D.js +1 -0
  119. package/dist/standalone/chunk-FHLODLBC.js +1 -0
  120. package/dist/standalone/chunk-FQEZUQ36.js +1 -0
  121. package/dist/standalone/{chunk-VEWQWS3J.js → chunk-FWM5Z6CH.js} +1 -1
  122. package/dist/standalone/chunk-GC3GKGWD.js +1 -0
  123. package/dist/standalone/chunk-GJXCPZDN.js +1 -0
  124. package/dist/standalone/chunk-GNI37YCV.js +33 -0
  125. package/dist/standalone/chunk-GVZ3VFGG.js +1 -0
  126. package/dist/standalone/chunk-GWNGVKLG.js +1 -0
  127. package/dist/standalone/chunk-GXTSE66Z.js +1 -0
  128. package/dist/standalone/chunk-H7BQUL7D.js +1 -0
  129. package/dist/standalone/chunk-HCCQTUHS.js +1 -0
  130. package/dist/standalone/chunk-HCOF7HOM.js +1 -0
  131. package/dist/standalone/chunk-HZDLUAWS.js +1 -0
  132. package/dist/standalone/chunk-IDZLHZIA.js +1 -0
  133. package/dist/standalone/{chunk-SU5DTRGK.js → chunk-IHGRWY3Y.js} +1 -1
  134. package/dist/standalone/chunk-IUGNIG6L.js +6 -0
  135. package/dist/standalone/chunk-J3BZWYJQ.js +1 -0
  136. package/dist/standalone/chunk-J45HAKBU.js +1 -0
  137. package/dist/standalone/chunk-J4PQAVOF.js +1 -0
  138. package/dist/standalone/chunk-J6FR2B77.js +1 -0
  139. package/dist/standalone/chunk-J6XQKD2F.js +1 -0
  140. package/dist/standalone/chunk-JCRFMCNP.js +1 -0
  141. package/dist/standalone/chunk-JD6PRRFO.js +1 -0
  142. package/dist/standalone/chunk-JENPPZFV.js +1 -0
  143. package/dist/standalone/chunk-JHTL3QHW.js +1 -0
  144. package/dist/standalone/chunk-JOPNP4EO.js +1 -0
  145. package/dist/standalone/chunk-JVP3TR3A.js +1 -0
  146. package/dist/standalone/chunk-KGLIQIZU.js +1 -0
  147. package/dist/standalone/{chunk-ONWGX5Y4.js → chunk-KH6OXCG3.js} +1 -1
  148. package/dist/standalone/{chunk-3FS22LNI.js → chunk-L26RMC2W.js} +3 -3
  149. package/dist/standalone/chunk-L2FYX4FN.js +1 -0
  150. package/dist/standalone/{chunk-XIRKBJPD.js → chunk-LPFUEJZ4.js} +5 -5
  151. package/dist/standalone/chunk-LSEUUZN4.js +1 -0
  152. package/dist/standalone/{chunk-BYOGQ2IV.js → chunk-MJTVTUNI.js} +2 -2
  153. package/dist/standalone/chunk-MQTI3STP.js +1 -0
  154. package/dist/standalone/chunk-N7WQJPOM.js +1 -0
  155. package/dist/standalone/chunk-NF2Q75WM.js +1 -0
  156. package/dist/standalone/chunk-NGZNXNRD.js +1 -0
  157. package/dist/standalone/chunk-O3AZ7JKE.js +1 -0
  158. package/dist/standalone/chunk-OK2QU2EV.js +1 -0
  159. package/dist/standalone/{chunk-IH2CJZF2.js → chunk-ONTGYVAN.js} +1 -1
  160. package/dist/standalone/chunk-OP4QEV27.js +1 -0
  161. package/dist/standalone/chunk-OPIMGKWU.js +1 -0
  162. package/dist/standalone/chunk-OWRKSQPE.js +1 -0
  163. package/dist/standalone/chunk-P5EVJEGC.js +1 -0
  164. package/dist/standalone/chunk-PAZKX7I6.js +1 -0
  165. package/dist/standalone/chunk-PDBW6GTJ.js +1 -0
  166. package/dist/standalone/chunk-PJUVJTDR.js +1 -0
  167. package/dist/standalone/chunk-Q2J73V2C.js +2 -0
  168. package/dist/standalone/chunk-Q2KL457J.js +1 -0
  169. package/dist/standalone/chunk-QAOZXPLU.js +1 -0
  170. package/dist/standalone/{chunk-3PAYDWHN.js → chunk-QEFLZBT7.js} +2 -2
  171. package/dist/standalone/chunk-QKUVJIRX.js +1 -0
  172. package/dist/standalone/chunk-QNM2J7MG.js +1 -0
  173. package/dist/standalone/chunk-QRA7AKYO.js +1 -0
  174. package/dist/standalone/chunk-RCXNYW7P.js +1 -0
  175. package/dist/standalone/chunk-RE7GRXBM.js +1 -0
  176. package/dist/standalone/{chunk-TDVDZ7XQ.js → chunk-RIAOZECW.js} +1 -1
  177. package/dist/standalone/{chunk-LUHXNZI4.js → chunk-RTS5G3ET.js} +1 -1
  178. package/dist/standalone/chunk-S36FVTKK.js +1 -0
  179. package/dist/standalone/chunk-SR6CPTRT.js +1 -0
  180. package/dist/standalone/chunk-T3ZCW3RG.js +1 -0
  181. package/dist/standalone/chunk-TKBTZX4K.js +1 -0
  182. package/dist/standalone/chunk-TMWKF4XM.js +5 -0
  183. package/dist/standalone/chunk-TW4O2BA5.js +159 -0
  184. package/dist/standalone/chunk-UD5REVU2.js +1 -0
  185. package/dist/standalone/{chunk-PQH2LSJX.js → chunk-UQA2AJGI.js} +1 -1
  186. package/dist/standalone/chunk-UW6QNC74.js +3 -0
  187. package/dist/standalone/chunk-UXBNXITB.js +1 -0
  188. package/dist/standalone/chunk-UZ2ZXB74.js +1 -0
  189. package/dist/standalone/chunk-V3BE427M.js +1 -0
  190. package/dist/standalone/chunk-VHPTPEZ4.js +1 -0
  191. package/dist/standalone/chunk-W4LJQYCI.js +1 -0
  192. package/dist/standalone/chunk-WADY55J2.js +30 -0
  193. package/dist/standalone/chunk-WCWP4EAW.js +1 -0
  194. package/dist/standalone/chunk-X54WR7FF.js +1 -0
  195. package/dist/standalone/chunk-XWWQIAF6.js +1 -0
  196. package/dist/standalone/{chunk-SYGCASPT.js → chunk-Y2YLTUMD.js} +1 -1
  197. package/dist/standalone/chunk-YEVTA35E.js +1 -0
  198. package/dist/standalone/{chunk-R36QXQZX.js → chunk-YORPLSI5.js} +1 -1
  199. package/dist/standalone/chunk-YX2N5PJW.js +1 -0
  200. package/dist/standalone/chunk-Z57KMMOK.js +1 -0
  201. package/dist/standalone/chunk-ZFQ253FX.js +1 -0
  202. package/dist/standalone/chunk-ZG3IUVQ2.js +1 -0
  203. package/dist/standalone/chunk-ZKEYRU5C.js +1 -0
  204. package/dist/standalone/{chunk-5R2YO7HF.js → chunk-ZOKSVUID.js} +4 -4
  205. package/dist/standalone/{chunk-H7HZ42JY.js → chunk-ZPQBVYNN.js} +1 -1
  206. package/dist/standalone/chunk-ZSLKFLWE.js +1 -0
  207. package/dist/standalone/chunk-ZSWW2UGP.js +1 -0
  208. package/dist/standalone/studio.js +2 -2
  209. package/dist/styles.css +1 -1
  210. package/package.json +7 -6
  211. package/dist/packem_shared/ADMIN_FUNCTIONS-4aGsMs95.mjs +0 -1
  212. package/dist/packem_shared/Studio-MA8kKZLu.mjs +0 -1
  213. package/dist/packem_shared/advisor-view-tBumWci_.mjs +0 -1
  214. package/dist/packem_shared/error-alert-C0R39DO1.mjs +0 -1
  215. package/dist/packem_shared/recording-client-DAipTA_n.mjs +0 -1
  216. package/dist/packem_shared/studio-UhUrPz5J.mjs +0 -2
  217. package/dist/packem_shared/use-sql-assistant-rZPs3LC3.mjs +0 -1
  218. package/dist/standalone/chunk-2AH4ABE5.js +0 -1
  219. package/dist/standalone/chunk-2G57ENH5.js +0 -1
  220. package/dist/standalone/chunk-3GXPALXG.js +0 -1
  221. package/dist/standalone/chunk-3GYLOE4V.js +0 -1
  222. package/dist/standalone/chunk-473JK2PQ.js +0 -1
  223. package/dist/standalone/chunk-4C4THJUD.js +0 -1
  224. package/dist/standalone/chunk-4DAKKAK7.js +0 -1
  225. package/dist/standalone/chunk-4M57OYFX.js +0 -1
  226. package/dist/standalone/chunk-4SQBAPY6.js +0 -1
  227. package/dist/standalone/chunk-5DNGK3NT.js +0 -1
  228. package/dist/standalone/chunk-5GIQ6C5N.js +0 -1
  229. package/dist/standalone/chunk-5WJG7FMH.js +0 -1
  230. package/dist/standalone/chunk-63KDHS3H.js +0 -1
  231. package/dist/standalone/chunk-6B6ARRMI.js +0 -1
  232. package/dist/standalone/chunk-6LMO2D54.js +0 -1
  233. package/dist/standalone/chunk-6M7FLLMT.js +0 -1
  234. package/dist/standalone/chunk-6QEXGYWH.js +0 -1
  235. package/dist/standalone/chunk-6UTZXEW3.js +0 -1
  236. package/dist/standalone/chunk-6VAY6L4J.js +0 -1
  237. package/dist/standalone/chunk-7PADVGQX.js +0 -1
  238. package/dist/standalone/chunk-7RGYCU6F.js +0 -1
  239. package/dist/standalone/chunk-7UM5ROG6.js +0 -1
  240. package/dist/standalone/chunk-A566HCBX.js +0 -1
  241. package/dist/standalone/chunk-A5JISKHE.js +0 -1
  242. package/dist/standalone/chunk-ADNRFCMZ.js +0 -1
  243. package/dist/standalone/chunk-AP4PC2M4.js +0 -1
  244. package/dist/standalone/chunk-BFE2DRP6.js +0 -33
  245. package/dist/standalone/chunk-BPEB4KFE.js +0 -1
  246. package/dist/standalone/chunk-BVX45MU5.js +0 -7
  247. package/dist/standalone/chunk-C6GN7ZXJ.js +0 -1
  248. package/dist/standalone/chunk-CL2VZNDI.js +0 -1
  249. package/dist/standalone/chunk-CNA3TVUK.js +0 -1
  250. package/dist/standalone/chunk-CZ6HBDIL.js +0 -1
  251. package/dist/standalone/chunk-D6S7MXW4.js +0 -1
  252. package/dist/standalone/chunk-E26OT26O.js +0 -1
  253. package/dist/standalone/chunk-FCAXVYAX.js +0 -1
  254. package/dist/standalone/chunk-FXPAJDES.js +0 -1
  255. package/dist/standalone/chunk-HHRYM6UW.js +0 -1
  256. package/dist/standalone/chunk-HPRF5LMA.js +0 -1
  257. package/dist/standalone/chunk-IB22LETR.js +0 -1
  258. package/dist/standalone/chunk-IBJVVHV5.js +0 -1
  259. package/dist/standalone/chunk-IENQRRQT.js +0 -1
  260. package/dist/standalone/chunk-IQ4TTHQT.js +0 -1
  261. package/dist/standalone/chunk-ITH5LRWM.js +0 -1
  262. package/dist/standalone/chunk-J6VFG6M5.js +0 -1
  263. package/dist/standalone/chunk-JSDKOE4U.js +0 -1
  264. package/dist/standalone/chunk-JTGGWF7R.js +0 -1
  265. package/dist/standalone/chunk-JZD7ZN3F.js +0 -1
  266. package/dist/standalone/chunk-K3CWB3AM.js +0 -1
  267. package/dist/standalone/chunk-KNFB3FGW.js +0 -1
  268. package/dist/standalone/chunk-KNXWDE4N.js +0 -1
  269. package/dist/standalone/chunk-KRPXOSBL.js +0 -1
  270. package/dist/standalone/chunk-KRY7BYHT.js +0 -1
  271. package/dist/standalone/chunk-KYAG2YMF.js +0 -1
  272. package/dist/standalone/chunk-KZCEJFZF.js +0 -1
  273. package/dist/standalone/chunk-KZILJQX3.js +0 -8
  274. package/dist/standalone/chunk-LEYUH5TS.js +0 -1
  275. package/dist/standalone/chunk-LFM672WN.js +0 -1
  276. package/dist/standalone/chunk-LIGOLZND.js +0 -1
  277. package/dist/standalone/chunk-LPU6YTSU.js +0 -1
  278. package/dist/standalone/chunk-MWJC3S62.js +0 -1
  279. package/dist/standalone/chunk-NP2AQOLE.js +0 -1
  280. package/dist/standalone/chunk-NVKLYDOH.js +0 -1
  281. package/dist/standalone/chunk-O2X2XYCM.js +0 -1
  282. package/dist/standalone/chunk-O3MDWYXF.js +0 -1
  283. package/dist/standalone/chunk-ONG4JEZD.js +0 -1
  284. package/dist/standalone/chunk-OS26JXYA.js +0 -1
  285. package/dist/standalone/chunk-OXFKZ4BM.js +0 -1
  286. package/dist/standalone/chunk-PGTEGUAB.js +0 -1
  287. package/dist/standalone/chunk-PTBUWRBY.js +0 -1
  288. package/dist/standalone/chunk-Q6HA3L2H.js +0 -1
  289. package/dist/standalone/chunk-QGV5ARD2.js +0 -1
  290. package/dist/standalone/chunk-QWRK4ESB.js +0 -1
  291. package/dist/standalone/chunk-RL2ITK2N.js +0 -1
  292. package/dist/standalone/chunk-RTJO3AR4.js +0 -1
  293. package/dist/standalone/chunk-SFY646MC.js +0 -1
  294. package/dist/standalone/chunk-T5UMHPAB.js +0 -1
  295. package/dist/standalone/chunk-T6HV2FQP.js +0 -2
  296. package/dist/standalone/chunk-T7ZKNNGX.js +0 -1
  297. package/dist/standalone/chunk-TCYPNSTV.js +0 -1
  298. package/dist/standalone/chunk-TQM6XHBA.js +0 -1
  299. package/dist/standalone/chunk-TRMWBRRU.js +0 -1
  300. package/dist/standalone/chunk-TW7KJSMR.js +0 -15
  301. package/dist/standalone/chunk-TYD3V4NB.js +0 -1
  302. package/dist/standalone/chunk-TZKLK52W.js +0 -1
  303. package/dist/standalone/chunk-U4RXQSQ7.js +0 -1
  304. package/dist/standalone/chunk-UNZ2UBVL.js +0 -1
  305. package/dist/standalone/chunk-VJRNOSRY.js +0 -1
  306. package/dist/standalone/chunk-W2BCSK5S.js +0 -1
  307. package/dist/standalone/chunk-W7MRISE3.js +0 -1
  308. package/dist/standalone/chunk-WM72PRE3.js +0 -1
  309. package/dist/standalone/chunk-X4WHMCOZ.js +0 -1
  310. package/dist/standalone/chunk-X74GEPSG.js +0 -1
  311. package/dist/standalone/chunk-XKPD4SFN.js +0 -1
  312. package/dist/standalone/chunk-XMSNLMWU.js +0 -1
  313. package/dist/standalone/chunk-XOPFDWXX.js +0 -1
  314. package/dist/standalone/chunk-XQLOVFPP.js +0 -1
  315. package/dist/standalone/chunk-XSHYZPGF.js +0 -1
  316. package/dist/standalone/chunk-XST3UEHU.js +0 -1
  317. package/dist/standalone/chunk-XYR5NST4.js +0 -1
  318. package/dist/standalone/chunk-Y74LIFSL.js +0 -1
  319. package/dist/standalone/chunk-YHTHRYP5.js +0 -1
  320. package/dist/standalone/chunk-YMEKCV27.js +0 -1
  321. package/dist/standalone/chunk-Z5EV64KS.js +0 -1
  322. package/dist/standalone/chunk-ZBON5T5A.js +0 -1
  323. package/dist/standalone/chunk-ZGSL4DPP.js +0 -1
  324. package/dist/standalone/chunk-ZOQTXWPK.js +0 -1
  325. package/dist/standalone/chunk-ZTOREMGH.js +0 -1
  326. package/dist/standalone/chunk-ZZ5GICTF.js +0 -1
  327. /package/dist/standalone/{chunk-UYEZR3BI.js → chunk-P6VNMPWR.js} +0 -0
@@ -0,0 +1 @@
1
+ import{a as $o}from"./chunk-GXTSE66Z.js";import{a as qa,b as Wa}from"./chunk-MJTVTUNI.js";import{a as $a,d as Ga}from"./chunk-CL3JOU6F.js";import{a as Ut,b as Xt,c as eo,d as to,e as oo,f as Ba,g as Zo,h as qo}from"./chunk-BCUOQNI2.js";import{$ as Vo,A as Ia,B as Oo,C as Do,D as _a,E as Kt,G as Zt,J as qt,K as Mo,L as Wt,M as $t,O as Io,P as Aa,Q as Va,R as Gt,S as Qt,T as Yt,U as Jt,V as _o,W as Ne,Y as La,Z as Ha,_ as Ao,b as Ca,ca as Lo,da as Ho,fa as Bo,j as jt,k as zt,l as Ta,la as Fo,m as wa,ma as jo,n as Ea,na as zo,o as ka,oa as Ko,p as Nr,pa as Fa,q as wo,qa as ja,ra as Uo,s as Eo,sa as za,t as Oa,u as ko,y as Da,z as Ma}from"./chunk-P5EVJEGC.js";import{a as Wo}from"./chunk-QKUVJIRX.js";import{c as Ka,h as Ua,k as Tr}from"./chunk-QAOZXPLU.js";import{a as Jr,b as Xr,h as ea,i as io,j as Cr,k as ta,l as oa,m as ra,n as aa,o as na}from"./chunk-RTS5G3ET.js";import{i as Sr}from"./chunk-IHGRWY3Y.js";import{C as Ra,D as Sa,H as Na,I as Ft,M as z,N as ne,b as he,e as uo,f as ba,l as xa,m as mo,o as Ht,p as ya,q as Bt,r as Ee,s as Pa}from"./chunk-OWRKSQPE.js";import{a as Yr}from"./chunk-4EPW63HS.js";import{a as wr}from"./chunk-V3BE427M.js";import{c as ke}from"./chunk-CKEQX655.js";import{a as Pe,c as ha,h as To,i as va}from"./chunk-UD5REVU2.js";import{a as Za}from"./chunk-RCXNYW7P.js";import{a as Rr,b as Lt}from"./chunk-UQA2AJGI.js";import{a as co,c as J,g as po,i as fa,j as B}from"./chunk-T3ZCW3RG.js";import{a as ia,b as la}from"./chunk-BX7TFVCC.js";import{a as ca,b as da}from"./chunk-4PI2OSSP.js";import{a as lo}from"./chunk-FBDIQ67D.js";import{a as ga}from"./chunk-ZPQBVYNN.js";import{A as ma,B as be,b as yr,s as Vt,v as sa,x as Z,y as pa,z as ua}from"./chunk-GNI37YCV.js";import{a as Pr}from"./chunk-GWNGVKLG.js";import{a as _,b as ie}from"./chunk-6G3E4PJ2.js";import{a as i,c as xr,d as T}from"./chunk-5PEAXTYQ.js";var M=T(Pr(),1);var ye=T(_(),1),E=T(_(),1);var n=T(ie(),1);var Qa=T(_(),1),Te=T(ie(),1);var Js={border:"1px solid var(--destructive)",color:"var(--destructive)",padding:12},Xs={overflow:"auto",whiteSpace:"pre-wrap"},Go=class extends Qa.Component{static{i(this,"g")}static getDerivedStateFromError(e){return{error:e}}state={error:null};componentDidCatch(e,o){console.error("[lunora-studio] panel error",e,o.componentStack)}reset=i(()=>{this.setState({error:null})},"reset");render(){let{children:e,fallbackTitle:o,label:r,retryLabel:a}=this.props,{error:s}=this.state;if(s===null)return(0,Te.jsx)(Te.Fragment,{children:e});let l=o??(r===void 0?"Something went wrong":`${r} failed`);return(0,Te.jsxs)("div",{"data-testid":"dash-error-boundary",role:"alert",style:Js,children:[(0,Te.jsx)("strong",{children:l}),(0,Te.jsx)("pre",{"data-testid":"dash-error-message",style:Xs,children:s.message}),(0,Te.jsx)("button",{"data-testid":"dash-error-retry",onClick:this.reset,type:"button",children:a??"Try again"})]})}};var Me={};xr(Me,{Arrow:()=>gn,Backdrop:()=>vn,Close:()=>Rn,Description:()=>Pn,Handle:()=>vo,Popup:()=>mn,Portal:()=>ln,Positioner:()=>cn,Root:()=>rn,Title:()=>xn,Trigger:()=>an,Viewport:()=>Nn,createHandle:()=>Tn});var fo=T(_(),1);var Qo=T(_(),1);var Er=Qo.createContext(void 0);function X(t){let e=Qo.useContext(Er);if(e===void 0&&!t)throw new Error(J(47));return e}i(X,"usePopoverRootContext");var Yo=T(_(),1),Ya=T(Yr(),1);var Ja={...eo,disabled:i(t=>t.disabled,"disabled"),instantType:i(t=>t.instantType,"instantType"),openMethod:i(t=>t.openMethod,"openMethod"),openChangeReason:i(t=>t.openChangeReason,"openChangeReason"),modal:i(t=>t.modal,"modal"),focusManagerModal:i(t=>t.focusManagerModal,"focusManagerModal"),stickIfOpen:i(t=>t.stickIfOpen,"stickIfOpen"),titleElementId:i(t=>t.titleElementId,"titleElementId"),descriptionElementId:i(t=>t.descriptionElementId,"descriptionElementId"),openOnHover:i(t=>t.openOnHover,"openOnHover"),closeDelay:i(t=>t.closeDelay,"closeDelay"),adaptiveOrigin:i(t=>t.adaptiveOrigin,"adaptiveOrigin")},Jo=class extends Zt{static{i(this,"PopoverStore")}constructor(e,o,r){let a=new Ne;super(en(e,a,o,r),tn(a),Ja)}setOpen=i((e,o)=>{let r=o.reason===z.triggerHover,a=o.reason===z.triggerPress&&o.event.detail===0,s=!e&&(o.reason===z.escapeKey||o.reason==null),l=Aa(o),c=this.select("activeTriggerId");if(!e&&o.reason===z.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=i(()=>{let u=Io(this.state,e,o.trigger,l());u.openChangeReason=o.reason,this.update(u)},"changeState");r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set("stickIfOpen",!1)}),Ya.flushSync(p)):p();let d;a?d="click":s?d="dismiss":o.reason===z.focusOut&&(d="focus"),this.set("instantType",d)},"setOpen")};function Xa(){let t=new Ne,e=new oo(Object.freeze(en(void 0,t)),Object.freeze(tn(t)),Ja);return Object.assign(e,{setOpen:po})}i(Xa,"createNullPopoverStore");function en(t,e,o,r=!1){let a={...Xt(e,o,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...t};return a.open&&t?.mounted===void 0&&(a.mounted=!0),a}i(en,"createInitialState");function tn(t){return{popupRef:Yo.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:Yo.createRef(),beforeContentFocusGuardRef:Yo.createRef(),stickIfOpenTimeout:new Ra,triggerElements:t}}i(tn,"createInitialContext");var Oe=T(ie(),1);var on=jt(i(function({props:e}){let{children:o,open:r,defaultOpen:a=!1,onOpenChange:s,onOpenChangeComplete:l,modal:c=!1,handle:p,triggerId:d,defaultTriggerId:u=null}=e,g=ei(p,{modal:c,open:a,openProp:r,activeTriggerId:u,triggerIdProp:d});g.useControlledProp("openProp",r),g.useControlledProp("triggerIdProp",d);let b=g.useState("open"),f=g.useState("mounted"),m=g.useState("payload");g.useContextCallback("onOpenChange",s),g.useContextCallback("onOpenChangeComplete",l),_o(g,b),Qt(g);let{forceUnmount:x}=Yt(b,g,()=>{g.update({stickIfOpen:!0,openChangeReason:null})});g.useSyncedValues({modal:c}),fo.useEffect(()=>{b||g.context.stickIfOpenTimeout.clear()},[g,b]),fo.useImperativeHandle(e.actionsRef,()=>({unmount:x,close:i(()=>g.setOpen(!1,ne(z.imperativeAction)),"close")}),[x,g]);let h=b||f;return(0,Oe.jsxs)(Er.Provider,{value:g,children:[p&&(0,Oe.jsx)($t,{handle:p,store:g}),h&&(0,Oe.jsx)(ti,{store:g,modal:c}),typeof o=="function"?o({payload:m}):o]})},"PopoverRootComponent"));function rn(t){return X(!0)?(0,Oe.jsx)(on,{props:t}):(0,Oe.jsx)(Ia,{children:(0,Oe.jsx)(on,{props:t})})}i(rn,"PopoverRoot");function ei(t,e){let o=Wt((r,a)=>new Jo(e,r,a));return fo.useEffect(()=>o.context.stickIfOpenTimeout.disposeEffect(),[o]),o}i(ei,"usePopoverRootStore");function ti({store:t,modal:e}){let o=t.useState("floatingRootContext"),r=Kt(o,{outsidePressEvent:{mouse:e==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),a=r.reference,s=r.floating;return Jt(t,{activeTriggerProps:a,inactiveTriggerProps:a,popupProps:s}),null}i(ti,"PopoverInteractions");var go=T(_(),1);var ro=T(ie(),1);var an=zt(i(function(e,o){let{render:r,className:a,style:s,disabled:l=!1,nativeButton:c=!0,handle:p,payload:d,openOnHover:u=!1,delay:g=300,closeDelay:b=0,id:f,...m}=e,x=X(!0),v=to(p)??x;if(!v)throw new Error(J(74));let P=he(f),y=v.useState("isTriggerActive",P),R=v.useState("floatingRootContext"),C=v.useState("isOpenedByTrigger",P),k=v.useState("triggerPopupId",P),S=go.useRef(null),{registerTrigger:N,isMountedByThisTrigger:w}=Gt(P,S,v,{payload:d,disabled:l,openOnHover:u,closeDelay:b}),O=v.useState("openChangeReason"),I=v.useState("stickIfOpen"),L=v.useState("openMethod"),V=v.useState("focusManagerModal"),H=Vo(R,{enabled:!l&&u&&(L!=="touch"||O!==z.triggerPress),mouseOnly:!0,move:!1,handleClose:Lo(),restMs:g,delay:{close:b},triggerElementRef:S,isActiveTrigger:y,isClosing:i(()=>v.select("transitionStatus")==="ending","isClosing")}),q=Do(R,{stickIfOpen:I}),F=Ho(()=>v.select("open"),ee=>{v.set("openMethod",ee)}),K=v.useState("triggerProps",w),{getButtonProps:j,buttonRef:D}=ke({disabled:l,native:c}),A={open(ee){return ee&&O===z.triggerPress?ya.open(ee):Ht.open(ee)}},{preFocusGuardRef:W,handlePreFocusGuardFocus:$,handleFocusTargetFocus:te}=Ba(v,S),Y=B("button",e,{state:{disabled:l,open:C},ref:[D,o,N,S],props:[q.reference,H,K,F,{[wo]:"",id:P,"aria-haspopup":"dialog","aria-expanded":C,"aria-controls":k},m,j],stateAttributesMapping:A}),oe=(0,ro.jsx)(go.Fragment,{children:Y},P);return w&&!V?(0,ro.jsxs)(go.Fragment,{children:[(0,ro.jsx)(Nr,{ref:W,onFocus:$}),oe,(0,ro.jsx)(Nr,{ref:v.context.triggerFocusTargetRef,onFocus:te})]}):oe},"PopoverTrigger"));var sn=T(_(),1);var Xo=T(_(),1);var kr=Xo.createContext(void 0);function nn(){let t=Xo.useContext(kr);if(t===void 0)throw new Error(J(45));return t}i(nn,"usePopoverPortalContext");var Or=T(ie(),1);var ln=sn.forwardRef(i(function(e,o){let{keepMounted:r=!1,...a}=e;return X().useState("mounted")||r?(0,Or.jsx)(kr.Provider,{value:r,children:(0,Or.jsx)(ko,{ref:o,...a})}):null},"PopoverPortal"));var tr=T(_(),1);var er=T(_(),1);var Dr=er.createContext(void 0);function ao(){let t=er.useContext(Dr);if(!t)throw new Error(J(46));return t}i(ao,"usePopoverPositionerContext");var ho=T(ie(),1);var cn=tr.forwardRef(i(function(e,o){let{render:r,className:a,style:s,anchor:l,positionMethod:c,side:p,align:d,sideOffset:u,alignOffset:g,collisionBoundary:b="clipping-ancestors",collisionPadding:f,arrowPadding:m,sticky:x,disableAnchorTracking:h=!1,collisionAvoidance:v=Eo,...P}=e,y=X(),R=nn(),C=Da(),k=y.useState("floatingRootContext"),S=y.useState("mounted"),N=y.useState("open"),w=y.useState("openChangeReason"),O=y.useState("activeTriggerElement"),I=y.useState("modal"),L=y.useState("openMethod"),V=y.useState("positionerElement"),H=y.useState("instantType"),q=y.useState("transitionStatus"),F=y.useState("adaptiveOrigin"),K=tr.useRef(null),j=Na(V),D=Fo({anchor:l,floatingRootContext:k,positionMethod:c,mounted:S,side:p,sideOffset:u,align:d,alignOffset:g,arrowPadding:m,collisionBoundary:b,collisionPadding:f,sticky:x,disableAnchorTracking:h,keepMounted:R,nodeId:C,collisionAvoidance:v,adaptiveOrigin:F}),A=k.useState("domReferenceElement");Pe(()=>{let Y=A,oe=K.current;if(Y&&(K.current=Y),oe&&Y&&Y!==oe){y.set("instantType",void 0);let ee=new AbortController;return j(()=>{y.set("instantType","trigger-change")},ee.signal),()=>{ee.abort()}}},[A,j,y]);let W=I===!0&&w!==z.triggerHover;ja(N&&W,L==="touch",V,O);let $=y.useStateSetter("positionerElement"),te={open:N,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:H},le=Ko(e,te,{styles:D.positionerStyles,transitionStatus:q,props:P,refs:[o,$],hidden:!S,inert:!N});return(0,ho.jsxs)(Dr.Provider,{value:D,children:[S&&W&&(0,ho.jsx)(jo,{inert:Bo(!N),cutout:O}),(0,ho.jsx)(Ma,{id:C,children:le})]})},"PopoverPositioner"));var un=T(_(),1);var De=T(_(),1);var Mr=De.createContext(void 0);function dn(){let[t,e]=De.useState(0),o=ha(()=>(e(a=>a+1),()=>{e(a=>Math.max(0,a-1))}));return{context:De.useMemo(()=>({register:o}),[o]),hasClosePart:t>0}}i(dn,"useClosePartCount");function pn(){let t=De.useContext(Mr);Pe(()=>t?.register(),[t])}i(pn,"useClosePartRegistration");var Ir=T(ie(),1);var mn=un.forwardRef(i(function(e,o){let{render:r,className:a,style:s,initialFocus:l,finalFocus:c,...p}=e,d=X(),u=ao(),g=za(!0)!=null,{context:b,hasClosePart:f}=dn(),m=d.useState("open"),x=d.useState("openMethod"),h=d.useState("instantType"),v=d.useState("transitionStatus"),P=d.useState("popupProps"),y=d.useState("titleElementId"),R=d.useState("descriptionElementId"),C=d.useState("modal"),k=d.useState("mounted"),S=d.useState("openChangeReason"),N=d.useState("activeTriggerElement"),w=d.useState("floatingRootContext"),O=w.useState("floatingId"),I=d.useState("disabled"),L=d.useState("openOnHover"),V=d.useState("closeDelay");Ft({open:m,ref:d.context.popupRef,onComplete(){m&&d.context.onOpenChangeComplete?.(!0)}}),Ao(w,{enabled:L&&!I,closeDelay:V});let H=l===void 0?Mo(d.context.popupRef):l,q=C!==!1&&f;d.useSyncedValue("focusManagerModal",q);let F=d.useStateSetter("popupElement"),K={open:m,side:u.side,align:u.align,instant:h,transitionStatus:v},j=B("div",e,{state:K,ref:[o,d.context.popupRef,F],props:[P,{id:O,role:"dialog",...qt,"aria-labelledby":y,"aria-describedby":R,onKeyDown(D){g&&Uo.has(D.key)&&D.stopPropagation()}},zo(v),p],stateAttributesMapping:Ee});return(0,Ir.jsx)(Oo,{context:w,openInteractionType:x,modal:q,disabled:!k||S===z.triggerHover,initialFocus:H,returnFocus:c,restoreFocus:"popup",previousFocusableElement:va(N)?N:void 0,nextFocusableElement:d.context.triggerFocusTargetRef,beforeContentFocusGuardRef:d.context.beforeContentFocusGuardRef,children:(0,Ir.jsx)(Mr.Provider,{value:b,children:j})})},"PopoverPopup"));var fn=T(_(),1);var gn=fn.forwardRef(i(function(e,o){let{render:r,className:a,style:s,...l}=e,p=X().useState("open"),{arrowRef:d,side:u,align:g,arrowUncentered:b,arrowStyles:f}=ao();return B("div",e,{state:{open:p,side:u,align:g,uncentered:b},ref:[o,d],props:[{style:f,"aria-hidden":!0},l],stateAttributesMapping:Bt})},"PopoverArrow"));var hn=T(_(),1);var vn=hn.forwardRef(i(function(e,o){let{render:r,className:a,style:s,...l}=e,c=X(),p=c.useState("open"),d=c.useState("mounted"),u=c.useState("transitionStatus"),g=c.useState("openChangeReason");return B("div",e,{state:{open:p,transitionStatus:u},ref:o,props:[{role:"presentation",hidden:!d,style:{pointerEvents:g===z.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:Ee})},"PopoverBackdrop"));var bn=T(_(),1);var xn=bn.forwardRef(i(function(e,o){let{render:r,className:a,style:s,...l}=e,c=X(),p=he(l.id);return c.useSyncedValueWithCleanup("titleElementId",p),B("h2",e,{ref:o,props:[{id:p},l]})},"PopoverTitle"));var yn=T(_(),1);var Pn=yn.forwardRef(i(function(e,o){let{render:r,className:a,style:s,...l}=e,c=X(),p=he(l.id);return c.useSyncedValueWithCleanup("descriptionElementId",p),B("p",e,{ref:o,props:[{id:p},l]})},"PopoverDescription"));var Cn=T(_(),1);var Rn=Cn.forwardRef(i(function(e,o){let{render:r,className:a,style:s,disabled:l=!1,nativeButton:c=!0,...p}=e,{buttonRef:d,getButtonProps:u}=ke({disabled:l,focusableWhenDisabled:!1,native:c}),g=X();return pn(),B("button",e,{ref:[o,d],props:[{onClick(f){g.setOpen(!1,ne(z.closePress,f.nativeEvent))}},p,u]})},"PopoverClose"));var Sn=T(_(),1);var Nn=Sn.forwardRef(i(function(e,o){let{render:r,className:a,style:s,children:l,...c}=e,p=X(),{side:d}=ao(),u=p.useState("instantType"),{children:g,state:b}=qo({store:p,side:d,children:l}),f={activationDirection:b.activationDirection,transitioning:b.transitioning,instant:u};return B("div",e,{state:f,ref:o,props:[c,{children:g}],stateAttributesMapping:Zo})},"PopoverViewport"));var vo=class extends Ut{static{i(this,"PopoverHandle")}constructor(){super(Xa(),"Popover")}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function Tn(){return new vo}i(Tn,"createPopoverHandle");var ce={};xr(ce,{Backdrop:()=>En,Close:()=>On,Description:()=>Mn,Handle:()=>yo,Popup:()=>Ln,Portal:()=>Bn,Root:()=>Wn,Title:()=>Yn,Trigger:()=>Xn,Viewport:()=>Gn,createHandle:()=>es});var wn=T(_(),1);var or=T(_(),1);var _r=or.createContext(void 0);function se(t){let e=or.useContext(_r);if(!t&&e===void 0)throw new Error(J(27));return e}i(se,"useDialogRootContext");var En=wn.forwardRef(i(function(e,o){let{render:r,className:a,style:s,forceRender:l=!1,...c}=e,p=se(),d=p.useState("open"),u=p.useState("nested"),g=p.useState("mounted"),b=p.useState("transitionStatus");return B("div",e,{state:{open:d,transitionStatus:b},ref:[p.context.backdropRef,o],stateAttributesMapping:Ee,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},c],enabled:l||!u})},"DialogBackdrop"));var kn=T(_(),1);var On=kn.forwardRef(i(function(e,o){let{render:r,className:a,style:s,disabled:l=!1,nativeButton:c=!0,...p}=e,d=se(),u=d.useState("open"),{getButtonProps:g,buttonRef:b}=ke({disabled:l,native:c}),f={disabled:l};function m(x){u&&d.setOpen(!1,ne(z.closePress,x.nativeEvent))}return i(m,"handleClick"),B("button",e,{state:f,ref:[o,b],props:[{onClick:m},p,g]})},"DialogClose"));var Dn=T(_(),1);var Mn=Dn.forwardRef(i(function(e,o){let{render:r,className:a,style:s,id:l,...c}=e,p=se(),d=he(l);return p.useSyncedValueWithCleanup("descriptionElementId",d),B("p",e,{ref:o,props:[{id:d},c]})},"DialogDescription"));var An=T(_(),1);var rr=T(_(),1);var Ar=rr.createContext(void 0);function ar(){let t=rr.useContext(Ar);if(t===void 0)throw new Error(J(26));return t}i(ar,"useDialogPortalContext");var In="--nested-dialogs";var _u=mo.open,Au=mo.closed,Vu=mo.startingStyle,Lu=mo.endingStyle;var _n="data-nested-dialog-open";var nr={...Bt,...xa,nestedDialogOpen(t){return t?{[_n]:""}:null}};var Vn=T(ie(),1);var Ln=An.forwardRef(i(function(e,o){let{render:r,className:a,style:s,finalFocus:l,initialFocus:c,...p}=e,d=se(),u=d.useState("descriptionElementId"),g=d.useState("disablePointerDismissal"),b=d.useState("floatingRootContext"),f=d.useState("popupProps"),m=d.useState("modal"),x=d.useState("mounted"),h=d.useState("nested"),v=d.useState("nestedOpenDialogCount"),P=d.useState("open"),y=d.useState("openMethod"),R=d.useState("titleElementId"),C=d.useState("transitionStatus"),k=d.useState("role"),S=b.useState("floatingId");ar(),Ft({open:P,ref:d.context.popupRef,onComplete(){P&&d.context.onOpenChangeComplete?.(!0)}});let N=c===void 0?Mo(d.context.popupRef):c,w=v>0,O=d.useStateSetter("popupElement"),L=B("div",e,{state:{open:P,nested:h,transitionStatus:C,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":R,"aria-describedby":u,role:k,...qt,hidden:!x,onKeyDown(V){Uo.has(V.key)&&V.stopPropagation()},style:{[In]:v}},p],ref:[o,d.context.popupRef,O],stateAttributesMapping:nr});return(0,Vn.jsx)(Oo,{context:b,openInteractionType:y,disabled:!x,closeOnFocusOut:!g,initialFocus:N,returnFocus:l,modal:m!==!1,restoreFocus:"popup",children:L})},"DialogPopup"));var Hn=T(_(),1);var bo=T(ie(),1);var Bn=Hn.forwardRef(i(function(e,o){let{keepMounted:r=!1,...a}=e,s=se(),l=s.useState("mounted"),c=s.useState("modal"),p=s.useState("open");return l||r?(0,bo.jsx)(Ar.Provider,{value:r,children:(0,bo.jsxs)(ko,{ref:o,...a,children:[l&&c===!0&&(0,bo.jsx)(jo,{ref:s.context.internalBackdropRef,inert:Bo(!p)}),e.children]})}):null},"DialogPortal"));var Zn=T(_(),1);var Vr=T(_(),1);function Fn({store:t,parentContext:e,isDrawer:o}){let r=t.useState("open"),a=t.useState("disablePointerDismissal"),s=t.useState("modal"),l=t.useState("popupElement"),c=t.useState("floatingRootContext"),[p,d]=Vr.useState(0),[u,g]=Vr.useState(0),b=p===0,f=Kt(c,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:s==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(m){if(!t.context.outsidePressEnabledRef.current||"button"in m&&m.button!==0)return!1;if("touches"in m){if(m.type==="touchend"){if(m.changedTouches.length!==1||m.touches.length!==0)return!1}else if(m.touches.length!==1)return!1}let x=ba(m);if(b&&!a){if(s){let h=t.context.internalBackdropRef.current,v=t.context.backdropRef.current;return h||v?h===x||v===x||uo(x,l)&&!x?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:b});return Fa(r&&s===!0,l),t.useContextCallback("onNestedDialogOpen",(m,x)=>{d(m),g(x)}),Pe(()=>(e?.onNestedDialogOpen&&(r?e.onNestedDialogOpen(p+1,u+(o?1:0)):e.onNestedDialogOpen(0,0)),()=>{e?.onNestedDialogOpen&&r&&e.onNestedDialogOpen(0,0)}),[o,r,p,u,e]),Jt(t,{activeTriggerProps:f.reference,inactiveTriggerProps:f.trigger,popupProps:f.floating,nestedOpenDialogCount:p,nestedOpenDrawerCount:u}),null}i(Fn,"DialogInteractions");var sr=T(_(),1);var jn={...eo,modal:i(t=>t.modal,"modal"),nested:i(t=>t.nested,"nested"),nestedOpenDialogCount:i(t=>t.nestedOpenDialogCount,"nestedOpenDialogCount"),nestedOpenDrawerCount:i(t=>t.nestedOpenDrawerCount,"nestedOpenDrawerCount"),disablePointerDismissal:i(t=>t.disablePointerDismissal,"disablePointerDismissal"),openMethod:i(t=>t.openMethod,"openMethod"),descriptionElementId:i(t=>t.descriptionElementId,"descriptionElementId"),titleElementId:i(t=>t.titleElementId,"titleElementId"),viewportElement:i(t=>t.viewportElement,"viewportElement"),role:i(t=>t.role,"role")},ir=class extends Zt{static{i(this,"DialogStore")}constructor(e,o,r){let a=new Ne,s=Kn(e,a,o,r);super(s,Un(a),jn)}setOpen=i((e,o)=>{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&&(this.state.floatingRootContext.dispatchOpenChange(e,o),this.update(Io(this.state,e,o.trigger)))},"setOpen")};function zn(){let t=new Ne;return new oo(Object.freeze(Kn(void 0,t)),Object.freeze(Un(t)),jn)}i(zn,"createNullDialogStore");function Kn(t,e,o,r=!1){return{...Xt(e,o,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...t}}i(Kn,"createInitialState");function Un(t){return{popupRef:sr.createRef(),backdropRef:sr.createRef(),internalBackdropRef:sr.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:t,onOpenChange:void 0,onOpenChangeComplete:void 0}}i(Un,"createInitialContext");var xo=T(ie(),1);function qn(t,e){let{children:o,open:r,defaultOpen:a=!1,onOpenChange:s,onOpenChangeComplete:l,disablePointerDismissal:c=!1,modal:p=!0,actionsRef:d,handle:u,triggerId:g,defaultTriggerId:b=null}=e,f=t==="drawer",m=t==="alert-dialog",x=m?!0:p,h=m||c,v=m?"alertdialog":"dialog",P=se(!0),y=P!=null,R={modal:x,disablePointerDismissal:h,nested:y,role:v},C=Wt((I,L)=>new ir({open:a,openProp:r,activeTriggerId:b,triggerIdProp:g,...R},I,L),!0);C.useControlledProp("openProp",r),C.useControlledProp("triggerIdProp",g),C.useSyncedValues(R),C.useContextCallback("onOpenChange",s),C.useContextCallback("onOpenChangeComplete",l);let k=C.useState("open"),S=C.useState("mounted"),N=C.useState("payload");_o(C,k),Qt(C);let{forceUnmount:w}=Yt(k,C);Zn.useImperativeHandle(d,()=>({unmount:w,close:i(()=>C.setOpen(!1,ne(z.imperativeAction)),"close")}),[w,C]);let O=k||S;return(0,xo.jsxs)(_r.Provider,{value:C,children:[u&&(0,xo.jsx)($t,{handle:u,store:C}),O&&(0,xo.jsx)(Fn,{store:C,parentContext:P?.context,isDrawer:f}),typeof o=="function"?o({payload:N}):o]})}i(qn,"useRenderDialogRoot");var Wn=jt(i(function(e){return qn("dialog",e)},"DialogRoot"));var $n=T(_(),1);var Gn=$n.forwardRef(i(function(e,o){let{render:r,className:a,style:s,children:l,...c}=e,p=ar(),d=se(),u=d.useState("open"),g=d.useState("nested"),b=d.useState("transitionStatus"),f=d.useState("nestedOpenDialogCount"),m=d.useState("mounted"),x=d.useStateSetter("viewportElement"),h=f>0;return B("div",e,{enabled:p||m,state:{open:u,nested:g,transitionStatus:b,nestedDialogOpen:h},ref:[o,x],stateAttributesMapping:nr,props:[{role:"presentation",hidden:!m,style:{pointerEvents:u?void 0:"none"},children:l},c]})},"DialogViewport"));var Qn=T(_(),1);var Yn=Qn.forwardRef(i(function(e,o){let{render:r,className:a,style:s,id:l,...c}=e,p=se(),d=he(l);return p.useSyncedValueWithCleanup("titleElementId",d),B("h2",e,{ref:o,props:[{id:d},c]})},"DialogTitle"));var Jn=T(_(),1);var Xn=zt(i(function(e,o){let{render:r,className:a,style:s,disabled:l=!1,nativeButton:c=!0,id:p,payload:d,handle:u,...g}=e,b=se(!0),m=to(u)??b;if(!m)throw new Error(J(79));let x=he(p),h=m.useState("floatingRootContext"),v=m.useState("isOpenedByTrigger",x),P=m.useState("triggerPopupId",x),y=Jn.useRef(null),{registerTrigger:R,isMountedByThisTrigger:C}=Gt(x,y,m,{payload:d}),{getButtonProps:k,buttonRef:S}=ke({disabled:l,native:c}),N=Do(h),w=Ho(()=>m.select("open"),L=>{m.set("openMethod",L)}),O={disabled:l,open:v},I=m.useState("triggerProps",C);return B("button",e,{state:O,ref:[S,o,R,y],props:[N.reference,I,w,{[wo]:"",id:x,"aria-haspopup":"dialog","aria-expanded":v,"aria-controls":P},g,k],stateAttributesMapping:Ht})},"DialogTrigger"));var yo=class extends Ut{static{i(this,"DialogHandle")}constructor(){super(zn(),"Dialog",!1)}open(e){this.openByTrigger(e)}openWithPayload(e){let o=this.attachedStore;o!==null&&(o.set("payload",e),o.setOpen(!0,ne(z.imperativeAction)))}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function es(){return new yo}i(es,"createDialogHandle");var Ce={};xr(Ce,{Arrow:()=>Cs,Handle:()=>Co,Popup:()=>ys,Portal:()=>hs,Positioner:()=>bs,Provider:()=>Ss,Root:()=>ss,Trigger:()=>ds,Viewport:()=>Ts,createHandle:()=>ws});var no=T(_(),1);var lr=T(_(),1);var Lr=lr.createContext(void 0);function xe(t){let e=lr.useContext(Lr);if(e===void 0&&!t)throw new Error(J(72));return e}i(xe,"useTooltipRootContext");var ts=T(_(),1);var os={...eo,disabled:i(t=>t.disabled,"disabled"),instantType:i(t=>t.instantType,"instantType"),isInstantPhase:i(t=>t.isInstantPhase,"isInstantPhase"),trackCursorAxis:i(t=>t.trackCursorAxis,"trackCursorAxis"),disableHoverablePopup:i(t=>t.disableHoverablePopup,"disableHoverablePopup"),lastOpenChangeReason:i(t=>t.openChangeReason,"lastOpenChangeReason"),closeOnClick:i(t=>t.closeOnClick,"closeOnClick"),closeDelay:i(t=>t.closeDelay,"closeDelay"),adaptiveOrigin:i(t=>t.adaptiveOrigin,"adaptiveOrigin")},cr=class extends Zt{static{i(this,"TooltipStore")}constructor(e,o,r){let a=new Ne;super(as(e,a,o,r),ns(a),os)}setOpen=i((e,o)=>{Va(this,e,o,{extraState:{openChangeReason:o.reason}})},"setOpen");cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,ne(z.triggerPress,e))}};function rs(){let t=new Ne,e=new oo(Object.freeze(as(void 0,t)),Object.freeze(ns(t)),os);return Object.assign(e,{setOpen:po,cancelPendingOpen:po})}i(rs,"createNullTooltipStore");function as(t,e,o,r=!1){return{...Xt(e,o,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...t}}i(as,"createInitialState");function ns(t){return{popupRef:ts.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:t}}i(ns,"createInitialContext");var Po=T(ie(),1);var ss=jt(i(function(e){let{disabled:o=!1,defaultOpen:r=!1,open:a,disableHoverablePopup:s=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:p,onOpenChangeComplete:d,handle:u,triggerId:g,defaultTriggerId:b=null,children:f}=e,m=Wt((I,L)=>new cr({open:r,openProp:a,activeTriggerId:b,triggerIdProp:g},I,L));m.useControlledProp("openProp",a),m.useControlledProp("triggerIdProp",g),m.useContextCallback("onOpenChange",p),m.useContextCallback("onOpenChangeComplete",d);let x=m.useState("open"),h=!o&&x,v=m.useState("activeTriggerId"),P=m.useState("mounted"),y=m.useState("payload");m.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:s,disabled:o}),Qt(m,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:R,transitionStatus:C}=Yt(h,m),k=m.useState("isInstantPhase"),S=m.useState("instantType"),N=m.useState("lastOpenChangeReason"),w=no.useRef(null);Pe(()=>{x&&o&&m.setOpen(!1,ne(z.disabled))},[x,o,m]),Pe(()=>{C==="ending"&&N===z.none||C!=="ending"&&k?(S!=="delay"&&(w.current=S),m.set("instantType","delay")):w.current!==null&&(m.set("instantType",w.current),w.current=null)},[C,k,N,S,m]),Pe(()=>{h&&v==null&&m.set("payload",void 0)},[m,v,h]),no.useImperativeHandle(c,()=>({unmount:R,close:i(()=>m.setOpen(!1,ne(z.imperativeAction)),"close")}),[R,m]);let O=h||P||!o&&l!=="none";return(0,Po.jsxs)(Lr.Provider,{value:m,children:[u&&(0,Po.jsx)($t,{handle:u,store:m}),O&&(0,Po.jsx)(ai,{store:m,disabled:o,trackCursorAxis:l}),typeof f=="function"?f({payload:y}):f]})},"TooltipRoot"));function ai({store:t,disabled:e,trackCursorAxis:o}){let r=t.useState("floatingRootContext"),a=Kt(r,{enabled:!e,referencePress:i(()=>t.select("closeOnClick"),"referencePress")}),s=_a(r,{enabled:!e&&o!=="none",axis:o==="none"?void 0:o}),l=no.useMemo(()=>co(s.reference,a.reference),[s.reference,a.reference]);return Jt(t,{activeTriggerProps:l,inactiveTriggerProps:l,popupProps:a.floating??fa}),null}i(ai,"TooltipInteractions");var pr=T(_(),1);var dr=T(_(),1);var Hr=dr.createContext(void 0);function is(){return dr.useContext(Hr)}i(is,"useTooltipProviderContext");var cs="data-base-ui-tooltip-trigger";function ls(t){if("composedPath"in t){let o=t.composedPath();for(let r=0;r<o.length;r+=1){let a=o[r];if(To(a))return a}}let e=t.target;return To(e)?e:null}i(ls,"getTargetElement");function ni(t){let e=t;for(;e;){let o=e.closest(`[${cs}]`);if(o)return o;let r=e.getRootNode();e="host"in r&&To(r.host)?r.host:null}return null}i(ni,"closestEnabledTooltipTrigger");var ds=zt(i(function(e,o){let{render:r,className:a,style:s,handle:l,payload:c,disabled:p,delay:d,closeOnClick:u=!0,closeDelay:g,id:b,...f}=e,m=xe(!0),h=to(l)??m;if(!h)throw new Error(J(82));let v=he(b),P=h.useState("isTriggerActive",v),y=h.useState("isOpenedByTrigger",v),R=h.useState("floatingRootContext"),C=pr.useRef(null),k=g??0,{registerTrigger:S,isMountedByThisTrigger:N}=Gt(v,C,h,{payload:c,closeOnClick:u,closeDelay:k}),w=is(),{activeIdRef:O,delayRef:I,isInstantPhase:L,hasProvider:V}=Ea(R,{open:y}),H=Ha(R);h.useSyncedValue("isInstantPhase",L);let q=h.useState("disabled"),F=p??q,K=ka(F),j=h.useState("trackCursorAxis"),D=h.useState("disableHoverablePopup"),A=pr.useRef(!1),W=Sa(),$=pr.useRef(void 0);function te(){return V&&O.current!=null?0:d??w??600}i(te,"getOpenDelay");function le(U){let G=C.current;if(!G||!U)return!1;let re=ni(U);return re!==null&&re!==G&&uo(G,re)}i(le,"isEnabledNestedTriggerTarget");function Y(U){let G=le(U);return A.current=G,G&&(H.openChangeTimeout.clear(),H.restTimeout.clear(),H.restTimeoutPending=!1,W.clear()),G}i(Y,"detectNestedTriggerHover");let oe=Vo(R,{enabled:!F,mouseOnly:!0,move:!1,handleClose:!D&&j!=="both"?Lo():null,restMs:te,delay(){return g==null&&V?{close:Ta(I.current,"close")}:{close:k}},triggerElementRef:C,isActiveTrigger:P,isClosing:i(()=>h.select("transitionStatus")==="ending","isClosing"),shouldOpen(){return!A.current}}),ee=La(R,{enabled:!F}).reference,de=i(U=>{let G=A.current,re=ls(U),ge=Y(re),ve=C.current,we=ve&&re&&uo(ve,re);if(ge&&h.select("open")&&h.select("lastOpenChangeReason")===z.triggerHover){h.setOpen(!1,ne(z.triggerHover,U));return}if(G&&!ge&&we&&!K.current&&!h.select("open")&&ve&&Ca($.current)){let Re=i(()=>{!A.current&&!K.current&&!h.select("open")&&h.setOpen(!0,ne(z.triggerHover,U,ve))},"open"),Se=te();Se===0?(W.clear(),Re()):W.start(Se,Re)}},"handleNestedTriggerHover"),pe=h.useState("triggerProps",N);return B("button",e,{state:{open:y},ref:[o,S,C],props:[oe,ee,N||j!=="none"?pe:void 0,{onMouseOver(U){de(U.nativeEvent)},onFocus(U){le(ls(U.nativeEvent))&&U.preventBaseUIHandler()},onMouseLeave(){A.current=!1,W.clear(),$.current=void 0},onPointerEnter(U){$.current=U.pointerType},onPointerDown(U){$.current=U.pointerType,h.set("closeOnClick",u),u&&!h.select("open")&&h.cancelPendingOpen(U.nativeEvent)},onClick(U){u&&!h.select("open")&&h.cancelPendingOpen(U.nativeEvent)},id:v,[Pa]:F?"":void 0,[cs]:F?void 0:""},f],stateAttributesMapping:Ht})},"TooltipTrigger"));var gs=T(_(),1);var ur=T(_(),1);var Br=ur.createContext(void 0);function ps(){let t=ur.useContext(Br);if(t===void 0)throw new Error(J(70));return t}i(ps,"useTooltipPortalContext");var mr=T(_(),1),us=T(Yr(),1);var ms=T(ie(),1);var fs=mr.forwardRef(i(function(e,o){let{children:r,container:a,className:s,render:l,style:c,...p}=e,{node:d,subtree:u}=Oa({container:a,ref:o,componentProps:e,elementProps:p});return!u&&!d?null:(0,ms.jsxs)(mr.Fragment,{children:[u,d&&us.createPortal(r,d)]})},"FloatingPortalLite"));var Fr=T(ie(),1);var hs=gs.forwardRef(i(function(e,o){let{keepMounted:r=!1,...a}=e;return xe().useState("mounted")||r?(0,Fr.jsx)(Br.Provider,{value:r,children:(0,Fr.jsx)(fs,{ref:o,...a})}):null},"TooltipPortal"));var gr=T(_(),1);var fr=T(_(),1);var jr=fr.createContext(void 0);function so(){let t=fr.useContext(jr);if(t===void 0)throw new Error(J(71));return t}i(so,"useTooltipPositionerContext");var vs=T(ie(),1);var bs=gr.forwardRef(i(function(e,o){let{render:r,className:a,anchor:s,positionMethod:l="absolute",side:c="top",align:p="center",sideOffset:d=0,alignOffset:u=0,collisionBoundary:g="clipping-ancestors",collisionPadding:b=5,arrowPadding:f=5,sticky:m=!1,disableAnchorTracking:x=!1,collisionAvoidance:h=Eo,style:v,...P}=e,y=xe(),R=ps(),C=y.useState("open"),k=y.useState("mounted"),S=y.useState("trackCursorAxis"),N=y.useState("disableHoverablePopup"),w=y.useState("floatingRootContext"),O=y.useState("instantType"),I=y.useState("transitionStatus"),L=y.useState("adaptiveOrigin"),V=Fo({anchor:s,positionMethod:l,floatingRootContext:w,mounted:k,side:c,sideOffset:d,align:p,alignOffset:u,collisionBoundary:g,collisionPadding:b,sticky:m,arrowPadding:f,disableAnchorTracking:x,keepMounted:R,collisionAvoidance:h,adaptiveOrigin:L}),H=gr.useMemo(()=>({open:C,side:V.side,align:V.align,anchorHidden:V.anchorHidden,instant:S!=="none"?"tracking-cursor":O}),[C,V.side,V.align,V.anchorHidden,S,O]),q=Ko(e,H,{styles:V.positionerStyles,transitionStatus:I,props:P,refs:[o,y.useStateSetter("positionerElement")],hidden:!k,inert:!C||S==="both"||N});return(0,vs.jsx)(jr.Provider,{value:V,children:q})},"TooltipPositioner"));var xs=T(_(),1);var ys=xs.forwardRef(i(function(e,o){let{render:r,className:a,style:s,...l}=e,c=xe(),{side:p,align:d}=so(),u=c.useState("open"),g=c.useState("instantType"),b=c.useState("transitionStatus"),f=c.useState("popupProps"),m=c.useState("floatingRootContext"),x=c.useState("disabled"),h=c.useState("closeDelay");Ft({open:u,ref:c.context.popupRef,onComplete(){u&&c.context.onOpenChangeComplete?.(!0)}}),Ao(m,{enabled:!x,closeDelay:h});let v=c.useStateSetter("popupElement");return B("div",e,{state:{open:u,side:p,align:d,instant:g,transitionStatus:b},ref:[o,c.context.popupRef,v],props:[qt,f,zo(b),l],stateAttributesMapping:Ee})},"TooltipPopup"));var Ps=T(_(),1);var Cs=Ps.forwardRef(i(function(e,o){let{render:r,className:a,style:s,...l}=e,c=xe(),{arrowRef:p,side:d,align:u,arrowUncentered:g,arrowStyles:b}=so(),f=c.useState("open"),m=c.useState("instantType");return B("div",e,{state:{open:f,side:d,align:u,uncentered:g,instant:m},ref:[o,p],props:[{style:b,"aria-hidden":!0},l],stateAttributesMapping:Bt})},"TooltipArrow"));var Rs=T(_(),1);var zr=T(ie(),1);var Ss=i(function(e){let{delay:o,closeDelay:r,timeout:a=400}=e,s=Rs.useMemo(()=>({open:o,close:r}),[o,r]);return(0,zr.jsx)(Hr.Provider,{value:o,children:(0,zr.jsx)(wa,{delay:s,timeoutMs:a,children:e.children})})},"TooltipProvider");var Ns=T(_(),1);var Ts=Ns.forwardRef(i(function(e,o){let{render:r,className:a,style:s,children:l,...c}=e,p=xe(),d=so(),u=p.useState("instantType"),{children:g,state:b}=qo({store:p,side:d.side,children:l}),f={activationDirection:b.activationDirection,transitioning:b.transitioning,instant:u};return B("div",e,{state:f,ref:o,props:[c,{children:g}],stateAttributesMapping:Zo})},"TooltipViewport"));var Co=class extends Ut{static{i(this,"TooltipHandle")}constructor(){super(rs(),"Tooltip")}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function ws(){return new Co}i(ws,"createTooltipHandle");var Es=T(Pr(),1);var ks=T(ie(),1);var si=i((t,e,o)=>t!==void 0?t:e===void 0&&o===void 0?ua:pa(e,o),"I"),Os=i(t=>{let e=(0,Es.c)(7),{catalogs:o,children:r,i18n:a,locale:s}=t,l;e[0]!==o||e[1]!==a||e[2]!==s?(l=si(a,s,o),e[0]=o,e[1]=a,e[2]=s,e[3]=l):l=e[3];let c=l,p;return e[4]!==r||e[5]!==c?(p=(0,ks.jsx)(ma,{value:c,children:r}),e[4]=r,e[5]=c,e[6]=p):p=e[6],p},"S");var Ur=T(Pr(),1);var Ie=T(_(),1);var ae=T(ie(),1);var Kr="lunora:command-palette",Ds=i(()=>{"window"in globalThis&&globalThis.dispatchEvent(new Event(Kr))},"ce"),ii=i(t=>{let e=(0,Ur.c)(18),{active:o,index:r,item:a,onActivate:s,onSelect:l}=t,c;e[0]!==a||e[1]!==l?(c=i(()=>{l(a)},"g"),e[0]=a,e[1]=l,e[2]=c):c=e[2];let p=c,d;e[3]!==r||e[4]!==s?(d=i(()=>{s(r)},"x"),e[3]=r,e[4]=s,e[5]=d):d=e[5];let u=d,g=o?"bg-accent text-accent-foreground":"text-foreground",b;e[6]!==g?(b=Z("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]=b):b=e[7];let f;e[8]!==a.label?(f=(0,ae.jsx)("span",{children:a.label}),e[8]=a.label,e[9]=f):f=e[9];let m;e[10]!==a.group?(m=(0,ae.jsx)("span",{className:"text-xs text-muted-foreground",children:a.group}),e[10]=a.group,e[11]=m):m=e[11];let x;return e[12]!==p||e[13]!==u||e[14]!==b||e[15]!==f||e[16]!==m?(x=(0,ae.jsx)("li",{children:(0,ae.jsxs)("button",{className:b,onClick:p,onMouseEnter:u,type:"button",children:[f,m]})}),e[12]=p,e[13]=u,e[14]=b,e[15]=f,e[16]=m,e[17]=x):x=e[17],x},"Y"),li=i((t,e)=>{let o=e.trim().toLowerCase();return o===""?t:t.filter(r=>r.label.toLowerCase().includes(o)||r.group.toLowerCase().includes(o))},"Z"),Ms=i(t=>{let e=(0,Ur.c)(40),{items:o}=t,r=be(),a=io(),{palette:s}=$o(),[l,c]=(0,Ie.useState)(!1),[p,d]=(0,Ie.useState)(""),[u,g]=(0,Ie.useState)(0),b=(0,Ie.useRef)(null),f,m;e[0]!==s?(f=i(()=>{let D=i(W=>{if(!(W.metaKey||W.ctrlKey)||W.key.toLowerCase()!==s)return;let{target:$}=W;$ instanceof HTMLElement&&($.isContentEditable||["INPUT","SELECT","TEXTAREA"].includes($.tagName))||(W.preventDefault(),c(!0))},"t"),A=i(()=>{c(!0)},"l");return globalThis.addEventListener("keydown",D),globalThis.addEventListener(Kr,A),()=>{globalThis.removeEventListener("keydown",D),globalThis.removeEventListener(Kr,A)}},"s"),m=[s],e[0]=s,e[1]=f,e[2]=m):(f=e[1],m=e[2]),(0,Ie.useEffect)(f,m);let x;e[3]!==o||e[4]!==p?(x=li(o,p),e[3]=o,e[4]=p,e[5]=x):x=e[5];let h=x,v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=i(D=>{c(D),D||(d(""),g(0))},"I"),e[6]=v):v=e[6];let P=v,y;e[7]!==a?(y=i(D=>{if(P(!1),D.run!==void 0){D.run();return}D.to!==void 0&&Vt(a({to:D.to}))},"K"),e[7]=a,e[8]=y):y=e[8];let R=y,C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=i(D=>{d(D.target.value),g(0)},"P"),e[9]=C):C=e[9];let k=C,S;e[10]!==u||e[11]!==h||e[12]!==R?(S=i(D=>{e:switch(D.key){case"ArrowDown":{D.preventDefault(),g(A=>h.length===0?0:(A+1)%h.length);break e}case"ArrowUp":{D.preventDefault(),g(A=>h.length===0?0:(A-1+h.length)%h.length);break e}case"Enter":{D.preventDefault();let A=h[u];A!==void 0&&R(A);break e}}},"z"),e[10]=u,e[11]=h,e[12]=R,e[13]=S):S=e[13];let N=S,w;e[14]===Symbol.for("react.memo_cache_sentinel")?(w=(0,ae.jsx)(ce.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"}),e[14]=w):w=e[14];let O;e[15]!==r?(O=r("Command palette"),e[15]=r,e[16]=O):O=e[16];let I;e[17]!==O?(I=(0,ae.jsx)(ce.Title,{className:"sr-only",children:O}),e[17]=O,e[18]=I):I=e[18];let L;e[19]===Symbol.for("react.memo_cache_sentinel")?(L=(0,ae.jsxs)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,ae.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,ae.jsx)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"})]}),e[19]=L):L=e[19];let V;e[20]!==r?(V=r("Search\u2026"),e[20]=r,e[21]=V):V=e[21];let H;e[22]!==N||e[23]!==p||e[24]!==V?(H=(0,ae.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[L,(0,ae.jsx)("input",{className:"h-11 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground","data-testid":"dash-command-input",onChange:k,onKeyDown:N,placeholder:V,ref:b,type:"text",value:p})]}),e[22]=N,e[23]=p,e[24]=V,e[25]=H):H=e[25];let q;e[26]!==u||e[27]!==h||e[28]!==R||e[29]!==r?(q=h.length===0?(0,ae.jsx)("li",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:r("No results.")}):h.map((D,A)=>(0,ae.jsx)(ii,{active:A===u,index:A,item:D,onActivate:g,onSelect:R},D.to??`${D.group}:${D.label}`)),e[26]=u,e[27]=h,e[28]=R,e[29]=r,e[30]=q):q=e[30];let F;e[31]!==q?(F=(0,ae.jsx)("ul",{className:"max-h-80 overflow-y-auto p-1.5","data-testid":"dash-command-list",children:q}),e[31]=q,e[32]=F):F=e[32];let K;e[33]!==I||e[34]!==H||e[35]!==F?(K=(0,ae.jsxs)(ce.Portal,{children:[w,(0,ae.jsxs)(ce.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:b,children:[I,H,F]})]}),e[33]=I,e[34]=H,e[35]=F,e[36]=K):K=e[36];let j;return e[37]!==l||e[38]!==K?(j=(0,ae.jsx)(ce.Root,{onOpenChange:P,open:l,children:K}),e[37]=l,e[38]=K,e[39]=j):j=e[39],j},"de");var Hs="(prefers-color-scheme: dark)",Bs=i(()=>{try{return globalThis.localStorage}catch{return}},"Jt"),ci=i(t=>t==="system"||t==="light"||t==="dark","Bs"),Fs=i(()=>globalThis.matchMedia,"Xt"),js="lunora-studio-theme",Zr=["system","light","dark"],di=i((t="system")=>{try{let e=Bs()?.getItem(js);return ci(e)?e:t}catch{return t}},"zs"),Is=i(t=>{let e=Bs();if(e!==void 0)try{e.setItem(js,t)}catch{}},"Vt"),pi=i(()=>{try{return Fs()?.(Hs).matches?"dark":"light"}catch{return"light"}},"Ds"),ui=i((t,e)=>t==="system"?e:t,"Os"),mi=i(t=>{let e;try{e=Fs()?.(Hs)}catch{e=void 0}if(e===void 0)return()=>{};let o=i(r=>{t(r.matches?"dark":"light")},"s");return e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}},"Zs"),Gr=(0,E.createContext)(null),fi=i(({children:t,defaultTheme:e="system"})=>{let[o,r]=(0,E.useState)(()=>di(e)),[a,s]=(0,E.useState)(()=>pi());(0,E.useEffect)(()=>mi(s),[]);let l=i(p=>{Is(p),r(p)},"i"),c={cycleTheme:i(()=>{r(p=>{let d=Zr[(Zr.indexOf(p)+1)%Zr.length]??p;return Is(d),d})},"cycleTheme"),resolvedTheme:ui(o,a),setTheme:l,systemTheme:a,theme:o};return(0,n.jsx)(Gr,{value:c,children:t})},"qs"),gi=i(t=>{let e=(0,M.c)(3),{children:o}=t,r=(0,E.use)(Gr),a;return e[0]!==o||e[1]!==r?(a=r===null?(0,n.jsx)(fi,{children:o}):o,e[0]=o,e[1]=r,e[2]=a):a=e[2],a},"Fs"),hi=i(()=>{let t=(0,E.use)(Gr);if(t===null)throw new yr("INTERNAL","useTheme must be used within a <ThemeProvider>");return t},"Ws");function th({delay:t=0,...e}){return(0,n.jsx)(Ce.Provider,{"data-slot":"tooltip-provider",delay:t,...e})}i(th,"Dr");function vi(t){let e=(0,M.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,n.jsx)(Ce.Root,{"data-slot":"tooltip",...o}),e[2]=o,e[3]=r):r=e[3],r}i(vi,"Us");function bi(t){let e=(0,M.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,n.jsx)(Ce.Trigger,{"data-slot":"tooltip-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}i(bi,"js");function xi({className:t,side:e="top",sideOffset:o=4,align:r="center",alignOffset:a=0,children:s,...l}){return(0,n.jsx)(Ce.Portal,{children:(0,n.jsx)(Ce.Positioner,{align:r,alignOffset:a,side:e,sideOffset:o,className:"isolate z-50",children:(0,n.jsxs)(Ce.Popup,{"data-slot":"tooltip-content",className:Z("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:[s,(0,n.jsx)(Ce.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"})]})})})}i(xi,"Gs");var yi=i(t=>{let e=(0,M.c)(5),{className:o}=t,r;e[0]!==o?(r=Z("h-full w-full text-foreground",o),e[0]=o,e[1]=r):r=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=(0,n.jsx)("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"}),e[2]=a):a=e[2];let s;return e[3]!==r?(s=(0,n.jsx)("svg",{"aria-hidden":"true",className:r,fill:"currentColor",viewBox:"0 0 543 446",children:a}),e[3]=r,e[4]=s):s=e[4],s},"Ks"),zs="lunora.studio.rulesBannerDismissed",Pi=i(()=>{try{return globalThis.localStorage.getItem(zs)==="1"}catch{return!1}},"Qs"),Ci=i(()=>{try{globalThis.localStorage.setItem(zs,"1")}catch{}},"Ys"),Ri=i(()=>{let t=(0,M.c)(18),e=be(),[o,r]=(0,E.useState)(Si),a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=i(()=>{r(!0),Ci()},"r"),t[0]=a):a=t[0];let s=a;if(o)return null;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,n.jsx)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"}),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,n.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[11px]",children:"lunora rules install"}),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,n.jsxs)("span",{children:[c," ",p," ",d]}),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 b;t[12]===Symbol.for("react.memo_cache_sentinel")?(b=(0,n.jsx)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M18 6 6 18M6 6l12 12"})}),t[12]=b):b=t[12];let f;t[13]!==g?(f=(0,n.jsx)("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:s,type:"button",children:b}),t[13]=g,t[14]=f):f=t[14];let m;return t[15]!==u||t[16]!==f?(m=(0,n.jsxs)("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,f]}),t[15]=u,t[16]=f,t[17]=m):m=t[17],m},"Js");function Si(){return Pi()}i(Si,"Xs");function Ks(t){let e=(0,M.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,n.jsx)(Me.Root,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}i(Ks,"ss");function Us(t){let e=(0,M.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,n.jsx)(Me.Trigger,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}i(Us,"as");function Zs({align:t="end",alignOffset:e=0,className:o,keepMounted:r=!1,side:a="bottom",sideOffset:s=6,...l}){return(0,n.jsx)(Me.Portal,{keepMounted:r,children:(0,n.jsx)(Me.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:a,sideOffset:s,children:(0,n.jsx)(Me.Popup,{className:Z("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})})})}i(Zs,"os");var qr=768;function Ni(){let t=(0,M.c)(2),[e,o]=(0,E.useState)(void 0),r,a;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=i(()=>{let s=globalThis.matchMedia(`(max-width: ${qr-1}px)`),l=i(()=>{o(globalThis.innerWidth<qr)},"i");return s.addEventListener("change",l),o(globalThis.innerWidth<qr),()=>{s.removeEventListener("change",l)}},"a"),a=[],t[0]=r,t[1]=a):(r=t[0],a=t[1]),(0,E.useEffect)(r,a),!!e}i(Ni,"ea");function Ti(t){let e=(0,M.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,n.jsx)(ce.Root,{"data-slot":"sheet",...o}),e[2]=o,e[3]=r):r=e[3],r}i(Ti,"ta");function wi(t){let e=(0,M.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,n.jsx)(ce.Portal,{"data-slot":"sheet-portal",...o}),e[2]=o,e[3]=r):r=e[3],r}i(wi,"sa");function Ei(t){let e=(0,M.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let a;e[3]!==o?(a=Z("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]=a):a=e[4];let s;return e[5]!==r||e[6]!==a?(s=(0,n.jsx)(ce.Backdrop,{"data-slot":"sheet-overlay",className:a,...r}),e[5]=r,e[6]=a,e[7]=s):s=e[7],s}i(Ei,"aa");function ki({className:t,children:e,side:o="right",showCloseButton:r=!0,...a}){return(0,n.jsxs)(wi,{children:[(0,n.jsx)(Ei,{}),(0,n.jsxs)(ce.Popup,{"data-slot":"sheet-content","data-side":o,className:Z("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),...a,children:[e,r&&(0,n.jsxs)(ce.Close,{"data-slot":"sheet-close",render:(0,n.jsx)(wr,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"}),children:[(0,n.jsx)(Tr,{icon:Ka,strokeWidth:2}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}i(ki,"oa");function Oi(t){let e=(0,M.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let a;e[3]!==o?(a=Z("flex flex-col gap-0.5 p-4",o),e[3]=o,e[4]=a):a=e[4];let s;return e[5]!==r||e[6]!==a?(s=(0,n.jsx)("div",{"data-slot":"sheet-header",className:a,...r}),e[5]=r,e[6]=a,e[7]=s):s=e[7],s}i(Oi,"ra");function Di(t){let e=(0,M.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let a;e[3]!==o?(a=Z("text-sm font-medium text-foreground",o),e[3]=o,e[4]=a):a=e[4];let s;return e[5]!==r||e[6]!==a?(s=(0,n.jsx)(ce.Title,{"data-slot":"sheet-title",className:a,...r}),e[5]=r,e[6]=a,e[7]=s):s=e[7],s}i(Di,"na");function Mi(t){let e=(0,M.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let a;e[3]!==o?(a=Z("text-xs/relaxed text-muted-foreground",o),e[3]=o,e[4]=a):a=e[4];let s;return e[5]!==r||e[6]!==a?(s=(0,n.jsx)(ce.Description,{"data-slot":"sheet-description",className:a,...r}),e[5]=r,e[6]=a,e[7]=s):s=e[7],s}i(Mi,"ia");var Ii="sidebar_state",_i=3600*24*7,Ai="16rem",Vi="18rem",Li="3rem",Hi="b",qs=ye.createContext(null);function hr(){let t=ye.useContext(qs);if(!t)throw new yr("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}i(hr,"Mt");function Bi({defaultOpen:t=!0,open:e,onOpenChange:o,className:r,style:a,children:s,...l}){let c=Ni(),[p,d]=ye.useState(!1),[u,g]=ye.useState(t),b=e??u,f=i(v=>{let P=typeof v=="function"?v(b):v;o?o(P):g(P),document.cookie=`${Ii}=${P}; path=/; max-age=${_i}`},"u"),m=i(()=>c?d(v=>!v):f(v=>!v),"g"),x=ye.useEffectEvent(()=>{m()});ye.useEffect(()=>{let v=i(P=>{P.key===Hi&&(P.metaKey||P.ctrlKey)&&(P.preventDefault(),x())},"p");return globalThis.addEventListener("keydown",v),()=>globalThis.removeEventListener("keydown",v)},[]);let h={state:b?"expanded":"collapsed",open:b,setOpen:f,isMobile:c,openMobile:p,setOpenMobile:d,toggleSidebar:m};return(0,n.jsx)(qs.Provider,{value:h,children:(0,n.jsx)("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Ai,"--sidebar-width-icon":Li,...a},className:Z("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),...l,children:s})})}i(Bi,"ha");function Fi({side:t="left",variant:e="sidebar",collapsible:o="offcanvas",className:r,children:a,dir:s,...l}){let{isMobile:c,state:p,openMobile:d,setOpenMobile:u}=hr();return o==="none"?(0,n.jsx)("div",{"data-slot":"sidebar",className:Z("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...l,children:a}):c?(0,n.jsx)(Ti,{open:d,onOpenChange:u,...l,children:(0,n.jsxs)(ki,{dir:s,"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":Vi},side:t,children:[(0,n.jsxs)(Oi,{className:"sr-only",children:[(0,n.jsx)(Di,{children:"Sidebar"}),(0,n.jsx)(Mi,{children:"Displays the mobile sidebar."})]}),(0,n.jsx)("div",{className:"flex h-full w-full flex-col",children:a})]})}):(0,n.jsxs)("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,n.jsx)("div",{"data-slot":"sidebar-gap",className:Z("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)")}),(0,n.jsx)("div",{"data-slot":"sidebar-container","data-side":t,className:Z("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",r),...l,children:(0,n.jsx)("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:a})})]})}i(Fi,"pa");function ji(t){let e=(0,M.c)(15),o,r,a;e[0]!==t?({className:o,onClick:r,...a}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=a):(o=e[1],r=e[2],a=e[3]);let{toggleSidebar:s}=hr(),l;e[4]!==o?(l=Z(o),e[4]=o,e[5]=l):l=e[5];let c;e[6]!==r||e[7]!==s?(c=i(g=>{r?.(g),s()},"l"),e[6]=r,e[7]=s,e[8]=c):c=e[8];let p,d;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=(0,n.jsx)(Tr,{icon:Ua,strokeWidth:2,className:"rtl:rotate-180"}),d=(0,n.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=p,e[10]=d):(p=e[9],d=e[10]);let u;return e[11]!==a||e[12]!==l||e[13]!==c?(u=(0,n.jsxs)(wr,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:l,onClick:c,...a,children:[p,d]}),e[11]=a,e[12]=l,e[13]=c,e[14]=u):u=e[14],u}i(ji,"ga");function zi(t){let e=(0,M.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let a;e[3]!==o?(a=Z("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]=a):a=e[4];let s;return e[5]!==r||e[6]!==a?(s=(0,n.jsx)("main",{"data-slot":"sidebar-inset",className:a,...r}),e[5]=r,e[6]=a,e[7]=s):s=e[7],s}i(zi,"ba");function Ki(t){let e=(0,M.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let a;e[3]!==o?(a=Z("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=a):a=e[4];let s;return e[5]!==r||e[6]!==a?(s=(0,n.jsx)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...r}),e[5]=r,e[6]=a,e[7]=s):s=e[7],s}i(Ki,"va");function Ui(t){let e=(0,M.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let a;e[3]!==o?(a=Z("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=a):a=e[4];let s;return e[5]!==r||e[6]!==a?(s=(0,n.jsx)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...r}),e[5]=r,e[6]=a,e[7]=s):s=e[7],s}i(Ui,"xa");function Zi(t){let e=(0,M.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let a;e[3]!==o?(a=Z("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]=a):a=e[4];let s;return e[5]!==r||e[6]!==a?(s=(0,n.jsx)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...r}),e[5]=r,e[6]=a,e[7]=s):s=e[7],s}i(Zi,"ya");function qi(t){let e=(0,M.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let a;e[3]!==o?(a=Z("relative flex w-full min-w-0 flex-col p-2",o),e[3]=o,e[4]=a):a=e[4];let s;return e[5]!==r||e[6]!==a?(s=(0,n.jsx)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...r}),e[5]=r,e[6]=a,e[7]=s):s=e[7],s}i(qi,"wa");function Wi(t){let e=(0,M.c)(10),o,r,a,s;if(e[0]!==t){let{className:p,render:d,...u}=t;o=d,s=Rr,r="div",a=co({className:Z("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]=r,e[3]=a,e[4]=s}else o=e[1],r=e[2],a=e[3],s=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]!==r||e[8]!==a?(c={defaultTagName:r,props:a,render:o,state:l},e[6]=o,e[7]=r,e[8]=a,e[9]=c):c=e[9],s(c)}i(Wi,"ka");function $i(t){let e=(0,M.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let a;e[3]!==o?(a=Z("w-full text-xs",o),e[3]=o,e[4]=a):a=e[4];let s;return e[5]!==r||e[6]!==a?(s=(0,n.jsx)("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...r}),e[5]=r,e[6]=a,e[7]=s):s=e[7],s}i($i,"Ma");function _s(t){let e=(0,M.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let a;e[3]!==o?(a=Z("flex w-full min-w-0 flex-col gap-0",o),e[3]=o,e[4]=a):a=e[4];let s;return e[5]!==r||e[6]!==a?(s=(0,n.jsx)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...r}),e[5]=r,e[6]=a,e[7]=s):s=e[7],s}i(_s,"Bt");function As(t){let e=(0,M.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let a;e[3]!==o?(a=Z("group/menu-item relative",o),e[3]=o,e[4]=a):a=e[4];let s;return e[5]!==r||e[6]!==a?(s=(0,n.jsx)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...r}),e[5]=r,e[6]=a,e[7]=s):s=e[7],s}i(As,"zt");var Gi=ga("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 Ws({render:t,isActive:e=!1,variant:o="default",size:r="default",tooltip:a,className:s,...l}){let{isMobile:c,state:p}=hr(),d=Rr({defaultTagName:"button",props:co({className:Z(Gi({variant:o,size:r}),s)},l),render:a?(0,n.jsx)(bi,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:r,active:e}});return a?(typeof a=="string"&&(a={children:a}),(0,n.jsxs)(vi,{children:[d,(0,n.jsx)(xi,{side:"right",align:"center",hidden:p!=="collapsed"||c,...a})]})):d}i(Ws,"ns");var Qi=i(t=>t.replace("__lunora_admin__:",""),"Sa"),Yi=i(()=>(0,E.useSyncExternalStore)(lo.subscribe,lo.getSnapshot,lo.getSnapshot),"Ca"),Ji=i(t=>t==="error"?"destructive":t==="pending"?"secondary":"default","Pa"),Xi=i(t=>{let e=(0,M.c)(56),{entry:o,focused:r}=t,a=be(),s;e[0]!==r?(s=i(L=>{L!==null&&r&&L.scrollIntoView({block:"nearest"})},"n"),e[0]=r,e[1]=s):s=e[1];let l=s,c;e[2]!==o.functionPath||e[3]!==o.shardKey||e[4]!==o.summary?(c=i(()=>{sa(`${o.functionPath} ${o.summary}${o.shardKey===""?"":` (shard ${o.shardKey})`}`)},"l"),e[2]=o.functionPath,e[3]=o.shardKey,e[4]=o.summary,e[5]=c):c=e[5];let p=c,d=r&&"bg-accent ring-1 ring-inset ring-primary/40",u;e[6]!==d?(u=Z("border-b border-border/60 last:border-b-0",d),e[6]=d,e[7]=u):u=e[7];let g;e[8]!==o.status?(g=Ji(o.status),e[8]=o.status,e[9]=g):g=e[9];let b=o.status==="pending"?"\u2026":o.status,f;e[10]!==g||e[11]!==b?(f=(0,n.jsx)(Lt,{className:"mt-px shrink-0",variant:g,children:b}),e[10]=g,e[11]=b,e[12]=f):f=e[12];let m;e[13]!==o.functionPath?(m=Qi(o.functionPath),e[13]=o.functionPath,e[14]=m):m=e[14];let x;e[15]!==m?(x=(0,n.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-foreground",children:m}),e[15]=m,e[16]=x):x=e[16];let h;e[17]!==o.kind||e[18]!==a?(h=o.kind==="subscription"&&(0,n.jsx)(Lt,{className:"shrink-0",variant:"outline",children:a("live")}),e[17]=o.kind,e[18]=a,e[19]=h):h=e[19];let v;e[20]!==o.summary?(v=o.summary!==""&&(0,n.jsx)("span",{className:"min-w-0 truncate text-muted-foreground",children:o.summary}),e[20]=o.summary,e[21]=v):v=e[21];let P;e[22]!==o.shardKey?(P=o.shardKey!==""&&(0,n.jsx)("span",{className:"font-mono",children:o.shardKey}),e[22]=o.shardKey,e[23]=P):P=e[23];let y;e[24]!==o.resultCount||e[25]!==a?(y=o.resultCount!==void 0&&(0,n.jsx)("span",{children:a("{count} rows",{count:o.resultCount})}),e[24]=o.resultCount,e[25]=a,e[26]=y):y=e[26];let R;e[27]!==o.pushes||e[28]!==a?(R=o.pushes!==void 0&&o.pushes>0&&(0,n.jsx)("span",{children:a("{count} pushes",{count:o.pushes})}),e[27]=o.pushes,e[28]=a,e[29]=R):R=e[29];let C;e[30]!==o.durationMs?(C=o.durationMs!==void 0&&(0,n.jsxs)("span",{children:[o.durationMs,"ms"]}),e[30]=o.durationMs,e[31]=C):C=e[31];let k;e[32]!==a?(k=a("Copy"),e[32]=a,e[33]=k):k=e[33];let S;e[34]!==p||e[35]!==k?(S=(0,n.jsx)("button",{"aria-label":k,className:"rounded px-1 outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-copy",onClick:p,type:"button",children:"\u29C9"}),e[34]=p,e[35]=k,e[36]=S):S=e[36];let N;e[37]!==P||e[38]!==y||e[39]!==R||e[40]!==C||e[41]!==S?(N=(0,n.jsxs)("span",{className:"ms-auto flex shrink-0 items-center gap-2 text-[11px] text-muted-foreground",children:[P,y,R,C,S]}),e[37]=P,e[38]=y,e[39]=R,e[40]=C,e[41]=S,e[42]=N):N=e[42];let w;e[43]!==h||e[44]!==v||e[45]!==N||e[46]!==f||e[47]!==x?(w=(0,n.jsxs)("div",{className:"flex items-start gap-2 px-3 py-1.5 text-xs",children:[f,x,h,v,N]}),e[43]=h,e[44]=v,e[45]=N,e[46]=f,e[47]=x,e[48]=w):w=e[48];let O;e[49]!==o.error?(O=o.error!==void 0&&(0,n.jsx)("p",{className:"px-3 pb-1.5 font-mono text-[11px] text-destructive","data-testid":"oc-error",children:o.error}),e[49]=o.error,e[50]=O):O=e[50];let I;return e[51]!==l||e[52]!==w||e[53]!==O||e[54]!==u?(I=(0,n.jsxs)("li",{className:u,"data-testid":"oc-row",ref:l,children:[w,O]}),e[51]=l,e[52]=w,e[53]=O,e[54]=u,e[55]=I):I=e[55],I},"_a"),el=i(t=>{let e=(0,M.c)(62),{focusSeq:o,onClose:r,onShownChange:a,shown:s}=t,l=be(),c=Yi(),[p,d]=(0,E.useState)(""),u;if(e[0]!==c||e[1]!==o||e[2]!==p||e[3]!==r||e[4]!==a||e[5]!==s||e[6]!==l){let g=p.trim().toLowerCase(),b=c.filter(A=>(s==="errors"?A.status==="error":!0)&&(g===""||`${A.functionPath} ${A.summary} ${A.shardKey}`.toLowerCase().includes(g))).toReversed(),f;e[8]!==c?(f=c.filter(tl),e[8]=c,e[9]=f):f=e[9];let m=f.length,x;e[10]!==l?(x=l("Operation console"),e[10]=l,e[11]=x):x=e[11];let h;e[12]!==l?(h=l("Operation console"),e[12]=l,e[13]=h):h=e[13];let v;e[14]!==h?(v=(0,n.jsx)("span",{className:"text-xs font-medium",children:h}),e[14]=h,e[15]=v):v=e[15];let P;e[16]!==c.length||e[17]!==l?(P=l("{count} calls",{count:c.length}),e[16]=c.length,e[17]=l,e[18]=P):P=e[18];let y;e[19]!==P?(y=(0,n.jsx)(Lt,{variant:"secondary",children:P}),e[19]=P,e[20]=y):y=e[20];let R;e[21]!==m||e[22]!==l?(R=m>0&&(0,n.jsx)(Lt,{variant:"destructive",children:l("{count} failed",{count:m})}),e[21]=m,e[22]=l,e[23]=R):R=e[23];let C=s==="errors",k=s==="errors"&&"bg-accent",S;e[24]!==k?(S=Z("rounded px-2 py-0.5 text-xs outline-none hover:bg-accent focus-visible:bg-accent",k),e[24]=k,e[25]=S):S=e[25];let N;e[26]!==a||e[27]!==s?(N=i(()=>{a(s==="errors"?"all":"errors")},"N"),e[26]=a,e[27]=s,e[28]=N):N=e[28];let w;e[29]!==l?(w=l("Errors"),e[29]=l,e[30]=w):w=e[30];let O;e[31]!==S||e[32]!==N||e[33]!==w||e[34]!==C?(O=(0,n.jsx)("button",{"aria-pressed":C,className:S,"data-testid":"oc-filter-errors",onClick:N,type:"button",children:w}),e[31]=S,e[32]=N,e[33]=w,e[34]=C,e[35]=O):O=e[35];let I;e[36]!==l?(I=l("Filter"),e[36]=l,e[37]=I):I=e[37];let L;e[38]===Symbol.for("react.memo_cache_sentinel")?(L=i(A=>{d(A.target.value)},"V"),e[38]=L):L=e[38];let V;e[39]!==l?(V=l("Filter"),e[39]=l,e[40]=V):V=e[40];let H;e[41]!==p||e[42]!==I||e[43]!==V?(H=(0,n.jsx)(Sr,{"aria-label":I,className:"h-7 w-40 text-xs","data-testid":"oc-search",onChange:L,placeholder:V,value:p}),e[41]=p,e[42]=I,e[43]=V,e[44]=H):H=e[44];let q;e[45]!==l?(q=l("Clear"),e[45]=l,e[46]=q):q=e[46];let F;e[47]!==q?(F=(0,n.jsx)("button",{className:"ms-auto rounded px-2 py-0.5 text-xs text-muted-foreground outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-clear",onClick:ol,type:"button",children:q}),e[47]=q,e[48]=F):F=e[48];let K;e[49]!==l?(K=l("Hide"),e[49]=l,e[50]=K):K=e[50];let j;e[51]!==r||e[52]!==K?(j=(0,n.jsx)("button",{"aria-label":K,className:"rounded px-2 py-0.5 text-xs text-muted-foreground outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-close",onClick:r,type:"button",children:"\u2715"}),e[51]=r,e[52]=K,e[53]=j):j=e[53];let D;e[54]!==O||e[55]!==H||e[56]!==F||e[57]!==j||e[58]!==v||e[59]!==y||e[60]!==R?(D=(0,n.jsxs)("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-1.5",children:[v,y,R,O,H,F,j]}),e[54]=O,e[55]=H,e[56]=F,e[57]=j,e[58]=v,e[59]=y,e[60]=R,e[61]=D):D=e[61],u=(0,n.jsxs)("section",{"aria-label":x,className:"flex max-h-80 flex-col border-t border-border bg-card","data-testid":"lunora-operation-console",children:[D,b.length===0?(0,n.jsx)("p",{className:"p-3 text-xs text-muted-foreground","data-testid":"oc-empty",children:l("Every admin call this studio makes is recorded here.")}):(0,n.jsx)("ul",{className:"min-h-0 flex-1 overflow-y-auto","data-testid":"oc-rows",children:b.map(A=>(0,n.jsx)(Xi,{entry:A,focused:A.seq===o},A.seq))})]}),e[0]=c,e[1]=o,e[2]=p,e[3]=r,e[4]=a,e[5]=s,e[6]=l,e[7]=u}else u=e[7];return u},"Ta");function tl(t){return t.status==="error"}i(tl,"Aa");function ol(){lo.clear()}i(ol,"Ra");var rl=i(()=>{let t=(0,M.c)(334),e=be(),o;t[0]!==e?(o=e("Health score"),t[0]=e,t[1]=o):o=t[1];let r;t[2]!==e?(r=e("Agents"),t[2]=e,t[3]=r):r=t[3];let a;t[4]!==e?(a=e("Evals"),t[4]=e,t[5]=a):a=t[5];let s;t[6]!==e?(s=e("AI usage"),t[6]=e,t[7]=s):s=t[7];let l;t[8]!==e?(l=e("Analytics"),t[8]=e,t[9]=l):l=t[9];let c;t[10]!==e?(c=e("API"),t[10]=e,t[11]=c):c=t[11];let p;t[12]!==e?(p=e("Architecture"),t[12]=e,t[13]=p):p=t[13];let d;t[14]!==e?(d=e("Audit"),t[14]=e,t[15]=d):d=t[15];let u;t[16]!==e?(u=e("Auth audit"),t[16]=e,t[17]=u):u=t[17];let g;t[18]!==e?(g=e("Configuration"),t[18]=e,t[19]=g):g=t[19];let b;t[20]!==e?(b=e("Sessions"),t[20]=e,t[21]=b):b=t[21];let f;t[22]!==e?(f=e("Containers"),t[22]=e,t[23]=f):f=t[23];let m;t[24]!==e?(m=e("Dashboards"),t[24]=e,t[25]=m):m=t[25];let x;t[26]!==e?(x=e("Data"),t[26]=e,t[27]=x):x=t[27];let h;t[28]!==e?(h=e("Deployment health"),t[28]=e,t[29]=h):h=t[29];let v;t[30]!==e?(v=e("Log drains"),t[30]=e,t[31]=v):v=t[31];let P;t[32]!==e?(P=e("Export / Import"),t[32]=e,t[33]=P):P=t[33];let y;t[34]!==e?(y=e("Fan-out"),t[34]=e,t[35]=y):y=t[35];let R;t[36]!==e?(R=e("Files"),t[36]=e,t[37]=R):R=t[37];let C;t[38]!==e?(C=e("Flags"),t[38]=e,t[39]=C):C=t[39];let k;t[40]!==e?(k=e("Functions"),t[40]=e,t[41]=k):k=t[41];let S;t[42]!==e?(S=e("Health"),t[42]=e,t[43]=S):S=t[43];let N;t[44]!==e?(N=e("Home"),t[44]=e,t[45]=N):N=t[45];let w;t[46]!==e?(w=e("Performance"),t[46]=e,t[47]=w):w=t[47];let O;t[48]!==e?(O=e("Issues"),t[48]=e,t[49]=O):O=t[49];let I;t[50]!==e?(I=e("KV"),t[50]=e,t[51]=I):I=t[51];let L;t[52]!==e?(L=e("Logs"),t[52]=e,t[53]=L):L=t[53];let V;t[54]!==e?(V=e("Metrics"),t[54]=e,t[55]=V):V=t[55];let H;t[56]!==e?(H=e("Migrations"),t[56]=e,t[57]=H):H=t[57];let q;t[58]!==e?(q=e("Notifications"),t[58]=e,t[59]=q):q=t[59];let F;t[60]!==e?(F=e("Organizations"),t[60]=e,t[61]=F):F=t[61];let K;t[62]!==e?(K=e("Time Travel"),t[62]=e,t[63]=K):K=t[63];let j;t[64]!==e?(j=e("Privacy requests"),t[64]=e,t[65]=j):j=t[65];let D;t[66]!==e?(D=e("Mail"),t[66]=e,t[67]=D):D=t[67];let A;t[68]!==e?(A=e("Payments"),t[68]=e,t[69]=A):A=t[69];let W;t[70]!==e?(W=e("Permissions"),t[70]=e,t[71]=W):W=t[71];let $;t[72]!==e?($=e("Queues"),t[72]=e,t[73]=$):$=t[73];let te;t[74]!==e?(te=e("Reactors"),t[74]=e,t[75]=te):te=t[75];let le;t[76]!==e?(le=e("Realtime"),t[76]=e,t[77]=le):le=t[77];let Y;t[78]!==e?(Y=e("RLS Policies"),t[78]=e,t[79]=Y):Y=t[79];let oe;t[80]!==e?(oe=e("Scheduled"),t[80]=e,t[81]=oe):oe=t[81];let ee;t[82]!==e?(ee=e("Schema"),t[82]=e,t[83]=ee):ee=t[83];let de;t[84]!==e?(de=e("Security"),t[84]=e,t[85]=de):de=t[85];let pe;t[86]!==e?(pe=e("Settings"),t[86]=e,t[87]=pe):pe=t[87];let ue;t[88]!==e?(ue=e("SQL editor"),t[88]=e,t[89]=ue):ue=t[89];let me;t[90]!==e?(me=e("Traces"),t[90]=e,t[91]=me):me=t[91];let fe;t[92]!==e?(fe=e("Access Rules"),t[92]=e,t[93]=fe):fe=t[93];let U;t[94]!==e?(U=e("Users"),t[94]=e,t[95]=U):U=t[95];let G;t[96]!==e?(G=e("Vectors"),t[96]=e,t[97]=G):G=t[97];let re;t[98]!==e?(re=e("Workflows"),t[98]=e,t[99]=re):re=t[99];let ge;t[100]!==o||t[101]!==r||t[102]!==b||t[103]!==f||t[104]!==m||t[105]!==x||t[106]!==h||t[107]!==v||t[108]!==P||t[109]!==y||t[110]!==R||t[111]!==C||t[112]!==a||t[113]!==k||t[114]!==S||t[115]!==N||t[116]!==w||t[117]!==O||t[118]!==I||t[119]!==L||t[120]!==V||t[121]!==H||t[122]!==q||t[123]!==s||t[124]!==F||t[125]!==K||t[126]!==j||t[127]!==D||t[128]!==A||t[129]!==W||t[130]!==$||t[131]!==te||t[132]!==le||t[133]!==Y||t[134]!==l||t[135]!==oe||t[136]!==ee||t[137]!==de||t[138]!==pe||t[139]!==ue||t[140]!==me||t[141]!==fe||t[142]!==U||t[143]!==G||t[144]!==re||t[145]!==c||t[146]!==p||t[147]!==d||t[148]!==u||t[149]!==g?(ge={advisorHealth:o,agents:r,evals:a,aiUsage:s,analytics:l,api:c,architecture:p,audit:d,authAudit:u,authConfig:g,authSessions:b,containers:f,dashboards:m,data:x,deploymentHealth:h,drains:v,export:P,fanout:y,files:R,flags:C,functions:k,health:S,home:N,insights:w,issues:O,kv:I,logs:L,metrics:V,migrations:H,notifications:q,organizations:F,pitr:K,privacyRequests:j,mail:D,payments:A,permissions:W,queues:$,reactors:te,realtime:le,rls:Y,schedule:oe,schema:ee,security:de,settings:pe,sql:ue,traces:me,storageRules:fe,users:U,vectors:G,workflows:re},t[100]=o,t[101]=r,t[102]=b,t[103]=f,t[104]=m,t[105]=x,t[106]=h,t[107]=v,t[108]=P,t[109]=y,t[110]=R,t[111]=C,t[112]=a,t[113]=k,t[114]=S,t[115]=N,t[116]=w,t[117]=O,t[118]=I,t[119]=L,t[120]=V,t[121]=H,t[122]=q,t[123]=s,t[124]=F,t[125]=K,t[126]=j,t[127]=D,t[128]=A,t[129]=W,t[130]=$,t[131]=te,t[132]=le,t[133]=Y,t[134]=l,t[135]=oe,t[136]=ee,t[137]=de,t[138]=pe,t[139]=ue,t[140]=me,t[141]=fe,t[142]=U,t[143]=G,t[144]=re,t[145]=c,t[146]=p,t[147]=d,t[148]=u,t[149]=g,t[150]=ge):ge=t[150];let ve=ge,we;t[151]!==e?(we=e("Advisors"),t[151]=e,t[152]=we):we=t[152];let Re;t[153]!==e?(Re=e("Auth"),t[153]=e,t[154]=Re):Re=t[154];let Se;t[155]!==e?(Se=e("Database"),t[155]=e,t[156]=Se):Se=t[156];let _e;t[157]!==e?(_e=e("Functions"),t[157]=e,t[158]=_e):_e=t[158];let Ae;t[159]!==e?(Ae=e("Observability"),t[159]=e,t[160]=Ae):Ae=t[160];let Ve;t[161]!==e?(Ve=e("Operations"),t[161]=e,t[162]=Ve):Ve=t[162];let Le;t[163]!==e?(Le=e("Overview"),t[163]=e,t[164]=Le):Le=t[164];let He;t[165]!==e?(He=e("Settings"),t[165]=e,t[166]=He):He=t[166];let Be;t[167]!==e?(Be=e("Storage"),t[167]=e,t[168]=Be):Be=t[168];let Ro;t[169]!==we||t[170]!==Re||t[171]!==Se||t[172]!==_e||t[173]!==Ae||t[174]!==Ve||t[175]!==Le||t[176]!==He||t[177]!==Be?(Ro={advisors:we,auth:Re,database:Se,functions:_e,observability:Ae,operations:Ve,overview:Le,settings:He,storage:Be},t[169]=we,t[170]=Re,t[171]=Se,t[172]=_e,t[173]=Ae,t[174]=Ve,t[175]=Le,t[176]=He,t[177]=Be,t[178]=Ro):Ro=t[178];let vr=Ro,Fe;t[179]!==e?(Fe=e("Score your app's advisor findings: a grade, the coverage split, and every procedure ranked worst-first."),t[179]=e,t[180]=Fe):Fe=t[180];let je;t[181]!==e?(je=e("Inspect agent threads, message timelines, tool calls, and token usage."),t[181]=e,t[182]=je):je=t[182];let ze;t[183]!==e?(ze=e("Scores recorded by recordEvaluation \u2014 the latest verdict per eval, its trend, and the graded runs behind it."),t[183]=e,t[184]=ze):ze=t[184];let Ke;t[185]!==e?(Ke=e("Tokens and spend from ctx.ai.model calls \u2014 totals, per function and per model, and the recent calls behind them."),t[185]=e,t[186]=Ke):Ke=t[186];let Ue;t[187]!==e?(Ue=e("Usage and latency from Analytics Engine \u2014 request volume, p50/p95, and hot shards."),t[187]=e,t[188]=Ue):Ue=t[188];let Ze;t[189]!==e?(Ze=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[189]=e,t[190]=Ze):Ze=t[190];let qe;t[191]!==e?(qe=e("A durable log of admin state-changing operations."),t[191]=e,t[192]=qe):qe=t[192];let We;t[193]!==e?(We=e("Authentication and security events \u2014 sign-ins, MFA, and session changes."),t[193]=e,t[194]=We):We=t[194];let $e;t[195]!==e?($e=e("Enabled plugins and session config (read-only)."),t[195]=e,t[196]=$e):$e=t[196];let Ge;t[197]!==e?(Ge=e("Your modules, and the calls, reads, writes and hand-offs between them, from codegen."),t[197]=e,t[198]=Ge):Ge=t[198];let Qe;t[199]!==e?(Qe=e("Browse and revoke active sessions across all users."),t[199]=e,t[200]=Qe):Qe=t[200];let Ye;t[201]!==e?(Ye=e("Live Cloudflare Containers \u2014 current lifecycle state per instance from the log stream."),t[201]=e,t[202]=Ye):Ye=t[202];let Je;t[203]!==e?(Je=e("Chart widgets backed by saved read-only SQL queries."),t[203]=e,t[204]=Je):Je=t[204];let Xe;t[205]!==e?(Xe=e("Browse and edit rows across your shard and global tables."),t[205]=e,t[206]=Xe):Xe=t[206];let et;t[207]!==e?(et=e("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint."),t[207]=e,t[208]=et):et=t[208];let tt;t[209]!==e?(tt=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[209]=e,t[210]=tt):tt=t[210];let ot;t[211]!==e?(ot=e("Export a shard to NDJSON, or import rows from it."),t[211]=e,t[212]=ot):ot=t[212];let rt;t[213]!==e?(rt=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[213]=e,t[214]=rt):rt=t[214];let at;t[215]!==e?(at=e("Browse objects in your R2 storage buckets."),t[215]=e,t[216]=at):at=t[216];let nt;t[217]!==e?(nt=e("Inspect feature flags and their live evaluation under a targeting context."),t[217]=e,t[218]=nt):nt=t[218];let st;t[219]!==e?(st=e("Run registered queries, mutations, and actions."),t[219]=e,t[220]=st):st=t[220];let it;t[221]!==e?(it=e("At-a-glance connection, error, and shard signals."),t[221]=e,t[222]=it):it=t[222];let lt;t[223]!==e?(lt=e("Connection, health, and advisor summary for your deployment."),t[223]=e,t[224]=lt):lt=t[224];let ct;t[225]!==e?(ct=e("Surface slow functions, error spikes, and cache problems."),t[225]=e,t[226]=ct):ct=t[226];let dt;t[227]!==e?(dt=e("Grouped error triage \u2014 Worker throws and container crashes folded by fingerprint."),t[227]=e,t[228]=dt):dt=t[228];let pt;t[229]!==e?(pt=e("A live stream of recent function logs."),t[229]=e,t[230]=pt):pt=t[230];let ut;t[231]!==e?(ut=e("Per-shard health and aggregate metrics."),t[231]=e,t[232]=ut):ut=t[232];let mt;t[233]!==e?(mt=e("Review migration status and run them."),t[233]=e,t[234]=mt):mt=t[234];let ft;t[235]!==e?(ft=e("Registered push devices \u2014 endpoint, kind, last-send status, and delivery errors."),t[235]=e,t[236]=ft):ft=t[236];let gt;t[237]!==e?(gt=e("Browse and manage organizations, members, and invitations."),t[237]=e,t[238]=gt):gt=t[238];let ht;t[239]!==e?(ht=e("Restore a shard to a point in the last 30 days."),t[239]=e,t[240]=ht):ht=t[240];let vt;t[241]!==e?(vt=e("Open data-subject export and erasure requests, with due dates and failed-run retries."),t[241]=e,t[242]=vt):vt=t[242];let bt;t[243]!==e?(bt=e("Email your app sent, captured in dev."),t[243]=e,t[244]=bt):bt=t[244];let xt;t[245]!==e?(xt=e("Synced customers, subscriptions, and webhook events."),t[245]=e,t[246]=xt):xt=t[246];let yt;t[247]!==e?(yt=e("Inspect access policies per table, and probe a function as any identity."),t[247]=e,t[248]=yt):yt=t[248];let Pt;t[249]!==e?(Pt=e("Inspect declared Cloudflare Queues \u2014 their producer bindings, consumer mode, and dead-letter queue."),t[249]=e,t[250]=Pt):Pt=t[250];let Ct;t[251]!==e?(Ct=e("Server-side onQueryChange reactors: what has run, what was suppressed, and what is failing."),t[251]=e,t[252]=Ct):Ct=t[252];let Rt;t[253]!==e?(Rt=e("Active WebSocket subscriptions on this shard."),t[253]=e,t[254]=Rt):Rt=t[254];let St;t[255]!==e?(St=e("Inspect row-level-security policies and roles, per table."),t[255]=e,t[256]=St):St=t[256];let Nt;t[257]!==e?(Nt=e("Inspect and cancel scheduled jobs."),t[257]=e,t[258]=Nt):Nt=t[258];let Tt;t[259]!==e?(Tt=e("Inspect each table and its columns."),t[259]=e,t[260]=Tt):Tt=t[260];let wt;t[261]!==e?(wt=e("Review admin gates, credentials, and log redaction."),t[261]=e,t[262]=wt):wt=t[262];let Et;t[263]!==e?(Et=e("Read-only deployment config \u2014 vars, secrets, and bindings."),t[263]=e,t[264]=Et):Et=t[264];let kt;t[265]!==e?(kt=e("Run read-only SQL against a shard."),t[265]=e,t[266]=kt):kt=t[266];let Ot;t[267]!==e?(Ot=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[267]=e,t[268]=Ot):Ot=t[268];let Dt;t[269]!==e?(Dt=e("Inspect storage access rules \u2014 per bucket, operation, and key prefix."),t[269]=e,t[270]=Dt):Dt=t[270];let Mt;t[271]!==e?(Mt=e("Recent ctx.trace waterfalls for this shard \u2014 the drill-down from a log line."),t[271]=e,t[272]=Mt):Mt=t[272];let It;t[273]!==e?(It=e("Manage auth users \u2014 roles, bans, sessions, and identity."),t[273]=e,t[274]=It):It=t[274];let _t;t[275]!==e?(_t=e("Browse Vectorize indexes and run similarity searches."),t[275]=e,t[276]=_t):_t=t[276];let At;t[277]!==e?(At=e("Inspect declared Cloudflare Workflows and their bindings."),t[277]=e,t[278]=At):At=t[278];let So;t[279]!==Nt||t[280]!==Tt||t[281]!==wt||t[282]!==Et||t[283]!==kt||t[284]!==Ot||t[285]!==Dt||t[286]!==Mt||t[287]!==It||t[288]!==_t||t[289]!==At||t[290]!==Fe||t[291]!==je||t[292]!==ze||t[293]!==Ke||t[294]!==Ue||t[295]!==Ze||t[296]!==qe||t[297]!==We||t[298]!==$e||t[299]!==Ge||t[300]!==Qe||t[301]!==Ye||t[302]!==Je||t[303]!==Xe||t[304]!==et||t[305]!==tt||t[306]!==ot||t[307]!==rt||t[308]!==at||t[309]!==nt||t[310]!==st||t[311]!==it||t[312]!==lt||t[313]!==ct||t[314]!==dt||t[315]!==pt||t[316]!==ut||t[317]!==mt||t[318]!==ft||t[319]!==gt||t[320]!==ht||t[321]!==vt||t[322]!==bt||t[323]!==xt||t[324]!==yt||t[325]!==Pt||t[326]!==Ct||t[327]!==Rt||t[328]!==St?(So={advisorHealth:Fe,agents:je,evals:ze,aiUsage:Ke,analytics:Ue,api:Ze,audit:qe,authAudit:We,authConfig:$e,architecture:Ge,authSessions:Qe,containers:Ye,dashboards:Je,data:Xe,deploymentHealth:et,drains:tt,export:ot,fanout:rt,files:at,flags:nt,functions:st,health:it,home:lt,insights:ct,issues:dt,logs:pt,metrics:ut,migrations:mt,notifications:ft,organizations:gt,pitr:ht,privacyRequests:vt,mail:bt,payments:xt,permissions:yt,queues:Pt,reactors:Ct,realtime:Rt,rls:St,schedule:Nt,schema:Tt,security:wt,settings:Et,sql:kt,kv:Ot,storageRules:Dt,traces:Mt,users:It,vectors:_t,workflows:At},t[279]=Nt,t[280]=Tt,t[281]=wt,t[282]=Et,t[283]=kt,t[284]=Ot,t[285]=Dt,t[286]=Mt,t[287]=It,t[288]=_t,t[289]=At,t[290]=Fe,t[291]=je,t[292]=ze,t[293]=Ke,t[294]=Ue,t[295]=Ze,t[296]=qe,t[297]=We,t[298]=$e,t[299]=Ge,t[300]=Qe,t[301]=Ye,t[302]=Je,t[303]=Xe,t[304]=et,t[305]=tt,t[306]=ot,t[307]=rt,t[308]=at,t[309]=nt,t[310]=st,t[311]=it,t[312]=lt,t[313]=ct,t[314]=dt,t[315]=pt,t[316]=ut,t[317]=mt,t[318]=ft,t[319]=gt,t[320]=ht,t[321]=vt,t[322]=bt,t[323]=xt,t[324]=yt,t[325]=Pt,t[326]=Ct,t[327]=Rt,t[328]=St,t[329]=So):So=t[329];let br=So,No;return t[330]!==vr||t[331]!==br||t[332]!==ve?(No={groupLabel:vr,tabDescription:br,tabLabel:ve},t[330]=vr,t[331]=br,t[332]=ve,t[333]=No):No=t[333],No},"La"),al=i(()=>{let t=(0,M.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsxs)("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,n.jsx)("rect",{height:"14",rx:"2",width:"20",x:"2",y:"3"}),(0,n.jsx)("path",{d:"M8 21h8M12 17v4"})]}),t[0]=e):e=t[0],e},"Ia"),nl=i(()=>{let t=(0,M.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsxs)("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,n.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,n.jsx)("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"})]}),t[0]=e):e=t[0],e},"Ea"),sl=i(()=>{let t=(0,M.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)("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,n.jsx)("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"})}),t[0]=e):e=t[0],e},"$a"),il=i(t=>{let e=(0,M.c)(2),{className:o}=t,r;return e[0]!==o?(r=(0,n.jsx)("span",{className:o}),e[0]=o,e[1]=r):r=e[1],r},"Ha"),ll=(0,E.lazy)(()=>import("./chunk-2EB7FN5S.js").catch(()=>({default:il}))),Wr="absolute inset-0 rounded-md border border-muted-foreground/40 bg-background/40",cl=[{Icon:al,value:"system"},{Icon:nl,value:"light"},{Icon:sl,value:"dark"}],dl=i(()=>{let t=(0,M.c)(21),{theme:e,setTheme:o}=hi(),r=be(),[a,s]=(0,E.useState)(!1),l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=i(()=>{s(!0)},"i"),t[0]=l):l=t[0];let c=l,p;t[1]!==r?(p=r("Dark theme"),t[1]=r,t[2]=p):p=t[2];let d;t[3]!==r?(d=r("Light theme"),t[3]=r,t[4]=d):d=t[4];let u;t[5]!==r?(u=r("System theme"),t[5]=r,t[6]=u):u=t[6];let g;t[7]!==p||t[8]!==d||t[9]!==u?(g={dark:p,light:d,system:u},t[7]=p,t[8]=d,t[9]=u,t[10]=g):g=t[10];let b=g,f;t[11]!==r?(f=r("Theme"),t[11]=r,t[12]=f):f=t[12];let m;t[13]!==a||t[14]!==b||t[15]!==o||t[16]!==e?(m=cl.map(h=>{let{Icon:v,value:P}=h,y=e===P;return(0,n.jsxs)("button",{"aria-checked":y,"aria-label":b[P],className:Z("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",y?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${P}`,onClick:i(()=>{c(),o(P)},"onClick"),role:"radio",title:b[P],type:"button",children:[y&&(a?(0,n.jsx)(E.Suspense,{fallback:(0,n.jsx)("span",{className:Wr}),children:(0,n.jsx)(ll,{className:Wr})}):(0,n.jsx)("span",{className:Wr})),(0,n.jsx)("span",{className:"relative",children:(0,n.jsx)(v,{})})]},P)}),t[13]=a,t[14]=b,t[15]=o,t[16]=e,t[17]=m):m=t[17];let x;return t[18]!==f||t[19]!==m?(x=(0,n.jsx)("div",{"aria-label":f,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",onFocus:c,onPointerEnter:c,role:"radiogroup",children:m}),t[18]=f,t[19]=m,t[20]=x):x=t[20],x},"za"),pl=i(t=>{let e=(0,M.c)(23),{domain:o,onOpenCommandPalette:r,page:a}=t,s=be(),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,n.jsx)(ji,{className:"-ms-1"}),e[0]=l):l=e[0];let c;e[1]!==s?(c=s("Breadcrumb"),e[1]=s,e[2]=c):c=e[2];let p;e[3]!==o?(p=(0,n.jsx)("span",{className:"text-muted-foreground",children:o}),e[3]=o,e[4]=p):p=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=(0,n.jsx)("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,n.jsx)("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})}),e[5]=d):d=e[5];let u;e[6]!==a?(u=(0,n.jsx)("span",{className:"font-medium text-foreground",children:a}),e[6]=a,e[7]=u):u=e[7];let g;e[8]!==c||e[9]!==p||e[10]!==u?(g=(0,n.jsxs)("nav",{"aria-label":c,className:"flex items-center gap-1.5 text-[13px]",children:[p,d,u]}),e[8]=c,e[9]=p,e[10]=u,e[11]=g):g=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=(0,n.jsxs)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,n.jsx)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"})]}),e[12]=b):b=e[12];let f;e[13]!==s?(f=s("Search\u2026"),e[13]=s,e[14]=f):f=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=(0,n.jsx)("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"\u2318K"}),e[15]=m):m=e[15];let x;e[16]!==r||e[17]!==f?(x=(0,n.jsxs)("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:r,type:"button",children:[b,f,m]}),e[16]=r,e[17]=f,e[18]=x):x=e[18];let h;e[19]===Symbol.for("react.memo_cache_sentinel")?(h=(0,n.jsx)("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:(0,n.jsx)(dl,{})}),e[19]=h):h=e[19];let v;return e[20]!==x||e[21]!==g?(v=(0,n.jsxs)("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[l,g,x,h]}),e[20]=x,e[21]=g,e[22]=v):v=e[22],v},"Da"),ul={agents:{capability:"agents"},analytics:{capability:"analytics",feature:"analytics"},authAudit:{feature:"auth"},authConfig:{feature:"auth"},authSessions:{feature:"auth"},containers:{capability:"containers",feature:"containers"},fanout:{capability:"crossShardFanout"},files:{capability:"objectStorage",feature:"storage"},flags:{feature:"flags"},kv:{capability:"keyValueStore",feature:"kv"},mail:{capability:"mail",feature:"mail"},notifications:{feature:"notifications"},organizations:{feature:"auth"},payments:{feature:"payments"},pitr:{capability:"pointInTimeRecovery"},privacyRequests:{feature:"privacy"},queues:{capability:"queues",feature:"queues"},reactors:{capability:"serverReactors"},schedule:{capability:"scheduler",feature:"scheduler"},storageRules:{feature:"storage"},users:{feature:"auth"},vectors:{capability:"vectorStore",feature:"vectors"},workflows:{capability:"workflows",feature:"workflows"}},ml={agents:"Durable agents",analytics:"Analytics",containers:"Containers",crossShardFanout:"Cross-shard fan-out",keyValueStore:"Key-value storage",mail:"Mail delivery",objectStorage:"Object storage",pointInTimeRecovery:"Point-in-time recovery",queues:"Queues",scheduler:"Scheduling",serverReactors:"Server reactors",vectorStore:"Vector search",workflows:"Workflows"},fl={kind:"hidden"},Vs={kind:"ok"},gl={kind:"pending"},$s=i((t,e,o)=>{let r=ul[t];return r?.feature!==void 0&&!e[r.feature]?fl:r?.capability===void 0?Vs:e.settled?e.platform?.unsupported.includes(r.capability)===!0?{kind:"unavailable",reason:o("{capability} is not supported on {platform}.",{capability:o(ml[r.capability]),platform:e.platform.name})}:Vs:gl},"is"),hl=i((t,e,o)=>{let r={},a=[];for(let s of t){let l=[];for(let c of s.tabs){let p=$s(c,e,o);p.kind!=="hidden"&&l.push(c),p.kind==="unavailable"&&(r[c]=p.reason)}l.length>0&&a.push({...s,tabs:l})}return{unavailable:r,visibleGroups:a}},"Wa"),vl=i(t=>{let e=(0,M.c)(3),{reason:o,title:r}=t,a;return e[0]!==o||e[1]!==r?(a=(0,n.jsx)(Za,{description:o,testId:"dash-unsupported",title:r}),e[0]=o,e[1]=r,e[2]=a):a=e[2],a},"Ua"),bl=i(t=>{let e=(0,M.c)(4),{console:o}=$o(),r,a;e[0]!==o||e[1]!==t?(r=i(()=>{if(t===void 0)return;let s=i(l=>{if(!l.ctrlKey||l.metaKey||l.altKey||l.shiftKey||l.repeat||l.key.toLowerCase()!==o)return;let{target:c}=l;c instanceof HTMLElement&&(c.isContentEditable||["INPUT","SELECT","TEXTAREA"].includes(c.tagName))||(l.preventDefault(),t())},"n");return globalThis.addEventListener("keydown",s),()=>{globalThis.removeEventListener("keydown",s)}},"a"),a=[o,t],e[0]=o,e[1]=t,e[2]=r,e[3]=a):(r=e[2],a=e[3]),(0,E.useEffect)(r,a)},"ja"),Q=i((t,e)=>(0,E.lazy)(()=>t().then(o=>({default:o[e]}))),"I"),xl=Q(()=>import("./chunk-X54WR7FF.js"),"InsightsPanel"),yl=(0,E.lazy)(()=>import("./chunk-2FTGLXYA.js")),Pl=(0,E.lazy)(()=>import("./chunk-ALQHMFOC.js")),Cl=(0,E.lazy)(()=>import("./chunk-6KE7ILEZ.js")),Rl=(0,E.lazy)(()=>import("./chunk-YX2N5PJW.js")),Sl=(0,E.lazy)(()=>import("./chunk-UW6QNC74.js")),Nl=Q(()=>import("./chunk-AZIKM5BA.js"),"AnalyticsPanel"),Tl=(0,E.lazy)(()=>import("./chunk-LPFUEJZ4.js")),wl=(0,E.lazy)(()=>import("./chunk-ZSLKFLWE.js")),El=(0,E.lazy)(()=>import("./chunk-GVZ3VFGG.js")),kl=(0,E.lazy)(()=>import("./chunk-66LYVBXB.js")),Ol=(0,E.lazy)(()=>import("./chunk-5NIQHOPN.js")),Dl=(0,E.lazy)(()=>import("./chunk-N7WQJPOM.js")),Ml=Q(()=>import("./chunk-5EWIOOBI.js"),"UsersPanel"),Il=(0,E.lazy)(()=>import("./chunk-J6XQKD2F.js")),_l=Q(()=>import("./chunk-FQEZUQ36.js"),"DeploymentHealthPanel"),Al=Q(()=>import("./chunk-E2FFHKGI.js"),"TableEditor"),Vl=Q(()=>import("./chunk-QEFLZBT7.js"),"ExportImportPanel"),Ll=(0,E.lazy)(()=>import("./chunk-ABMHWBYA.js")),Hl={data:$a,migrations:Ga},Bl=Q(()=>import("./chunk-ZFQ253FX.js"),"PitrPanel"),Fl=Q(()=>import("./chunk-HCCQTUHS.js"),"PrivacyRequestsPanel"),jl=(0,E.lazy)(()=>import("./chunk-OPIMGKWU.js")),zl=(0,E.lazy)(()=>import("./chunk-NF2Q75WM.js")),Kl=Q(()=>import("./chunk-PAZKX7I6.js"),"FunctionRunner"),Ul=Q(()=>import("./chunk-IDZLHZIA.js"),"FunctionStatsPanel"),Zl=(0,E.lazy)(()=>import("./chunk-7WV3EPE6.js")),ql=Q(()=>import("./chunk-53CGUTRT.js"),"AuditPanel"),Wl=(0,E.lazy)(()=>import("./chunk-ZOKSVUID.js")),$l=(0,E.lazy)(()=>import("./chunk-OP4QEV27.js").then(t=>({default:t.LogsPanel}))),Gl=Q(()=>import("./chunk-Q2J73V2C.js"),"MailPanel"),Ql=Q(()=>import("./chunk-5O7ICPWV.js"),"SchedulePanel"),Yl=(0,E.lazy)(()=>import("./chunk-EXFERMUT.js")),Jl=(0,E.lazy)(()=>import("./chunk-Q2KL457J.js")),Xl=Q(()=>import("./chunk-VHPTPEZ4.js"),"KvBrowser"),ec=(0,E.lazy)(()=>import("./chunk-COLSZPCE.js")),tc=Q(()=>import("./chunk-ZG3IUVQ2.js"),"PaymentsPanel"),oc=Q(()=>import("./chunk-EE2COWFF.js"),"PermissionsPanel"),rc=(0,E.lazy)(()=>import("./chunk-BO5NNWMO.js")),ac=(0,E.lazy)(()=>import("./chunk-H7BQUL7D.js")),nc=(0,E.lazy)(()=>import("./chunk-ZKEYRU5C.js")),sc=Q(()=>import("./chunk-3RZD6VJ7.js"),"HealthPanel"),ic=Q(()=>import("./chunk-JCRFMCNP.js"),"MetricsPanel"),lc=Q(()=>import("./chunk-AEU3EF4T.js"),"SchemaViewer"),cc=Q(()=>import("./chunk-J6FR2B77.js"),"SettingsPanel"),dc=Q(()=>import("./chunk-WADY55J2.js"),"SqlEditorPanel"),pc=Q(()=>import("./chunk-L26RMC2W.js"),"FileBrowser"),uc=(0,E.lazy)(()=>import("./chunk-JENPPZFV.js")),mc=(0,E.lazy)(()=>import("./chunk-Z57KMMOK.js")),fc=(0,E.lazy)(()=>import("./chunk-XWWQIAF6.js")),gc=(0,E.lazy)(()=>import("./chunk-MQTI3STP.js")),hc=Q(()=>import("./chunk-JHTL3QHW.js"),"VectorBrowser"),vc=(0,E.lazy)(()=>import("./chunk-GC3GKGWD.js")),Gs=(0,E.createContext)(null),bc={analytics:(0,n.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),api:(0,n.jsx)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4M13 5l-2 14"}),architecture:(0,n.jsx)("path",{d:"M4 4h6v5H4V4Zm10 0h6v5h-6V4ZM9 15h6v5H9v-5ZM7 9v3h10V9M12 12v3"}),audit:(0,n.jsx)("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"}),authAudit:(0,n.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8h6m-6 3h6"}),authConfig:(0,n.jsx)("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"}),agents:(0,n.jsx)("path",{d:"M12 8V5m0 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM6 8h12a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2Zm3 5h.01M15 13h.01M9 21h6"}),authSessions:(0,n.jsx)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),containers:(0,n.jsx)("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"}),dashboards:(0,n.jsx)("path",{d:"M4 5h7v6H4V5Zm9 0h7v4h-7V5ZM4 14h7v5H4v-5Zm9-1h7v6h-7v-6Z"}),deploymentHealth:(0,n.jsx)("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 3 4-5"}),drains:(0,n.jsx)("path",{d:"M5 5h14M7 5v6a5 5 0 0 0 10 0V5M10 16h4v3h-4zM12 19v2"}),data:(0,n.jsx)("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"}),export:(0,n.jsx)("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"}),fanout:(0,n.jsx)("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"}),files:(0,n.jsx)("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"}),flags:(0,n.jsx)("path",{d:"M6 21V4m0 0h11l-2 3 2 3H6"}),functions:(0,n.jsx)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4"}),evals:(0,n.jsx)("path",{d:"M4 19V5m0 14h16M8 15l3-4 3 3 4-6M8 15v.01"}),aiUsage:(0,n.jsx)("path",{d:"M12 3v3m0 12v3M5.6 5.6l2.1 2.1m8.6 8.6 2.1 2.1M3 12h3m12 0h3M5.6 18.4l2.1-2.1m8.6-8.6 2.1-2.1M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z"}),health:(0,n.jsx)("path",{d:"M3 12h4l2 6 4-14 2 8h6"}),home:(0,n.jsx)("path",{d:"M3 11.5 12 4l9 7.5M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9"}),insights:(0,n.jsx)("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"}),issues:(0,n.jsx)("path",{d:"M10.3 4.3 2.5 18a2 2 0 0 0 1.7 3h15.6a2 2 0 0 0 1.7-3L13.7 4.3a2 2 0 0 0-3.4 0ZM12 9v4m0 3v.01"}),kv:(0,n.jsx)("path",{d:"M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"}),logs:(0,n.jsx)("path",{d:"M5 6h14M5 10h14M5 14h9M5 18h11"}),mail:(0,n.jsx)("path",{d:"M4 5h16v14H4V5Zm0 1.5 8 6 8-6"}),payments:(0,n.jsx)("path",{d:"M3 7h18v10H3V7Zm0 3h18M7 14h4"}),metrics:(0,n.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),migrations:(0,n.jsx)("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"}),notifications:(0,n.jsx)("path",{d:"M15 17h5l-1.4-1.4A2 2 0 0 1 18 14.2V11a6 6 0 0 0-4-5.7V5a2 2 0 1 0-4 0v.3A6 6 0 0 0 6 11v3.2a2 2 0 0 1-.6 1.4L4 17h5m6 0v1a3 3 0 1 1-6 0v-1m6 0H9"}),organizations:(0,n.jsx)("path",{d:"M3 21V8l6-4 6 4v13M9 21v-5h2v5M15 11h6v10M18 14v.01M18 17v.01M6 9v.01M6 12v.01M6 15v.01"}),permissions:(0,n.jsx)("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"}),pitr:(0,n.jsx)("path",{d:"M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"}),privacyRequests:(0,n.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8h6m-6 3h4"}),queues:(0,n.jsx)("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"}),reactors:(0,n.jsx)("path",{d:"M4 4v6h6M20 20v-6h-6M20 9a8 8 0 0 0-14.7-3M4 15a8 8 0 0 0 14.7 3"}),realtime:(0,n.jsx)("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"}),rls:(0,n.jsx)("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"}),schedule:(0,n.jsx)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),schema:(0,n.jsx)("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"}),sql:(0,n.jsx)("path",{d:"M4 5h16v14H4V5Zm3 4 3 3-3 3m6 0h4"}),storageRules:(0,n.jsx)("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"}),advisorHealth:(0,n.jsx)("path",{d:"M3 12h4l2-5 3 10 2-5h5"}),security:(0,n.jsx)("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"}),traces:(0,n.jsx)("path",{d:"M3 6h9M6 12h12M10 18h7"}),settings:(0,n.jsx)("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"}),users:(0,n.jsx)("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"}),vectors:(0,n.jsx)("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"}),workflows:(0,n.jsx)("path",{d:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM7.5 10v2a2 2 0 0 0 2 2H14m2.5-4V8a2 2 0 0 0-2-2H10"})},Ls=[{key:"overview",tabs:["home","dashboards"]},{key:"database",tabs:["data","sql","schema","migrations","vectors","pitr","export"]},{key:"functions",tabs:["functions","api","architecture","workflows","agents","queues"]},{key:"auth",tabs:["users","organizations","authSessions","authAudit","authConfig"]},{key:"storage",tabs:["files","storageRules","kv"]},{key:"observability",tabs:["issues","logs","traces","evals","aiUsage","audit","realtime","reactors","fanout","containers","metrics","analytics","health","deploymentHealth"]},{key:"advisors",tabs:["advisorHealth","security","rls","permissions","insights"]},{key:"operations",tabs:["schedule","mail","drains","notifications","payments","flags","privacyRequests"]},{key:"settings",tabs:["settings"]}],$r=i(t=>{let e=(0,M.c)(2),{tab:o}=t,r=bc[o],a;return e[0]!==r?(a=(0,n.jsx)("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:r}),e[0]=r,e[1]=a):a=e[1],a},"Lt"),xc=i(t=>t,"Ko"),Qs=xc(["home","data","sql","functions","api","architecture","workflows","agents","queues","containers","schema","migrations","vectors","export","pitr","users","organizations","authSessions","authAudit","authConfig","files","storageRules","kv","dashboards","metrics","analytics","health","deploymentHealth","advisorHealth","security","rls","permissions","insights","issues","logs","traces","evals","aiUsage","reactors","realtime","fanout","mail","notifications","payments","audit","schedule","drains","flags","privacyRequests","settings"]),yc=new Set(["api","data","migrations","sql"]),Pc=i(t=>{let e=t.split("/").findLast(Boolean)??"";return Qs.includes(e)?e:"home"},"Yo"),Cc=i(t=>{let e=(0,M.c)(19),{chrome:o,connected:r}=t,a=be(),s;e[0]!==a?(s=a("admin token"),e[0]=a,e[1]=s):s=e[1];let l;e[2]!==s?(l=(0,n.jsx)("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:s}),e[2]=s,e[3]=l):l=e[3];let c;e[4]!==o.onTokenChange||e[5]!==o.token?(c=(0,n.jsx)(Sr,{className:"h-8","data-testid":"dash-app-token",id:"dash-app-token",onChange:o.onTokenChange,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:o.token}),e[4]=o.onTokenChange,e[5]=o.token,e[6]=c):c=e[6];let p;e[7]!==r||e[8]!==a?(p=r&&(0,n.jsxs)("p",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground","data-testid":"dash-app-token-warning",role:"note",children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"}),a("Token rides the WebSocket URL \u2014 it can surface in browser DevTools and server logs. Use a dev-only token.")]}),e[7]=r,e[8]=a,e[9]=p):p=e[9];let d;e[10]!==o.clearToken||e[11]!==r||e[12]!==a?(d=r&&(0,n.jsx)("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:a("Clear")}),e[10]=o.clearToken,e[11]=r,e[12]=a,e[13]=d):d=e[13];let u;return e[14]!==l||e[15]!==c||e[16]!==p||e[17]!==d?(u=(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[l,c,p,d]}),e[14]=l,e[15]=c,e[16]=p,e[17]=d,e[18]=u):u=e[18],u},"Jo"),Ys="opacity-50",Rc=i(t=>{let e=(0,M.c)(27),{current:o,group:r,groupLabel:a,selectTab:s,tabDescription:l,tabLabel:c,unavailable:p}=t,d=r.tabs.includes(o)?"page":void 0,u=a[r.key],g=r.tabs[0],b;e[0]!==g?(b=(0,n.jsx)($r,{tab:g}),e[0]=g,e[1]=b):b=e[1];let f;e[2]!==d||e[3]!==u||e[4]!==b?(f=(0,n.jsx)(Us,{"aria-current":d,"aria-label":u,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:b}),e[2]=d,e[3]=u,e[4]=b,e[5]=f):f=e[5];let m=a[r.key],x;e[6]!==m?(x=(0,n.jsx)("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:m}),e[6]=m,e[7]=x):x=e[7];let h;if(e[8]!==o||e[9]!==r.tabs||e[10]!==s||e[11]!==l||e[12]!==c||e[13]!==p){let y;e[15]!==o||e[16]!==s||e[17]!==l||e[18]!==c||e[19]!==p?(y=i(R=>(0,n.jsxs)("button",{"aria-current":o===R?"page":void 0,className:Z("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",p[R]!==void 0&&Ys),"data-tab":R,"data-testid":`dash-tab-${R}`,"data-unsupported":p[R]===void 0?void 0:"true",onClick:s,title:l[R],type:"button",children:[(0,n.jsx)($r,{tab:R}),(0,n.jsx)("span",{children:c[R]})]},R),"m"),e[15]=o,e[16]=s,e[17]=l,e[18]=c,e[19]=p,e[20]=y):y=e[20],h=r.tabs.map(y),e[8]=o,e[9]=r.tabs,e[10]=s,e[11]=l,e[12]=c,e[13]=p,e[14]=h}else h=e[14];let v;e[21]!==x||e[22]!==h?(v=(0,n.jsxs)(Zs,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[x,h]}),e[21]=x,e[22]=h,e[23]=v):v=e[23];let P;return e[24]!==f||e[25]!==v?(P=(0,n.jsxs)(Ks,{children:[f,v]}),e[24]=f,e[25]=v,e[26]=P):P=e[26],P},"Xo"),Sc=i(t=>{let e=(0,M.c)(45),{chrome:o,collapsed:r,connected:a}=t,s=be();if(o===null){let y;e[0]!==s?(y=s("Admin"),e[0]=s,e[1]=y):y=e[1];let R;e[2]===Symbol.for("react.memo_cache_sentinel")?(R=(0,n.jsx)("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"}),e[2]=R):R=e[2];let C;e[3]!==s?(C=s("Admin"),e[3]=s,e[4]=C):C=e[4];let k;e[5]!==C?(k=(0,n.jsx)("span",{className:"truncate text-[13px] font-medium",children:C}),e[5]=C,e[6]=k):k=e[6];let S;e[7]!==s?(S=s("Studio"),e[7]=s,e[8]=S):S=e[8];let N;e[9]!==S?(N=(0,n.jsx)("span",{className:"truncate text-[11px] text-muted-foreground",children:S}),e[9]=S,e[10]=N):N=e[10];let w;e[11]!==k||e[12]!==N?(w=(0,n.jsxs)("span",{className:"grid flex-1 text-start leading-tight",children:[k,N]}),e[11]=k,e[12]=N,e[13]=w):w=e[13];let O;return e[14]!==y||e[15]!==w?(O=(0,n.jsxs)(Ws,{className:"data-active:bg-transparent",size:"lg",tooltip:y,children:[R,w]}),e[14]=y,e[15]=w,e[16]=O):O=e[16],O}let l=r?"mx-auto size-8 justify-center":"w-full p-2",c;e[17]!==l?(c=Z("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]!==a||e[20]!==s?(p=s(a?"Connected":"Not connected"),e[19]=a,e[20]=s,e[21]=p):p=e[21];let d=a?"bg-success":"bg-muted-foreground/50",u;e[22]!==d?(u=Z("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,n.jsxs)("span",{className:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:["C",(0,n.jsx)("span",{"aria-hidden":"true",className:u})]}),e[24]=u,e[25]=g):g=e[25];let b;e[26]!==r||e[27]!==a||e[28]!==s?(b=!r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("span",{className:"grid flex-1 text-start leading-tight",children:[(0,n.jsx)("span",{className:"truncate text-[13px] font-medium",children:s("Admin")}),(0,n.jsx)("span",{className:"truncate text-[11px] text-muted-foreground",children:s(a?"Connected":"Not connected")})]}),(0,n.jsx)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"m8 9 4-4 4 4M8 15l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e[26]=r,e[27]=a,e[28]=s,e[29]=b):b=e[29];let f;e[30]!==c||e[31]!==p||e[32]!==g||e[33]!==b?(f=(0,n.jsxs)(Us,{className:c,"data-testid":"dash-app-connect",title:p,children:[g,b]}),e[30]=c,e[31]=p,e[32]=g,e[33]=b,e[34]=f):f=e[34];let m=r?"end":"start",x=r?"right":"top",h;e[35]!==o||e[36]!==a?(h=(0,n.jsx)(Cc,{chrome:o,connected:a}),e[35]=o,e[36]=a,e[37]=h):h=e[37];let v;e[38]!==x||e[39]!==h||e[40]!==m?(v=(0,n.jsx)(Zs,{align:m,keepMounted:!0,side:x,children:h}),e[38]=x,e[39]=h,e[40]=m,e[41]=v):v=e[41];let P;return e[42]!==v||e[43]!==f?(P=(0,n.jsxs)(Ks,{children:[f,v]}),e[42]=v,e[43]=f,e[44]=P):P=e[44],P},"er"),Nc=i(t=>{let e=(0,M.c)(29),{chrome:o,connected:r,current:a,groupLabel:s,groups:l,selectTab:c,tabDescription:p,tabLabel:d,unavailable:u}=t,g=be(),{state:b}=hr(),f=b==="collapsed",m=f&&"justify-center px-0",x;e[0]!==m?(x=Z("flex items-center gap-2.5 px-1.5 py-1",m),e[0]=m,e[1]=x):x=e[1];let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=(0,n.jsx)(yi,{className:"size-9 shrink-0 text-foreground"}),e[2]=h):h=e[2];let v;e[3]!==f||e[4]!==r||e[5]!==g?(v=!f&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("span",{className:"grid flex-1 leading-tight",children:[(0,n.jsx)("span",{className:"truncate text-sm font-semibold text-foreground",children:"lunora"}),(0,n.jsx)("span",{className:"truncate text-[11px] text-muted-foreground",children:g("Studio")})]}),(0,n.jsx)(Lt,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:g(r?"Live":"Local")})]}),e[3]=f,e[4]=r,e[5]=g,e[6]=v):v=e[6];let P;e[7]!==x||e[8]!==v?(P=(0,n.jsx)(Ki,{children:(0,n.jsxs)("div",{className:x,children:[h,v]})}),e[7]=x,e[8]=v,e[9]=P):P=e[9];let y;e[10]!==f||e[11]!==a||e[12]!==s||e[13]!==l||e[14]!==c||e[15]!==p||e[16]!==d||e[17]!==u?(y=f?l.map(S=>(0,n.jsx)(Rc,{current:a,group:S,groupLabel:s,selectTab:c,tabDescription:p,tabLabel:d,unavailable:u},S.key)):l.map(S=>(0,n.jsxs)(qi,{children:[(0,n.jsx)(Wi,{className:"text-[11px] font-medium tracking-wider uppercase",children:s[S.key]}),(0,n.jsx)($i,{children:(0,n.jsx)(_s,{children:S.tabs.map(N=>(0,n.jsx)(As,{children:(0,n.jsxs)(Ws,{className:Z("data-active:text-foreground dark:data-active:text-royal-amethyst data-active:shadow-[inset_2px_0_0_0_var(--royal-amethyst)]",u[N]!==void 0&&Ys),"data-tab":N,"data-testid":`dash-tab-${N}`,"data-unsupported":u[N]===void 0?void 0:"true",isActive:a===N,onClick:c,title:p[N],tooltip:p[N],children:[(0,n.jsx)($r,{tab:N}),(0,n.jsx)("span",{children:d[N]})]})},N))})})]},S.key)),e[10]=f,e[11]=a,e[12]=s,e[13]=l,e[14]=c,e[15]=p,e[16]=d,e[17]=u,e[18]=y):y=e[18];let R;e[19]!==y?(R=(0,n.jsx)(Zi,{children:y}),e[19]=y,e[20]=R):R=e[20];let C;e[21]!==o||e[22]!==f||e[23]!==r?(C=(0,n.jsx)(Ui,{children:(0,n.jsx)(_s,{children:(0,n.jsx)(As,{children:(0,n.jsx)(Sc,{chrome:o,collapsed:f,connected:r})})})}),e[21]=o,e[22]=f,e[23]=r,e[24]=C):C=e[24];let k;return e[25]!==P||e[26]!==R||e[27]!==C?(k=(0,n.jsxs)(Fi,{collapsible:"icon",variant:"inset",children:[P,R,C]}),e[25]=P,e[26]=R,e[27]=C,e[28]=k):k=e[28],k},"tr"),Qr=i(()=>{let t=(0,M.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(Wo,{className:"h-8 w-40"}),(0,n.jsx)(Wo,{className:"h-8 w-24"})]}),(0,n.jsx)(Wo,{className:"h-72 w-full"})]}),t[0]=e):e=t[0],e},"$t"),Tc=i(t=>{let e=(0,M.c)(5),{title:o,verdict:r}=t;if(r.kind==="pending"){let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,n.jsx)(Qr,{}),e[0]=s):s=e[0],s}if(r.kind==="unavailable"){let s;return e[1]!==o||e[2]!==r.reason?(s=(0,n.jsx)(vl,{reason:r.reason,title:o}),e[1]=o,e[2]=r.reason,e[3]=s):s=e[3],s}let a;return e[4]===Symbol.for("react.memo_cache_sentinel")?(a=(0,n.jsx)(oa,{}),e[4]=a):a=e[4],a},"sr"),wc=i(()=>{let t=(0,M.c)(55),e=be(),o=io(),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={select:Ic},t[0]=r):r=t[0];let a=na(r),s=Pc(a),l=yc.has(s),c=da(),p=c?.toggle,d=la();bl(p);let u=qa(),{groupLabel:g,tabDescription:b,tabLabel:f}=rl(),{unavailable:m,visibleGroups:x}=hl(Ls,u,e),h={...b,...m},v=$s(s,u,e),P=v.kind==="hidden",y,R;t[1]!==P||t[2]!==o?(y=i(()=>{P&&Vt(o({replace:!0,to:"/home"}))},"m"),R=[P,o],t[1]=P,t[2]=o,t[3]=y,t[4]=R):(y=t[3],R=t[4]),(0,E.useEffect)(y,R);let C;t[5]!==o?(C=i(ge=>{Vt(o({to:`/${ge.currentTarget.dataset.tab??""}`}))},"C"),t[5]=o,t[6]=C):C=t[6];let k=C,S,N;t[7]!==s||t[8]!==f?(S=i(()=>{typeof document<"u"&&(document.title=`${f[s]} \xB7 lunora`)},"S"),N=[s,f],t[7]=s,t[8]=f,t[9]=S,t[10]=N):(S=t[9],N=t[10]),(0,E.useEffect)(S,N);let w=x.find(ge=>ge.tabs.includes(s))??Ls[0],O=x.flatMap(ge=>ge.tabs.filter(ve=>m[ve]===void 0).map(ve=>({group:g[ge.key],label:f[ve],to:`/${ve}`}))),I;t[11]!==e||t[12]!==p?(I=p===void 0?[]:[{group:e("Operations"),label:e("Toggle operation console"),run:p}],t[11]=e,t[12]=p,t[13]=I):I=t[13];let L;t[14]!==d||t[15]!==e?(L=d===void 0||d.unavailable?[]:[{group:e("Operations"),label:e("Ask the assistant"),run:d.toggle}],t[14]=d,t[15]=e,t[16]=L):L=t[16];let V=[...O,...I,...L],H=(0,E.use)(Gs),q=H!==null&&H.token!=="",F=g[w.key],K=f[s],j;t[17]!==F||t[18]!==K?(j=(0,n.jsx)(pl,{domain:F,onOpenCommandPalette:Ds,page:K}),t[17]=F,t[18]=K,t[19]=j):j=t[19];let D;t[20]!==H?.rulesInstalled?(D=H?.rulesInstalled===!1&&(0,n.jsx)(Ri,{}),t[20]=H?.rulesInstalled,t[21]=D):D=t[21];let A=`dash-tab-${s}`,W=l?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",$=f[s],te;t[22]!==e||t[23]!==$?(te=e("{title} failed",{title:$}),t[22]=e,t[23]=$,t[24]=te):te=t[24];let le=f[s],Y;t[25]!==e?(Y=e("Try again"),t[25]=e,t[26]=Y):Y=t[26];let oe;t[27]===Symbol.for("react.memo_cache_sentinel")?(oe=(0,n.jsx)(Qr,{}),t[27]=oe):oe=t[27];let ee=f[s],de;t[28]!==ee||t[29]!==v?(de=(0,n.jsx)(E.Suspense,{fallback:oe,children:(0,n.jsx)(Tc,{title:ee,verdict:v})}),t[28]=ee,t[29]=v,t[30]=de):de=t[30];let pe;t[31]!==s||t[32]!==te||t[33]!==le||t[34]!==Y||t[35]!==de?(pe=(0,n.jsx)(Go,{fallbackTitle:te,label:le,retryLabel:Y,children:de},s),t[31]=s,t[32]=te,t[33]=le,t[34]=Y,t[35]=de,t[36]=pe):pe=t[36];let ue;t[37]!==W||t[38]!==pe?(ue=(0,n.jsx)("div",{className:W,children:pe}),t[37]=W,t[38]=pe,t[39]=ue):ue=t[39];let me;t[40]!==c?(me=c?.open===!0&&(0,n.jsx)(el,{focusSeq:c.focusSeq,onClose:c.close,onShownChange:c.setShown,shown:c.shown}),t[40]=c,t[41]=me):me=t[41];let fe;t[42]!==A||t[43]!==ue||t[44]!==me?(fe=(0,n.jsxs)("div",{"aria-labelledby":A,className:"flex min-w-0 flex-1 flex-col overflow-hidden","data-testid":"dash-panel",id:"dash-panel",role:"tabpanel",children:[ue,me]}),t[42]=A,t[43]=ue,t[44]=me,t[45]=fe):fe=t[45];let U;t[46]!==j||t[47]!==D||t[48]!==fe?(U=(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[j,D,fe]}),t[46]=j,t[47]=D,t[48]=fe,t[49]=U):U=t[49];let G;t[50]!==d?(G=d!==void 0&&d.open&&!d.unavailable&&(0,n.jsx)(E.Suspense,{fallback:null,children:(0,n.jsx)(Sl,{assistant:d})}),t[50]=d,t[51]=G):G=t[51];let re;return t[52]!==U||t[53]!==G?(re=(0,n.jsxs)(zi,{className:"flex flex-row overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[U,G]}),t[52]=U,t[53]=G,t[54]=re):re=t[54],(0,n.jsxs)(Bi,{className:"min-h-0 flex-1","data-platform":u.platform?.id,"data-testid":"lunora-studio",children:[(0,n.jsx)(Ms,{items:V}),(0,n.jsx)(Nc,{chrome:H,connected:q,current:s,groupLabel:g,groups:x,selectTab:k,tabDescription:h,tabLabel:f,unavailable:m}),re]})},"ar"),Ec=i(()=>{let t=(0,M.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(ca,{children:(0,n.jsx)(ia,{children:(0,n.jsx)(wc,{})})}),t[0]=e):e=t[0],e},"or"),kc=i(t=>{let e=(0,M.c)(5),{initialShardKey:o,schemaEditable:r}=t,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];let s=ea(a),{table:l}=s,c=typeof l=="string"?l:void 0,p;return e[1]!==o||e[2]!==c||e[3]!==r?(p=(0,n.jsx)(lc,{initialShardKey:o,initialTable:c,schemaEditable:r}),e[1]=o,e[2]=c,e[3]=r,e[4]=p):p=e[4],p},"rr"),Oc=i(()=>{let t=(0,M.c)(3),e=io(),o,r;return t[0]!==e?(o=i(()=>{Vt(e({replace:!0,to:"/home"}))},"s"),r=[e],t[0]=e,t[1]=o,t[2]=r):(o=t[1],r=t[2]),(0,E.useEffect)(o,r),null},"nr"),Dc=i(({analyticsSqlQuery:t,basePath:e,privacyRequests:o,dataEditable:r=!1,functions:a,initialShardKey:s,openApiSpec:l,openRpcSpec:c,runAsIdentity:p=!1,schemaEditable:d=!1,scheduledCancel:u,scheduledCron:g,scheduledLoad:b})=>{let f=ta({component:Ec}),m={agents:(0,n.jsx)(Rl,{initialShardKey:s}),analytics:(0,n.jsx)(Nl,{runQuery:t}),api:(0,n.jsx)(Tl,{functions:a,initialShardKey:s,openApiSpec:l,openRpcSpec:c}),architecture:(0,n.jsx)(wl,{}),audit:(0,n.jsx)(ql,{initialShardKey:s}),authAudit:(0,n.jsx)(El,{}),authConfig:(0,n.jsx)(kl,{}),authSessions:(0,n.jsx)(Ol,{}),containers:(0,n.jsx)(Il,{}),dashboards:(0,n.jsx)(ac,{initialShardKey:s}),data:(0,n.jsx)(Al,{canGenerateRows:r&&d,editable:r,initialShardKey:s}),deploymentHealth:(0,n.jsx)(_l,{}),drains:(0,n.jsx)(Wl,{}),export:(0,n.jsx)(Vl,{initialShardKey:s}),fanout:(0,n.jsx)(nc,{initialShardKey:s}),files:(0,n.jsx)(pc,{}),kv:(0,n.jsx)(Xl,{}),flags:(0,n.jsx)(jl,{initialShardKey:s}),reactors:(0,n.jsx)(zl,{initialShardKey:s}),functions:(0,n.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,n.jsx)(Ul,{functions:a,initialShardKey:s}),(0,n.jsx)(Kl,{functions:a,runAsIdentity:p})]}),health:(0,n.jsx)(sc,{initialShardKey:s}),home:(0,n.jsx)(Wa,{initialShardKey:s}),insights:(0,n.jsx)(xl,{initialShardKey:s}),issues:(0,n.jsx)(Zl,{initialShardKey:s}),logs:(0,n.jsx)($l,{initialShardKey:s}),traces:(0,n.jsx)(mc,{initialShardKey:s}),evals:(0,n.jsx)(fc,{initialShardKey:s}),aiUsage:(0,n.jsx)(gc,{initialShardKey:s}),metrics:(0,n.jsx)(ic,{initialShardKey:s}),migrations:(0,n.jsx)(Ll,{initialShardKey:s}),notifications:(0,n.jsx)(ec,{}),organizations:(0,n.jsx)(Dl,{}),permissions:(0,n.jsx)(oc,{functions:a,runAsIdentity:p,schemaEditable:d}),pitr:(0,n.jsx)(Bl,{initialShardKey:s}),privacyRequests:(0,n.jsx)(Fl,{source:o}),mail:(0,n.jsx)(Gl,{}),payments:(0,n.jsx)(tc,{}),queues:(0,n.jsx)(rc,{}),realtime:(0,n.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,n.jsx)(Yl,{initialShardKey:s}),(0,n.jsx)(Jl,{})]}),rls:(0,n.jsx)(yl,{}),schedule:(0,n.jsx)(Ql,{loadCronJobs:g,scheduledCancel:u,scheduledLoad:b}),schema:(0,n.jsx)(kc,{initialShardKey:s,schemaEditable:d}),advisorHealth:(0,n.jsx)(Pl,{}),security:(0,n.jsx)(Cl,{}),settings:(0,n.jsx)(cc,{initialShardKey:s}),sql:(0,n.jsx)(dc,{initialShardKey:s}),storageRules:(0,n.jsx)(uc,{}),users:(0,n.jsx)(Ml,{}),vectors:(0,n.jsx)(hc,{}),workflows:(0,n.jsx)(vc,{})},x=Cr({component:i(()=>m.home,"component"),getParentRoute:i(()=>f,"getParentRoute"),path:"/"}),h=Qs.map(y=>Cr({component:i(()=>m[y],"component"),getParentRoute:i(()=>f,"getParentRoute"),path:`/${y}`,validateSearch:Hl[y]})),v=f.addChildren([x,...h]),P="window"in globalThis?Jr():Xr({initialEntries:["/home"]});return ra({...e===void 0||e==="/"?{}:{basepath:e},defaultNotFoundComponent:Oc,defaultPendingComponent:Qr,defaultPendingMinMs:0,defaultPendingMs:0,history:P,routeTree:v})},"ir"),Mc=i(t=>{let e=(0,M.c)(19),{analyticsSqlQuery:o,basePath:r,chrome:a,dataEditable:s,functions:l,initialShardKey:c,openApiSpec:p,openRpcSpec:d,privacyRequests:u,runAsIdentity:g,schemaEditable:b,scheduledCancel:f,scheduledCron:m,scheduledLoad:x}=t,h;e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==l||e[4]!==c||e[5]!==p||e[6]!==d||e[7]!==u||e[8]!==g||e[9]!==f||e[10]!==m||e[11]!==x||e[12]!==b?(h=Dc({analyticsSqlQuery:o,basePath:r,privacyRequests:u,dataEditable:s,functions:l,initialShardKey:c,openApiSpec:p,openRpcSpec:d,runAsIdentity:g,schemaEditable:b,scheduledCancel:f,scheduledCron:m,scheduledLoad:x}),e[0]=o,e[1]=r,e[2]=s,e[3]=l,e[4]=c,e[5]=p,e[6]=d,e[7]=u,e[8]=g,e[9]=f,e[10]=m,e[11]=x,e[12]=b,e[13]=h):h=e[13];let v=h,P=a??null,y;e[14]!==v?(y=(0,n.jsx)(aa,{router:v}),e[14]=v,e[15]=y):y=e[15];let R;return e[16]!==P||e[17]!==y?(R=(0,n.jsx)(Gs,{value:P,children:y}),e[16]=P,e[17]=y,e[18]=R):R=e[18],R},"lr"),oh=i(t=>{let e=(0,M.c)(10),o,r,a;e[0]!==t?({i18n:o,locale:r,...a}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=a):(o=e[1],r=e[2],a=e[3]);let s;e[4]!==a?(s=(0,n.jsx)(gi,{children:(0,n.jsx)(Mc,{...a})}),e[4]=a,e[5]=s):s=e[5];let l=s;if(o===void 0&&r===void 0)return l;let c;return e[6]!==o||e[7]!==r||e[8]!==l?(c=(0,n.jsx)(Os,{i18n:o,locale:r,children:l}),e[6]=o,e[7]=r,e[8]=l,e[9]=c):c=e[9],c},"Or");function Ic(t){return t.location.pathname}i(Ic,"cr");export{Go as a,Os as b,fi as c,hi as d,th as e,yi as f,Ti as g,ki as h,Oi as i,Di as j,oh as k};
@@ -0,0 +1 @@
1
+ import{b as c}from"./chunk-FBDIQ67D.js";import{m as l}from"./chunk-FACXM2UB.js";import{a as g}from"./chunk-GWNGVKLG.js";import{a as r,d as f}from"./chunk-5PEAXTYQ.js";var m=f(g(),1);var p={capabilities:{accounts:!0,admin:!0,inviteOnly:!1,organization:!1,passkey:!1,twoFactor:!1},emailAndPassword:!1,organization:{enabled:!1,roles:!1,teams:!1},plugins:[],rateLimit:{enabled:!1},session:{},socialProviders:[],userFields:[]},h=r(()=>{let o=(0,m.c)(6),t=l(),a;o[0]===Symbol.for("react.memo_cache_sentinel")?(a=["lunora-auth-config"],o[0]=a):a=o[0];let e;o[1]!==t?(e=r(()=>t.getAuthConfig(),"t"),o[1]=t,o[2]=e):e=o[2];let{data:d,isLoading:u}=c(a,e),n=d??p,s=!u,i;return o[3]!==n||o[4]!==s?(i={config:n,ready:s},o[3]=n,o[4]=s,o[5]=i):i=o[5],i},"y");export{h as a};
@@ -0,0 +1 @@
1
+ import{x as d}from"./chunk-GNI37YCV.js";import{a as m}from"./chunk-GWNGVKLG.js";import{b as i}from"./chunk-6G3E4PJ2.js";import{a as c,d as b}from"./chunk-5PEAXTYQ.js";var n=b(m(),1);var o=b(i(),1);function p(r){let e=(0,n.c)(8),t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=d("w-full caption-bottom text-xs",t),e[3]=t,e[4]=l):l=e[4];let s;return e[5]!==a||e[6]!==l?(s=(0,o.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto overflow-y-clip",children:(0,o.jsx)("table",{"data-slot":"table",className:l,...a})}),e[5]=a,e[6]=l,e[7]=s):s=e[7],s}c(p,"f");function f(r){let e=(0,n.c)(8),t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=d("bg-muted/50 [&_tr]:border-b",t),e[3]=t,e[4]=l):l=e[4];let s;return e[5]!==a||e[6]!==l?(s=(0,o.jsx)("thead",{"data-slot":"table-header",className:l,...a}),e[5]=a,e[6]=l,e[7]=s):s=e[7],s}c(f,"p");function h(r){let e=(0,n.c)(8),t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=d("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=l):l=e[4];let s;return e[5]!==a||e[6]!==l?(s=(0,o.jsx)("tbody",{"data-slot":"table-body",className:l,...a}),e[5]=a,e[6]=l,e[7]=s):s=e[7],s}c(h,"m");function x(r){let e=(0,n.c)(8),t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=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]=l):l=e[4];let s;return e[5]!==a||e[6]!==l?(s=(0,o.jsx)("tr",{"data-slot":"table-row",className:l,...a}),e[5]=a,e[6]=l,e[7]=s):s=e[7],s}c(x,"u");function N(r){let e=(0,n.c)(8),t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=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]=l):l=e[4];let s;return e[5]!==a||e[6]!==l?(s=(0,o.jsx)("th",{"data-slot":"table-head",className:l,...a}),e[5]=a,e[6]=l,e[7]=s):s=e[7],s}c(N,"h");function w(r){let e=(0,n.c)(8),t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=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]=l):l=e[4];let s;return e[5]!==a||e[6]!==l?(s=(0,o.jsx)("td",{"data-slot":"table-cell",className:l,...a}),e[5]=a,e[6]=l,e[7]=s):s=e[7],s}c(w,"x");export{p as a,f as b,h as c,x as d,N as e,w as f};
@@ -0,0 +1 @@
1
+ import{a as je}from"./chunk-JOPNP4EO.js";import{a as Be,b as Ue,c as We,d as De,e as we}from"./chunk-2H6VLY2M.js";import"./chunk-O3AZ7JKE.js";import{a as qe}from"./chunk-ELSQ4FVH.js";import"./chunk-2SNHKJXK.js";import"./chunk-P5EVJEGC.js";import"./chunk-D65UVZIA.js";import"./chunk-NGVP66OH.js";import"./chunk-QAOZXPLU.js";import{a as ze}from"./chunk-J45HAKBU.js";import{a as _e}from"./chunk-FHLODLBC.js";import"./chunk-3D67ZJRW.js";import"./chunk-ZSWW2UGP.js";import"./chunk-QRA7AKYO.js";import{i as Ae}from"./chunk-IHGRWY3Y.js";import"./chunk-OWRKSQPE.js";import"./chunk-4EPW63HS.js";import{a as le}from"./chunk-V3BE427M.js";import"./chunk-CKEQX655.js";import"./chunk-UD5REVU2.js";import{a as Ee}from"./chunk-RCXNYW7P.js";import{b as me}from"./chunk-UQA2AJGI.js";import"./chunk-T3ZCW3RG.js";import{a as Le,b as Re,c as Ve,d as pe,e as B,f as L}from"./chunk-7QEZ2SFW.js";import"./chunk-4PI2OSSP.js";import{a as U}from"./chunk-2W4UO5BC.js";import{c as Ce}from"./chunk-FBDIQ67D.js";import{a as Ke,e as Te}from"./chunk-OK2QU2EV.js";import{m as be}from"./chunk-FACXM2UB.js";import"./chunk-ZPQBVYNN.js";import{B as ue,e as Se,f as $e,h as ie,i as Ne,j as ke,s as re,w as Me}from"./chunk-GNI37YCV.js";import"./chunk-PDBW6GTJ.js";import{a as Ge}from"./chunk-GWNGVKLG.js";import{a as Oe,b as He}from"./chunk-6G3E4PJ2.js";import{a as d,d as ye}from"./chunk-5PEAXTYQ.js";var ge=ye(Ge(),1);var ne=ye(Oe(),1);var t=ye(He(),1);var Ie="none",Je=["all","open","resolved","ignored"],Pe=["critical","high","medium","low"],Qe=ie(U.resolveIssue),Xe=ie(U.ignoreIssue),Fe=ie(U.assignIssue),Ye=ie(U.setIssueSeverity),Ze=ie(U.explainIssue),es=d(n=>Array.isArray(n?.issues)?n.issues:[],"Xe"),ss=d(n=>n==="resolved"?"success":n==="ignored"?"secondary":"warning","Je"),ts=d(n=>n==="critical"?"destructive":n==="high"?"warning":n==="medium"?"info":"secondary","Ze"),as=d(n=>{let e=(0,ge.c)(44),{expanded:u,issue:s,shardKey:$}=n,i=be(),l=ue(),[a,o]=(0,ne.useState)(void 0),{busy:_,error:A,run:R}=je(),K;e[0]!==i||e[1]!==s||e[2]!==R||e[3]!==$?(K=d(()=>{o(void 0),R(async()=>{let g={culprit:s.culprit,sampleMessage:s.sampleMessage,title:s.title},S=await i.query(Ze,g,Ne($));o(S)})},"C"),e[0]=i,e[1]=s,e[2]=R,e[3]=$,e[4]=K):K=e[4];let z=K;if(!u)return null;let k;if(e[5]!==s.sampleMessage){let g=$e(s.sampleMessage);k=g===void 0?void 0:Se(g.body),e[5]=s.sampleMessage,e[6]=k}else k=e[6];let T=k,E=`issues-detail-${s.hash}`,h;e[7]!==s.sampleMessage?(h=(0,t.jsx)("p",{className:"whitespace-pre-wrap font-mono text-xs text-muted-foreground",children:s.sampleMessage}),e[7]=s.sampleMessage,e[8]=h):h=e[8];let x;e[9]!==l?(x=l("Suggested fix"),e[9]=l,e[10]=x):x=e[10];let M;e[11]!==x?(M=(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:x}),e[11]=x,e[12]=M):M=e[12];let v;e[13]!==T||e[14]!==s.hash||e[15]!==l?(v=T===void 0?(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground","data-testid":`issues-hint-empty-${s.hash}`,children:l("No known fix for this error yet.")}):(0,t.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm","data-testid":`issues-hint-${s.hash}`,children:T}),e[13]=T,e[14]=s.hash,e[15]=l,e[16]=v):v=e[16];let y;e[17]!==M||e[18]!==v?(y=(0,t.jsxs)("div",{children:[M,v]}),e[17]=M,e[18]=v,e[19]=y):y=e[19];let b=`issues-explain-${s.hash}`,w;e[20]!==_||e[21]!==l?(w=l(_?"Explaining\u2026":"Explain in plain language"),e[20]=_,e[21]=l,e[22]=w):w=e[22];let m;e[23]!==_||e[24]!==z||e[25]!==w||e[26]!==b?(m=(0,t.jsx)("div",{children:(0,t.jsx)(le,{"data-testid":b,disabled:_,onClick:z,size:"sm",type:"button",variant:"outline",children:w})}),e[23]=_,e[24]=z,e[25]=w,e[26]=b,e[27]=m):m=e[27];let f;e[28]!==A||e[29]!==s.hash?(f=A!==null&&(0,t.jsx)("p",{className:"text-xs text-destructive","data-testid":`issues-explain-error-${s.hash}`,role:"alert",children:A}),e[28]=A,e[29]=s.hash,e[30]=f):f=e[30];let p;e[31]!==a||e[32]!==s.hash||e[33]!==l?(p=a!==void 0&&(a.degraded?(0,t.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":`issues-degraded-${s.hash}`,children:a.reason==="no-ai-binding"?l("No AI binding is configured. Wire an AI binding to enable plain-language explanations \u2014 the suggested fix above is always available."):l("The AI model could not explain this error right now. The suggested fix above still applies.")}):(0,t.jsxs)("div",{"data-testid":`issues-explanation-${s.hash}`,children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:l("AI explanation")}),(0,t.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm",children:a.explanation}),a.groundedId===void 0&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground","data-testid":`issues-ungrounded-${s.hash}`,children:l("No catalog fix matched this error, so this explanation is the model's own reading of the message. Verify before acting on it.")}),(0,t.jsx)("p",{className:"mt-1 text-[0.7rem] text-muted-foreground",children:l("Generated by {model}",{model:a.model})})]})),e[31]=a,e[32]=s.hash,e[33]=l,e[34]=p):p=e[34];let c;e[35]!==m||e[36]!==f||e[37]!==p||e[38]!==h||e[39]!==y?(c=(0,t.jsx)(L,{className:"bg-muted/30",colSpan:7,children:(0,t.jsxs)("div",{className:"flex flex-col gap-3 py-1",children:[h,y,m,f,p]})}),e[35]=m,e[36]=f,e[37]=p,e[38]=h,e[39]=y,e[40]=c):c=e[40];let I;return e[41]!==c||e[42]!==E?(I=(0,t.jsx)(pe,{"data-testid":E,children:c}),e[41]=c,e[42]=E,e[43]=I):I=e[43],I},"et"),is=d(n=>{let e=(0,ge.c)(119),{busy:u,issue:s,rowError:$,runTriage:i,shardKey:l}=n,a=ue(),[o,_]=(0,ne.useState)(!1),A;e[0]===Symbol.for("react.memo_cache_sentinel")?(A=d(()=>{_(rs)},"A"),e[0]=A):A=e[0];let R=A,K;e[1]!==s.hash||e[2]!==i?(K=d(ae=>{let ce=ae===null||ae===Ie?null:ae;re(i(s.hash,Ye,{severity:ce}))},"C"),e[1]=s.hash,e[2]=i,e[3]=K):K=e[3];let z=K,k;e[4]!==s.hash||e[5]!==i?(k=d(ae=>{if(ae.key!=="Enter")return;let ce=ae.currentTarget.value.trim();re(i(s.hash,Fe,{assignee:ce===""?null:ce}))},"T"),e[4]=s.hash,e[5]=i,e[6]=k):k=e[6];let T=k,E=`issues-row-${s.hash}`,h;e[7]!==a?(h=a("Toggle issue details"),e[7]=a,e[8]=h):h=e[8];let x=`issues-toggle-${s.hash}`,M=`mt-1 size-3 shrink-0 text-muted-foreground transition-transform ${o?"rotate-90":""}`,v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsx)("path",{d:"m9 6 6 6-6 6"}),e[9]=v):v=e[9];let y;e[10]!==M?(y=(0,t.jsx)("svg",{"aria-hidden":"true",className:M,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",children:v}),e[10]=M,e[11]=y):y=e[11];let b;e[12]!==s.title?(b=(0,t.jsx)("span",{className:"block truncate font-medium",title:s.title,children:s.title}),e[12]=s.title,e[13]=b):b=e[13];let w;e[14]!==s.culprit?(w=(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",title:s.culprit,children:s.culprit}),e[14]=s.culprit,e[15]=w):w=e[15];let m;e[16]!==b||e[17]!==w?(m=(0,t.jsxs)("span",{className:"min-w-0",children:[b,w]}),e[16]=b,e[17]=w,e[18]=m):m=e[18];let f;e[19]!==o||e[20]!==m||e[21]!==h||e[22]!==x||e[23]!==y?(f=(0,t.jsxs)("button",{"aria-expanded":o,"aria-label":h,className:"flex w-full items-start gap-2 text-left","data-testid":x,onClick:R,type:"button",children:[y,m]}),e[19]=o,e[20]=m,e[21]=h,e[22]=x,e[23]=y,e[24]=f):f=e[24];let p;e[25]!==s.hash||e[26]!==$?(p=$!==void 0&&(0,t.jsx)("p",{className:"mt-1 text-xs text-destructive","data-testid":`issues-action-error-${s.hash}`,role:"alert",children:$}),e[25]=s.hash,e[26]=$,e[27]=p):p=e[27];let c;e[28]!==f||e[29]!==p?(c=(0,t.jsxs)(L,{className:"max-w-80",children:[f,p]}),e[28]=f,e[29]=p,e[30]=c):c=e[30];let I=`issues-status-${s.hash}`,g;e[31]!==s.status?(g=ss(s.status),e[31]=s.status,e[32]=g):g=e[32];let S;e[33]!==s.status||e[34]!==I||e[35]!==g?(S=(0,t.jsx)(L,{children:(0,t.jsx)(me,{"data-testid":I,variant:g,children:s.status})}),e[33]=s.status,e[34]=I,e[35]=g,e[36]=S):S=e[36];let V=s.severity??Ie,r;e[37]!==a?(r=a("Set severity"),e[37]=a,e[38]=r):r=e[38];let oe=`issues-severity-${s.hash}`,j;e[39]!==a?(j=a("\u2014"),e[39]=a,e[40]=j):j=e[40];let N;e[41]!==s.severity||e[42]!==a?(N=s.severity===void 0?(0,t.jsx)("span",{className:"text-muted-foreground",children:a("\u2014")}):(0,t.jsx)(me,{variant:ts(s.severity),children:s.severity}),e[41]=s.severity,e[42]=a,e[43]=N):N=e[43];let C;e[44]!==j||e[45]!==N?(C=(0,t.jsx)(Ue,{placeholder:j,children:N}),e[44]=j,e[45]=N,e[46]=C):C=e[46];let q;e[47]!==r||e[48]!==oe||e[49]!==C?(q=(0,t.jsx)(We,{"aria-label":r,className:"h-7 w-[110px]","data-testid":oe,children:C}),e[47]=r,e[48]=oe,e[49]=C,e[50]=q):q=e[50];let de;e[51]===Symbol.for("react.memo_cache_sentinel")?(de=Pe.map(ls),e[51]=de):de=e[51];let W;e[52]!==a?(W=a("Clear"),e[52]=a,e[53]=W):W=e[53];let D;e[54]!==W?(D=(0,t.jsxs)(De,{children:[de,(0,t.jsx)(we,{value:Ie,children:W})]}),e[54]=W,e[55]=D):D=e[55];let F;e[56]!==u||e[57]!==z||e[58]!==V||e[59]!==q||e[60]!==D?(F=(0,t.jsx)(L,{children:(0,t.jsxs)(Be,{disabled:u,onValueChange:z,value:V,children:[q,D]})}),e[56]=u,e[57]=z,e[58]=V,e[59]=q,e[60]=D,e[61]=F):F=e[61];let O;e[62]!==a?(O=a("Assignee"),e[62]=a,e[63]=O):O=e[63];let fe=`issues-assignee-${s.hash}`,xe=s.assignee??"",ve=s.assignee??"",G;e[64]!==a?(G=a("Unassigned"),e[64]=a,e[65]=G):G=e[65];let H;e[66]!==u||e[67]!==T||e[68]!==O||e[69]!==fe||e[70]!==xe||e[71]!==ve||e[72]!==G?(H=(0,t.jsx)(L,{children:(0,t.jsx)(Ae,{"aria-label":O,className:"h-7 w-32","data-testid":fe,defaultValue:xe,disabled:u,onKeyDown:T,placeholder:G},ve)}),e[66]=u,e[67]=T,e[68]=O,e[69]=fe,e[70]=xe,e[71]=ve,e[72]=G,e[73]=H):H=e[73];let J;e[74]!==s.count?(J=(0,t.jsx)(L,{className:"text-right",children:(0,t.jsx)(me,{variant:"secondary",children:s.count})}),e[74]=s.count,e[75]=J):J=e[75];let P;e[76]!==s.lastSeen?(P=Me(s.lastSeen),e[76]=s.lastSeen,e[77]=P):P=e[77];let Q;e[78]!==P?(Q=(0,t.jsx)(L,{className:"text-xs tabular-nums text-muted-foreground",children:P}),e[78]=P,e[79]=Q):Q=e[79];let X;e[80]!==u||e[81]!==s.hash||e[82]!==s.status||e[83]!==i||e[84]!==a?(X=s.status!=="resolved"&&(0,t.jsx)(le,{"data-testid":`issues-resolve-${s.hash}`,disabled:u,onClick:d(()=>{re(i(s.hash,Qe,{}))},"onClick"),size:"xs",variant:"outline",children:a("Resolve")}),e[80]=u,e[81]=s.hash,e[82]=s.status,e[83]=i,e[84]=a,e[85]=X):X=e[85];let Y;e[86]!==u||e[87]!==s.hash||e[88]!==s.status||e[89]!==i||e[90]!==a?(Y=s.status!=="ignored"&&(0,t.jsx)(le,{"data-testid":`issues-ignore-${s.hash}`,disabled:u,onClick:d(()=>{re(i(s.hash,Xe,{}))},"onClick"),size:"xs",variant:"ghost",children:a("Ignore")}),e[86]=u,e[87]=s.hash,e[88]=s.status,e[89]=i,e[90]=a,e[91]=Y):Y=e[91];let Z;e[92]!==u||e[93]!==s.assignee||e[94]!==s.hash||e[95]!==s.status||e[96]!==i||e[97]!==a?(Z=s.status!=="open"&&(0,t.jsx)(le,{"data-testid":`issues-reopen-${s.hash}`,disabled:u,onClick:d(()=>{re(i(s.hash,Fe,{assignee:s.assignee??null}))},"onClick"),size:"xs",variant:"ghost",children:a("Reopen")}),e[92]=u,e[93]=s.assignee,e[94]=s.hash,e[95]=s.status,e[96]=i,e[97]=a,e[98]=Z):Z=e[98];let ee;e[99]!==X||e[100]!==Y||e[101]!==Z?(ee=(0,t.jsx)(L,{className:"text-right",children:(0,t.jsxs)("div",{className:"flex justify-end gap-1",children:[X,Y,Z]})}),e[99]=X,e[100]=Y,e[101]=Z,e[102]=ee):ee=e[102];let se;e[103]!==c||e[104]!==S||e[105]!==F||e[106]!==H||e[107]!==J||e[108]!==Q||e[109]!==E||e[110]!==ee?(se=(0,t.jsxs)(pe,{"data-testid":E,children:[c,S,F,H,J,Q,ee]}),e[103]=c,e[104]=S,e[105]=F,e[106]=H,e[107]=J,e[108]=Q,e[109]=E,e[110]=ee,e[111]=se):se=e[111];let te;e[112]!==o||e[113]!==s||e[114]!==l?(te=(0,t.jsx)(as,{expanded:o,issue:s,shardKey:l},s.sampleMessage),e[112]=o,e[113]=s,e[114]=l,e[115]=te):te=e[115];let he;return e[116]!==se||e[117]!==te?(he=(0,t.jsxs)(t.Fragment,{children:[se,te]}),e[116]=se,e[117]=te,e[118]=he):he=e[118],he},"tt"),ks=d(n=>{let e=(0,ge.c)(38),{initialShardKey:u}=n,s=ue(),$=be(),{queryShardKey:i,setShardKey:l,shardKey:a}=ze(u),[o,_]=(0,ne.useState)("all"),[A,R]=(0,ne.useState)(ns),[K,z]=(0,ne.useState)(os),k;e[0]!==o?(k=o==="all"?{}:{status:o},e[0]=o,e[1]=k):k=e[1];let T;e[2]!==i?(T={live:!0,shardKey:i},e[2]=i,e[3]=T):T=e[3];let{data:E,error:h,liveError:x}=Ce(U.getIssues,k,T),M=E!==void 0,v;if(e[4]!==K||e[5]!==A||e[6]!==$||e[7]!==E||e[8]!==h||e[9]!==x||e[10]!==M||e[11]!==i||e[12]!==l||e[13]!==a||e[14]!==o||e[15]!==s){let y=es(E),b;e[17]!==$||e[18]!==i?(b=d(async(r,oe,j)=>{z(N=>{if(!N.has(r))return N;let C=new Map(N);return C.delete(r),C}),R(N=>new Set(N).add(r));try{await $.query(oe,{...j,hash:r},Ne(i))}catch(N){let C=ke(N);z(q=>new Map(q).set(r,C))}R(N=>{let C=new Set(N);return C.delete(r),C})},"v"),e[17]=$,e[18]=i,e[19]=b):b=e[19];let w=b,m;e[20]!==s?(m=d(r=>s(r==="all"?"All":r==="open"?"Open":r==="resolved"?"Resolved":"Ignored"),"u"),e[20]=s,e[21]=m):m=e[21];let f=m,p;e[22]!==h?(p=h!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"issues-error",role:"alert",children:h}),e[22]=h,e[23]=p):p=e[23];let c;e[24]!==l||e[25]!==a?(c=(0,t.jsx)(_e,{onChange:l,testId:"issues-shard-input",value:a}),e[24]=l,e[25]=a,e[26]=c):c=e[26];let I;e[27]!==x?(I=(0,t.jsx)(qe,{message:x,prefix:"issues"}),e[27]=x,e[28]=I):I=e[28];let g;e[29]!==o||e[30]!==f?(g=Je.map(r=>(0,t.jsx)(le,{"data-active":o===r?"":void 0,"data-testid":`issues-filter-${r}`,onClick:d(()=>{_(r)},"onClick"),size:"xs",variant:o===r?"default":"outline",children:f(r)},r)),e[29]=o,e[30]=f,e[31]=g):g=e[31];let S;e[32]!==g?(S=(0,t.jsx)("div",{className:"ms-auto flex items-center gap-1","data-testid":"issues-status-filter",role:"group",children:g}),e[32]=g,e[33]=S):S=e[33];let V;e[34]!==S||e[35]!==c||e[36]!==I?(V=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,I,S]}),e[34]=S,e[35]=c,e[36]=I,e[37]=V):V=e[37],v=(0,t.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-issues-panel",children:[p,V,M&&y.length===0?(0,t.jsx)(Ee,{description:s("No grouped errors yet. When a function throws or a container crashes, matching errors fold into a single issue here."),testId:"issues-empty",title:s("No issues")}):(0,t.jsx)(Ke,{className:"overflow-hidden py-0",children:(0,t.jsx)(Te,{className:"px-0",children:(0,t.jsxs)(Le,{"data-testid":"issues-table",children:[(0,t.jsx)(Re,{children:(0,t.jsxs)(pe,{children:[(0,t.jsx)(B,{children:s("Issue")}),(0,t.jsx)(B,{children:s("Status")}),(0,t.jsx)(B,{children:s("Severity")}),(0,t.jsx)(B,{children:s("Assignee")}),(0,t.jsx)(B,{className:"text-right",children:s("Events")}),(0,t.jsx)(B,{children:s("Last seen")}),(0,t.jsx)(B,{className:"text-right",children:s("Actions")})]})}),(0,t.jsx)(Ve,{children:y.map(r=>(0,t.jsx)(is,{busy:A.has(r.hash),issue:r,rowError:K.get(r.hash),runTriage:w,shardKey:i},r.hash))})]})})})]}),e[4]=K,e[5]=A,e[6]=$,e[7]=E,e[8]=h,e[9]=x,e[10]=M,e[11]=i,e[12]=l,e[13]=a,e[14]=o,e[15]=s,e[16]=v}else v=e[16];return v},"Tt");function rs(n){return!n}d(rs,"st");function ls(n){return(0,t.jsx)(we,{value:n,children:n},n)}d(ls,"at");function ns(){return new Set}d(ns,"it");function os(){return new Map}d(os,"lt");export{ks as default};
@@ -0,0 +1 @@
1
+ "use client";import{a as c,b as h,c as f}from"./chunk-TW4O2BA5.js";import"./chunk-4EPW63HS.js";import"./chunk-PDBW6GTJ.js";import{a as C,b as I}from"./chunk-6G3E4PJ2.js";import{a as u,d as g}from"./chunk-5PEAXTYQ.js";var e=g(C(),1),p=g(I(),1);var T=u(({code:s,isIncomplete:l=!1,language:t,maxHeight:d,raw:r,className:x,startLine:H,lineNumbers:N,...B})=>{let{shikiTheme:m}=(0,e.useContext)(f),a=h(),[b,i]=(0,e.useState)(r);return(0,e.useEffect)(()=>{if(!a){i(r);return}let o=!0,n=a.highlight({code:s,isIncomplete:l,language:t,themes:m},k=>{o&&i(k)});return n&&i(n),()=>{o=!1}},[s,l,t,m,a,r]),(0,p.jsx)(c,{className:x,language:t,lineNumbers:N,maxHeight:d,result:b,startLine:H,...B})},"T");export{T as HighlightedCodeBlockBody};
@@ -0,0 +1 @@
1
+ import{a as dt}from"./chunk-3X3NXJBR.js";import{a as st}from"./chunk-ELSQ4FVH.js";import"./chunk-HCOF7HOM.js";import{a as De}from"./chunk-TKBTZX4K.js";import"./chunk-5GYHGDIF.js";import"./chunk-Y2YLTUMD.js";import"./chunk-JD6PRRFO.js";import"./chunk-NGZNXNRD.js";import"./chunk-2SNHKJXK.js";import"./chunk-BCUOQNI2.js";import"./chunk-P5EVJEGC.js";import"./chunk-D65UVZIA.js";import"./chunk-NGVP66OH.js";import"./chunk-QAOZXPLU.js";import{a as at}from"./chunk-J45HAKBU.js";import{a as ot}from"./chunk-YEVTA35E.js";import{a as tt}from"./chunk-FHLODLBC.js";import{b as et}from"./chunk-3D67ZJRW.js";import"./chunk-ZSWW2UGP.js";import{h as Be,i as We}from"./chunk-RTS5G3ET.js";import"./chunk-QRA7AKYO.js";import{i as Ge}from"./chunk-IHGRWY3Y.js";import"./chunk-OWRKSQPE.js";import"./chunk-4EPW63HS.js";import{a as Ze}from"./chunk-V3BE427M.js";import"./chunk-CKEQX655.js";import"./chunk-UD5REVU2.js";import{a as qe}from"./chunk-RCXNYW7P.js";import{b as Ve}from"./chunk-UQA2AJGI.js";import"./chunk-T3ZCW3RG.js";import{a as Te}from"./chunk-IUGNIG6L.js";import"./chunk-LSEUUZN4.js";import{a as rt,b as it,c as nt,d as _e,e as q,f as T}from"./chunk-7QEZ2SFW.js";import"./chunk-WCWP4EAW.js";import"./chunk-BX7TFVCC.js";import"./chunk-4PI2OSSP.js";import{a as F}from"./chunk-2W4UO5BC.js";import{c as de}from"./chunk-FBDIQ67D.js";import{a as Xe,e as Ye}from"./chunk-OK2QU2EV.js";import{m as Qe}from"./chunk-FACXM2UB.js";import"./chunk-ZPQBVYNN.js";import{B as ce,h as Ue,i as ze,j as He,s as Oe,w as je,x as le}from"./chunk-GNI37YCV.js";import"./chunk-PDBW6GTJ.js";import{a as Ae}from"./chunk-GWNGVKLG.js";import{a as Je,b as Pe}from"./chunk-6G3E4PJ2.js";import{a as s,d as se}from"./chunk-5PEAXTYQ.js";var be=se(Ae(),1),he=se(Je(),1);var lt=se(Ae(),1),S=se(Je(),1);var m=se(Pe(),1);var qt=Ue(F.runMigration),ct=s(t=>{let e=(0,lt.c)(98),{initialShardKey:r}=t,i=Qe(),a=ce(),{queryShardKey:o,setShardKey:n,shardKey:d}=at(r),[l,f]=(0,S.useState)(""),[h,g]=(0,S.useState)("up"),[p,b]=(0,S.useState)(!0),[y,x]=(0,S.useState)(!1),[v,u]=(0,S.useState)(null),[w,k]=(0,S.useState)(null),L;e[0]!==d?(L=d.trim(),e[0]=d,e[1]=L):L=e[1];let C=L===o,j;e[2]===Symbol.for("react.memo_cache_sentinel")?(j={},e[2]=j):j=e[2];let M;e[3]!==o?(M={live:!0,shardKey:o},e[3]=o,e[4]=M):M=e[4];let $=de(F.migrationStatus,j,M),N=$.data?.migrations??null,Ie=$.error,{errorSource:Fe,liveError:Re}=$,ye,ve;e[5]!==o||e[6]!==$.data?(ye=s(()=>{$.data!==void 0&&et(o)},"W"),ve=[$.data,o],e[5]=o,e[6]=$.data,e[7]=ye,e[8]=ve):(ye=e[7],ve=e[8]),(0,S.useEffect)(ye,ve);let xe;if(e[9]!==i||e[10]!==h||e[11]!==p||e[12]!==l||e[13]!==d||e[14]!==$||e[15]!==a){let I=s(async()=>{let Ee=l.trim();if(Ee===""){k(a("Enter a migration id")),u(null);return}x(!0),k(null);try{let Le=await i.query(qt,{direction:h,dryRun:p,id:Ee},ze(d));u(Le),$.refetch()}catch(Le){let jt=Le;u(null),k(He(jt))}x(!1)},"u");xe=s(()=>{Oe(I())},"V"),e[9]=i,e[10]=h,e[11]=p,e[12]=l,e[13]=d,e[14]=$,e[15]=a,e[16]=xe}else xe=e[16];let ke=xe,we;e[17]===Symbol.for("react.memo_cache_sentinel")?(we=s(I=>{f(I.target.value)},"Y"),e[17]=we):we=e[17];let Nt=we,$e;e[18]===Symbol.for("react.memo_cache_sentinel")?($e=s(I=>{g(I.target.value==="down"?"down":"up")},"Z"),e[18]=$e):$e=e[18];let St=$e,Ne;e[19]===Symbol.for("react.memo_cache_sentinel")?(Ne=s(I=>{b(I.target.checked)},"ee"),e[19]=Ne):Ne=e[19];let Ot=Ne,_;e[20]!==n||e[21]!==d?(_=(0,m.jsx)(tt,{onChange:n,testId:"mg-shard-input",value:d}),e[20]=n,e[21]=d,e[22]=_):_=e[22];let D;e[23]!==Re?(D=(0,m.jsx)(st,{message:Re,prefix:"mg"}),e[23]=Re,e[24]=D):D=e[24];let K;e[25]!==_||e[26]!==D?(K=(0,m.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[_,D]}),e[25]=_,e[26]=D,e[27]=K):K=e[27];let E;e[28]!==Ie||e[29]!==Fe?(E=Ie!==null&&(0,m.jsx)(Te,{error:Fe,testId:"mg-status-error"}),e[28]=Ie,e[29]=Fe,e[30]=E):E=e[30];let J;e[31]!==N||e[32]!==a?(J=N!==null&&N.length===0&&(0,m.jsx)(qe,{description:a("Data migrations you run against this shard will be tracked here."),icon:(0,m.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,m.jsx)("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"})}),testId:"mg-empty",title:a("No migrations have run on this shard.")}),e[31]=N,e[32]=a,e[33]=J):J=e[33];let A;e[34]!==N||e[35]!==a?(A=N!==null&&N.length>0&&(0,m.jsx)(Xe,{className:"overflow-hidden py-0",children:(0,m.jsx)(Ye,{className:"px-0",children:(0,m.jsxs)(rt,{"data-testid":"mg-table",children:[(0,m.jsx)(it,{children:(0,m.jsxs)(_e,{children:[(0,m.jsx)(q,{children:a("id")}),(0,m.jsx)(q,{children:a("direction")}),(0,m.jsx)(q,{children:a("status")}),(0,m.jsx)(q,{children:a("processed")}),(0,m.jsx)(q,{children:a("changed")}),(0,m.jsx)(q,{children:a("updated")}),(0,m.jsx)(q,{children:a("error")})]})}),(0,m.jsx)(nt,{children:N.map(Tt)})]})})}),e[34]=N,e[35]=a,e[36]=A):A=e[36];let P;e[37]!==a?(P=a("Run migration"),e[37]=a,e[38]=P):P=e[38];let B;e[39]!==P?(B=(0,m.jsx)(De,{children:P}),e[39]=P,e[40]=B):B=e[40];let W;e[41]!==a?(W=a("Migration id"),e[41]=a,e[42]=W):W=e[42];let U;e[43]!==a?(U=a("migration id"),e[43]=a,e[44]=U):U=e[44];let z;e[45]!==l||e[46]!==W||e[47]!==U?(z=(0,m.jsx)(Ge,{"aria-label":W,className:"w-auto","data-testid":"mg-id-input",onChange:Nt,placeholder:U,value:l}),e[45]=l,e[46]=W,e[47]=U,e[48]=z):z=e[48];let H;e[49]!==a?(H=a("Direction"),e[49]=a,e[50]=H):H=e[50];let Q;e[51]!==a?(Q=a("up"),e[51]=a,e[52]=Q):Q=e[52];let V;e[53]!==Q?(V=(0,m.jsx)("option",{value:"up",children:Q}),e[53]=Q,e[54]=V):V=e[54];let G;e[55]!==a?(G=a("down"),e[55]=a,e[56]=G):G=e[56];let Z;e[57]!==G?(Z=(0,m.jsx)("option",{value:"down",children:G}),e[57]=G,e[58]=Z):Z=e[58];let X;e[59]!==h||e[60]!==H||e[61]!==V||e[62]!==Z?(X=(0,m.jsxs)("select",{"aria-label":H,className:"flex h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs transition-colors outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 dark:bg-input/30","data-testid":"mg-direction",onChange:St,value:h,children:[V,Z]}),e[59]=h,e[60]=H,e[61]=V,e[62]=Z,e[63]=X):X=e[63];let Y;e[64]!==p?(Y=(0,m.jsx)("input",{checked:p,className:"size-4 accent-primary","data-testid":"mg-dry-run",id:"mg-dry-run",onChange:Ot,type:"checkbox"}),e[64]=p,e[65]=Y):Y=e[65];let ee;e[66]!==a?(ee=a("Dry run"),e[66]=a,e[67]=ee):ee=e[67];let te;e[68]!==Y||e[69]!==ee?(te=(0,m.jsxs)(De,{className:"flex items-center gap-1.5",htmlFor:"mg-dry-run",children:[Y,ee]}),e[68]=Y,e[69]=ee,e[70]=te):te=e[70];let ae;e[71]!==p||e[72]!==ke||e[73]!==y||e[74]!==C||e[75]!==a?(ae=p?(0,m.jsx)(Ze,{"data-testid":"mg-run",disabled:y||!C,onClick:ke,type:"button",children:a(y?"Running\u2026":"Run")}):(0,m.jsx)(ot,{confirmLabel:a(y?"Running\u2026":"Run migration?"),disabled:y||!C,onConfirm:ke,testId:"mg-run",children:a("Run")}),e[71]=p,e[72]=ke,e[73]=y,e[74]=C,e[75]=a,e[76]=ae):ae=e[76];let re;e[77]!==z||e[78]!==X||e[79]!==te||e[80]!==ae?(re=(0,m.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[z,X,te,ae]}),e[77]=z,e[78]=X,e[79]=te,e[80]=ae,e[81]=re):re=e[81];let ie;e[82]!==B||e[83]!==re?(ie=(0,m.jsxs)("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card p-3 shadow-xs",children:[B,re]}),e[82]=B,e[83]=re,e[84]=ie):ie=e[84];let ne;e[85]!==w?(ne=w!==null&&(0,m.jsx)("pre",{className:"text-sm text-destructive whitespace-pre-wrap","data-testid":"mg-run-error",role:"alert",children:w}),e[85]=w,e[86]=ne):ne=e[86];let oe;e[87]!==v||e[88]!==a?(oe=v!==null&&(0,m.jsxs)("p",{className:"text-sm text-muted-foreground","data-testid":"mg-run-result",children:[v.dryRun?a("Dry run: "):"",a("{status} \u2014 processed",{status:v.status}),v.processed,a(", changed"),v.changed]}),e[87]=v,e[88]=a,e[89]=oe):oe=e[89];let Se;return e[90]!==K||e[91]!==E||e[92]!==J||e[93]!==A||e[94]!==ie||e[95]!==ne||e[96]!==oe?(Se=(0,m.jsxs)("div",{className:"flex flex-col gap-3 pt-4","data-testid":"lunora-migrations",children:[K,E,J,A,ie,ne,oe]}),e[90]=K,e[91]=E,e[92]=J,e[93]=A,e[94]=ie,e[95]=ne,e[96]=oe,e[97]=Se):Se=e[97],Se},"yt");function Tt(t){return(0,m.jsxs)(_e,{"data-testid":`mg-row-${t.id}`,children:[(0,m.jsx)(T,{children:t.id}),(0,m.jsx)(T,{children:t.direction}),(0,m.jsx)(T,{children:(0,m.jsx)(Ve,{variant:"secondary",children:t.status})}),(0,m.jsx)(T,{children:t.processed}),(0,m.jsx)(T,{children:t.changed}),(0,m.jsx)(T,{children:je(t.updatedAt)}),(0,m.jsx)(T,{children:t.error??""})]},t.id)}s(Tt,"Je");var c=se(Pe(),1);var Ke=1;function Ct(t){let e={},r=Object.keys(t);r.sort();for(let i of r)e[i]=t[i];return e}s(Ct,"me");var me=s(t=>typeof t=="object"&&t!==null,"O"),Mt=s(t=>me(t)&&me(t.fields)&&me(t.indexes)&&me(t.relations)&&typeof t.shardMode=="string","ue"),It=s(t=>{if(t===void 0||t.trim()==="")return{status:"absent"};let e;try{e=JSON.parse(t)}catch(r){return{error:`baseline is not valid JSON: ${r instanceof Error?r.message:String(r)}`,status:"invalid"}}if(!me(e)||e.version!==Ke||!me(e.tables))return{error:`baseline is malformed or written by an incompatible version (expected version ${String(Ke)})`,status:"invalid"};for(let[r,i]of Object.entries(e.tables))if(!Mt(i))return{error:`baseline table "${r}" has an invalid structure`,status:"invalid"};return{snapshot:{jurisdiction:typeof e.jurisdiction=="string"?e.jurisdiction:void 0,migrationIds:Array.isArray(e.migrationIds)?e.migrationIds:[],tables:e.tables,version:Ke},status:"ok"}},"fe"),Ft=s((t,e)=>t.unique===e.unique&&t.fields.length===e.fields.length&&t.fields.every((r,i)=>r===e.fields[i]),"he"),mt=s(t=>t.unique!==void 0,"V"),ge=s(({nullable:t,optional:e,refined:r,unique:i,...a})=>JSON.stringify(Ct(a)),"q"),ut=s(t=>({form:JSON.stringify([ge(t),t.optional===!0,t.nullable===!0]),refined:t.refined===!0}),"G"),ht=s(t=>t.kind==="union"&&t.members?t.members.map(e=>ut(e)):[ut({...t,nullable:!1,optional:!1})],"Q"),Rt=s((t,e)=>{if(e.kind!=="union")return!1;let r=ht(e);return ht(t).every(i=>r.some(a=>a.form===i.form&&(i.refined||!a.refined)))},"pe"),O=s(t=>{switch(t.kind){case"array":return`array(${t.of?O(t.of):"?"})`;case"from":return t.output===void 0?"from":`from(${t.output})`;case"id":return`id(${t.ref??"?"})`;case"literal":return`literal(${t.literal??"?"})`;case"object":return`object({ ${Object.keys(t.fields??{}).join(", ")} })`;case"record":return`record(${t.key?O(t.key):"?"}, ${t.of?O(t.of):"?"})`;case"union":return(t.members??[]).map(e=>O(e)).join(" | ");default:return t.kind}},"x"),fe=s((t,e,r)=>({remediation:"backfill",scope:"table",severity:"breaking",summary:r,table:t,type:e}),"F"),pe=s((t,e,r)=>({remediation:"none",scope:"table",severity:"safe",summary:r,table:t,type:e}),"T"),kt=s((t,e)=>{let r=JSON.stringify(t),i=JSON.stringify(e);return r===i?0:r<i?-1:1},"Z"),ue=s(t=>({...t,...t.kind==="from"?{output:void 0}:{},...t.fields?{fields:Object.fromEntries(Object.entries(t.fields).map(([e,r])=>[e,ue(r)]))}:{},...t.key?{key:ue(t.key)}:{},...t.of?{of:ue(t.of)}:{},...t.members?{members:t.members.map(e=>ue(e)).toSorted(kt)}:{}}),"S"),ft=s(t=>t.kind==="union"?t.members??[]:[t],"U"),Lt=s((t,e)=>{let r=[...t],i=[...e],a=new Set,o=new Set,n=s((d,l)=>{for(let[f,h]of r.entries()){if(o.has(f))continue;let g=i.findIndex((p,b)=>!a.has(b)&&d(h,p));g!==-1&&(a.add(g),o.add(f),l&&([r[f],i[g]]=Me(h,i[g])))}},"s");return n((d,l)=>JSON.stringify(d)===JSON.stringify(l),!1),n((d,l)=>ge(ue(d))===ge(ue(l)),!0),[r,i]},"ge"),Me=s((t,e)=>{if(t.kind==="union"||e.kind==="union"){let[a,o]=Lt(ft(t),ft(e)),n=s((d,l)=>d.kind==="union"?{...d,members:l.toSorted(kt)}:l[0],"s");return[n(t,a),n(e,o)]}if(t.kind!==e.kind)return[t,e];if(t.kind==="from")return t.output===void 0||e.output===void 0?[{...t,output:void 0},{...e,output:void 0}]:[t,e];let r={...t.fields?{fields:{...t.fields}}:{}},i={...e.fields?{fields:{...e.fields}}:{}};for(let a of["key","of"])t[a]&&e[a]&&([r[a],i[a]]=Me(t[a],e[a]));for(let a of Object.keys(t.fields??{})){let o=t.fields?.[a],n=e.fields?.[a];o&&n&&r.fields&&i.fields&&([r.fields[a],i.fields[a]]=Me(o,n))}return[{...t,...r},{...e,...i}]},"I"),_t=s((t,e,r,i,a)=>{let[o,n]=Me(r,i);if(o.kind===n.kind&&(!a||ge(o)===ge(n)))return;if(a&&Rt(o,n))return pe(t,"widenedFieldShape",`field ${t}.${e} widened: ${O(o)} \u2192 ${O(n)} \u2014 every stored value stays valid`);if(o.kind!==n.kind)return fe(t,"changedFieldKind",`field ${t}.${e} changed type: ${o.kind} \u2192 ${n.kind} \u2014 add a data migration to convert existing values`);let d=Object.values(n.fields??{});return a&&o.kind==="object"&&Object.keys(o.fields??{}).length===0&&d.length>0&&d.every(l=>l.optional)?pe(t,"widenedFieldShape",`field ${t}.${e} now records its optional object shape \u2014 stored values stay valid`):fe(t,"changedFieldShape",`field ${t}.${e} changed shape: ${O(o)} \u2192 ${O(n)} \u2014 stored values were written against the old shape; add a data migration to convert them`)},"be"),Dt=s((t,e,r,i)=>{let a=[];return r.unique!==i.unique&&a.push(i.unique===!0?fe(t,"addedFieldConstraint",`field ${t}.${e} became unique \u2014 existing duplicates would violate it; add a data migration to de-duplicate first`):pe(t,"relaxedFieldConstraint",`field ${t}.${e} is no longer unique`)),r.nullable!==i.nullable&&a.push(i.nullable===!0?pe(t,"relaxedFieldConstraint",`field ${t}.${e} became nullable`):fe(t,"addedFieldConstraint",`field ${t}.${e} is no longer nullable \u2014 rows holding NULL would be invalid; add a data migration to backfill them`)),r.refined!==i.refined&&a.push(i.refined===!0?fe(t,"addedFieldConstraint",`field ${t}.${e} gained a validation refinement \u2014 stored values were never checked against it; add a data migration if any could fail`):pe(t,"relaxedFieldConstraint",`field ${t}.${e} dropped its validation refinement`)),a},"ye"),wt=s((t,e,r,i)=>{let a=[],o=mt(r)&&mt(i),n=_t(t,e,r,i,o);return n&&a.push(n),o&&a.push(...Dt(t,e,r,i)),r.optional&&!i.optional?a.push({remediation:"backfill",severity:"breaking",summary:`field ${t}.${e} became required \u2014 rows missing it would be invalid; add a data migration to backfill it`,table:t,scope:"table",type:"fieldOptionalToRequired"}):!r.optional&&i.optional&&a.push({remediation:"none",scope:"table",severity:"safe",summary:`field ${t}.${e} became optional`,table:t,type:"fieldRequiredToOptional"}),a},"N"),Kt=s((t,e,r)=>r.optional?{remediation:"none",scope:"table",severity:"safe",summary:`added optional field ${t}.${e}`,table:t,type:"addedOptionalField"}:{remediation:"backfill",severity:"breaking",summary:`added required field ${t}.${e} \u2014 existing rows have no value; add a data migration to backfill it`,table:t,scope:"table",type:"addedRequiredField"},"ve"),Et=s((t,e,r,i)=>{for(let[a,o]of Object.entries(r.fields)){let n=e.fields[a];n===void 0?i.push(Kt(t,a,o)):i.push(...wt(t,a,n,o))}for(let a of Object.keys(e.fields))r.fields[a]===void 0&&i.push({remediation:"backfill",severity:"breaking",summary:`removed field ${t}.${a} \u2014 add a data migration if stored data must be cleaned up`,table:t,scope:"table",type:"removedField"})},"xe"),Jt=s((t,e,r,i)=>{for(let[a,o]of Object.entries(r.indexes)){let n=e.indexes[a];if(n===void 0){i.push(o.unique?{remediation:"backfill",scope:"table",severity:"breaking",summary:`added unique index ${a} on ${t} \u2014 existing duplicates would violate it; add a data migration to de-duplicate first`,table:t,type:"addedIndex"}:{remediation:"none",scope:"table",severity:"safe",summary:`added index ${a} on ${t}`,table:t,type:"addedIndex"});continue}Ft(n,o)||i.push({remediation:"code",severity:"breaking",summary:`index ${a} on ${t} changed shape \u2014 a query may have relied on the old index`,table:t,scope:"table",type:"changedIndex"})}for(let a of Object.keys(e.indexes))r.indexes[a]===void 0&&i.push({remediation:"code",severity:"breaking",summary:`removed index ${a} on ${t} \u2014 a query that used \`.withIndex("${a}")\` would break`,table:t,scope:"table",type:"removedIndex"})},"ke"),At=s((t,e,r,i)=>{for(let a of Object.keys(r.relations))e.relations[a]===void 0&&i.push({remediation:"none",scope:"schema",severity:"safe",summary:`added relation ${t}.${a}`,table:t,type:"addedRelation"});for(let a of Object.keys(e.relations))r.relations[a]===void 0&&i.push({remediation:"code",scope:"schema",severity:"breaking",summary:`removed relation ${t}.${a}`,table:t,type:"removedRelation"})},"$e"),pt="shardBy:_unknown_",Ce="global",Pt=s((t,e)=>t===Ce&&e.startsWith(`${Ce}:`)||e===Ce&&t.startsWith(`${Ce}:`),"we"),Bt=s((t,e,r)=>{if(e===r)return r!==pt?void 0:{remediation:"rehome",scope:"table",severity:"breaking",summary:`table ${t} declares a non-literal .shardBy(...) key, so codegen cannot read which column partitions it \u2014 every such key records as "${pt}" and two DIFFERENT keys would compare equal. Pass the shard key as a string literal; until then this is reported on every run, because the alternative is a silent pass on a re-home that strands every row (export/import is the only way back).`,table:t,type:"changedShardMode"};if(!Pt(e,r))return{remediation:"rehome",severity:"breaking",summary:`table ${t} changed shard mode: ${e} \u2192 ${r} \u2014 its physical storage moves, and existing rows do NOT follow the schema; re-home them with an export/import round trip (https://lunora.sh/docs/concepts/sharding#migrating-a-populated-table)`,table:t,scope:"table",type:"changedShardMode"}},"Oe"),gt=s(t=>t.memory!==void 0,"B"),bt=s(t=>t.after??0,"K"),R=s(t=>t.after===void 0?`.ttl("${t.field}")`:`.ttl("${t.field}", { after: ${String(t.after)} })`,"w"),Wt=s((t,e,r)=>{if(e===void 0&&r===void 0)return;let i=s(d=>({remediation:"backfill",scope:"table",severity:"breaking",summary:d,table:t,type:"changedTtlPolicy"}),"i"),a=s(d=>({remediation:"none",scope:"table",severity:"safe",summary:d,table:t,type:"changedTtlPolicy"}),"o");if(r===void 0)return a(`table ${t} dropped its TTL policy \u2014 its rows are no longer swept`);if(e===void 0)return i(`table ${t} gained a TTL policy ${R(r)} \u2014 every row already past the cutoff is deleted on the next alarm sweep; add a data migration to refresh or clear "${r.field}" on the rows written before it`);if(e.field!==r.field)return i(`table ${t} moved its TTL to a different column: ${R(e)} \u2192 ${R(r)} \u2014 rows are now expired by a column they were never written against; add a data migration to populate "${r.field}"`);let o=bt(e),n=bt(r);return n<o?i(`table ${t} shortened its TTL: ${R(e)} \u2192 ${R(r)} \u2014 rows that were not expired under the old offset are deleted on the next alarm sweep; add a data migration to refresh "${r.field}" on the rows that must survive`):n>o?a(`table ${t} lengthened its TTL: ${R(e)} \u2192 ${R(r)}`):void 0},"Se"),Ut=s((t,e,r)=>{let i=[];return e.memory!==r.memory&&i.push(r.memory===!0?{remediation:"rehome",scope:"table",severity:"breaking",summary:`table ${t} became a .memory() table \u2014 every row is deleted in every shard on the next Durable Object cold start, and no data migration survives that; export the rows first if they must be kept, or revert`,table:t,type:"changedMemoryMode"}:{remediation:"none",scope:"table",severity:"safe",summary:`table ${t} is no longer a .memory() table \u2014 its rows now survive a cold start`,table:t,type:"changedMemoryMode"}),e.commitOrdered!==r.commitOrdered&&i.push(r.commitOrdered===!0?{remediation:"backfill",scope:"table",severity:"breaking",summary:`table ${t} became .commitOrdered() \u2014 rows written before it carry no _commitSeq, so a \`_commitSeq > cursor\` changefeed never offers them; add a data migration over the table to stamp them (the rewrite allocates a sequence)`,table:t,type:"changedCommitOrdering"}:{remediation:"code",scope:"table",severity:"breaking",summary:`table ${t} is no longer .commitOrdered() \u2014 new rows carry no _commitSeq, so a \`_commitSeq > cursor\` changefeed stops advancing without erroring; update the consumers before deploying`,table:t,type:"changedCommitOrdering"}),i},"je"),zt=s((t,e,r,i)=>{let a=Bt(t,e.shardMode,r.shardMode);if(a&&i.push(a),gt(e)&&gt(r)){i.push(...Ut(t,e,r));let o=Wt(t,e.ttl,r.ttl);o&&i.push(o)}Et(t,e,r,i),Jt(t,e,r,i),At(t,e,r,i)},"Fe"),Ht=s((t,e)=>{let r=[],i=t?.tables??{};for(let[a,o]of Object.entries(e.tables)){let n=i[a];if(n===void 0){r.push({remediation:"none",scope:"table",severity:"safe",summary:`added table ${a}`,table:a,type:"addedTable"});continue}zt(a,n,o,r)}for(let a of Object.keys(i))e.tables[a]===void 0&&r.push({remediation:"rehome",scope:"table",severity:"breaking",summary:`removed table ${a} \u2014 its rows stay in each shard's SQLite, unreachable through the schema; export the shard first if the data must be kept`,table:a,type:"removedTable"});if(t!==void 0&&t.jurisdiction!==e.jurisdiction){let a=t.jurisdiction??"(none)",o=e.jurisdiction??"(none)";r.push({remediation:"rehome",scope:"schema",severity:"breaking",summary:`Durable Object jurisdiction changed from ${a} to ${o} \u2014 this re-homes every DO and strands all existing shard, scheduler, and session-DO data in the old region (no in-place migration; export then import to move it). Revert the change, or override the gate to proceed intentionally.`,type:"changedJurisdiction"})}return{changes:r}},"Te"),yt=s(t=>Object.entries(t.fields).map(([e,r])=>({name:e,optional:r.optional,ref:Object.values(t.relations).find(i=>i.field===e&&i.kind==="one")?.table,type:O(r)})),"Y"),vt=s((t,e,r)=>{let i={},a=e?.fields??{},o=r?.fields??{};for(let[n,d]of Object.entries(o)){let l=a[n];l===void 0?i[n]=e===void 0?"unchanged":"added":i[n]=wt(t,n,l,d).length===0?"unchanged":"changed"}for(let n of Object.keys(a))o[n]===void 0&&(i[n]="removed");return i},"z"),Qt=s((t,e)=>{let{changes:r}=Ht(t,e),i=new Set(r.filter(n=>n.scope==="table"&&n.table!==void 0).map(n=>n.table)),a=[],o=s((n,d)=>n?"added":i.has(d)?"changed":"context","r");for(let[n,d]of Object.entries(e.tables)){let l=t?.tables[n],f=o(l===void 0,n);a.push({columns:yt(d),fieldStatus:vt(n,l,d),name:n,shardMode:d.shardMode,status:f})}for(let[n,d]of Object.entries(t?.tables??{}))e.tables[n]===void 0&&a.push({columns:yt(d),fieldStatus:vt(n,d,void 0),name:n,shardMode:d.shardMode,status:"removed"});return a.sort((n,d)=>n.name.localeCompare(d.name)),{breakingCount:r.filter(n=>n.severity==="breaking").length,changes:r,tables:a}},"Me"),xt=s(t=>{let e=It(t);return e.status==="ok"?e.snapshot:void 0},"X"),Vt={added:"ring-2 ring-emerald-500/60",changed:"ring-2 ring-amber-500/70",context:"opacity-55",removed:"opacity-70 ring-2 ring-destructive/60"},Gt=s(t=>t==="global"||t.startsWith("global:")?"global":"shard","Ce"),Zt=s(t=>{let e=(0,be.c)(24),{appliedAt:r,hash:i,onSelect:a,selected:o,seq:n}=t,d=o?"border-s-primary bg-accent/60 text-foreground":"border-s-transparent text-muted-foreground hover:bg-accent/30 hover:text-foreground",l;e[0]!==d?(l=le("flex w-full flex-col items-start gap-1 border-s-2 px-4 py-3 text-start outline-none transition-colors",d),e[0]=d,e[1]=l):l=e[1];let f=`sh-version-${i}`,h;e[2]!==i||e[3]!==a?(h=s(()=>{a(i)},"f"),e[2]=i,e[3]=a,e[4]=h):h=e[4];let g;e[5]!==n?(g=(0,c.jsxs)("span",{className:"font-mono text-[13px] tabular-nums",children:["v",n]}),e[5]=n,e[6]=g):g=e[6];let p;e[7]!==i?(p=i.slice(0,7),e[7]=i,e[8]=p):p=e[8];let b;e[9]!==p?(b=(0,c.jsx)("span",{className:"ms-auto font-mono text-[10px] tracking-wider text-muted-foreground/70 uppercase",children:p}),e[9]=p,e[10]=b):b=e[10];let y;e[11]!==g||e[12]!==b?(y=(0,c.jsxs)("span",{className:"flex w-full items-baseline gap-2",children:[g,b]}),e[11]=g,e[12]=b,e[13]=y):y=e[13];let x;e[14]!==r?(x=je(r),e[14]=r,e[15]=x):x=e[15];let v;e[16]!==x?(v=(0,c.jsx)("span",{className:"font-mono text-[10px] tracking-wide text-muted-foreground/70",children:x}),e[16]=x,e[17]=v):v=e[17];let u;return e[18]!==v||e[19]!==l||e[20]!==f||e[21]!==h||e[22]!==y?(u=(0,c.jsx)("li",{children:(0,c.jsxs)("button",{className:l,"data-testid":f,onClick:h,type:"button",children:[y,v]})}),e[18]=v,e[19]=l,e[20]=f,e[21]=h,e[22]=y,e[23]=u):u=e[23],u},"Ie"),Xt=s(t=>{let e=(0,be.c)(26),{breaking:r,count:i,first:a}=t,o=ce();if(a){let b;e[0]!==i?(b=(0,c.jsx)("span",{className:"text-3xl leading-none font-light tracking-tight tabular-nums",children:i}),e[0]=i,e[1]=b):b=e[1];let y;e[2]!==o?(y=o("tables"),e[2]=o,e[3]=y):y=e[3];let x;e[4]!==y?(x=(0,c.jsx)("span",{className:"font-mono text-[11px] tracking-widest text-muted-foreground uppercase",children:y}),e[4]=y,e[5]=x):x=e[5];let v;return e[6]!==b||e[7]!==x?(v=(0,c.jsxs)("div",{className:"flex items-baseline gap-3","data-testid":"sh-summary",children:[b,x]}),e[6]=b,e[7]=x,e[8]=v):v=e[8],v}let n=r>0&&"text-destructive",d;e[9]!==n?(d=le("text-3xl leading-none font-light tracking-tight tabular-nums",n),e[9]=n,e[10]=d):d=e[10];let l;e[11]!==i||e[12]!==d?(l=(0,c.jsx)("span",{className:d,children:i}),e[11]=i,e[12]=d,e[13]=l):l=e[13];let f;e[14]!==i||e[15]!==o?(f=o(i===1?"change":"changes"),e[14]=i,e[15]=o,e[16]=f):f=e[16];let h;e[17]!==f?(h=(0,c.jsx)("span",{className:"font-mono text-[11px] tracking-widest text-muted-foreground uppercase",children:f}),e[17]=f,e[18]=h):h=e[18];let g;e[19]!==r||e[20]!==o?(g=r>0&&(0,c.jsxs)("span",{className:"font-mono text-[11px] tracking-widest text-destructive uppercase",children:["\xB7 ",o("{count} breaking",{count:r})]}),e[19]=r,e[20]=o,e[21]=g):g=e[21];let p;return e[22]!==l||e[23]!==h||e[24]!==g?(p=(0,c.jsxs)("div",{className:"flex items-baseline gap-3","data-testid":"sh-summary",children:[l,h,g]}),e[22]=l,e[23]=h,e[24]=g,e[25]=p):p=e[25],p},"Re"),$t={addedFieldConstraint:{action:"added",kind:"constraint"},addedIndex:{action:"added",kind:"index"},addedOptionalField:{action:"added",kind:"field?"},addedRelation:{action:"added",kind:"relation"},addedRequiredField:{action:"added",kind:"field"},addedTable:{action:"added",kind:"table"},changedCommitOrdering:{action:"changed",kind:"commit ordering"},changedFieldKind:{action:"changed",kind:"field kind"},changedFieldShape:{action:"changed",kind:"field shape"},changedIndex:{action:"changed",kind:"index"},changedJurisdiction:{action:"changed",kind:"jurisdiction"},changedMemoryMode:{action:"changed",kind:"memory mode"},changedShardMode:{action:"changed",kind:"shard mode"},changedTtlPolicy:{action:"changed",kind:"TTL policy"},fieldOptionalToRequired:{action:"changed",kind:"field \u2192 required"},fieldRequiredToOptional:{action:"changed",kind:"field \u2192 optional"},relaxedFieldConstraint:{action:"removed",kind:"constraint"},removedField:{action:"removed",kind:"field"},removedIndex:{action:"removed",kind:"index"},removedRelation:{action:"removed",kind:"relation"},removedTable:{action:"removed",kind:"table"},widenedFieldShape:{action:"changed",kind:"field \u2192 wider"}},Yt=s((t,e)=>{let r=`${$t[t.type].action} ${e} `;return t.summary.startsWith(r)?t.summary.slice(r.length):t.summary},"Ee"),ea=s(t=>{let e=new Map;for(let i of t){let a=i.table??"",o=e.get(a);o===void 0?e.set(a,[i]):o.push(i)}let r=[...e].map(([i,a])=>({changes:a,table:i}));return[...r.filter(i=>i.table!==""),...r.filter(i=>i.table==="")]},"Ae"),ta=s(t=>{let e=(0,be.c)(2),{children:r}=t,i;return e[0]!==r?(i=(0,c.jsx)("div",{className:"px-4 pt-4 pb-2 font-mono text-[10px] tracking-widest text-muted-foreground/70 uppercase",children:r}),e[0]=r,e[1]=i):i=e[1],i},"De"),aa=s(({pane:t,shardKey:e=""})=>{let r=ce(),i=We(),a=Be({strict:!1}).version,o=s(u=>{Oe(i({search:{version:u},to:"/migrations"}))},"s"),n=de(F.schemaHistory,{},{shardKey:e}),d=n.data?.versions??[],l=a!==void 0&&d.some(u=>u.hash===a)?a:d[0]?.hash,f=d.findIndex(u=>u.hash===l),h=f===-1?void 0:d[f+1]?.hash,g=de(F.schemaVersion,{hash:l??""},{enabled:l!==void 0,shardKey:e}),p=de(F.schemaVersion,{hash:h??""},{enabled:h!==void 0,shardKey:e}),b=(0,he.useMemo)(()=>{let u=xt(g.data?.version?.snapshotJson);if(u!==void 0)return Qt(xt(p.data?.version?.snapshotJson),u)},[g.data,p.data]),y=(0,he.useMemo)(()=>(b?.tables??[]).map(u=>({columns:u.columns,name:u.name,tier:Gt(u.shardMode)})),[b]),x=(0,he.useMemo)(()=>{let u={};for(let w of b?.tables??[])u[w.name]=Vt[w.status];return u},[b]);if(n.error!==null)return(0,c.jsx)(Te,{error:n.errorSource,testId:"sh-error"});if(d.length===0)return(0,c.jsx)(qe,{description:r("Each distinct schema shape this shard runs is recorded here, so you can see what changed and when."),testId:"sh-empty",title:r("No schema versions recorded yet.")});let v=b?.changes??[];return(0,c.jsxs)("div",{className:"flex min-h-0 flex-1 gap-4","data-testid":"lunora-schema-history",children:[(0,c.jsxs)("nav",{className:"flex w-56 shrink-0 flex-col overflow-hidden border-e border-border","data-testid":"sh-timeline-rail",children:[(0,c.jsx)(ta,{children:r("Schema versions")}),(0,c.jsx)("ul",{className:"min-h-0 flex-1 overflow-y-auto","data-testid":"sh-timeline",children:d.map(u=>(0,c.jsx)(Zt,{appliedAt:u.appliedAt,hash:u.hash,onSelect:o,selected:u.hash===l,seq:u.seq},u.hash))})]}),(0,c.jsxs)("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col gap-4 pe-1 pt-4",children:[(0,c.jsx)(Xt,{breaking:b?.breakingCount??0,count:h===void 0?y.length:v.length,first:h===void 0}),t==="diagram"?(0,c.jsx)("div",{className:"flex min-h-0 flex-1 flex-col",children:(0,c.jsx)(dt,{fill:!0,nodeClasses:x,tables:y,testIdPrefix:"sh"})}):(0,c.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto","data-testid":"sh-changes",children:ea(v).map(u=>{let w=(b?.tables??[]).find(k=>k.name===u.table);return(0,c.jsxs)("section",{className:"mb-6",children:[(0,c.jsxs)("div",{className:"flex items-baseline gap-3 border-b border-border/60 pb-1.5",children:[(0,c.jsx)("span",{className:"font-mono text-[13px] text-foreground",children:u.table===""?r("schema"):u.table}),w!==void 0&&(0,c.jsx)("span",{className:"font-mono text-[10px] tracking-widest text-muted-foreground/70 tabular-nums uppercase",children:r("{count} columns",{count:w.columns.length})}),u.changes.length>1&&(0,c.jsx)("span",{className:"ms-auto font-mono text-[10px] tracking-widest text-muted-foreground/70 tabular-nums",children:u.changes.length})]}),(0,c.jsx)("ul",{children:u.changes.map(k=>{let{action:L,kind:C}=$t[k.type],j=k.severity==="breaking",M=Yt(k,C);return(0,c.jsxs)("li",{className:"flex items-baseline gap-4 border-s-2 py-1.5 ps-3 transition-colors hover:bg-accent/30",children:[(0,c.jsx)("span",{"aria-hidden":"true",className:le("-ms-3 h-3 w-0.5 shrink-0 self-center",j?"bg-destructive":"bg-transparent")}),(0,c.jsxs)("span",{className:"w-44 shrink-0 font-mono text-[10px] tracking-widest text-muted-foreground/70 uppercase",children:[r(L)," ",C]}),M!==u.table&&(0,c.jsx)("span",{className:le("min-w-0 font-mono text-[13px]",j?"text-destructive":"text-foreground"),children:M}),j&&(0,c.jsx)("span",{className:"ms-auto shrink-0 font-mono text-[10px] tracking-widest text-destructive uppercase",children:r("breaking")})]},`${k.type}-${k.summary}`)})})]},u.table)})})]})]})},"Le"),ra=s(t=>le("-mb-px border-b-2 px-3 py-2.5 font-mono text-[11px] tracking-wider uppercase transition-colors outline-none","hover:bg-accent/40 focus-visible:bg-accent/40",t?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),"Je"),Ra=s(t=>{let e=(0,be.c)(11),{initialShardKey:r}=t,i=ce(),[a,o]=(0,he.useState)("diagram"),n;e[0]!==a?(n=s((g,p,b,y)=>(0,c.jsxs)("button",{"aria-selected":a===g,className:ra(a===g),"data-testid":b,onClick:s(()=>{o(g)},"onClick"),role:"tab",type:"button",children:[p,y!==void 0&&(0,c.jsx)("span",{className:"ms-2 tabular-nums text-muted-foreground/70",children:y})]}),"s"),e[0]=a,e[1]=n):n=e[1];let d=n,l;e[2]!==i||e[3]!==d?(l=(0,c.jsxs)("div",{className:"flex shrink-0 items-center gap-1 border-b border-border px-3","data-testid":"mg-panes",role:"tablist",children:[d("diagram",i("Diagram"),"mg-pane-diagram"),d("changes",i("Changes"),"mg-pane-changes"),d("data",i("Data migrations"),"mg-pane-data")]}),e[2]=i,e[3]=d,e[4]=l):l=e[4];let f;e[5]!==r||e[6]!==a?(f=(0,c.jsx)("div",{className:"flex min-h-0 flex-1 flex-col",children:a==="data"?(0,c.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-4",children:(0,c.jsx)(ct,{initialShardKey:r})}):(0,c.jsx)(aa,{pane:a,shardKey:r})}),e[5]=r,e[6]=a,e[7]=f):f=e[7];let h;return e[8]!==l||e[9]!==f?(h=(0,c.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col pt-4","data-testid":"lunora-migrations-route",children:[l,f]}),e[8]=l,e[9]=f,e[10]=h):h=e[10],h},"Ze");export{Ra as default};
@@ -0,0 +1 @@
1
+ import{a as Ze}from"./chunk-3X3NXJBR.js";import{a as Me,b as Re}from"./chunk-HCOF7HOM.js";import{a as ke}from"./chunk-TKBTZX4K.js";import"./chunk-5GYHGDIF.js";import"./chunk-Y2YLTUMD.js";import"./chunk-JD6PRRFO.js";import"./chunk-NGZNXNRD.js";import"./chunk-2SNHKJXK.js";import"./chunk-BCUOQNI2.js";import"./chunk-P5EVJEGC.js";import"./chunk-D65UVZIA.js";import"./chunk-NGVP66OH.js";import"./chunk-QAOZXPLU.js";import{a as Ye}from"./chunk-J45HAKBU.js";import{a as Xe}from"./chunk-FHLODLBC.js";import{b as We}from"./chunk-3D67ZJRW.js";import"./chunk-ZSWW2UGP.js";import{i as Ue}from"./chunk-RTS5G3ET.js";import"./chunk-QRA7AKYO.js";import{i as Ae}from"./chunk-IHGRWY3Y.js";import"./chunk-OWRKSQPE.js";import"./chunk-4EPW63HS.js";import{a as be}from"./chunk-V3BE427M.js";import"./chunk-CKEQX655.js";import"./chunk-UD5REVU2.js";import{a as Qe}from"./chunk-RCXNYW7P.js";import{b as je}from"./chunk-UQA2AJGI.js";import"./chunk-T3ZCW3RG.js";import{a as $e}from"./chunk-2W4UO5BC.js";import{a as qe,b as Ge,c as Ke,d as Pe,e as Le}from"./chunk-OK2QU2EV.js";import{m as Je}from"./chunk-FACXM2UB.js";import"./chunk-ZPQBVYNN.js";import{B as Oe,h as ze,i as Ee,j as Fe,s as ge,x as De}from"./chunk-GNI37YCV.js";import"./chunk-PDBW6GTJ.js";import{a as st}from"./chunk-GWNGVKLG.js";import{a as nt,b as rt}from"./chunk-6G3E4PJ2.js";import{a as r,d as Be}from"./chunk-5PEAXTYQ.js";var we=Be(st(),1);var x=Be(nt(),1);var t=Be(rt(),1);var ot=ze($e.listTables),it=ze($e.listTableIndexes),dt=ze($e.readTablePage),ct=ze($e.describeTables),mt={},He=[],ut=r(s=>{let e=(0,we.c)(74),{initialShardKey:u,initialTable:n}=s,l=Je(),[a,m]=(0,x.useState)("graph"),{queryShardKey:c,setShardKey:d,shardKey:b}=Ye(u),[o,h]=(0,x.useState)(""),[i,y]=(0,x.useState)(null),[p,$]=(0,x.useState)(null),S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={},e[0]=S):S=e[0];let[K,N]=(0,x.useState)(S),O;e[1]===Symbol.for("react.memo_cache_sentinel")?(O={},e[1]=O):O=e[1];let[E,P]=(0,x.useState)(O),[T,C]=(0,x.useState)(null),z;e[2]===Symbol.for("react.memo_cache_sentinel")?(z={},e[2]=z):z=e[2];let[F,fe]=(0,x.useState)(z),te;e[3]===Symbol.for("react.memo_cache_sentinel")?(te={},e[3]=te):te=e[3];let[_,j]=(0,x.useState)(te),[k,xe]=(0,x.useState)(null),[L,ce]=(0,x.useState)(null),le;e[4]===Symbol.for("react.memo_cache_sentinel")?(le={},e[4]=le):le=e[4];let[W,Ce]=(0,x.useState)(le),[X,me]=(0,x.useState)(null),ve=(0,x.useRef)(0),M;e[5]!==l?(M=r(async g=>{ve.current=ve.current+1;let v=ve.current;$(null);try{let w=await l.query(ot,{},Ee(g));if(v!==ve.current)return;We(g),y(w),N({}),P({}),C(null),fe(A=>Object.fromEntries(Object.entries(A).filter(I=>{let[pe]=I;return pe!==g}))),j(A=>Object.fromEntries(Object.entries(A).filter(I=>{let[pe]=I;return pe!==g})))}catch(w){let A=w;if(v!==ve.current)return;y(null),$(Fe(A))}},"D"),e[5]=l,e[6]=M):M=e[6];let B=M,ae;e[7]!==l?(ae=r(async()=>{ce(null);try{xe(await l.listGlobalTables())}catch(g){let v=g;xe(null),ce(Fe(v))}},"se"),e[7]=l,e[8]=ae):ae=e[8];let ue=ae,D,ne;e[9]!==c||e[10]!==B||e[11]!==ue?(D=r(()=>{ge(B(c)),ge(ue())},"R"),ne=[B,ue,c],e[9]=c,e[10]=B,e[11]=ue,e[12]=D,e[13]=ne):(D=e[12],ne=e[13]),(0,x.useEffect)(D,ne);let R;e[14]!==l||e[15]!==K||e[16]!==T||e[17]!==c?(R=r(async g=>{if(T===g){C(null);return}C(g);let v=`${c}:${g}`;if(K[v]!==void 0)return;let[w,A]=await Promise.allSettled([l.query(dt,{limit:1,offset:0,table:g},Ee(c)),l.query(it,{table:g},Ee(c))]);w.status==="fulfilled"?N(I=>({...I,[v]:w.value.columns})):$(Fe(w.reason)),A.status==="fulfilled"&&P(I=>({...I,[v]:A.value.indexes}))},"K"),e[14]=l,e[15]=K,e[16]=T,e[17]=c,e[18]=R):R=e[18];let se=R,re;e[19]!==l||e[20]!==W||e[21]!==X?(re=r(async g=>{if(X===g){me(null);return}if(me(g),W[g]===void 0)try{let v=await l.readGlobalTablePage({limit:1,offset:0,table:g});Ce(w=>({...w,[g]:v.columns}))}catch(v){ce(Fe(v))}},"oe"),e[19]=l,e[20]=W,e[21]=X,e[22]=re):re=e[22];let he=re,Y=(0,x.useRef)(void 0),Z,V;e[23]!==n||e[24]!==i||e[25]!==se?(Z=r(()=>{n===void 0||i===null||Y.current===n||i.some(g=>g.name===n)&&(Y.current=n,ge(se(n)))},"Q"),V=[n,i,se],e[23]=n,e[24]=i,e[25]=se,e[26]=Z,e[27]=V):(Z=e[26],V=e[27]),(0,x.useEffect)(Z,V);let oe;e[28]!==l?(oe=r(async(g,v,w)=>{let[A,I]=await Promise.all([Promise.allSettled([l.query(ct,{tables:[...v,...w]},Ee(g))]),Promise.all(w.map(async Q=>{let Se=await Promise.allSettled([l.readGlobalTablePage({limit:1,offset:0,table:Q})]),Ve=Se[0].status==="fulfilled"?Se[0].value:void 0;return{columns:Ve?.columns??[],refs:Ve?.refs??{},table:Q}}))]),pe=A[0].status==="fulfilled"?A[0].value?.columnsByTable??{}:{},_e=A[0].status==="rejected",Ie=new Map(I.map(ht)),G=[...v,...w].map(Q=>{let Se=pe[Q]??[];return[Q,Se.length>0?Se:Ie.get(Q)??[]]});fe(Q=>({...Q,[g]:Object.fromEntries(G)})),j(Q=>({...Q,[g]:_e}))},"ie"),e[28]=l,e[29]=oe):oe=e[29];let U=oe,ie,J;e[30]!==L||e[31]!==k||e[32]!==U||e[33]!==c||e[34]!==F||e[35]!==i||e[36]!==a?(ie=r(()=>{a!=="graph"||i===null||k===null&&L===null||F[c]!==void 0||ge(U(c,i.map(pt),(k??[]).map(gt)))},"re"),J=[a,i,k,L,c,F,U],e[30]=L,e[31]=k,e[32]=U,e[33]=c,e[34]=F,e[35]=i,e[36]=a,e[37]=ie,e[38]=J):(ie=e[37],J=e[38]),(0,x.useEffect)(ie,J);let q=F[c]??mt,H;if(e[39]!==q||e[40]!==k||e[41]!==i){let g;e[43]!==q?(g=r(I=>({columns:q[I.name]??He,name:I.name,tier:"shard"}),"h"),e[43]=q,e[44]=g):g=e[44];let v=(i??[]).map(g),w;e[45]!==q?(w=r(I=>({columns:q[I.name]??He,name:I.name,tier:"global"}),"N"),e[45]=q,e[46]=w):w=e[46];let A=(k??[]).map(w);H=[...v,...A],e[39]=q,e[40]=k,e[41]=i,e[42]=H}else H=e[42];let f=H,ee;if(e[47]!==o||e[48]!==i){let g=o.trim().toLowerCase();ee=(i??[]).filter(v=>v.name.toLowerCase().includes(g)),e[47]=o,e[48]=i,e[49]=ee}else ee=e[49];let de=ee,ye;if(e[50]!==k||e[51]!==o){let g=o.trim().toLowerCase();ye=(k??[]).filter(v=>v.name.toLowerCase().includes(g)),e[50]=k,e[51]=o,e[52]=ye}else ye=e[52];let Te=ye,Ne;return e[53]!==K||e[54]!==f||e[55]!==p||e[56]!==T||e[57]!==Te||e[58]!==de||e[59]!==W||e[60]!==L||e[61]!==X||e[62]!==k||e[63]!==E||e[64]!==B||e[65]!==d||e[66]!==_||e[67]!==b||e[68]!==o||e[69]!==i||e[70]!==se||e[71]!==he||e[72]!==a?(Ne={columns:K,diagramTables:f,error:p,expanded:T,filteredGlobalTables:Te,filteredTables:de,globalColumns:W,globalError:L,globalExpanded:X,globalTables:k,indexes:E,refresh:B,setShardKey:d,setTableFilter:h,setView:m,shardColumnsError:_,shardKey:b,tableFilter:o,tables:i,toggle:se,toggleGlobal:he,view:a},e[53]=K,e[54]=f,e[55]=p,e[56]=T,e[57]=Te,e[58]=de,e[59]=W,e[60]=L,e[61]=X,e[62]=k,e[63]=E,e[64]=B,e[65]=d,e[66]=_,e[67]=b,e[68]=o,e[69]=i,e[70]=se,e[71]=he,e[72]=a,e[73]=Ne):Ne=e[73],Ne},"mt");function ht(s){let{columns:e,refs:u,table:n}=s;return[n,e.map(l=>{let a=u[l];return a===void 0?{name:l,optional:!1,type:""}:{name:l,optional:!1,ref:a,type:"id"}})]}r(ht,"ut");function pt(s){return s.name}r(pt,"ft");function gt(s){return s.name}r(gt,"ht");var bt="/__lunora/schema-edit",ft=r(async s=>{let e=await fetch(bt,{body:JSON.stringify(s),headers:{"Content-Type":"application/json"},method:"POST"}),u=await e.json();return u.needsMigration===!0?{kind:"needs-migration",message:u.message??"This edit needs a migration."}:e.ok&&u.tables!==void 0?{diagnostics:u.diagnostics??[],kind:"ok",tables:u.tables}:{kind:"error",message:u.error??`schema edit failed (${String(e.status)})`}},"gt"),xt=r(s=>{let e=(0,we.c)(32),{hasTables:u,mode:n,onAddColumn:l,onAddIndex:a,onAddTable:m,onDestructive:c}=s,d=Oe(),b=n==="addTable"?"default":"outline",o;e[0]!==d?(o=d("Add table"),e[0]=d,e[1]=o):o=e[1];let h;e[2]!==m||e[3]!==b||e[4]!==o?(h=(0,t.jsx)(be,{"data-testid":"sc-editor-add-table",onClick:m,size:"xs",type:"button",variant:b,children:o}),e[2]=m,e[3]=b,e[4]=o,e[5]=h):h=e[5];let i=!u,y=n==="addColumn"?"default":"outline",p;e[6]!==d?(p=d("Add column"),e[6]=d,e[7]=p):p=e[7];let $;e[8]!==l||e[9]!==i||e[10]!==y||e[11]!==p?($=(0,t.jsx)(be,{"data-testid":"sc-editor-add-column",disabled:i,onClick:l,size:"xs",type:"button",variant:y,children:p}),e[8]=l,e[9]=i,e[10]=y,e[11]=p,e[12]=$):$=e[12];let S=!u,K=n==="addIndex"?"default":"outline",N;e[13]!==d?(N=d("Add index"),e[13]=d,e[14]=N):N=e[14];let O;e[15]!==a||e[16]!==N||e[17]!==S||e[18]!==K?(O=(0,t.jsx)(be,{"data-testid":"sc-editor-add-index",disabled:S,onClick:a,size:"xs",type:"button",variant:K,children:N}),e[15]=a,e[16]=N,e[17]=S,e[18]=K,e[19]=O):O=e[19];let E=!u,P=n==="destructive"?"default":"ghost",T;e[20]!==d?(T=d("Rename / drop / change type\u2026"),e[20]=d,e[21]=T):T=e[21];let C;e[22]!==c||e[23]!==E||e[24]!==P||e[25]!==T?(C=(0,t.jsx)(be,{"data-testid":"sc-editor-destructive",disabled:E,onClick:c,size:"xs",type:"button",variant:P,children:T}),e[22]=c,e[23]=E,e[24]=P,e[25]=T,e[26]=C):C=e[26];let z;return e[27]!==O||e[28]!==C||e[29]!==h||e[30]!==$?(z=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[h,$,O,C]}),e[27]=O,e[28]=C,e[29]=h,e[30]=$,e[31]=z):z=e[31],z},"bt"),vt=r(s=>{let e=(0,we.c)(28),{onOpenMigrations:u,result:n}=s,l=Oe();if(n===null){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(t.Fragment,{}),e[0]=o):o=e[0],o}if(n.kind==="error"){let o;return e[1]!==n.message?(o=(0,t.jsx)("p",{className:"mt-3 text-sm text-destructive","data-testid":"sc-editor-error",role:"alert",children:n.message}),e[1]=n.message,e[2]=o):o=e[2],o}if(n.kind==="needs-migration"){let o;e[3]!==n.message||e[4]!==l?(o=n.message===""?l("This edit changes stored data and must go through a migration. Review the migration before applying."):n.message,e[3]=n.message,e[4]=l,e[5]=o):o=e[5];let h;e[6]!==o?(h=(0,t.jsx)("p",{className:"text-sm text-warning",role:"alert",children:o}),e[6]=o,e[7]=h):h=e[7];let i;e[8]!==l?(i=l("Open Migrations"),e[8]=l,e[9]=i):i=e[9];let y;e[10]!==u||e[11]!==i?(y=(0,t.jsx)(be,{className:"self-start","data-testid":"sc-editor-open-migrations",onClick:u,size:"xs",type:"button",variant:"outline",children:i}),e[10]=u,e[11]=i,e[12]=y):y=e[12];let p;return e[13]!==h||e[14]!==y?(p=(0,t.jsxs)("div",{className:"mt-3 flex flex-col gap-2","data-testid":"sc-editor-needs-migration",children:[h,y]}),e[13]=h,e[14]=y,e[15]=p):p=e[15],p}if(n.diagnostics.length===0){let o;return e[16]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(t.Fragment,{}),e[16]=o):o=e[16],o}let a;e[17]!==l?(a=l("Codegen reported diagnostics:"),e[17]=l,e[18]=a):a=e[18];let m;e[19]!==a?(m=(0,t.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:a}),e[19]=a,e[20]=m):m=e[20];let c;e[21]!==n.diagnostics?(c=n.diagnostics.map(yt),e[21]=n.diagnostics,e[22]=c):c=e[22];let d;e[23]!==c?(d=(0,t.jsx)("ul",{className:"flex flex-col gap-0.5",children:c}),e[23]=c,e[24]=d):d=e[24];let b;return e[25]!==m||e[26]!==d?(b=(0,t.jsxs)("div",{className:"mt-3 flex flex-col gap-1","data-testid":"sc-editor-diagnostics",children:[m,d]}),e[25]=m,e[26]=d,e[27]=b):b=e[27],b},"xt");function yt(s){return(0,t.jsx)("li",{className:"font-mono text-[11px] text-destructive",children:s},s)}r(yt,"vt");var Nt=[{label:"string",validator:"v.string()"},{label:"number",validator:"v.number()"},{label:"boolean",validator:"v.boolean()"},{label:"bigint",validator:"v.bigint()"},{label:"bytes",validator:"v.bytes()"},{label:"any",validator:"v.any()"}],Ct="v.string()",Tt=r(s=>s.split(",").map(e=>e.trim()).filter(e=>e!==""),"Nt"),wt=r(s=>{let e=(0,we.c)(83),{onApplied:u,tableNames:n}=s,l=Oe(),a=Ue(),[m,c]=(0,x.useState)(null),[d,b]=(0,x.useState)(!1),[o,h]=(0,x.useState)(null),[i,y]=(0,x.useState)(""),[p,$]=(0,x.useState)(""),[S,K]=(0,x.useState)(Ct),[N,O]=(0,x.useState)(n[0]??""),[E,P]=(0,x.useState)(""),[T,C]=(0,x.useState)(""),[z,F]=(0,x.useState)(!1),fe;e[0]===Symbol.for("react.memo_cache_sentinel")?(fe=r(()=>{c(null),y(""),$(""),P(""),C(""),F(!1)},"pe"),e[0]=fe):fe=e[0];let te=fe,_;e[1]!==u?(_=r(async G=>{b(!0),h(null);try{let Q=await ft(G);h(Q),Q.kind==="ok"&&(u(Q.tables),te())}catch(Q){let Se=Q;h({kind:"error",message:Se instanceof Error?Se.message:String(Se)})}b(!1)},"E"),e[1]=u,e[2]=_):_=e[2];let j=_,k;e[3]!==j||e[4]!==i?(k=r(()=>{ge(j({kind:"addTable",table:i.trim()}))},"w"),e[3]=j,e[4]=i,e[5]=k):k=e[5];let xe=k,L;e[6]!==p||e[7]!==j||e[8]!==N||e[9]!==S?(L=r(()=>{ge(j({column:p.trim(),kind:"addOptionalColumn",table:N,validator:S}))},"B"),e[6]=p,e[7]=j,e[8]=N,e[9]=S,e[10]=L):L=e[10];let ce=L,le;e[11]!==T||e[12]!==E||e[13]!==j||e[14]!==N||e[15]!==z?(le=r(()=>{ge(j({fields:Tt(T),kind:"addIndex",name:E.trim(),table:N,unique:z}))},"le"),e[11]=T,e[12]=E,e[13]=j,e[14]=N,e[15]=z,e[16]=le):le=e[16];let W=le,Ce;e[17]===Symbol.for("react.memo_cache_sentinel")?(Ce=r(()=>{h(null),c("addTable")},"Ne"),e[17]=Ce):Ce=e[17];let X=Ce,me;e[18]===Symbol.for("react.memo_cache_sentinel")?(me=r(()=>{h(null),c("addColumn")},"me"),e[18]=me):me=e[18];let ve=me,M;e[19]===Symbol.for("react.memo_cache_sentinel")?(M=r(()=>{h(null),c("addIndex")},"D"),e[19]=M):M=e[19];let B=M,ae;e[20]!==l?(ae=r(()=>{c("destructive"),h({kind:"needs-migration",message:l("This edit changes stored data and must go through a migration. Review the migration before applying.")})},"se"),e[20]=l,e[21]=ae):ae=e[21];let ue=ae,D;e[22]===Symbol.for("react.memo_cache_sentinel")?(D=r(G=>{y(G.target.value)},"R"),e[22]=D):D=e[22];let ne=D,R;e[23]===Symbol.for("react.memo_cache_sentinel")?(R=r(G=>{$(G.target.value)},"K"),e[23]=R):R=e[23];let se=R,re;e[24]===Symbol.for("react.memo_cache_sentinel")?(re=r(G=>{K(G.target.value)},"oe"),e[24]=re):re=e[24];let he=re,Y;e[25]===Symbol.for("react.memo_cache_sentinel")?(Y=r(G=>{O(G.target.value)},"X"),e[25]=Y):Y=e[25];let Z=Y,V;e[26]===Symbol.for("react.memo_cache_sentinel")?(V=r(G=>{P(G.target.value)},"U"),e[26]=V):V=e[26];let oe=V,U;e[27]===Symbol.for("react.memo_cache_sentinel")?(U=r(G=>{C(G.target.value)},"V"),e[27]=U):U=e[27];let ie=U,J;e[28]===Symbol.for("react.memo_cache_sentinel")?(J=r(G=>{F(G.target.checked)},"Y"),e[28]=J):J=e[28];let q=J,H;e[29]!==a?(H=r(()=>{ge(a({to:"/migrations"}))},"Z"),e[29]=a,e[30]=H):H=e[30];let f=H,ee;e[31]!==l?(ee=l("Edit schema"),e[31]=l,e[32]=ee):ee=e[32];let de;e[33]!==ee?(de=(0,t.jsx)(Ke,{children:ee}),e[33]=ee,e[34]=de):de=e[34];let ye;e[35]!==l?(ye=l("Adds a table, column, or index to lunora/schema.ts and reruns codegen."),e[35]=l,e[36]=ye):ye=e[36];let Te;e[37]!==ye?(Te=(0,t.jsx)(Pe,{children:ye}),e[37]=ye,e[38]=Te):Te=e[38];let Ne;e[39]!==de||e[40]!==Te?(Ne=(0,t.jsxs)(Ge,{children:[de,Te]}),e[39]=de,e[40]=Te,e[41]=Ne):Ne=e[41];let g=n.length>0,v;e[42]!==m||e[43]!==ue||e[44]!==g?(v=(0,t.jsx)(xt,{hasTables:g,mode:m,onAddColumn:ve,onAddIndex:B,onAddTable:X,onDestructive:ue}),e[42]=m,e[43]=ue,e[44]=g,e[45]=v):v=e[45];let w;e[46]!==d||e[47]!==m||e[48]!==xe||e[49]!==l||e[50]!==i?(w=m==="addTable"&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"sc-editor-table-form",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-table-name",children:l("Table name")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-table-name",id:"sc-editor-table-name",onChange:ne,value:i})]}),(0,t.jsx)(be,{"data-testid":"sc-editor-table-apply",disabled:d||i.trim()==="",onClick:xe,size:"xs",type:"button",children:l(d?"Applying\u2026":"Apply")}),(0,t.jsx)(be,{onClick:te,size:"xs",type:"button",variant:"ghost",children:l("Cancel")})]}),e[46]=d,e[47]=m,e[48]=xe,e[49]=l,e[50]=i,e[51]=w):w=e[51];let A;e[52]!==d||e[53]!==p||e[54]!==m||e[55]!==ce||e[56]!==l||e[57]!==n||e[58]!==N||e[59]!==S?(A=m==="addColumn"&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"sc-editor-column-form",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-column-table",children:l("Table name")}),(0,t.jsx)("select",{className:"h-8 rounded-md border border-input bg-transparent px-2 text-xs","data-testid":"sc-editor-column-table",id:"sc-editor-column-table",onChange:Z,value:N,children:n.map(St)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-column-name",children:l("Column name")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-column-name",id:"sc-editor-column-name",onChange:se,value:p})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-column-type",children:l("Column type")}),(0,t.jsx)("select",{className:"h-8 rounded-md border border-input bg-transparent px-2 text-xs","data-testid":"sc-editor-column-type",id:"sc-editor-column-type",onChange:he,value:S,children:Nt.map(kt)})]}),(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground",children:l("Optional")}),(0,t.jsx)(be,{"data-testid":"sc-editor-column-apply",disabled:d||p.trim()===""||N==="",onClick:ce,size:"xs",type:"button",children:l(d?"Applying\u2026":"Apply")}),(0,t.jsx)(be,{onClick:te,size:"xs",type:"button",variant:"ghost",children:l("Cancel")})]}),e[52]=d,e[53]=p,e[54]=m,e[55]=ce,e[56]=l,e[57]=n,e[58]=N,e[59]=S,e[60]=A):A=e[60];let I;e[61]!==d||e[62]!==T||e[63]!==E||e[64]!==m||e[65]!==W||e[66]!==l||e[67]!==n||e[68]!==N||e[69]!==z?(I=m==="addIndex"&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"sc-editor-index-form",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-index-table",children:l("Table name")}),(0,t.jsx)("select",{className:"h-8 rounded-md border border-input bg-transparent px-2 text-xs","data-testid":"sc-editor-index-table",id:"sc-editor-index-table",onChange:Z,value:N,children:n.map(_t)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-index-name",children:l("Index name")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-index-name",id:"sc-editor-index-name",onChange:oe,value:E})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-index-fields",children:l("Index fields (comma-separated)")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-index-fields",id:"sc-editor-index-fields",onChange:ie,value:T})]}),(0,t.jsxs)(ke,{className:"flex items-center gap-1 text-xs",htmlFor:"sc-editor-index-unique",children:[(0,t.jsx)("input",{checked:z,"data-testid":"sc-editor-index-unique",id:"sc-editor-index-unique",onChange:q,type:"checkbox"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:l("Unique")})]}),(0,t.jsx)(be,{"data-testid":"sc-editor-index-apply",disabled:d||E.trim()===""||T.trim()==="",onClick:W,size:"xs",type:"button",children:l(d?"Applying\u2026":"Apply")}),(0,t.jsx)(be,{onClick:te,size:"xs",type:"button",variant:"ghost",children:l("Cancel")})]}),e[61]=d,e[62]=T,e[63]=E,e[64]=m,e[65]=W,e[66]=l,e[67]=n,e[68]=N,e[69]=z,e[70]=I):I=e[70];let pe;e[71]!==f||e[72]!==o?(pe=(0,t.jsx)(vt,{onOpenMigrations:f,result:o}),e[71]=f,e[72]=o,e[73]=pe):pe=e[73];let _e;e[74]!==v||e[75]!==w||e[76]!==A||e[77]!==I||e[78]!==pe?(_e=(0,t.jsxs)(Le,{children:[v,w,A,I,pe]}),e[74]=v,e[75]=w,e[76]=A,e[77]=I,e[78]=pe,e[79]=_e):_e=e[79];let Ie;return e[80]!==Ne||e[81]!==_e?(Ie=(0,t.jsxs)(qe,{"data-testid":"sc-editor",size:"sm",children:[Ne,_e]}),e[80]=Ne,e[81]=_e,e[82]=Ie):Ie=e[82],Ie},"Tt");function St(s){return(0,t.jsx)("option",{value:s,children:s},s)}r(St,"St");function kt(s){return(0,t.jsx)("option",{value:s.validator,children:s.label},s.validator)}r(kt,"wt");function _t(s){return(0,t.jsx)("option",{value:s,children:s},s)}r(_t,"_t");var et=[],It=r(s=>{let e=(0,we.c)(5),{open:u}=s,n=u&&"rotate-90",l;e[0]!==n?(l=De("size-3.5 shrink-0 text-muted-foreground transition-transform duration-150",n),e[0]=n,e[1]=l):l=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)("path",{d:"m9 6 6 6-6 6"}),e[2]=a):a=e[2];let m;return e[3]!==l?(m=(0,t.jsx)("svg",{"aria-hidden":"true",className:l,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:a}),e[3]=l,e[4]=m):m=e[4],m},"Et"),tt=r(s=>{let e=(0,we.c)(20),{children:u,expanded:n,name:l,onToggle:a,rowCount:m,rowTestId:c,toggleTestId:d}=s,b;e[0]!==n?(b=(0,t.jsx)(It,{open:n}),e[0]=n,e[1]=b):b=e[1];let o;e[2]!==l?(o=(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:l,children:l}),e[2]=l,e[3]=o):o=e[3];let h;e[4]!==m?(h=(0,t.jsxs)("span",{className:"ms-auto shrink-0 text-xs text-muted-foreground tabular-nums",children:["(",m,")"]}),e[4]=m,e[5]=h):h=e[5];let i;e[6]!==n||e[7]!==a||e[8]!==b||e[9]!==o||e[10]!==h||e[11]!==d?(i=(0,t.jsxs)("button",{"aria-expanded":n,className:"flex w-full items-center gap-2 px-3 py-2 text-start transition-colors hover:bg-muted/50 aria-expanded:bg-muted/40","data-testid":d,onClick:a,type:"button",children:[b,o," ",h]}),e[6]=n,e[7]=a,e[8]=b,e[9]=o,e[10]=h,e[11]=d,e[12]=i):i=e[12];let y;e[13]!==u||e[14]!==n?(y=n&&(0,t.jsx)("div",{className:"px-3 pb-3 ps-8",children:u}),e[13]=u,e[14]=n,e[15]=y):y=e[15];let p;return e[16]!==c||e[17]!==i||e[18]!==y?(p=(0,t.jsxs)("li",{className:"border-t border-border/60 first:border-t-0","data-testid":c,children:[i,y]}),e[16]=c,e[17]=i,e[18]=y,e[19]=p):p=e[19],p},"Je"),lt=r(s=>{let e=(0,we.c)(5),{columns:u,testId:n}=s,l;e[0]!==u?(l=u.map(zt),e[0]=u,e[1]=l):l=e[1];let a;return e[2]!==l||e[3]!==n?(a=(0,t.jsx)("ul",{className:"flex flex-wrap gap-1.5 pt-1","data-testid":n,children:l}),e[2]=l,e[3]=n,e[4]=a):a=e[4],a},"We"),At=r(s=>{let e=(0,we.c)(10),{heading:u,indexes:n,testId:l}=s,a;e[0]!==u?(a=(0,t.jsx)("p",{className:"mb-1.5 font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:u}),e[0]=u,e[1]=a):a=e[1];let m;e[2]!==n?(m=n.map(Et),e[2]=n,e[3]=m):m=e[3];let c;e[4]!==m||e[5]!==l?(c=(0,t.jsx)("ul",{className:"flex flex-col gap-1","data-testid":l,children:m}),e[4]=m,e[5]=l,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==c?(d=(0,t.jsxs)("div",{className:"pt-3",children:[a,c]}),e[7]=a,e[8]=c,e[9]=d):d=e[9],d},"It"),at=r(s=>De("border-b-2 px-3 py-2 font-mono text-[11px] tracking-widest uppercase outline-none transition-colors",s?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),"Xe"),Xt=r(s=>{let e=(0,we.c)(85),{initialShardKey:u,initialTable:n,schemaEditable:l}=s,a=Oe(),m;e[0]!==u||e[1]!==n?(m={initialShardKey:u,initialTable:n},e[0]=u,e[1]=n,e[2]=m):m=e[2];let{columns:c,diagramTables:d,error:b,expanded:o,filteredGlobalTables:h,filteredTables:i,globalColumns:y,globalError:p,globalExpanded:$,globalTables:S,indexes:K,refresh:N,setShardKey:O,setTableFilter:E,setView:P,shardColumnsError:T,shardKey:C,tableFilter:z,tables:F,toggle:fe,toggleGlobal:te,view:_}=ut(m),j;e[3]!==P?(j=r(()=>{P("list")},"M"),e[3]=P,e[4]=j):j=e[4];let k=j,xe;e[5]!==P?(xe=r(()=>{P("graph")},"ge"),e[5]=P,e[6]=xe):xe=e[6];let L=xe,ce;e[7]!==E?(ce=r(f=>{E(f.target.value)},"ce"),e[7]=E,e[8]=ce):ce=e[8];let le=ce,W;e[9]!==N||e[10]!==C?(W=r(f=>{ge(N(C))},"J"),e[9]=N,e[10]=C,e[11]=W):W=e[11];let Ce=W,X;e[12]!==F?(X=F??[],e[12]=F,e[13]=X):X=e[13];let me;e[14]!==X?(me=X.map(Ft),e[14]=X,e[15]=me):me=e[15];let ve=me,M;e[16]!==O||e[17]!==C?(M=(0,t.jsx)(Xe,{onChange:O,testId:"sc-shard-input",value:C}),e[16]=O,e[17]=C,e[18]=M):M=e[18];let B;e[19]!==a?(B=a("Schema view"),e[19]=a,e[20]=B):B=e[20];let ae=_==="graph",ue=_==="graph",D;e[21]!==ue?(D=at(ue),e[21]=ue,e[22]=D):D=e[22];let ne;e[23]!==a?(ne=a("Graph"),e[23]=a,e[24]=ne):ne=e[24];let R;e[25]!==L||e[26]!==ae||e[27]!==D||e[28]!==ne?(R=(0,t.jsx)("button",{"aria-selected":ae,className:D,"data-testid":"sc-view-graph",onClick:L,role:"tab",type:"button",children:ne}),e[25]=L,e[26]=ae,e[27]=D,e[28]=ne,e[29]=R):R=e[29];let se=_==="list",re=_==="list",he;e[30]!==re?(he=at(re),e[30]=re,e[31]=he):he=e[31];let Y;e[32]!==a?(Y=a("Table list"),e[32]=a,e[33]=Y):Y=e[33];let Z;e[34]!==k||e[35]!==se||e[36]!==he||e[37]!==Y?(Z=(0,t.jsx)("button",{"aria-selected":se,className:he,"data-testid":"sc-view-list",onClick:k,role:"tab",type:"button",children:Y}),e[34]=k,e[35]=se,e[36]=he,e[37]=Y,e[38]=Z):Z=e[38];let V;e[39]!==R||e[40]!==Z||e[41]!==B?(V=(0,t.jsxs)("div",{"aria-label":B,className:"flex items-center gap-1","data-testid":"sc-view-toggle",role:"tablist",children:[R,Z]}),e[39]=R,e[40]=Z,e[41]=B,e[42]=V):V=e[42];let oe;e[43]!==V||e[44]!==M?(oe=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[M,V]}),e[43]=V,e[44]=M,e[45]=oe):oe=e[45];let U;e[46]!==Ce||e[47]!==l||e[48]!==ve?(U=l===!0&&(0,t.jsx)(wt,{onApplied:Ce,tableNames:ve}),e[46]=Ce,e[47]=l,e[48]=ve,e[49]=U):U=e[49];let ie;e[50]!==le||e[51]!==a||e[52]!==z||e[53]!==_?(ie=_==="list"&&(0,t.jsx)(Ae,{"aria-label":a("Filter tables"),className:"h-8 max-w-xs","data-testid":"sc-filter",onChange:le,placeholder:a("Filter tables"),value:z}),e[50]=le,e[51]=a,e[52]=z,e[53]=_,e[54]=ie):ie=e[54];let J;e[55]!==d||e[56]!==b||e[57]!==p||e[58]!==T||e[59]!==C||e[60]!==_?(J=_==="graph"&&(0,t.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"sc-graph-view",children:[b!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-error",role:"alert",children:b}),p!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-global-error",role:"alert",children:p}),(0,t.jsx)(Ze,{columnsError:T[C]===!0,tables:d,testIdPrefix:"sc-graph"})]}),e[55]=d,e[56]=b,e[57]=p,e[58]=T,e[59]=C,e[60]=_,e[61]=J):J=e[61];let q;e[62]!==c||e[63]!==b||e[64]!==o||e[65]!==h||e[66]!==i||e[67]!==y||e[68]!==p||e[69]!==$||e[70]!==S||e[71]!==K||e[72]!==C||e[73]!==a||e[74]!==F||e[75]!==fe||e[76]!==te||e[77]!==_?(q=_==="list"&&(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)(qe,{"data-testid":"sc-shard-section",size:"sm",children:[(0,t.jsxs)(Ge,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(Re,{tier:"shard"}),(0,t.jsx)(Ke,{children:a("Shard tables")}),F!==null&&(0,t.jsx)(je,{className:"ms-auto tabular-nums",variant:"outline",children:i.length})]}),(0,t.jsx)(Pe,{children:Me.shard.hint})]}),(0,t.jsxs)(Le,{children:[b!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-error",role:"alert",children:b}),F!==null&&F.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"sc-empty",children:a("No tables in this shard.")}),F!==null&&F.length>0&&i.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"sc-no-match",children:a("No tables match your filter.")}),i.length>0&&(0,t.jsx)("ul",{className:"-mx-3 overflow-hidden border-t border-border","data-testid":"sc-table-list",children:i.map(f=>{let ee=`${C}:${f.name}`,de=K[ee]??[];return(0,t.jsxs)(tt,{expanded:o===f.name,name:f.name,onToggle:r(()=>{ge(fe(f.name))},"onToggle"),rowCount:f.rowCount,rowTestId:`sc-table-${f.name}`,toggleTestId:`sc-toggle-${f.name}`,children:[(0,t.jsx)(lt,{columns:c[ee]??et,testId:`sc-columns-${f.name}`}),de.length>0&&(0,t.jsx)(At,{heading:a("Indexes"),indexes:de,testId:`sc-indexes-${f.name}`})]},f.name)})})]})]}),(0,t.jsxs)(qe,{"data-testid":"sc-global-section",size:"sm",children:[(0,t.jsxs)(Ge,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(Re,{tier:"global"}),(0,t.jsx)(Ke,{children:a("Global tables (D1)")}),S!==null&&(0,t.jsx)(je,{className:"ms-auto tabular-nums",variant:"outline",children:h.length})]}),(0,t.jsx)(Pe,{children:Me.global.hint})]}),(0,t.jsxs)(Le,{children:[p!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-global-error",role:"alert",children:p}),S!==null&&S.length===0&&(0,t.jsx)(Qe,{description:Me.global.hint,testId:"sc-global-empty",title:a("No global tables.")}),S!==null&&S.length>0&&h.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"sc-global-no-match",children:a("No tables match your filter.")}),h.length>0&&(0,t.jsx)("ul",{className:"-mx-3 overflow-hidden border-t border-border","data-testid":"sc-global-table-list",children:h.map(f=>(0,t.jsx)(tt,{expanded:$===f.name,name:f.name,onToggle:r(()=>{ge(te(f.name))},"onToggle"),rowCount:f.rowCount,rowTestId:`sc-global-table-${f.name}`,toggleTestId:`sc-global-toggle-${f.name}`,children:(0,t.jsx)(lt,{columns:y[f.name]??et,testId:`sc-global-columns-${f.name}`})},f.name))})]})]})]}),e[62]=c,e[63]=b,e[64]=o,e[65]=h,e[66]=i,e[67]=y,e[68]=p,e[69]=$,e[70]=S,e[71]=K,e[72]=C,e[73]=a,e[74]=F,e[75]=fe,e[76]=te,e[77]=_,e[78]=q):q=e[78];let H;return e[79]!==oe||e[80]!==U||e[81]!==ie||e[82]!==J||e[83]!==q?(H=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-schema",children:[oe,U,ie,J,q]}),e[79]=oe,e[80]=U,e[81]=ie,e[82]=J,e[83]=q,e[84]=H):H=e[84],H},"Qt");function zt(s){return(0,t.jsx)("li",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground",children:s},s)}r(zt,"kt");function Et(s){return(0,t.jsxs)("li",{className:"flex flex-wrap items-center gap-1.5 text-xs",children:[(0,t.jsx)("span",{className:"font-mono",children:s.name}),(0,t.jsx)(je,{variant:"outline",children:s.type}),s.unique===!0&&(0,t.jsx)(je,{variant:"secondary",children:"unique"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:s.fields.join(", ")})]},`${s.type}:${s.name}`)}r(Et,"At");function Ft(s){return s.name}r(Ft,"$t");export{Xt as SchemaViewer};
@@ -0,0 +1 @@
1
+ import{a as $}from"./chunk-4NKJV7YX.js";import{a as b}from"./chunk-IUGNIG6L.js";import"./chunk-LSEUUZN4.js";import{a as y,b as w,c as j,d as h,e as c,f as i}from"./chunk-7QEZ2SFW.js";import"./chunk-WCWP4EAW.js";import"./chunk-BX7TFVCC.js";import"./chunk-4PI2OSSP.js";import{a as u}from"./chunk-2W4UO5BC.js";import{c as p}from"./chunk-FBDIQ67D.js";import{a as d,e as l}from"./chunk-OK2QU2EV.js";import"./chunk-FACXM2UB.js";import"./chunk-ZPQBVYNN.js";import{B as k,x}from"./chunk-GNI37YCV.js";import"./chunk-PDBW6GTJ.js";import"./chunk-GWNGVKLG.js";import{b as T}from"./chunk-6G3E4PJ2.js";import{a as o,d as I}from"./chunk-5PEAXTYQ.js";var e=I(T(),1);var m={clean:"text-emerald-600 dark:text-emerald-400",exempt:"text-muted-foreground",failing:"text-red-600 dark:text-red-400",warned:"text-amber-600 dark:text-amber-400"},A={"at-risk":"text-red-600 dark:text-red-400",excellent:"text-emerald-600 dark:text-emerald-400",good:"text-emerald-600 dark:text-emerald-400","needs-work":"text-amber-600 dark:text-amber-400"},C=o((r,a)=>`exempt: ${r.exemptReason===void 0||r.exemptReason===""?a:r.exemptReason}`,"E"),E=o(r=>r.toSorted((a,n)=>a.coverage==="clean"&&n.coverage!=="clean"?1:n.coverage==="clean"&&a.coverage!=="clean"?-1:a.score-n.score),"S"),Y=o(({testId:r="advisor-health"})=>{let a=k(),n=p(u.getAdvisories,{},{live:!0}),g=p(u.getAdvisorProcedures,{},{live:!0}),f=n.data?.advisories??null,N=g.data?.procedures??null,t=f===null||N===null?null:$(N,f),v=g.error??n.error;if(v!==null)return(0,e.jsx)(b,{error:v,testId:`${r}-error`});if(t===null)return(0,e.jsx)(d,{children:(0,e.jsx)(l,{className:"py-8 text-center text-muted-foreground","data-testid":`${r}-loading`,children:a("Loading\u2026")})});let R=E(t.procedures);return(0,e.jsxs)("div",{className:"space-y-4","data-testid":r,children:[(0,e.jsx)(d,{children:(0,e.jsxs)(l,{className:"flex flex-wrap items-baseline gap-x-6 gap-y-2 py-6",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("span",{className:x("text-4xl font-semibold tabular-nums",A[t.grade]),"data-testid":`${r}-score`,children:t.score}),(0,e.jsx)("span",{className:"text-muted-foreground text-lg",children:"/100"})]}),(0,e.jsx)("span",{className:x("text-sm font-medium uppercase tracking-wide",A[t.grade]),"data-testid":`${r}-grade`,children:t.grade}),(0,e.jsxs)("div",{className:"text-muted-foreground flex gap-4 text-sm tabular-nums","data-testid":`${r}-summary`,children:[(0,e.jsxs)("span",{className:m.clean,children:[t.summary.clean," ",a("clean")]}),(0,e.jsxs)("span",{className:m.warned,children:[t.summary.warned," ",a("warned")]}),(0,e.jsxs)("span",{className:m.failing,children:[t.summary.failing," ",a("failing")]}),(0,e.jsxs)("span",{className:m.exempt,children:[t.summary.exempt," ",a("exempt")]})]})]})}),t.project.checks.length>0&&(0,e.jsx)(d,{children:(0,e.jsxs)(l,{className:"py-4 text-sm","data-testid":`${r}-project`,children:[(0,e.jsxs)("span",{className:"font-medium",children:[a("Schema & config")," ",t.project.score,"/100"]}),(0,e.jsxs)("span",{className:"text-muted-foreground",children:[" \u2014 ",t.project.checks.map(s=>s.name).join(", ")]})]})}),(0,e.jsx)(d,{children:(0,e.jsx)(l,{className:"p-0",children:(0,e.jsxs)(y,{children:[(0,e.jsx)(w,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(c,{className:"w-20",children:a("Score")}),(0,e.jsx)(c,{children:a("Procedure")}),(0,e.jsx)(c,{className:"w-32",children:a("Kind")}),(0,e.jsx)(c,{children:a("Rules fired")})]})}),(0,e.jsx)(j,{children:R.map(s=>(0,e.jsxs)(h,{"data-testid":`${r}-row`,children:[(0,e.jsx)(i,{className:x("tabular-nums font-medium",m[s.coverage]),children:s.coverage==="exempt"?"\u2014":s.score}),(0,e.jsx)(i,{className:"font-mono text-xs",children:s.id}),(0,e.jsxs)(i,{className:"text-muted-foreground text-xs",children:[s.visibility," ",s.kind,s.sensitivity.level==="high"&&(0,e.jsx)("span",{className:"ml-1 text-amber-600 dark:text-amber-400",children:a("sensitive")})]}),(0,e.jsx)(i,{className:"text-muted-foreground text-xs",children:s.coverage==="exempt"?C(s,a("no reason given")):s.checks.map(S=>S.name).join(", ")})]},s.id))})]})})})]})},"Y");export{Y as default};
@@ -0,0 +1 @@
1
+ import{a as S}from"./chunk-RCXNYW7P.js";import{a as q,b as M,c as A,d as w,e as C,f as E}from"./chunk-7QEZ2SFW.js";import{a as L}from"./chunk-OK2QU2EV.js";import{B as g,j as v,r as N,s as j}from"./chunk-GNI37YCV.js";import"./chunk-PDBW6GTJ.js";import{a as I}from"./chunk-GWNGVKLG.js";import{a as H,b as R}from"./chunk-6G3E4PJ2.js";import{a as u,d as x}from"./chunk-5PEAXTYQ.js";var Q=x(I(),1),d=x(H(),1);var a=x(R(),1);var T={volume:"Request volume per function",latency:"Latency p50 / p95 per function",hotShards:"Hot shards"},O=Object.keys(T),P={error:null,loading:!0,rows:null},$=u(s=>Object.keys(s[0]??{}),"B"),U=u(s=>{let e=(0,Q.c)(22),{state:y,title:o}=s,l=g(),{error:t,loading:r,rows:n}=y,c;if(e[0]!==t||e[1]!==r||e[2]!==n||e[3]!==l||e[4]!==o){let b=n===null?[]:$(n),i;e[6]!==l||e[7]!==o?(i=l(o),e[6]=l,e[7]=o,e[8]=i):i=e[8];let p;e[9]!==i?(p=(0,a.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,a.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:i})}),e[9]=i,e[10]=p):p=e[10];let m;e[11]!==r||e[12]!==l?(m=r&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-loading",children:l("Loading\u2026")}),e[11]=r,e[12]=l,e[13]=m):m=e[13];let h;e[14]!==t||e[15]!==r?(h=!r&&t!==null&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"analytics-error",role:"alert",children:t}),e[14]=t,e[15]=r,e[16]=h):h=e[16];let f;e[17]!==t||e[18]!==r||e[19]!==n||e[20]!==l?(f=!r&&t===null&&n!==null&&n.length===0&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-empty-rows",children:l("No data points yet.")}),e[17]=t,e[18]=r,e[19]=n,e[20]=l,e[21]=f):f=e[21],c=(0,a.jsxs)(L,{className:"gap-0 py-0","data-testid":`analytics-panel-${o}`,children:[p,m,h,f,!r&&t===null&&n!==null&&n.length>0&&(0,a.jsxs)(q,{children:[(0,a.jsx)(M,{children:(0,a.jsx)(w,{children:b.map(W)})}),(0,a.jsx)(A,{children:n.map((V,B)=>(0,a.jsx)(w,{children:b.map(k=>(0,a.jsx)(E,{className:"font-mono text-xs",children:N(V[k])},k))},B))})]})]}),e[0]=t,e[1]=r,e[2]=n,e[3]=l,e[4]=o,e[5]=c}else c=e[5];return c},"V"),G=u(({runQuery:s}={})=>{let e=g(),[y,o]=(0,d.useState)({}),l=(0,d.useCallback)(async t=>{if(s!==void 0)for(let r of O){if(t.cancelled)return;o(n=>({...n,[r]:P}));try{let{rows:n}=await s(r);t.cancelled||o(c=>({...c,[r]:{error:null,loading:!1,rows:n}}))}catch(n){t.cancelled||o(c=>({...c,[r]:{error:v(n),loading:!1,rows:null}}))}}},[s]);return(0,d.useEffect)(()=>{let t={cancelled:!1};return j(l(t)),()=>{t.cancelled=!0}},[l]),s===void 0?(0,a.jsx)(S,{description:e("Analytics usage panels read through your worker, never from the browser. Pass studio.analyticsSqlQuery, a runner that calls an admin-only action running functionUsageQuery(panel) through ctx.analyticsSql, to enable these panels."),icon:(0,a.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"})}),testId:"analytics-not-configured",title:e("Analytics usage panels are not wired up.")}):(0,a.jsx)("div",{className:"flex flex-col gap-4","data-testid":"lunora-analytics-panel",children:O.map(t=>(0,a.jsx)(U,{state:y[t]??P,title:T[t]},t))})},"X");function W(s){return(0,a.jsx)(C,{children:s},s)}u(W,"$");export{G as AnalyticsPanel};