@lunora/studio 1.0.0-alpha.59 → 1.0.0-alpha.60

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 (381) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.js +1 -43
  3. package/dist/mount.js +1 -27
  4. package/dist/packem_chunks/ApiTab.js +1 -251
  5. package/dist/packem_chunks/AuditPanel.js +1 -200
  6. package/dist/packem_chunks/DeploymentHealthPanel.js +1 -664
  7. package/dist/packem_chunks/ExportImportPanel.js +3 -198
  8. package/dist/packem_chunks/FileBrowser.js +4 -2955
  9. package/dist/packem_chunks/FunctionRunner.js +1 -326
  10. package/dist/packem_chunks/FunctionStatsPanel.js +1 -377
  11. package/dist/packem_chunks/HealthPanel.js +1 -648
  12. package/dist/packem_chunks/InsightsPanel.js +1 -462
  13. package/dist/packem_chunks/LogsPanel.js +1 -1303
  14. package/dist/packem_chunks/MailPanel.js +2 -353
  15. package/dist/packem_chunks/MetricsPanel.js +1 -1960
  16. package/dist/packem_chunks/MigrationsPanel.js +1 -239
  17. package/dist/packem_chunks/NotificationsPanel.js +1 -306
  18. package/dist/packem_chunks/PitrPanel.js +1 -252
  19. package/dist/packem_chunks/SchemaViewer.js +1 -2512
  20. package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -95
  21. package/dist/packem_chunks/SettingsPanel.js +1 -391
  22. package/dist/packem_chunks/SqlEditorPanel.js +4 -2340
  23. package/dist/packem_chunks/TableEditor.js +1 -290
  24. package/dist/packem_chunks/agents-panel.js +1 -326
  25. package/dist/packem_chunks/analytics-panel.js +1 -261
  26. package/dist/packem_chunks/auth-audit-panel.js +1 -247
  27. package/dist/packem_chunks/auth-config-panel.js +1 -365
  28. package/dist/packem_chunks/auth-sessions-panel.js +1 -175
  29. package/dist/packem_chunks/containers-panel.js +1 -261
  30. package/dist/packem_chunks/dashboards-panel.js +1 -781
  31. package/dist/packem_chunks/fanout-panel.js +1 -482
  32. package/dist/packem_chunks/flags-panel.js +1 -176
  33. package/dist/packem_chunks/issues-panel.js +1 -427
  34. package/dist/packem_chunks/kv-browser.js +1 -1896
  35. package/dist/packem_chunks/log-drains-panel.js +4 -273
  36. package/dist/packem_chunks/organizations-panel.js +1 -3209
  37. package/dist/packem_chunks/payments-panel.js +1 -213
  38. package/dist/packem_chunks/permissions-panel.js +1 -805
  39. package/dist/packem_chunks/queues-panel.js +1 -1075
  40. package/dist/packem_chunks/rls-panel.js +1 -315
  41. package/dist/packem_chunks/schedule-panel.js +1 -831
  42. package/dist/packem_chunks/sparkline.js +1 -79
  43. package/dist/packem_chunks/storage-rules-panel.js +1 -140
  44. package/dist/packem_chunks/subscriptions-panel.js +1 -238
  45. package/dist/packem_chunks/sync-client-panel.js +1 -0
  46. package/dist/packem_chunks/traces-panel.js +1 -747
  47. package/dist/packem_chunks/users-panel.js +1 -1731
  48. package/dist/packem_chunks/vector-browser.js +1 -281
  49. package/dist/packem_chunks/workflows-panel.js +1 -562
  50. package/dist/packem_shared/ADMIN_FUNCTIONS-BYNSbBVE.js +1 -0
  51. package/dist/packem_shared/ApiDocsPanel-eJYZlylw.js +2 -0
  52. package/dist/packem_shared/ApiReferencePanel-C42v1jr6.js +1 -0
  53. package/dist/packem_shared/CommandPalette-CVIaY3j8.js +1 -0
  54. package/dist/packem_shared/ConfirmButton-CTL3f3kr.js +1 -0
  55. package/dist/packem_shared/ConnectionBadge-DOk0CQWo.js +1 -0
  56. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js +1 -0
  57. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-B-hcFVoi.js +1 -0
  58. package/dist/packem_shared/DEFAULT_LOCALE-BZ4NojpD.js +1 -0
  59. package/dist/packem_shared/DataBrowser-B8J5lHjP.js +1 -0
  60. package/dist/packem_shared/DataFilters-Csb30F0C.js +1 -0
  61. package/dist/packem_shared/ErrorBoundary-DvzYskH7.js +1 -0
  62. package/dist/packem_shared/GlobalDataBrowser-RLJ6NvOs.js +1 -0
  63. package/dist/packem_shared/HomePanel-DL1HupAN.js +1 -0
  64. package/dist/packem_shared/OpenRpcReferencePanel-sGsIgYWj.js +1 -0
  65. package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.js +1 -0
  66. package/dist/packem_shared/ScheduledJobs-DUbo6epc.js +1 -0
  67. package/dist/packem_shared/ShardInput-BVn2iCU0.js +1 -0
  68. package/dist/packem_shared/Studio-BWBclm_C.js +1 -0
  69. package/dist/packem_shared/StudioApp-BFm73yVr.js +1 -0
  70. package/dist/packem_shared/StudioI18nProvider-CZ5h4nrV.js +1 -0
  71. package/dist/packem_shared/advisor-view-DaCX9Jy5.js +1 -0
  72. package/dist/packem_shared/aggregateMetrics-BNfajLa2.js +1 -0
  73. package/dist/packem_shared/alert-CVcOFuDR.js +1 -0
  74. package/dist/packem_shared/badge-BbuuAio7.js +1 -0
  75. package/dist/packem_shared/bar-chart-AryFCeoa.js +9 -0
  76. package/dist/packem_shared/browser-storage-xjTyMKY0.js +1 -0
  77. package/dist/packem_shared/button-BkCrNcAs.js +1 -0
  78. package/dist/packem_shared/card-CIDGUN6K.js +1 -0
  79. package/dist/packem_shared/cf-links-gbDy51nR.js +1 -0
  80. package/dist/packem_shared/checkbox-StT4Gob6.js +1 -0
  81. package/dist/packem_shared/data-grid-BMBKzMEJ.js +1 -0
  82. package/dist/packem_shared/data-view-params-C8T3bW1z.js +1 -0
  83. package/dist/packem_shared/dropdown-menu-C3RQ_HlW.js +2 -0
  84. package/dist/packem_shared/empty-state-Cg7t_8qu.js +1 -0
  85. package/dist/packem_shared/error-alert-B59DnrDI.js +1 -0
  86. package/dist/packem_shared/grid-features-uZCUj955.js +6 -0
  87. package/dist/packem_shared/home-panel-B-8BCffw.js +3 -0
  88. package/dist/packem_shared/input-JHu63lTv.js +1 -0
  89. package/dist/packem_shared/internal-AtZ4bTal.js +2 -0
  90. package/dist/packem_shared/label-6uP1obNF.js +1 -0
  91. package/dist/packem_shared/live-status-CGW2JHf_.js +1 -0
  92. package/dist/packem_shared/log-fields-CoL3hsIQ.js +1 -0
  93. package/dist/packem_shared/modal-shell-CUwwWC2o.js +1 -0
  94. package/dist/packem_shared/reference-view-KvhektwF.js +12 -0
  95. package/dist/packem_shared/result-chart-CwKhhKM0.js +1 -0
  96. package/dist/packem_shared/scroll-area-DTEq6Jec.js +2 -0
  97. package/dist/packem_shared/select-Bul-DeII.js +2 -0
  98. package/dist/packem_shared/shard-history-DMEW5VBE.js +1 -0
  99. package/dist/packem_shared/skeleton-C1wQ9M5t.js +1 -0
  100. package/dist/packem_shared/sparkline-DtcZoU48.js +1 -0
  101. package/dist/packem_shared/storage-tier-DznqOf-q.js +1 -0
  102. package/dist/packem_shared/studio-BHA7hnI3.js +2 -0
  103. package/dist/packem_shared/table-DdJBrClo.js +2 -0
  104. package/dist/packem_shared/table-list-sidebar-CMCcNALK.js +1 -0
  105. package/dist/packem_shared/textarea-Bu2-jKAs.js +1 -0
  106. package/dist/packem_shared/trace-handoff-Dw7mwjxu.js +1 -0
  107. package/dist/packem_shared/use-admin-query-Di3fLE8H.js +1 -0
  108. package/dist/packem_shared/use-async-submit-H68GHPz8.js +1 -0
  109. package/dist/packem_shared/useDebounced-Ihdiid_k.js +1 -0
  110. package/dist/packem_shared/utils-bhneXptQ.js +1 -0
  111. package/dist/packem_shared/virtual-rect-1o1veP7R.js +1 -0
  112. package/dist/standalone/chunk-23HKRH5H.js +13 -0
  113. package/dist/standalone/chunk-2A4RKII2.js +1 -0
  114. package/dist/standalone/chunk-3DTM4GI5.js +1 -0
  115. package/dist/standalone/chunk-3MHKT76P.js +1 -0
  116. package/dist/standalone/chunk-46IB4C4Q.js +1 -0
  117. package/dist/standalone/chunk-4AYEV5UN.js +1 -0
  118. package/dist/standalone/chunk-4FNHHFWR.js +1 -0
  119. package/dist/standalone/chunk-6CLVIOCB.js +1 -0
  120. package/dist/standalone/chunk-6I62RSI5.js +1 -0
  121. package/dist/standalone/chunk-6OKDCV7J.js +1 -0
  122. package/dist/standalone/chunk-6P7HIPUE.js +1 -0
  123. package/dist/standalone/chunk-6UYILUSX.js +1 -0
  124. package/dist/standalone/chunk-725RLB7D.js +1 -0
  125. package/dist/standalone/chunk-7AZZ7OJO.js +1 -0
  126. package/dist/standalone/chunk-7CRLAMGB.js +1 -0
  127. package/dist/standalone/chunk-7Z5QEFR4.js +2 -0
  128. package/dist/standalone/chunk-AGVJJQFL.js +1 -0
  129. package/dist/standalone/chunk-AKTGRZXN.js +1 -0
  130. package/dist/standalone/chunk-BAIN7UJ4.js +1 -0
  131. package/dist/standalone/chunk-BHWSIIDT.js +1 -0
  132. package/dist/standalone/{chunk-L7SK4ZZD.js → chunk-C4O5UR4Y.js} +1 -1
  133. package/dist/standalone/chunk-C4VURT57.js +1 -0
  134. package/dist/standalone/chunk-CKO3F55C.js +4 -0
  135. package/dist/standalone/chunk-CVMRZUF5.js +4 -0
  136. package/dist/standalone/chunk-CWWGDW4V.js +1 -0
  137. package/dist/standalone/chunk-CYET4BRZ.js +1 -0
  138. package/dist/standalone/chunk-CZEUVNCQ.js +1 -0
  139. package/dist/standalone/chunk-FXFK4M4E.js +1 -0
  140. package/dist/standalone/chunk-FYAJPWE7.js +1 -0
  141. package/dist/standalone/chunk-GS7OBQO5.js +1 -0
  142. package/dist/standalone/chunk-GTXVH7I5.js +1 -0
  143. package/dist/standalone/chunk-H6SIM4BT.js +1 -0
  144. package/dist/standalone/chunk-H6WOFY6A.js +8 -0
  145. package/dist/standalone/chunk-HA34GYEX.js +1 -0
  146. package/dist/standalone/chunk-HMIOF5GV.js +1 -0
  147. package/dist/standalone/chunk-HY46NTNW.js +6 -0
  148. package/dist/standalone/chunk-IBCKC2BO.js +1 -0
  149. package/dist/standalone/chunk-ICKBVXPP.js +1 -0
  150. package/dist/standalone/chunk-IE4ROTQD.js +1 -0
  151. package/dist/standalone/chunk-IYYTWZ2E.js +2 -0
  152. package/dist/standalone/chunk-J2LMP2A7.js +1 -0
  153. package/dist/standalone/chunk-JC6WYIHM.js +1 -0
  154. package/dist/standalone/chunk-JKPK25JO.js +1 -0
  155. package/dist/standalone/chunk-JLFCXBNQ.js +1 -0
  156. package/dist/standalone/chunk-JRWBGR5B.js +1 -0
  157. package/dist/standalone/chunk-K5PFWU5J.js +1 -0
  158. package/dist/standalone/chunk-KJTLW5W2.js +11 -0
  159. package/dist/standalone/{chunk-HBGS4SEX.js → chunk-KLLYGWNF.js} +9 -9
  160. package/dist/standalone/chunk-KNN3ZEQ7.js +1 -0
  161. package/dist/standalone/{chunk-4QHKBC77.js → chunk-KOC5KV3E.js} +1 -1
  162. package/dist/standalone/chunk-KSRXMTBV.js +1 -0
  163. package/dist/standalone/chunk-KYCAYNXM.js +1 -0
  164. package/dist/standalone/chunk-KZ2YUNMR.js +1 -0
  165. package/dist/standalone/chunk-LKHUVEHX.js +1 -0
  166. package/dist/standalone/chunk-LPOKAJT4.js +4 -0
  167. package/dist/standalone/chunk-MZEK4SGD.js +1 -0
  168. package/dist/standalone/chunk-NCCUM26H.js +1 -0
  169. package/dist/standalone/chunk-O62HJZV3.js +1 -0
  170. package/dist/standalone/chunk-OTJOI23O.js +62 -0
  171. package/dist/standalone/chunk-P2NBOUGZ.js +1 -0
  172. package/dist/standalone/chunk-P4J6XNG3.js +1 -0
  173. package/dist/standalone/chunk-PGDWFWH5.js +1 -0
  174. package/dist/standalone/chunk-PR2SE2MD.js +1 -0
  175. package/dist/standalone/chunk-PTTDIYGP.js +1 -0
  176. package/dist/standalone/chunk-PWDMXMRD.js +1 -0
  177. package/dist/standalone/chunk-Q34MSC2F.js +1 -0
  178. package/dist/standalone/chunk-Q5WXTZWX.js +1 -0
  179. package/dist/standalone/chunk-QC5HCNJZ.js +4 -0
  180. package/dist/standalone/chunk-QJKRHZYV.js +1 -0
  181. package/dist/standalone/chunk-R43KHQDA.js +1 -0
  182. package/dist/standalone/chunk-RC2K5RBE.js +1 -0
  183. package/dist/standalone/chunk-RE6UWCMG.js +1 -0
  184. package/dist/standalone/chunk-RUP3M2GF.js +3 -0
  185. package/dist/standalone/chunk-SA6MBPBL.js +1 -0
  186. package/dist/standalone/{chunk-BJGBHGK3.js → chunk-SEDZDNQF.js} +1 -1
  187. package/dist/standalone/chunk-SKHEGARW.js +1 -0
  188. package/dist/standalone/chunk-SKJZDOHG.js +1 -0
  189. package/dist/standalone/chunk-SNDYNCAA.js +1 -0
  190. package/dist/standalone/chunk-SZUHZ2OG.js +1 -0
  191. package/dist/standalone/chunk-TAE2H7PU.js +1 -0
  192. package/dist/standalone/chunk-TEIBKU46.js +1 -0
  193. package/dist/standalone/chunk-TO6NLVFD.js +1 -0
  194. package/dist/standalone/chunk-TYTJDFX2.js +1 -0
  195. package/dist/standalone/{chunk-LXULVPEM.js → chunk-UDZY7MKE.js} +3 -3
  196. package/dist/standalone/chunk-UHHTEBC3.js +1 -0
  197. package/dist/standalone/chunk-UNDFOYRI.js +1 -0
  198. package/dist/standalone/chunk-UNN4CESU.js +1 -0
  199. package/dist/standalone/chunk-UNXX5GQH.js +1 -0
  200. package/dist/standalone/{chunk-ZHVTQ37P.js → chunk-UREY4GLG.js} +1 -1
  201. package/dist/standalone/chunk-UWF5DOGV.js +1 -0
  202. package/dist/standalone/chunk-UY2Y5CXB.js +1 -0
  203. package/dist/standalone/{chunk-VLXV72QE.js → chunk-UZYGEOWY.js} +1 -1
  204. package/dist/standalone/chunk-V66TSUKV.js +1 -0
  205. package/dist/standalone/chunk-VEFNSN7P.js +1 -0
  206. package/dist/standalone/chunk-VUJGR4PB.js +1 -0
  207. package/dist/standalone/chunk-VUXJER3D.js +1 -0
  208. package/dist/standalone/chunk-W572365D.js +1 -0
  209. package/dist/standalone/chunk-WYFLGXZ3.js +3 -0
  210. package/dist/standalone/chunk-XDKFPBIL.js +1 -0
  211. package/dist/standalone/chunk-XRKCGQM2.js +1 -0
  212. package/dist/standalone/chunk-YNBJ6ICE.js +1 -0
  213. package/dist/standalone/chunk-YQ5PILIJ.js +1 -0
  214. package/dist/standalone/chunk-YT7VXQVX.js +1 -0
  215. package/dist/standalone/chunk-Z7MUQMLE.js +1 -0
  216. package/dist/standalone/chunk-ZFWEPGWG.js +1 -0
  217. package/dist/standalone/chunk-ZMFZRGAN.js +1 -0
  218. package/dist/standalone/studio.js +9 -214
  219. package/package.json +4 -4
  220. package/dist/packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js +0 -62
  221. package/dist/packem_shared/ApiDocsPanel-DNDpeR5O.js +0 -842
  222. package/dist/packem_shared/ApiReferencePanel-ChlRsAXU.js +0 -230
  223. package/dist/packem_shared/CommandPalette-BpkopP5f.js +0 -373
  224. package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
  225. package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
  226. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
  227. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
  228. package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
  229. package/dist/packem_shared/DataBrowser-obTn4sKX.js +0 -4493
  230. package/dist/packem_shared/DataFilters-B1Q7mrt7.js +0 -253
  231. package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
  232. package/dist/packem_shared/GlobalDataBrowser-BCaohHZ5.js +0 -293
  233. package/dist/packem_shared/HomePanel-DCRj3hGB.js +0 -14
  234. package/dist/packem_shared/OpenRpcReferencePanel-CIeQE1aE.js +0 -192
  235. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
  236. package/dist/packem_shared/ScheduledJobs-BQzQo84k.js +0 -262
  237. package/dist/packem_shared/ShardInput-CZnpHILL.js +0 -107
  238. package/dist/packem_shared/Studio-DnlPCbID.js +0 -16
  239. package/dist/packem_shared/StudioApp-CzqlB4zO.js +0 -708
  240. package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
  241. package/dist/packem_shared/advisor-view-D95sN-wO.js +0 -159
  242. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
  243. package/dist/packem_shared/alert-CdAET2K_.js +0 -68
  244. package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
  245. package/dist/packem_shared/bar-chart-DSwcWIRy.js +0 -3246
  246. package/dist/packem_shared/browser-storage-L4gOP5gJ.js +0 -105
  247. package/dist/packem_shared/button-BhsN2uZH.js +0 -49
  248. package/dist/packem_shared/card-F2vH_aj2.js +0 -175
  249. package/dist/packem_shared/cf-links-SIbyi4Y1.js +0 -8
  250. package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
  251. package/dist/packem_shared/data-grid-BywzWfek.js +0 -183
  252. package/dist/packem_shared/data-view-params-Cd6yRVbv.js +0 -96
  253. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
  254. package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
  255. package/dist/packem_shared/error-alert-D9uIFJUS.js +0 -114
  256. package/dist/packem_shared/grid-features-ZOLhHKrR.js +0 -809
  257. package/dist/packem_shared/home-panel-BRAA2UlM.js +0 -1889
  258. package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
  259. package/dist/packem_shared/internal-DzHCc2Rq.js +0 -131
  260. package/dist/packem_shared/label-D8ykjn5J.js +0 -46
  261. package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
  262. package/dist/packem_shared/log-fields-jEH83H2G.js +0 -18
  263. package/dist/packem_shared/modal-shell-hyaJvIJ6.js +0 -100
  264. package/dist/packem_shared/reference-view-DfXN7oWP.js +0 -2127
  265. package/dist/packem_shared/result-chart-Bf9mbCIo.js +0 -119
  266. package/dist/packem_shared/scroll-area-DLhcy-ml.js +0 -93
  267. package/dist/packem_shared/select-D9OwHEch.js +0 -273
  268. package/dist/packem_shared/shard-history-AxiJ1WPP.js +0 -16
  269. package/dist/packem_shared/skeleton-CGhL0p20.js +0 -45
  270. package/dist/packem_shared/sparkline-BnA1kC9X.js +0 -93
  271. package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
  272. package/dist/packem_shared/studio-8QSXbZ98.js +0 -4192
  273. package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
  274. package/dist/packem_shared/table-list-sidebar-gCE17v9B.js +0 -842
  275. package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
  276. package/dist/packem_shared/trace-handoff-CGolF3KS.js +0 -38
  277. package/dist/packem_shared/use-admin-query-C7JNuQp-.js +0 -106
  278. package/dist/packem_shared/use-async-submit-rnSk_jXl.js +0 -91
  279. package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
  280. package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
  281. package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
  282. package/dist/standalone/chunk-2K47A3P6.js +0 -1
  283. package/dist/standalone/chunk-2MLA6WFH.js +0 -1
  284. package/dist/standalone/chunk-2NGUNNGW.js +0 -1
  285. package/dist/standalone/chunk-2TJVFKD2.js +0 -1
  286. package/dist/standalone/chunk-2YTF6LJ6.js +0 -1
  287. package/dist/standalone/chunk-3GXGLNKW.js +0 -1
  288. package/dist/standalone/chunk-3HGNPZBN.js +0 -1
  289. package/dist/standalone/chunk-3LJEGSMK.js +0 -11
  290. package/dist/standalone/chunk-3OA7PECS.js +0 -6
  291. package/dist/standalone/chunk-4PC7IXNY.js +0 -1
  292. package/dist/standalone/chunk-56XQYNUJ.js +0 -1
  293. package/dist/standalone/chunk-5OIBXYZM.js +0 -1
  294. package/dist/standalone/chunk-5QT5JRXD.js +0 -3
  295. package/dist/standalone/chunk-6RLPR7PL.js +0 -1
  296. package/dist/standalone/chunk-6V74EUPK.js +0 -1
  297. package/dist/standalone/chunk-7EE33WLB.js +0 -1
  298. package/dist/standalone/chunk-7TJJXVSE.js +0 -1
  299. package/dist/standalone/chunk-AHILM3ZP.js +0 -1
  300. package/dist/standalone/chunk-AN4RKMKW.js +0 -1
  301. package/dist/standalone/chunk-APSSZB6Z.js +0 -1
  302. package/dist/standalone/chunk-AXNGWSBM.js +0 -1
  303. package/dist/standalone/chunk-AXZILWRM.js +0 -1
  304. package/dist/standalone/chunk-C7RHEBOH.js +0 -1
  305. package/dist/standalone/chunk-CKSHCYGC.js +0 -2
  306. package/dist/standalone/chunk-CSWIYOB3.js +0 -1
  307. package/dist/standalone/chunk-D3VAON25.js +0 -1
  308. package/dist/standalone/chunk-DDLQN67F.js +0 -1
  309. package/dist/standalone/chunk-DGHW5JG5.js +0 -1
  310. package/dist/standalone/chunk-DMCSOTAE.js +0 -3
  311. package/dist/standalone/chunk-E3BKETAS.js +0 -1
  312. package/dist/standalone/chunk-E3OXNN6O.js +0 -1
  313. package/dist/standalone/chunk-E6BOGDIS.js +0 -1
  314. package/dist/standalone/chunk-F2YMCQ6B.js +0 -1
  315. package/dist/standalone/chunk-F7GE4X2U.js +0 -1
  316. package/dist/standalone/chunk-FAVUOGJR.js +0 -1
  317. package/dist/standalone/chunk-FXP6256Q.js +0 -1
  318. package/dist/standalone/chunk-G6CTAYHJ.js +0 -1
  319. package/dist/standalone/chunk-GTM65MVX.js +0 -1
  320. package/dist/standalone/chunk-H42W62SE.js +0 -1
  321. package/dist/standalone/chunk-HTF5ZX4I.js +0 -8
  322. package/dist/standalone/chunk-HV7G6DFP.js +0 -5
  323. package/dist/standalone/chunk-I2PS4L74.js +0 -1
  324. package/dist/standalone/chunk-IYHPYY4A.js +0 -1
  325. package/dist/standalone/chunk-J6J54MBP.js +0 -1
  326. package/dist/standalone/chunk-J7OGP4NN.js +0 -1
  327. package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
  328. package/dist/standalone/chunk-JZLGLG4T.js +0 -1
  329. package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
  330. package/dist/standalone/chunk-KZ6INM5M.js +0 -1
  331. package/dist/standalone/chunk-L2LN3MK4.js +0 -4
  332. package/dist/standalone/chunk-LT3FH6MW.js +0 -1
  333. package/dist/standalone/chunk-LZUWZBPE.js +0 -1
  334. package/dist/standalone/chunk-M4JM3TOY.js +0 -1
  335. package/dist/standalone/chunk-MLA5ZAEB.js +0 -1
  336. package/dist/standalone/chunk-MRBI5HNQ.js +0 -1
  337. package/dist/standalone/chunk-N5XX4HOL.js +0 -6
  338. package/dist/standalone/chunk-N7SVJOHN.js +0 -1
  339. package/dist/standalone/chunk-NKFXMDOD.js +0 -1
  340. package/dist/standalone/chunk-NPSNKFHE.js +0 -1
  341. package/dist/standalone/chunk-O3NAGRTR.js +0 -1
  342. package/dist/standalone/chunk-O7FVPUCO.js +0 -1
  343. package/dist/standalone/chunk-OKQXTLFX.js +0 -1
  344. package/dist/standalone/chunk-OXHHSUXO.js +0 -1
  345. package/dist/standalone/chunk-QAFAJBAW.js +0 -1
  346. package/dist/standalone/chunk-QAIM6KWT.js +0 -1
  347. package/dist/standalone/chunk-QCPMTB6W.js +0 -1
  348. package/dist/standalone/chunk-QQ2LOSZL.js +0 -1
  349. package/dist/standalone/chunk-QVIPA6UJ.js +0 -1
  350. package/dist/standalone/chunk-QVUQXJCT.js +0 -4
  351. package/dist/standalone/chunk-R2GMHLJY.js +0 -1
  352. package/dist/standalone/chunk-RD5UG2YL.js +0 -1
  353. package/dist/standalone/chunk-RJTIP3WF.js +0 -1
  354. package/dist/standalone/chunk-RRCPZMC2.js +0 -22
  355. package/dist/standalone/chunk-SHERR7ZP.js +0 -1
  356. package/dist/standalone/chunk-SOC5CY3F.js +0 -1
  357. package/dist/standalone/chunk-SS7JLF2I.js +0 -4
  358. package/dist/standalone/chunk-SWWYUGPL.js +0 -2
  359. package/dist/standalone/chunk-TAD43CG5.js +0 -1
  360. package/dist/standalone/chunk-TTXRHJUP.js +0 -4
  361. package/dist/standalone/chunk-UK64ZSUW.js +0 -1
  362. package/dist/standalone/chunk-UKDHGVOC.js +0 -1
  363. package/dist/standalone/chunk-UPNTMJFF.js +0 -1
  364. package/dist/standalone/chunk-V43BLH4J.js +0 -1
  365. package/dist/standalone/chunk-VL23Y44O.js +0 -4
  366. package/dist/standalone/chunk-VXM5H542.js +0 -4
  367. package/dist/standalone/chunk-WMDH2CIZ.js +0 -1
  368. package/dist/standalone/chunk-WVTPZ6CM.js +0 -1
  369. package/dist/standalone/chunk-XN6QYJQ6.js +0 -13
  370. package/dist/standalone/chunk-XNJNSCLM.js +0 -1
  371. package/dist/standalone/chunk-Y4U6CC22.js +0 -1
  372. package/dist/standalone/chunk-Y572GMZE.js +0 -1
  373. package/dist/standalone/chunk-Y7PD5KP4.js +0 -76
  374. package/dist/standalone/chunk-YFIPHCEC.js +0 -1
  375. package/dist/standalone/chunk-YJXOWLFJ.js +0 -1
  376. package/dist/standalone/chunk-YNN6NFRZ.js +0 -1
  377. package/dist/standalone/chunk-YUGHRVPD.js +0 -1
  378. package/dist/standalone/chunk-ZIGWVHCS.js +0 -1
  379. package/dist/standalone/chunk-ZPP2KOR4.js +0 -1
  380. package/dist/standalone/chunk-ZPUO7FNI.js +0 -1
  381. /package/dist/standalone/{chunk-TEWVD66F.js → chunk-GXZAXNZI.js} +0 -0
@@ -0,0 +1,3 @@
1
+ import{c as L}from"react/compiler-runtime";import{useNavigate as Qe}from"@tanstack/react-router";import{useState as Ee,useEffect as Fe,lazy as nt,Suspense as at}from"react";import{g as Ye}from"./badge-BbuuAio7.js";import{u as Ze,c as q}from"./card-CIDGUN6K.js";import{E as rt}from"./empty-state-Cg7t_8qu.js";import{K as _e}from"./use-admin-query-Di3fLE8H.js";import{useT as I}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{ADMIN_FUNCTIONS as Ne}from"./ADMIN_FUNCTIONS-BYNSbBVE.js";import{f as Se,c as st,a as ot,r as lt,g as it,k as ct}from"./internal-AtZ4bTal.js";import{c as Xe}from"./utils-bhneXptQ.js";import{deriveInsights as dt}from"./DEFAULT_INSIGHT_THRESHOLDS-B-hcFVoi.js";import{useLunora as et}from"@lunora/react";import{jsx as r,jsxs as h}from"react/jsx-runtime";import{u as We}from"./button-BkCrNcAs.js";const mt=ot(Ne.studioFeatures),tt={analytics:!0,auth:!0,containers:!0,flags:!0,kv:!0,mail:!0,payments:!0,queues:!0,scheduler:!0,storage:!0,vectors:!0,workflows:!0},ut=t=>{if(t===null||typeof t!="object")return tt;const e=t,a=n=>typeof e[n]=="boolean"?e[n]:!0;return{analytics:a("analytics"),auth:a("auth"),containers:a("containers"),flags:a("flags"),kv:a("kv"),mail:a("mail"),payments:a("payments"),queues:a("queues"),scheduler:a("scheduler"),storage:a("storage"),vectors:a("vectors"),workflows:a("workflows")}},pt=()=>{const t=L(3),e=et(),[a,n]=Ee(tt);let s,o;return t[0]!==e?(s=()=>{Se((async()=>{try{n(ut(await e.query(mt,{},st(""))))}catch{}})())},o=[e],t[0]=e,t[1]=s,t[2]=o):(s=t[1],o=t[2]),Fe(s,o),a},ft=()=>{const t=L(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.6,viewBox:"0 0 24 24",children:r("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})}),t[0]=e):e=t[0],e},ht=t=>{const e=L(24),{group:a}=t,n=I(),s=Qe();let o;e[0]!==a.tab||e[1]!==s?(o=()=>{Se(s({to:`/${a.tab}`}))},e[0]=a.tab,e[1]=s,e[2]=o):o=e[2];const l=o,i=a.bindings.length;let c;e[3]!==a.label?(c=r("span",{className:"text-sm font-medium text-foreground",children:a.label}),e[3]=a.label,e[4]=c):c=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=r(ft,{}),e[5]=u):u=e[5];let d;e[6]!==c?(d=h("div",{className:"flex items-center justify-between",children:[c,u]}),e[6]=c,e[7]=d):d=e[7];let p;e[8]!==i||e[9]!==n?(p=i===1?n("1 binding"):n("{count} bindings",{count:i}),e[8]=i,e[9]=n,e[10]=p):p=e[10];let m;e[11]!==p?(m=r("span",{className:"text-xs text-muted-foreground",children:p}),e[11]=p,e[12]=m):m=e[12];let f;e[13]!==i||e[14]!==a.bindings?(f=i>0&&r("div",{className:"flex flex-wrap gap-1.5",children:a.bindings.map(bt)}),e[13]=i,e[14]=a.bindings,e[15]=f):f=e[15];let g;e[16]!==d||e[17]!==m||e[18]!==f?(g=h(Ze,{className:"flex flex-col gap-2 py-4",children:[d,m,f]}),e[16]=d,e[17]=m,e[18]=f,e[19]=g):g=e[19];let x;return e[20]!==a.testId||e[21]!==l||e[22]!==g?(x=r(q,{className:"cursor-pointer gap-0 py-0 transition-colors hover:bg-muted/40","data-testid":a.testId,onClick:l,children:g}),e[20]=a.testId,e[21]=l,e[22]=g,e[23]=x):x=e[23],x},Ue=["kv","files","vectors"],gt=(t,e)=>[...t.filter(a=>a.tab!==e.tab),e].toSorted((a,n)=>Ue.indexOf(a.tab)-Ue.indexOf(n.tab)),xt=()=>{const t=L(19),e=et(),a=pt(),n=I();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=[],t[0]=s):s=t[0];const[o,l]=Ee(s);let i,c;if(t[1]!==e||t[2]!==a.kv||t[3]!==a.storage||t[4]!==a.vectors||t[5]!==n?(i=()=>{const g={cancelled:!1},x=[{enabled:a.kv,label:n("KV Namespaces"),load:async()=>(await e.listKvNamespaces()).map(yt),tab:"kv",testId:"home-binding-kv"},{enabled:a.storage,label:n("R2 Buckets"),load:()=>e.listStorageBuckets(),tab:"files",testId:"home-binding-r2"},{enabled:a.vectors,label:n("Vectorize Indexes"),load:async()=>(await e.listVectorIndexes()).map(vt),tab:"vectors",testId:"home-binding-vectors"}];for(const b of x)b.enabled&&Se((async()=>{try{const y=await b.load();if(!g.cancelled){const S={bindings:y,label:b.label,tab:b.tab,testId:b.testId};l(M=>gt(M,S))}}catch{}})());return()=>{g.cancelled=!0}},c=[e,a.kv,a.storage,a.vectors,n],t[1]=e,t[2]=a.kv,t[3]=a.storage,t[4]=a.vectors,t[5]=n,t[6]=i,t[7]=c):(i=t[6],c=t[7]),Fe(i,c),o.length===0)return null;let u;t[8]!==n?(u=n("Bindings"),t[8]=n,t[9]=u):u=t[9];let d;t[10]!==u?(d=r("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:u}),t[10]=u,t[11]=d):d=t[11];let p;t[12]!==o?(p=o.map(Nt),t[12]=o,t[13]=p):p=t[13];let m;t[14]!==p?(m=r("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:p}),t[14]=p,t[15]=m):m=t[15];let f;return t[16]!==d||t[17]!==m?(f=h("section",{className:"flex flex-col gap-3","data-testid":"home-bindings",children:[d,m]}),t[16]=d,t[17]=m,t[18]=f):f=t[18],f};function bt(t){return r(Ye,{variant:"secondary",children:t},t)}function yt(t){return t.binding}function vt(t){return t.name}function Nt(t){return r(ht,{group:t},t.tab)}const _t=[{name:"lunora_list_functions",summary:"list every query, mutation, and action with its path"},{name:"lunora_list_tables",summary:"list the schema's tables"},{name:"lunora_get_function_schema",summary:"read a function's argument JSON Schema before calling it"},{name:"lunora_run_query",summary:"run a read-only query"},{name:"lunora_run_mutation",summary:"run a mutation — writes; only when LUNORA_MCP_ALLOW_WRITES is set"},{name:"lunora_run_action",summary:"run an action — writes/effects; only when LUNORA_MCP_ALLOW_WRITES is set"}],St=t=>JSON.stringify({mcpServers:{lunora:{args:["-y","@lunora/mcp"],command:"npx",env:{LUNORA_ADMIN_TOKEN:"<your-admin-token>",LUNORA_URL:t}}}},null,2),kt=t=>{const e=_t.map(a=>`- ${a.name} — ${a.summary}`).join(`
2
+ `);return[`You have a Lunora MCP server connected to the deployment at ${t}.`,"It exposes this backend's functions and schema so you can inspect and operate it:",e,"",`Start by calling lunora_list_functions and lunora_list_tables to learn what exists, then lunora_get_function_schema before any run call. The full HTTP API is also documented at ${t}/_lunora/admin/openapi (that endpoint needs the same admin token the MCP server is configured with).`].join(`
3
+ `)},wt=1500,$t=()=>{const t=L(35),e=I();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=lt(),t[0]=a):a=t[0];const n=a,[s,o]=Ee(null);let l,i;t[1]!==s?(l=()=>{if(s===null)return;const A=globalThis.setTimeout(()=>{o(null)},wt);return()=>{globalThis.clearTimeout(A)}},i=[s],t[1]=s,t[2]=l,t[3]=i):(l=t[2],i=t[3]),Fe(l,i);let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=(A,C)=>{it(C)&&o(A)},t[4]=c):c=t[4];const u=c;let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{u("config",St(n))},t[5]=d):d=t[5];const p=d;let m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{u("prompt",kt(n))},t[6]=m):m=t[6];const f=m;let g;t[7]!==e?(g=e("Connect an AI agent"),t[7]=e,t[8]=g):g=t[8];let x;t[9]!==g?(x=r("span",{className:"text-sm font-medium text-foreground",children:g}),t[9]=g,t[10]=x):x=t[10];let b;t[11]!==e?(b=e("Drive this deployment from an AI agent over the Model Context Protocol — it can list functions and tables, read schemas, and run read-only queries. Writes stay off unless you opt in."),t[11]=e,t[12]=b):b=t[12];let y;t[13]!==b?(y=r("span",{className:"text-xs text-muted-foreground",children:b}),t[13]=b,t[14]=y):y=t[14];let S;t[15]!==x||t[16]!==y?(S=h("div",{className:"flex flex-col gap-1.5 p-4",children:[x,y]}),t[15]=x,t[16]=y,t[17]=S):S=t[17];let M;t[18]===Symbol.for("react.memo_cache_sentinel")?(M=r("code",{className:"font-mono text-xs text-muted-foreground","data-testid":"home-connect-agent-command",children:"npx -y @lunora/mcp"}),t[18]=M):M=t[18];let k;t[19]!==s||t[20]!==e?(k=e(s==="config"?"Copied":"Copy MCP config"),t[19]=s,t[20]=e,t[21]=k):k=t[21];let v;t[22]!==k?(v=r(We,{"data-testid":"home-connect-agent-copy-config",onClick:p,size:"xs",variant:"outline",children:k}),t[22]=k,t[23]=v):v=t[23];let w;t[24]!==s||t[25]!==e?(w=e(s==="prompt"?"Copied":"Copy agent prompt"),t[24]=s,t[25]=e,t[26]=w):w=t[26];let $;t[27]!==w?($=r(We,{"data-testid":"home-connect-agent-copy-prompt",onClick:f,size:"xs",variant:"outline",children:w}),t[27]=w,t[28]=$):$=t[28];let N;t[29]!==v||t[30]!==$?(N=h("div",{className:"flex flex-col gap-3 border-t border-border bg-muted/50 px-4 py-3",children:[M,h("div",{className:"flex flex-wrap gap-2",children:[v,$]})]}),t[29]=v,t[30]=$,t[31]=N):N=t[31];let _;return t[32]!==S||t[33]!==N?(_=h(q,{className:"gap-0 py-0","data-testid":"home-connect-agent",children:[S,N]}),t[32]=S,t[33]=N,t[34]=_):_=t[34],_},Lt=nt(()=>import("../packem_chunks/sparkline.js").then(t=>({default:t.Sparkline}))),Be=t=>{if(t<1e3)return`${String(Math.round(t))}ms`;const e=t>=1e4?0:1;return`${(t/1e3).toFixed(e)}s`},Mt=(t,e)=>{const a=Math.max(0,Math.round((e-t)/1e3));if(a<60)return`${String(a)}s ago`;const n=Math.round(a/60);if(n<60)return`${String(n)}m ago`;const s=Math.round(n/60);return s<24?`${String(s)}h ago`:`${String(Math.round(s/24))}d ago`},He=(t,e)=>{if(t===void 0||t.length===0)return[];const a=new Map;for(const n of t)a.set(n.bucketMs,(a.get(n.bucketMs)??0)+n[e]);return[...a.entries()].toSorted(([n],[s])=>n-s).map(([,n])=>n)},Je=(t,e=!0)=>{if(t.length<4)return null;const a=Math.floor(t.length/2),n=t.slice(0,a).reduce((l,i)=>l+i,0),s=t.slice(a).reduce((l,i)=>l+i,0);if(n===0)return null;const o=(s-n)/n*100;return{positive:e?o>=0:o<=0,text:`${o>=0?"+":""}${o.toFixed(1)}%`}},Oe=t=>{const e=L(24),{delta:a,footer:n,label:s,trend:o,unit:l,value:i}=t,c=I();let u;e[0]!==s?(u=r("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:s}),e[0]=s,e[1]=u):u=e[1];let d;e[2]!==i?(d=r("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:i}),e[2]=i,e[3]=d):d=e[3];let p;e[4]!==l?(p=l!==void 0&&r("span",{className:"text-xs text-muted-foreground",children:l}),e[4]=l,e[5]=p):p=e[5];let m;e[6]!==d||e[7]!==p?(m=h("span",{className:"flex items-baseline gap-1.5",children:[d,p]}),e[6]=d,e[7]=p,e[8]=m):m=e[8];let f;e[9]!==o?(f=o!==void 0&&r(at,{fallback:r("div",{"aria-hidden":"true",className:"h-8 w-28"}),children:r(Lt,{data:o})}),e[9]=o,e[10]=f):f=e[10];let g;e[11]!==m||e[12]!==f?(g=h("div",{className:"flex items-center justify-between gap-3",children:[m,f]}),e[11]=m,e[12]=f,e[13]=g):g=e[13];let x;e[14]!==u||e[15]!==g?(x=h("div",{className:"flex flex-col gap-2.5 p-4",children:[u,g]}),e[14]=u,e[15]=g,e[16]=x):x=e[16];let b;e[17]!==a||e[18]!==n||e[19]!==c?(b=a==null?n!=null&&r("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:n}):h("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px]",children:[r("span",{className:Xe("font-semibold",a.positive?"text-success":"text-destructive"),children:a.text})," ",r("span",{className:"text-muted-foreground",children:c("vs. prev.")})]}),e[17]=a,e[18]=n,e[19]=c,e[20]=b):b=e[20];let y;return e[21]!==x||e[22]!==b?(y=h(q,{className:"justify-between gap-0 py-0",children:[x,b]}),e[21]=x,e[22]=b,e[23]=y):y=e[23],y},At=()=>{const t=L(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r("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:r("path",{d:"m9 6 6 6-6 6"})}),t[0]=e):e=t[0],e},De=t=>{const e=L(7),{command:a,label:n}=t;let s;e[0]!==n?(s=r("div",{className:"p-4",children:r("span",{className:"text-sm font-medium text-foreground",children:n})}),e[0]=n,e[1]=s):s=e[1];let o;e[2]!==a?(o=r("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5",children:r("code",{className:"font-mono text-xs text-muted-foreground",children:a})}),e[2]=a,e[3]=o):o=e[3];let l;return e[4]!==s||e[5]!==o?(l=h(q,{className:"justify-between gap-0 py-0",children:[s,o]}),e[4]=s,e[5]=o,e[6]=l):l=e[6],l},Ge=t=>{const e=L(18),{count:a,onView:n,testId:s,title:o}=t,l=I();let i;e[0]!==o?(i=r("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:o}),e[0]=o,e[1]=i):i=e[1];let c;e[2]!==a||e[3]!==l?(c=a===null?r("span",{className:"text-xs text-muted-foreground",children:l("No data yet")}):r(Ye,{variant:a>0?"destructive":"success",children:a>0?a:l("All clear")}),e[2]=a,e[3]=l,e[4]=c):c=e[4];let u;e[5]!==i||e[6]!==c?(u=h("div",{className:"flex items-start justify-between gap-2 p-4",children:[i,c]}),e[5]=i,e[6]=c,e[7]=u):u=e[7];let d;e[8]!==l?(d=l("View"),e[8]=l,e[9]=d):d=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=r(At,{}),e[10]=p):p=e[10];let m;e[11]!==n||e[12]!==d?(m=h("button",{className:"flex items-center gap-1 border-t border-border bg-muted/50 px-4 py-2.5 text-[12px] font-medium text-foreground outline-none transition-colors hover:bg-muted focus-visible:bg-muted",onClick:n,type:"button",children:[d,p]}),e[11]=n,e[12]=d,e[13]=m):m=e[13];let f;return e[14]!==u||e[15]!==m||e[16]!==s?(f=h(q,{className:"justify-between gap-0 py-0","data-testid":s,children:[u,m]}),e[14]=u,e[15]=m,e[16]=s,e[17]=f):f=e[17],f},Ct=t=>{const e=L(7),{functions:a}=t,n=I();let s;if(e[0]!==a||e[1]!==n){const o=[...a].toSorted(Ot).slice(0,5);let l;e[3]!==n?(l=n("Top functions"),e[3]=n,e[4]=l):l=e[4];let i;e[5]!==l?(i=r("div",{className:"border-b border-border px-4 py-3",children:r("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l})}),e[5]=l,e[6]=i):i=e[6],s=h(q,{className:"gap-0 py-0","data-testid":"home-top-functions",children:[i,o.length===0?r("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:n("No functions called yet.")}):h("div",{className:"divide-y divide-border",children:[h("div",{className:"grid grid-cols-[1fr_auto_auto_auto] gap-4 px-4 py-1.5 font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:[r("span",{children:n("Function")}),r("span",{className:"text-end",children:n("Calls")}),r("span",{className:"w-12 text-end",children:n("Avg")}),r("span",{className:"w-8 text-end",children:n("Err")})]}),o.map(Kt)]})]}),e[0]=a,e[1]=n,e[2]=s}else s=e[2];return s},It=t=>{const e=L(26),{subs:a}=t,n=I();let s;e[0]!==n?(s=n("Live connections"),e[0]=n,e[1]=s):s=e[1];let o;e[2]!==s?(o=r("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:s}),e[2]=s,e[3]=o):o=e[3];const l=a?.totalConnections??0;let i;e[4]!==l?(i=l.toLocaleString(),e[4]=l,e[5]=i):i=e[5];let c;e[6]!==i?(c=r("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:i}),e[6]=i,e[7]=c):c=e[7];let u;e[8]!==n?(u=n("sockets"),e[8]=n,e[9]=u):u=e[9];let d;e[10]!==u?(d=r("span",{className:"text-xs text-muted-foreground",children:u}),e[10]=u,e[11]=d):d=e[11];let p;e[12]!==c||e[13]!==d?(p=h("span",{className:"flex items-baseline gap-1.5",children:[c,d]}),e[12]=c,e[13]=d,e[14]=p):p=e[14];const m=a?.totalSubscriptions??0;let f;e[15]!==m?(f=m.toLocaleString(),e[15]=m,e[16]=f):f=e[16];let g;e[17]!==n?(g=n("active subscriptions"),e[17]=n,e[18]=g):g=e[18];let x;e[19]!==f||e[20]!==g?(x=h("span",{className:"text-[11px] text-muted-foreground",children:[f," ",g]}),e[19]=f,e[20]=g,e[21]=x):x=e[21];let b;return e[22]!==x||e[23]!==o||e[24]!==p?(b=r(q,{"data-testid":"home-live-connections",children:h(Ze,{className:"flex flex-col gap-2.5 py-4",children:[o,p,x]})}),e[22]=x,e[23]=o,e[24]=p,e[25]=b):b=e[25],b},jt=t=>{const e=L(7),{entries:a}=t,n=I();let s;if(e[0]!==a||e[1]!==n){const o=Date.now();let l;e[3]!==n?(l=n("Recent activity"),e[3]=n,e[4]=l):l=e[4];let i;e[5]!==l?(i=r("div",{className:"border-b border-border px-4 py-3",children:r("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l})}),e[5]=l,e[6]=i):i=e[6],s=h(q,{className:"gap-0 py-0","data-testid":"home-recent-activity",children:[i,a.length===0?r("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:n("No recent activity.")}):r("ul",{className:"divide-y divide-border",children:a.slice(0,5).map(c=>h("li",{className:"flex items-center justify-between gap-3 px-4 py-2 text-[13px]",children:[h("span",{className:"flex min-w-0 items-center gap-2",children:[r("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-muted-foreground/40"}),h("span",{className:"truncate text-foreground",children:[c.op,c.table!==void 0&&h("span",{className:"text-muted-foreground",children:[" · ",c.table,c.id===void 0?"":`#${c.id}`]})]})]}),r("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:Mt(c.ts,o)})]},c.seq))})]}),e[0]=a,e[1]=n,e[2]=s}else s=e[2];return s},Tt=t=>{const e=t.reduce((a,n)=>a+n.calls,0);return e===0?null:t.reduce((a,n)=>a+n.totalDurationMs,0)/e},Zt=t=>{const e=L(151),{initialShardKey:a}=t,n=I(),s=Qe(),o=a??"";let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={},e[0]=l):l=e[0];let i;e[1]!==o?(i={shardKey:o},e[1]=o,e[2]=i):i=e[2];const c=_e(Ne.getMetrics,l,i);let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u={},e[3]=u):u=e[3];let d;e[4]!==o?(d={shardKey:o},e[4]=o,e[5]=d):d=e[5];const p=_e(Ne.getFunctionStats,u,d);let m,f;e[6]===Symbol.for("react.memo_cache_sentinel")?(m={},f={shardKey:""},e[6]=m,e[7]=f):(m=e[6],f=e[7]);const g=_e(Ne.getSecurityAudit,m,f);let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x={},e[8]=x):x=e[8];let b;e[9]!==o?(b={shardKey:o},e[9]=o,e[10]=b):b=e[10];const y=_e(Ne.listSubscriptions,x,b);let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S={},e[11]=S):S=e[11];let M;e[12]!==o?(M={shardKey:o},e[12]=o,e[13]=M):M=e[13];const k=_e(Ne.getAuditLog,S,M),v=c.data??null;let w,$,N,_,A,C,P,j,T,z,D,B,O,K,E,F,V,W;if(e[14]!==k.data||e[15]!==g.data||e[16]!==v||e[17]!==c.data||e[18]!==s||e[19]!==p.data||e[20]!==y.data||e[21]!==n){_=Array.isArray(p.data?.functions)?p.data.functions:[],P=y.data??null;let Le;e[40]!==k.data?(Le=Array.isArray(k.data?.entries)?k.data.entries:[],e[40]=k.data,e[41]=Le):Le=e[41],$=Le,A=c.data===void 0||p.data===void 0?null:dt(v,_).length,C=Array.isArray(g.data?.findings)?g.data.findings.length:null;let Me;e[42]!==s?(Me=()=>{Se(s({to:"/security"}))},e[42]=s,e[43]=Me):Me=e[43],W=Me;let Ae;e[44]!==s?(Ae=()=>{Se(s({to:"/insights"}))},e[44]=s,e[45]=Ae):Ae=e[45],V=Ae;const Ce=He(v?.history,"calls"),Ie=He(v?.history,"errors"),Ve=Tt(_),je=Math.max(0,..._.map(Rt)),R=v?.cache;let Te;e[46]!==R?(Te=R!=null&&R.hits+R.misses>0?Math.round(R.hits/(R.hits+R.misses)*100):null,e[46]=R,e[47]=Te):Te=e[47],N=Te,E="flex flex-col gap-6",F="lunora-home",D="grid gap-3 sm:grid-cols-2 xl:grid-cols-4",B="home-health";const Re=Je(Ce);let xe;e[48]!==n?(xe=n("Requests"),e[48]=n,e[49]=xe):xe=e[49];const qe=v?.requests??0;let be;e[50]!==qe?(be=qe.toLocaleString(),e[50]=qe,e[51]=be):be=e[51],e[52]!==Ce||e[53]!==Re||e[54]!==xe||e[55]!==be?(O=r(Oe,{delta:Re,label:xe,trend:Ce,value:be}),e[52]=Ce,e[53]=Re,e[54]=xe,e[55]=be,e[56]=O):O=e[56];const Pe=Je(Ie,!1);let ye;e[57]!==n?(ye=n("Errors"),e[57]=n,e[58]=ye):ye=e[58];const ze=v?.errors??0;let ve;e[59]!==ze?(ve=ze.toLocaleString(),e[59]=ze,e[60]=ve):ve=e[60],e[61]!==Ie||e[62]!==Pe||e[63]!==ye||e[64]!==ve?(K=r(Oe,{delta:Pe,label:ye,trend:Ie,value:ve}),e[61]=Ie,e[62]=Pe,e[63]=ye,e[64]=ve,e[65]=K):K=e[65],w=Oe,e[66]!==je||e[67]!==n?(j=je>0?`${n("max")} ${Be(je)}`:void 0,e[66]=je,e[67]=n,e[68]=j):j=e[68],e[69]!==n?(T=n("Avg latency"),e[69]=n,e[70]=T):T=e[70],z=Ve===null?"—":Be(Ve),e[14]=k.data,e[15]=g.data,e[16]=v,e[17]=c.data,e[18]=s,e[19]=p.data,e[20]=y.data,e[21]=n,e[22]=w,e[23]=$,e[24]=N,e[25]=_,e[26]=A,e[27]=C,e[28]=P,e[29]=j,e[30]=T,e[31]=z,e[32]=D,e[33]=B,e[34]=O,e[35]=K,e[36]=E,e[37]=F,e[38]=V,e[39]=W}else w=e[22],$=e[23],N=e[24],_=e[25],A=e[26],C=e[27],P=e[28],j=e[29],T=e[30],z=e[31],D=e[32],B=e[33],O=e[34],K=e[35],E=e[36],F=e[37],V=e[38],W=e[39];let U;e[71]!==w||e[72]!==j||e[73]!==T||e[74]!==z?(U=r(w,{footer:j,label:T,value:z}),e[71]=w,e[72]=j,e[73]=T,e[74]=z,e[75]=U):U=e[75];let H;e[76]!==N||e[77]!==n?(H=N===null?void 0:`${String(N)}% ${n("cache hit")}`,e[76]=N,e[77]=n,e[78]=H):H=e[78];let J;e[79]!==n?(J=n("Database size"),e[79]=n,e[80]=J):J=e[80];const Ke=v?.databaseSize??null;let G;e[81]!==Ke?(G=ct(Ke),e[81]=Ke,e[82]=G):G=e[82];let Q;e[83]!==H||e[84]!==J||e[85]!==G?(Q=r(Oe,{footer:H,label:J,value:G}),e[83]=H,e[84]=J,e[85]=G,e[86]=Q):Q=e[86];let Y;e[87]!==D||e[88]!==B||e[89]!==O||e[90]!==K||e[91]!==U||e[92]!==Q?(Y=h("div",{className:D,"data-testid":B,children:[O,K,U,Q]}),e[87]=D,e[88]=B,e[89]=O,e[90]=K,e[91]=U,e[92]=Q,e[93]=Y):Y=e[93];let ke;e[94]===Symbol.for("react.memo_cache_sentinel")?(ke=r(xt,{}),e[94]=ke):ke=e[94];let Z;e[95]!==_?(Z=r("div",{className:"lg:col-span-2",children:r(Ct,{functions:_})}),e[95]=_,e[96]=Z):Z=e[96];let X;e[97]!==P?(X=r(It,{subs:P}),e[97]=P,e[98]=X):X=e[98];let ee;e[99]!==$?(ee=r(jt,{entries:$}),e[99]=$,e[100]=ee):ee=e[100];let te;e[101]!==X||e[102]!==ee?(te=h("div",{className:"flex flex-col gap-3",children:[X,ee]}),e[101]=X,e[102]=ee,e[103]=te):te=e[103];let ne;e[104]!==Z||e[105]!==te?(ne=h("div",{className:"grid gap-3 lg:grid-cols-3",children:[Z,te]}),e[104]=Z,e[105]=te,e[106]=ne):ne=e[106];let ae;e[107]!==n?(ae=n("Advisors"),e[107]=n,e[108]=ae):ae=e[108];let re;e[109]!==ae?(re=r("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:ae}),e[109]=ae,e[110]=re):re=e[110];let se;e[111]!==A||e[112]!==C||e[113]!==n||e[114]!==V||e[115]!==W?(se=C===0&&A===0?r(rt,{description:n("No security or performance issues detected."),icon:h("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[r("path",{d:"M12 3 4 6v5c0 5 3.4 8.5 8 10 4.6-1.5 8-5 8-10V6l-8-3Z"}),r("path",{d:"m9 12 2 2 4-4"})]}),testId:"home-advisors-clear",title:n("No issues found")}):h("div",{className:"grid gap-3 sm:grid-cols-2",children:[r(Ge,{count:C,onView:W,testId:"home-security",title:n("Security findings")}),r(Ge,{count:A,onView:V,testId:"home-performance",title:n("Performance issues")})]}),e[111]=A,e[112]=C,e[113]=n,e[114]=V,e[115]=W,e[116]=se):se=e[116];let oe;e[117]!==re||e[118]!==se?(oe=h("section",{className:"flex flex-col gap-3","data-testid":"home-advisors",children:[re,se]}),e[117]=re,e[118]=se,e[119]=oe):oe=e[119];let le;e[120]!==n?(le=n("Get connected"),e[120]=n,e[121]=le):le=e[121];let ie;e[122]!==le?(ie=r("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:le}),e[122]=le,e[123]=ie):ie=e[123];let ce;e[124]!==n?(ce=n("Client SDK"),e[124]=n,e[125]=ce):ce=e[125];let de;e[126]!==ce?(de=r(De,{command:"npm i @lunora/client",label:ce}),e[126]=ce,e[127]=de):de=e[127];let me;e[128]!==n?(me=n("React"),e[128]=n,e[129]=me):me=e[129];let ue;e[130]!==me?(ue=r(De,{command:"npm i @lunora/react",label:me}),e[130]=me,e[131]=ue):ue=e[131];let pe;e[132]!==n?(pe=n("CLI"),e[132]=n,e[133]=pe):pe=e[133];let fe;e[134]!==pe?(fe=r(De,{command:"lunora dev",label:pe}),e[134]=pe,e[135]=fe):fe=e[135];let he;e[136]!==de||e[137]!==ue||e[138]!==fe?(he=h("div",{className:"grid gap-3 sm:grid-cols-3",children:[de,ue,fe]}),e[136]=de,e[137]=ue,e[138]=fe,e[139]=he):he=e[139];let we;e[140]===Symbol.for("react.memo_cache_sentinel")?(we=r($t,{}),e[140]=we):we=e[140];let ge;e[141]!==ie||e[142]!==he?(ge=h("section",{className:"flex flex-col gap-3","data-testid":"home-get-connected",children:[ie,he,we]}),e[141]=ie,e[142]=he,e[143]=ge):ge=e[143];let $e;return e[144]!==E||e[145]!==F||e[146]!==Y||e[147]!==ne||e[148]!==oe||e[149]!==ge?($e=h("div",{className:E,"data-testid":F,children:[Y,ke,ne,oe,ge]}),e[144]=E,e[145]=F,e[146]=Y,e[147]=ne,e[148]=oe,e[149]=ge,e[150]=$e):$e=e[150],$e};function Ot(t,e){return e.calls-t.calls}function Kt(t){return h("div",{className:"grid grid-cols-[1fr_auto_auto_auto] items-center gap-4 px-4 py-2 text-[13px]",children:[r("span",{className:"truncate font-mono text-xs text-foreground",children:t.path}),r("span",{className:"text-end tabular-nums",children:t.calls.toLocaleString()}),r("span",{className:"w-12 text-end tabular-nums text-muted-foreground",children:Be(t.calls>0?t.totalDurationMs/t.calls:0)}),r("span",{className:Xe("w-8 text-end tabular-nums",t.errors>0?"text-destructive":"text-muted-foreground"),children:t.errors})]},t.path)}function Rt(t){return t.maxDurationMs}export{Zt as H,pt as S};
@@ -0,0 +1 @@
1
+ import{c as o}from"react/compiler-runtime";import"react";import{Input as l}from"@base-ui/react/input";import{c as s}from"./utils-bhneXptQ.js";import{jsx as u}from"react/jsx-runtime";function g(d){const i=o(10);let e,r,t;i[0]!==d?({className:e,type:t,...r}=d,i[0]=d,i[1]=e,i[2]=r,i[3]=t):(e=i[1],r=i[2],t=i[3]);let n;i[4]!==e?(n=s("h-8 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-xs dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),i[4]=e,i[5]=n):n=i[5];let a;return i[6]!==r||i[7]!==n||i[8]!==t?(a=u(l,{type:t,"data-slot":"input",className:n,...r}),i[6]=r,i[7]=n,i[8]=t,i[9]=a):a=i[9],a}export{g as u};
@@ -0,0 +1,2 @@
1
+ const n=(t,r,e,o,i)=>{switch(r){case"action":return t.action(e,o,i);case"mutation":return t.mutation(e,o,i);default:return t.query(e,o,i)}},s=t=>({__lunoraRef:t}),c=t=>{const r=t.trim();return r===""?{}:{shardKey:r}},l=t=>t instanceof Error?t.message:String(t),u=t=>{if(t===null||typeof t!="object"||!("code"in t))return;const{code:r}=t;return typeof r=="string"?r:void 0},f=t=>{if(t===null||typeof t!="object"||!("hint"in t))return;const{hint:r}=t;return typeof r=="string"?r:Array.isArray(r)?r.filter(e=>typeof e=="string").join(`
2
+ `):void 0},g=t=>{if(t===null||typeof t!="object"||!("docsUrl"in t))return;const r=t.docsUrl;if(typeof r=="string")try{const{protocol:e}=new URL(r);return e==="http:"||e==="https:"?r:void 0}catch{return}},d=t=>{if(t==null)return"";switch(typeof t){case"bigint":case"boolean":case"number":return t.toString();case"string":return t;case"symbol":return t.toString();default:return JSON.stringify(t)}},a=(t,r)=>{t.catch(e=>{})},p=t=>{if(t!==void 0&&t!=="")return t;const r=globalThis.location;return r?.origin!==void 0&&r.origin!==""?r.origin:"http://localhost:5173"},y=t=>{const r="navigator"in globalThis?globalThis.navigator.clipboard:void 0;return r===void 0?!1:(a(r.writeText(t)),!0)},h=t=>{if(t==null)return"—";if(t<1024)return`${t.toString()} B`;const r=["KB","MB","GB","TB"];let e=t/1024,o=0;for(;e>=1024&&o<r.length-1;)e/=1024,o+=1;return`${e.toFixed(1)} ${r[o]??"TB"}`},m=(t,r="")=>{if(t==null||t==="")return r;const e=new Date(t);return Number.isNaN(e.getTime())?String(t):e.toLocaleString()};export{s as a,f as b,c,g as d,l as e,a as f,y as g,d as h,m as i,n as j,h as k,u as l,p as r};
@@ -0,0 +1 @@
1
+ import{c as n}from"react/compiler-runtime";import"react";import{c as s}from"./utils-bhneXptQ.js";import{jsx as i}from"react/jsx-runtime";function u(r){const e=n(8);let 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 o;e[3]!==t?(o=s("flex items-center gap-2 text-xs leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=i("label",{"data-slot":"label",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}export{u as p};
@@ -0,0 +1 @@
1
+ import{c as n}from"react/compiler-runtime";import{useT as m}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{jsx as v}from"react/jsx-runtime";const p=a=>{const r=n(6),{message:t,prefix:l}=a,o=m();if(t===void 0)return null;const i=`${l}-live-error`;let e;r[0]!==t||r[1]!==o?(e=o("Live unavailable: {liveError}",{liveError:t}),r[0]=t,r[1]=o,r[2]=e):e=r[2];let s;return r[3]!==i||r[4]!==e?(s=v("span",{className:"text-xs text-destructive","data-testid":i,role:"status",children:e}),r[3]=i,r[4]=e,r[5]=s):s=r[5],s};export{p as L};
@@ -0,0 +1 @@
1
+ const i=r=>{if(typeof r=="string")return r;try{return JSON.stringify(r)??String(r)}catch{return String(r)}},o=r=>typeof r!="object"||r===null||Array.isArray(r)?"":Object.entries(r).map(([t,e])=>`${t}=${i(e)}`).join(" ");export{o as f};
@@ -0,0 +1 @@
1
+ import{c as v}from"react/compiler-runtime";import{c as k}from"./utils-bhneXptQ.js";import{jsx as w}from"react/jsx-runtime";const y={dialog:"fixed inset-0 z-[1000] flex justify-center bg-black/20 pt-[10vh]",drawer:"fixed inset-0 z-[1000] flex justify-end bg-black/20"},N={dialog:"flex h-fit w-[min(28rem,92vw)] flex-col gap-3 rounded-lg border border-border bg-background p-4 shadow-xl",drawer:"flex h-full w-[min(34rem,100vw)] flex-col gap-4 overflow-auto border-l border-border bg-background p-4 shadow-xl"},I=u=>{const e=v(18),{className:s,children:i,label:c,onClose:r,panelTestId:b,testId:f,variant:h}=u;let t;e[0]!==r?(t=n=>{n.target===n.currentTarget&&r()},e[0]=r,e[1]=t):t=e[1];const g=t;let a;e[2]!==r?(a=n=>{n.key==="Escape"&&r()},e[2]=r,e[3]=a):a=e[3];const m=a,p=y[h],x=N[h];let l;e[4]!==s||e[5]!==x?(l=k(x,s),e[4]=s,e[5]=x,e[6]=l):l=e[6];let o;e[7]!==i||e[8]!==c||e[9]!==b||e[10]!==l?(o=w("div",{"aria-label":c,className:l,"data-testid":b,role:"dialog",children:i}),e[7]=i,e[8]=c,e[9]=b,e[10]=l,e[11]=o):o=e[11];let d;return e[12]!==g||e[13]!==m||e[14]!==p||e[15]!==o||e[16]!==f?(d=w("div",{className:p,"data-testid":f,onClick:g,onKeyDown:m,role:"presentation",children:o}),e[12]=g,e[13]=m,e[14]=p,e[15]=o,e[16]=f,e[17]=d):d=e[17],d};export{I as M};
@@ -0,0 +1,12 @@
1
+ import{c as K}from"react/compiler-runtime";import{useState as L,useEffect as se,createContext as ie,use as le}from"react";import{e as D,g as Z,f as de,j as ce,c as me,a as ue}from"./internal-AtZ4bTal.js";import{SentIcon as pe,Copy01Icon as fe,Search01Icon as he}from"@hugeicons/core-free-icons";import{HugeiconsIcon as H}from"@hugeicons/react";import{u as xe}from"./input-JHu63lTv.js";import{useT as q}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{u as U}from"./button-BkCrNcAs.js";import{jsx as s,jsxs as w,Fragment as ge}from"react/jsx-runtime";import{g as be}from"./badge-BbuuAio7.js";import{ShardInput as ye}from"./ShardInput-BVn2iCU0.js";import{p as V}from"./label-6uP1obNF.js";import{l as ve}from"./textarea-Bu2-jKAs.js";import{LunoraError as Ne}from"@lunora/errors";import{useLunora as ke}from"@lunora/react";import{c as Y}from"./utils-bhneXptQ.js";const bt=function(t,e,r){const o=K(10);let a;o[0]===Symbol.for("react.memo_cache_sentinel")?(a={kind:"loading"},o[0]=a):a=o[0];const[n,l]=L(a);let c,f;o[1]!==r||o[2]!==e||o[3]!==t?(c=()=>{if(t!==void 0)return;let u=!1;return e().then(i=>(u||l(r(i)),i)).catch(i=>{u||l({kind:"error",message:D(i)})}),()=>{u=!0}},f=[r,e,t],o[1]=r,o[2]=e,o[3]=t,o[4]=c,o[5]=f):(c=o[4],f=o[5]),se(c,f);let d;return o[6]!==r||o[7]!==n||o[8]!==t?(d=t===void 0?n:r(t),o[6]=r,o[7]=n,o[8]=t,o[9]=d):d=o[9],d},$e=t=>typeof t=="number"?"number":typeof t=="boolean"?"boolean":"string",ee=t=>{if(t.enum!==void 0&&t.enum.length>0)return t.enum;if(t.anyOf!==void 0&&t.anyOf.length>0&&t.anyOf.every(e=>e.const!==void 0))return t.anyOf.map(e=>e.const)},F=t=>t===void 0?"any":t.const!==void 0?JSON.stringify(t.const):t.enum!==void 0&&t.enum.length>0?t.enum.map(e=>JSON.stringify(e)).join(" | "):t.anyOf!==void 0&&t.anyOf.length>0?t.anyOf.map(e=>F(e)).join(" | "):t.type==="array"?`array<${F(t.items)}>`:t.type??"any",we=t=>{const e=ee(t);return e!==void 0?t.type??$e(e[0]):F(t)},Se=t=>{const e=ee(t);return e===void 0?void 0:e.map(r=>JSON.stringify(r)).join(" | ")},Oe=t=>{const e=[];t.minimum!==void 0?e.push(`${String(t.minimum)} ≤`):t.exclusiveMinimum!==void 0&&e.push(`${String(t.exclusiveMinimum)} <`);const r=e.length>0;e.push("value"),t.maximum!==void 0?e.push(`≤ ${String(t.maximum)}`):t.exclusiveMaximum!==void 0&&e.push(`< ${String(t.exclusiveMaximum)}`);const o=e.length>(r?2:1);return r||o?e.join(" "):void 0},je=t=>{if(t.type==="object"&&t.properties!==void 0)return t;if(t.type==="array"&&t.items?.type==="object"&&t.items.properties!==void 0)return t.items},B=t=>{if(t===void 0)return null;if(t.const!==void 0)return t.const;if(t.enum!==void 0&&t.enum.length>0)return t.enum[0];if(t.anyOf!==void 0&&t.anyOf.length>0)return B(t.anyOf[0]);switch(t.type){case"array":return[];case"boolean":return!1;case"number":return 0;case"object":{const e={};for(const[r,o]of Object.entries(t.properties??{}))e[r]=B(o);return e}case"string":return"";default:return null}},z=t=>{const e=K(7),{label:r,value:o}=t;let a;e[0]!==r?(a=s("span",{className:"text-muted-foreground",children:r}),e[0]=r,e[1]=a):a=e[1];let n;e[2]!==o?(n=s("span",{className:"text-foreground",children:o}),e[2]=o,e[3]=n):n=e[3];let l;return e[4]!==a||e[5]!==n?(l=w("span",{className:"inline-flex items-center gap-1 rounded border border-border px-1.5 py-0.5 font-mono text-[10px]",children:[a,n]}),e[4]=a,e[5]=n,e[6]=l):l=e[6],l},Pe=t=>{const e=K(40),{name:r,required:o,schema:a}=t,n=q();let l;e[0]!==a?(l=Oe(a),e[0]=a,e[1]=l):l=e[1];const c=l;let f;e[2]!==a?(f=Se(a),e[2]=a,e[3]=f):f=e[3];const d=f,u=a["x-lunora-table"],i=a.format!==void 0||c!==void 0||d!==void 0||u!==void 0;let b;e[4]!==a?(b=je(a),e[4]=a,e[5]=b):b=e[5];const y=b,v=o?"*":"?";let N;e[6]!==v?(N=s("span",{className:"text-muted-foreground",children:v}),e[6]=v,e[7]=N):N=e[7];let m;e[8]!==r||e[9]!==N?(m=w("span",{className:"font-mono text-foreground",children:[r,N]}),e[8]=r,e[9]=N,e[10]=m):m=e[10];let g;e[11]!==a?(g=we(a),e[11]=a,e[12]=g):g=e[12];let h;e[13]!==g?(h=s("span",{className:"font-mono text-muted-foreground",children:g}),e[13]=g,e[14]=h):h=e[14];let p;e[15]!==m||e[16]!==h?(p=w("div",{className:"flex items-baseline gap-2",children:[m,h]}),e[15]=m,e[16]=h,e[17]=p):p=e[17];let x;e[18]!==a.description?(x=a.description!==void 0&&s("p",{className:"max-w-prose text-muted-foreground",children:a.description}),e[18]=a.description,e[19]=x):x=e[19];let k;e[20]!==i||e[21]!==c||e[22]!==u||e[23]!==a.format||e[24]!==n||e[25]!==d?(k=i&&w("div",{className:"flex flex-wrap gap-1",children:[a.format!==void 0&&s(z,{label:n("Format"),value:a.format}),c!==void 0&&s(z,{label:n("Range"),value:c}),d!==void 0&&s(z,{label:n("Value in"),value:d}),u!==void 0&&s(z,{label:n("relation"),value:u})]}),e[20]=i,e[21]=c,e[22]=u,e[23]=a.format,e[24]=n,e[25]=d,e[26]=k):k=e[26];let S;e[27]!==x||e[28]!==k||e[29]!==p?(S=w("div",{className:"flex flex-col gap-1 py-2",children:[p,x,k]}),e[27]=x,e[28]=k,e[29]=p,e[30]=S):S=e[30];const $=S;if(y===void 0){let j;return e[31]!==$?(j=s("div",{className:"border-b border-border/50 last:border-b-0",children:$}),e[31]=$,e[32]=j):j=e[32],j}let O;e[33]!==$?(O=s("summary",{className:"cursor-pointer marker:text-muted-foreground",children:$}),e[33]=$,e[34]=O):O=e[34];let _;e[35]!==y?(_=s("div",{className:"mb-2 ml-2 border-l border-border pl-3",children:s(te,{schema:y})}),e[35]=y,e[36]=_):_=e[36];let P;return e[37]!==O||e[38]!==_?(P=w("details",{className:"border-b border-border/50 last:border-b-0",children:[O,_]}),e[37]=O,e[38]=_,e[39]=P):P=e[39],P},te=t=>{const e=K(7),{schema:r}=t;let o;e[0]!==r.required?(o=new Set(r.required),e[0]=r.required,e[1]=o):o=e[1];const a=o;let n;e[2]!==r.properties?(n=Object.entries(r.properties??{}),e[2]=r.properties,e[3]=n):n=e[3];const l=n;let c;return e[4]!==a||e[5]!==l?(c=s("div",{className:"flex flex-col",children:l.map(f=>{const[d,u]=f;return s(Pe,{name:d,required:a.has(d),schema:u},d)})}),e[4]=a,e[5]=l,e[6]=c):c=e[6],c},Q=t=>{const e=K(10),{schema:r,testId:o}=t;if(r?.type!=="object"||Object.keys(r.properties??{}).length===0){let l;e[0]!==r?(l=F(r),e[0]=r,e[1]=l):l=e[1];let c;return e[2]!==l||e[3]!==o?(c=s("p",{className:"font-mono text-xs text-muted-foreground","data-testid":o,children:l}),e[2]=l,e[3]=o,e[4]=c):c=e[4],c}let a;e[5]!==r?(a=s(te,{schema:r}),e[5]=r,e[6]=a):a=e[6];let n;return e[7]!==a||e[8]!==o?(n=s("div",{className:"text-xs","data-testid":o,children:a}),e[7]=a,e[8]=o,e[9]=n):n=e[9],n},_e=["curl","javascript","lunora"],Ce={lunora:"Lunora",curl:"cURL",javascript:"JavaScript"},Te=t=>`api.${t.replaceAll(/[/:]/g,".")}`,Ie=t=>{const e=B(t.argsSchema)??{};return t.functionPath===void 0?e:{args:e,functionPath:t.functionPath}},Je=(t,e,r)=>{const o=`${r}${e.httpPath}`,a=JSON.stringify(Ie(e),void 0,2),n=JSON.stringify(B(e.argsSchema)??{},void 0,2);switch(t){case"curl":{const l=e.method!=="GET"&&e.method!=="HEAD",c=[`curl -X ${e.method} ${JSON.stringify(o)}`];return l&&c.push(' -H "Content-Type: application/json"',` -d '${a}'`),c.join(` \\
2
+ `)}case"lunora":return e.functionPath===void 0?`await fetch(${JSON.stringify(e.httpPath)}, { method: ${JSON.stringify(e.method)} });`:`import { useLunora } from "@lunora/react";
3
+ import { api } from "./_generated/api";
4
+
5
+ const client = useLunora();
6
+ await client.${e.kind??"query"}(${Te(e.functionPath)}, ${n});`;default:{const l=e.method!=="GET"&&e.method!=="HEAD"?`{
7
+ method: ${JSON.stringify(e.method)},
8
+ headers: { "Content-Type": "application/json" },
9
+ body: JSON.stringify(${a}),
10
+ }`:`{ method: ${JSON.stringify(e.method)} }`;return`const response = await fetch(${JSON.stringify(o)}, ${l});
11
+ const data = await response.json();`}}},Ee=t=>{const e=K(24),{operation:r,server:o}=t,a=q(),[n,l]=L("curl");let c;e[0]!==r||e[1]!==n||e[2]!==o?(c=Je(n,r,o),e[0]=r,e[1]=n,e[2]=o,e[3]=c):c=e[3];const f=c;let d;e[4]!==f?(d=()=>{Z(f)},e[4]=f,e[5]=d):d=e[5];const u=d;let i;e[6]===Symbol.for("react.memo_cache_sentinel")?(i=x=>{l(x.currentTarget.dataset.sample)},e[6]=i):i=e[6];const b=i;let y;e[7]!==n?(y=_e.map(x=>s("button",{"aria-selected":n===x,className:"rounded px-2 py-0.5 text-xs text-muted-foreground transition-colors hover:text-foreground aria-selected:bg-muted aria-selected:font-medium aria-selected:text-foreground","data-sample":x,"data-testid":`api-sample-${x}`,onClick:b,role:"tab",type:"button",children:Ce[x]},x)),e[7]=n,e[8]=y):y=e[8];let v;e[9]!==y?(v=s("div",{className:"flex gap-1",role:"tablist",children:y}),e[9]=y,e[10]=v):v=e[10];let N;e[11]!==a?(N=a("Copy"),e[11]=a,e[12]=N):N=e[12];let m;e[13]!==u||e[14]!==N?(m=s(U,{"data-testid":"api-sample-copy",onClick:u,size:"xs",type:"button",variant:"ghost",children:N}),e[13]=u,e[14]=N,e[15]=m):m=e[15];let g;e[16]!==v||e[17]!==m?(g=w("div",{className:"flex items-center justify-between gap-2 border-b border-border px-3 py-2",children:[v,m]}),e[16]=v,e[17]=m,e[18]=g):g=e[18];let h;e[19]!==f?(h=s("pre",{className:"overflow-auto px-3 pb-3 font-mono text-xs","data-testid":"api-sample-source",children:f}),e[19]=f,e[20]=h):h=e[20];let p;return e[21]!==g||e[22]!==h?(p=w("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card","data-testid":"api-code-samples",children:[g,h]}),e[21]=g,e[22]=h,e[23]=p):p=e[23],p},Ae={blue:"text-info",emerald:"text-success",neutral:"text-muted-foreground",orange:"text-warning",red:"text-destructive",violet:"text-royal-amethyst"},Me=t=>{switch(t.toUpperCase()){case"DELETE":return"red";case"GET":return"emerald";case"PATCH":return"orange";case"POST":return"blue";case"PUT":return"orange";default:return"neutral"}},Ke=t=>{switch(t){case"action":return"violet";case"mutation":return"orange";case"query":return"emerald";default:return"neutral"}},G=t=>{const e=K(7),{kind:r,method:o,testId:a}=t;let n;e[0]!==r||e[1]!==o?(n=r??o.toUpperCase(),e[0]=r,e[1]=o,e[2]=n):n=e[2];const l=n,c=r===void 0?Me(o):Ke(r),f=`${Ae[c]} font-mono text-[10px] tracking-wide uppercase`;let d;return e[3]!==l||e[4]!==f||e[5]!==a?(d=s(be,{className:f,"data-testid":a,variant:"ghost",children:l}),e[3]=l,e[4]=f,e[5]=a,e[6]=d):d=e[6],d},re=t=>t.startsWith("2")?"text-emerald-600 dark:text-emerald-400":t==="default"||t.startsWith("4")||t.startsWith("5")?"text-red-600 dark:text-red-400":"text-muted-foreground",oe=t=>t.startsWith("2")?"bg-emerald-500":t==="default"||t.startsWith("4")||t.startsWith("5")?"bg-red-500":"bg-muted-foreground",Le=t=>JSON.stringify(B(t.argsSchema)??{},void 0,2),ae=ie(null),ne=()=>{const t=le(ae);if(t===null)throw new Ne("INTERNAL","useOperationRun must be used within an OperationRunProvider");return t},Re=({children:t,operation:e})=>{const r=q(),o=ke(),[a,n]=L(()=>Le(e)),[l,c]=L(""),[f,d]=L("idle"),[u,i]=L(void 0),[b,y]=L(null),[v,N]=L(null),m=async()=>{let g;try{g=a.trim()===""?{}:JSON.parse(a)}catch(p){d("error"),i(void 0),N(null),y(r("Invalid JSON args: {message}",{message:D(p)}));return}d("running"),y(null);const h=performance.now();try{let p;if(e.functionPath===void 0){const x=e.method!=="GET"&&e.method!=="HEAD",k=await(await fetch(e.httpPath,{body:x?JSON.stringify(g):void 0,headers:x?{"content-type":"application/json"}:void 0,method:e.method})).text();try{p=JSON.parse(k)}catch{p=k}}else p=await ce(o,e.kind,ue(e.functionPath),g,me(l));i(p),N(Math.round(performance.now()-h)),d("success")}catch(p){i(void 0),N(Math.round(performance.now()-h)),y(D(p)),d("error")}};return s(ae,{value:{argsText:a,durationMs:v,error:b,operation:e,response:u,send:()=>{de(m())},setArgsText:n,setShardKey:c,shardKey:l,status:f},children:t})},qe=()=>{const t=K(48),e=q(),{argsText:r,operation:o,send:a,setArgsText:n,setShardKey:l,shardKey:c,status:f}=ne();let d;t[0]!==n?(d=E=>{n(E.target.value)},t[0]=n,t[1]=d):d=t[1];const u=d;let i;t[2]!==a?(i=E=>{E.key==="Enter"&&(E.metaKey||E.ctrlKey)&&(E.preventDefault(),a())},t[2]=a,t[3]=i):i=t[3];const b=i,y=f==="running";let v;t[4]!==o.kind||t[5]!==o.method?(v=s(G,{kind:o.kind,method:o.method,testId:"api-try-method"}),t[4]=o.kind,t[5]=o.method,t[6]=v):v=t[6];const N=o.functionPath??o.httpPath;let m;t[7]!==N?(m=s("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-foreground",children:N}),t[7]=N,t[8]=m):m=t[8];const g=y?"animate-pulse":void 0;let h;t[9]!==g?(h=s(H,{className:g,icon:pe,strokeWidth:2}),t[9]=g,t[10]=h):h=t[10];let p;t[11]!==y||t[12]!==e?(p=e(y?"Sending…":"Send"),t[11]=y,t[12]=e,t[13]=p):p=t[13];let x;t[14]!==y||t[15]!==a||t[16]!==h||t[17]!==p?(x=w(U,{"data-testid":"api-try-send",disabled:y,onClick:a,size:"sm",type:"button",children:[h,p]}),t[14]=y,t[15]=a,t[16]=h,t[17]=p,t[18]=x):x=t[18];let k;t[19]!==v||t[20]!==m||t[21]!==x?(k=w("div",{className:"flex items-center gap-2 border-b border-border bg-muted px-3 py-2",children:[v,m,x]}),t[19]=v,t[20]=m,t[21]=x,t[22]=k):k=t[22];let S;t[23]!==e?(S=e("Arguments (JSON)"),t[23]=e,t[24]=S):S=t[24];let $;t[25]!==S?($=s(V,{htmlFor:"api-try-args",children:S}),t[25]=S,t[26]=$):$=t[26];let O;t[27]!==r?(O=r.split(`
12
+ `),t[27]=r,t[28]=O):O=t[28];const _=Math.min(12,Math.max(3,O.length));let P;t[29]!==r||t[30]!==u||t[31]!==b||t[32]!==_?(P=s(ve,{className:"font-mono text-xs","data-testid":"api-try-args",id:"api-try-args",onChange:u,onKeyDown:b,rows:_,spellCheck:!1,value:r}),t[29]=r,t[30]=u,t[31]=b,t[32]=_,t[33]=P):P=t[33];let j;t[34]!==$||t[35]!==P?(j=w("div",{className:"flex flex-col gap-1.5",children:[$,P]}),t[34]=$,t[35]=P,t[36]=j):j=t[36];let J;t[37]!==o.functionPath||t[38]!==l||t[39]!==c||t[40]!==e?(J=o.functionPath!==void 0&&w("div",{className:"flex flex-col gap-1.5",children:[s(V,{htmlFor:"shard-input",children:e("Shard key (optional)")}),s(ye,{id:"shard-input",onChange:l,testId:"shard-input",value:c})]}),t[37]=o.functionPath,t[38]=l,t[39]=c,t[40]=e,t[41]=J):J=t[41];let M;t[42]!==j||t[43]!==J?(M=w("div",{className:"flex flex-col gap-3 p-3",children:[j,J]}),t[42]=j,t[43]=J,t[44]=M):M=t[44];let A;return t[45]!==M||t[46]!==k?(A=w("div",{className:"overflow-hidden rounded-xl border border-border bg-card","data-testid":"api-try-it",children:[k,M]}),t[45]=M,t[46]=k,t[47]=A):A=t[47],A},We=t=>{const e=K(51),{operation:r}=t,o=q(),a=`api-operation-${r.operationId}`,n=r.key;let l;e[0]!==r.kind||e[1]!==r.method?(l=s(G,{kind:r.kind,method:r.method,testId:"api-operation-method"}),e[0]=r.kind,e[1]=r.method,e[2]=l):l=e[2];const c=r.functionPath??r.httpPath;let f;e[3]!==c?(f=s("code",{className:"truncate font-mono text-xs text-muted-foreground",children:c}),e[3]=c,e[4]=f):f=e[4];let d;e[5]!==l||e[6]!==f?(d=w("div",{className:"flex items-center gap-2",children:[l,f]}),e[5]=l,e[6]=f,e[7]=d):d=e[7];let u;e[8]!==r.title?(u=s("h1",{className:"text-lg font-semibold text-foreground","data-testid":"api-operation-title",children:r.title}),e[8]=r.title,e[9]=u):u=e[9];let i;e[10]!==r.description?(i=r.description!==void 0&&s("p",{className:"text-sm text-muted-foreground",children:r.description}),e[10]=r.description,e[11]=i):i=e[11];let b;e[12]!==d||e[13]!==u||e[14]!==i?(b=w("header",{className:"sticky top-0 z-10 -mx-6 -mt-6 flex flex-col gap-2 border-b border-border bg-background px-6 pt-6 pb-3",children:[d,u,i]}),e[12]=d,e[13]=u,e[14]=i,e[15]=b):b=e[15];let y;e[16]!==o?(y=o("Try it"),e[16]=o,e[17]=y):y=e[17];let v;e[18]!==y?(v=s("h2",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:y}),e[18]=y,e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s(qe,{}),e[20]=N):N=e[20];let m;e[21]!==v?(m=w("section",{className:"flex flex-col gap-2",children:[v,N]}),e[21]=v,e[22]=m):m=e[22];let g;e[23]!==o?(g=o("Request arguments"),e[23]=o,e[24]=g):g=e[24];let h;e[25]!==g?(h=s("h2",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:g}),e[25]=g,e[26]=h):h=e[26];let p;e[27]!==r.argsSchema?(p=s(Q,{schema:r.argsSchema,testId:"api-operation-args"}),e[27]=r.argsSchema,e[28]=p):p=e[28];let x;e[29]!==h||e[30]!==p?(x=w("section",{className:"flex flex-col gap-2",children:[h,p]}),e[29]=h,e[30]=p,e[31]=x):x=e[31];let k;e[32]!==o?(k=o("Response body"),e[32]=o,e[33]=k):k=e[33];let S;e[34]!==k?(S=s("h2",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:k}),e[34]=k,e[35]=S):S=e[35];let $;if(e[36]!==r.responses||e[37]!==o){let P;e[39]!==o?(P=j=>w("div",{className:"flex flex-col gap-1.5 rounded-xl border border-border bg-card p-3",children:[w("div",{className:"flex items-center justify-between gap-2",children:[w("span",{className:`inline-flex items-center gap-1.5 font-mono text-xs font-semibold ${re(j.status)}`,children:[s("span",{className:`size-1.5 rounded-full ${oe(j.status)}`}),j.status]}),j.schema!==void 0&&s("span",{className:"rounded border border-border px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:o("application/json")})]}),j.description!==void 0&&s("p",{className:"text-xs text-muted-foreground",children:j.description}),j.schema!==void 0&&s(Q,{schema:j.schema,testId:`api-response-${j.status}`})]},j.status),e[39]=o,e[40]=P):P=e[40],$=r.responses.map(P),e[36]=r.responses,e[37]=o,e[38]=$}else $=e[38];let O;e[41]!==S||e[42]!==$?(O=w("section",{className:"flex flex-col gap-3",children:[S,$]}),e[41]=S,e[42]=$,e[43]=O):O=e[43];let _;return e[44]!==r.key||e[45]!==a||e[46]!==m||e[47]!==x||e[48]!==O||e[49]!==b?(_=w("div",{className:"flex flex-col gap-6 duration-200 animate-in fade-in-0 slide-in-from-bottom-1","data-testid":a,children:[b,m,x,O]},n),e[44]=r.key,e[45]=a,e[46]=m,e[47]=x,e[48]=O,e[49]=b,e[50]=_):_=e[50],_},Be={boolean:"text-royal-amethyst",key:"text-sky-sapphire",number:"text-warning",plain:"",string:"text-success"},ze=/"(?:[^"\\]|\\.)*"|\b(?:true|false|null)\b|-?\d+(?:\.\d+)?/g,Fe=/^\s*:/,De=(t,e,r)=>r.startsWith('"')?Fe.test(t.slice(e))?"key":"string":r==="true"||r==="false"||r==="null"?"boolean":"number",He=t=>{const e=[];let r=0;for(const o of t.matchAll(ze)){const{index:a}=o,n=o[0],l=a+n.length;a>r&&e.push({kind:"plain",start:r,text:t.slice(r,a)}),e.push({kind:De(t,l,n),start:a,text:n}),r=l}return r<t.length&&e.push({kind:"plain",start:r,text:t.slice(r)}),e},Ue=t=>{const e=K(4),{code:r}=t;let o;e[0]!==r?(o=He(r).map(Ge),e[0]=r,e[1]=o):o=e[1];let a;return e[2]!==o?(a=s(ge,{children:o}),e[2]=o,e[3]=a):a=e[3],a};function Ge(t){return s("span",{className:Be[t.kind],children:t.text},t.start)}const X="__live__",Ve=t=>t.schema===void 0?"":JSON.stringify(B(t.schema),void 0,2),Qe=(t,e,r)=>r?t??"":e===void 0?"":JSON.stringify(e,void 0,2),Xe=t=>{const e=K(18),{active:r,running:o,showError:a}=t,n=q();if(o){let i;e[0]!==n?(i=n("Sending…"),e[0]=n,e[1]=i):i=e[1];let b;return e[2]!==i?(b=s("p",{className:"px-3 py-3 text-xs text-muted-foreground","data-testid":"api-response-running",children:i}),e[2]=i,e[3]=b):b=e[3],b}if(r===void 0||r.body===""){let i;e[4]!==r?.live||e[5]!==n?(i=r?.live===!0?n("Send a request to see the response."):n("No example for this response."),e[4]=r?.live,e[5]=n,e[6]=i):i=e[6];let b;return e[7]!==i?(b=s("p",{className:"px-3 py-3 text-xs text-muted-foreground","data-testid":"api-response-idle",children:i}),e[7]=i,e[8]=b):b=e[8],b}const l=a&&"text-destructive";let c;e[9]!==l?(c=Y("max-h-[28rem] overflow-auto px-3 py-3 font-mono text-xs",l),e[9]=l,e[10]=c):c=e[10];const f=a?"api-response-error":"api-response-body";let d;e[11]!==r.body||e[12]!==a?(d=a?r.body:s(Ue,{code:r.body}),e[11]=r.body,e[12]=a,e[13]=d):d=e[13];let u;return e[14]!==c||e[15]!==f||e[16]!==d?(u=s("pre",{className:c,"data-testid":f,children:d}),e[14]=c,e[15]=f,e[16]=d,e[17]=u):u=e[17],u},Ze=()=>{const t=K(67),e=q(),{durationMs:r,error:o,operation:a,response:n,status:l}=ne(),c=l==="running",f=l==="error",d=l==="success"||f;let u;if(t[0]!==r||t[1]!==o||t[2]!==f||t[3]!==a.responses||t[4]!==d||t[5]!==n||t[6]!==e){e:{const T=a.responses.map(Ye);if(!d){u=T;break e}let I;t[8]!==o||t[9]!==f||t[10]!==n?(I=Qe(o,n,f),t[8]=o,t[9]=f,t[10]=n,t[11]=I):I=t[11];let C;t[12]!==e?(C=e("Live"),t[12]=e,t[13]=C):C=t[13];const R=f?"error":"200";let W;t[14]!==r||t[15]!==I||t[16]!==C||t[17]!==R?(W={body:I,durationMs:r,id:X,label:C,live:!0,status:R},t[14]=r,t[15]=I,t[16]=C,t[17]=R,t[18]=W):W=t[18],u=[W,...T]}t[0]=r,t[1]=o,t[2]=f,t[3]=a.responses,t[4]=d,t[5]=n,t[6]=e,t[7]=u}else u=t[7];const i=u;let b;t[19]!==d||t[20]!==i?(b=d?X:i.find(et)?.id??i[0]?.id??"",t[19]=d,t[20]=i,t[21]=b):b=t[21];const y=b,[v,N]=L(null);let m,g,h,p,x,k,S,$,O,_;if(t[22]!==y||t[23]!==v||t[24]!==e||t[25]!==i){m=i.find(R=>R.id===(v??y))??i[0];let T;t[36]===Symbol.for("react.memo_cache_sentinel")?(T=R=>{const{id:W}=R.currentTarget.dataset;W!==void 0&&N(W)},t[36]=T):T=t[36],h=T,g=()=>{m!==void 0&&Z(m.body)};const I=m?.live===!0?m.durationMs:null;p=m?.live===!0&&m.status==="error",O="flex min-h-0 flex-col rounded-xl border border-border bg-card",_="api-response-panel",S="flex items-center justify-between gap-2 border-b border-border px-3 py-2";let C;t[37]!==e?(C=e("Response"),t[37]=e,t[38]=C):C=t[38],t[39]!==C?($=s("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:C}),t[39]=C,t[40]=$):$=t[40],x="flex items-center gap-2",k=I!==null&&s("span",{className:"font-mono text-[10px] text-muted-foreground",children:e("{ms} ms",{ms:I})}),t[22]=y,t[23]=v,t[24]=e,t[25]=i,t[26]=m,t[27]=g,t[28]=h,t[29]=p,t[30]=x,t[31]=k,t[32]=S,t[33]=$,t[34]=O,t[35]=_}else m=t[26],g=t[27],h=t[28],p=t[29],x=t[30],k=t[31],S=t[32],$=t[33],O=t[34],_=t[35];let P;t[41]!==m||t[42]!==g||t[43]!==e?(P=m!==void 0&&m.body!==""&&s(U,{"aria-label":e("Copy"),"data-testid":"api-response-copy",onClick:g,size:"icon-xs",type:"button",variant:"ghost",children:s(H,{icon:fe,strokeWidth:2})}),t[41]=m,t[42]=g,t[43]=e,t[44]=P):P=t[44];let j;t[45]!==x||t[46]!==k||t[47]!==P?(j=w("div",{className:x,children:[k,P]}),t[45]=x,t[46]=k,t[47]=P,t[48]=j):j=t[48];let J;t[49]!==S||t[50]!==$||t[51]!==j?(J=w("div",{className:S,children:[$,j]}),t[49]=S,t[50]=$,t[51]=j,t[52]=J):J=t[52];let M;t[53]!==m?.id||t[54]!==h||t[55]!==i?(M=i.length>0&&s("div",{className:"flex gap-1 overflow-x-auto border-b border-border px-2 py-1.5",role:"tablist",children:i.map(T=>{const I=T.id===m?.id;return w("button",{"aria-selected":I,className:Y("inline-flex items-center gap-1.5 rounded px-2 py-0.5 font-mono text-xs transition-colors hover:text-foreground aria-selected:bg-muted aria-selected:font-medium",I?re(T.status):"text-muted-foreground"),"data-id":T.id,"data-testid":T.live?"api-response-tab-live":`api-response-tab-${T.status}`,onClick:h,role:"tab",type:"button",children:[s("span",{className:`size-1.5 rounded-full ${oe(T.status)}`}),T.label]},T.id)})}),t[53]=m?.id,t[54]=h,t[55]=i,t[56]=M):M=t[56];let A;t[57]!==m||t[58]!==c||t[59]!==p?(A=s(Xe,{active:m,running:c,showError:p}),t[57]=m,t[58]=c,t[59]=p,t[60]=A):A=t[60];let E;return t[61]!==J||t[62]!==M||t[63]!==A||t[64]!==O||t[65]!==_?(E=w("div",{className:O,"data-testid":_,children:[J,M,A]}),t[61]=J,t[62]=M,t[63]=A,t[64]=O,t[65]=_,t[66]=E):E=t[66],E};function Ye(t){return{body:Ve(t),durationMs:null,id:t.status,label:t.status,live:!1,status:t.status}}function et(t){return t.status.startsWith("2")}const tt=(t,e)=>{const r=e.trim().toLowerCase();return r===""?t:t.map(o=>({...o,operations:o.operations.filter(a=>`${a.summary} ${a.operationId}`.toLowerCase().includes(r))})).filter(o=>o.operations.length>0)},yt=t=>{const e=K(53),{model:r}=t,o=q(),a=r.groups[0]?.operations[0]?.key??"",[n,l]=L(a),[c,f]=L("");let d;e[0]!==a||e[1]!==r.operationByKey||e[2]!==n?(d=r.operationByKey.get(n)??r.operationByKey.get(a),e[0]=a,e[1]=r.operationByKey,e[2]=n,e[3]=d):d=e[3];const u=d;let i,b,y,v,N,m,g,h,p,x;if(e[4]!==c||e[5]!==r.groups||e[6]!==r.server||e[7]!==u?.key||e[8]!==o){i=tt(r.groups,c);let P;e[19]===Symbol.for("react.memo_cache_sentinel")?(P=I=>{const{key:C}=I.currentTarget.dataset;C!==void 0&&l(C)},e[19]=P):P=e[19];const j=P;let J;e[20]===Symbol.for("react.memo_cache_sentinel")?(J=I=>{f(I.target.value)},e[20]=J):J=e[20];const M=J;b=r.server??"",p="grid min-h-0 flex-1 grid-cols-1 overflow-hidden lg:grid-cols-[16rem_minmax(0,1fr)_22rem]",x="api-reference",e[21]!==o?(N=o("API operations"),e[21]=o,e[22]=N):N=e[22],m="flex min-h-0 flex-col overflow-y-auto border-r border-border",g="api-reference-nav";let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=s(H,{className:"pointer-events-none absolute top-1/2 left-2 size-3.5 -translate-y-1/2 text-muted-foreground",icon:he,strokeWidth:2}),e[23]=A):A=e[23];let E;e[24]!==o?(E=o("Filter operations"),e[24]=o,e[25]=E):E=e[25],e[26]!==c||e[27]!==E?(h=s("div",{className:"sticky top-0 z-10 border-b border-border bg-sidebar p-2",children:w("div",{className:"relative",children:[A,s(xe,{className:"h-7 pl-7","data-testid":"api-filter",onChange:M,placeholder:E,value:c})]})}),e[26]=c,e[27]=E,e[28]=h):h=e[28],y="flex flex-col gap-4 p-2";let T;e[29]!==u?.key||e[30]!==o?(T=I=>w("div",{className:"flex flex-col gap-1",children:[w("div",{className:"flex items-center justify-between px-2",children:[s("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:I.name||o("(root)")}),s("span",{className:"font-mono text-[10px] text-muted-foreground/70",children:I.operations.length})]}),I.operations.map(C=>{const R=C.key===u?.key;return w("button",{"aria-current":R?"page":void 0,className:"flex items-center justify-between gap-2 rounded-md border-l-2 border-transparent px-2 py-1 text-start text-xs text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground aria-[current=page]:border-primary aria-[current=page]:bg-sidebar-accent aria-[current=page]:font-medium aria-[current=page]:text-foreground","data-key":C.key,"data-testid":`api-nav-${C.operationId}`,onClick:j,type:"button",children:[s("span",{className:"truncate",children:C.summary}),s(G,{kind:C.kind,method:C.method})]},C.key)})]},I.name),e[29]=u?.key,e[30]=o,e[31]=T):T=e[31],v=i.map(T),e[4]=c,e[5]=r.groups,e[6]=r.server,e[7]=u?.key,e[8]=o,e[9]=i,e[10]=b,e[11]=y,e[12]=v,e[13]=N,e[14]=m,e[15]=g,e[16]=h,e[17]=p,e[18]=x}else i=e[9],b=e[10],y=e[11],v=e[12],N=e[13],m=e[14],g=e[15],h=e[16],p=e[17],x=e[18];let k;e[32]!==i.length||e[33]!==o?(k=i.length===0&&s("p",{className:"px-2 py-1 text-xs text-muted-foreground","data-testid":"api-nav-empty",children:o("No operations match your filter.")}),e[32]=i.length,e[33]=o,e[34]=k):k=e[34];let S;e[35]!==k||e[36]!==y||e[37]!==v?(S=w("div",{className:y,children:[v,k]}),e[35]=k,e[36]=y,e[37]=v,e[38]=S):S=e[38];let $;e[39]!==S||e[40]!==N||e[41]!==m||e[42]!==g||e[43]!==h?($=w("nav",{"aria-label":N,className:m,"data-testid":g,children:[h,S]}),e[39]=S,e[40]=N,e[41]=m,e[42]=g,e[43]=h,e[44]=$):$=e[44];let O;e[45]!==u||e[46]!==b?(O=u===void 0?s("div",{className:"lg:col-span-2"}):w(Re,{operation:u,children:[s("div",{className:"min-w-0 overflow-y-auto p-6","data-testid":"api-reference-main",children:s(We,{operation:u})}),w("aside",{className:"flex min-w-0 flex-col gap-4 overflow-y-auto border-border p-4 lg:border-l","data-testid":"api-reference-aside",children:[s(Ee,{operation:u,server:b}),s(Ze,{})]})]},u.key),e[45]=u,e[46]=b,e[47]=O):O=e[47];let _;return e[48]!==$||e[49]!==O||e[50]!==p||e[51]!==x?(_=w("div",{className:p,"data-testid":x,children:[$,O]}),e[48]=$,e[49]=O,e[50]=p,e[51]=x,e[52]=_):_=e[52],_};export{yt as U,bt as u};
@@ -0,0 +1 @@
1
+ import{c as v}from"react/compiler-runtime";import{useT as b}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{h as x}from"./internal-AtZ4bTal.js";import{X as y,B as N,T as g,E as w}from"./bar-chart-AryFCeoa.js";import{jsx as n,jsxs as j}from"react/jsx-runtime";const q=50,B={value:{colors:{dark:["var(--chart-1)"],light:["var(--chart-1)"]},label:"value"}},S=a=>{const l=a.columns.find(t=>a.rows.length>0&&a.rows.every(o=>typeof o[t]=="number"))??null;return{label:a.columns.find(t=>t!==l)??null,value:l}},X=a=>{const l=v(15),{result:t}=a,o=b();let c;l[0]!==t?(c=S(t),l[0]=t,l[1]=c):c=l[1];const{label:m,value:s}=c;let u;l[2]!==m||l[3]!==t||l[4]!==s?(u=s===null?[]:t.rows.slice(0,q).map((e,r)=>({label:m===null?`#${(r+1).toString()}`:x(e[m]),value:Number(e[s])||0})),l[2]=m,l[3]=t,l[4]=s,l[5]=u):u=l[5];const p=u;if(s===null){let e;l[6]!==o?(e=o("No numeric column to chart."),l[6]=o,l[7]=e):e=l[7];let r;return l[8]!==e?(r=n("p",{className:"p-4 text-sm text-muted-foreground","data-testid":"sql-chart-empty",children:e}),l[8]=e,l[9]=r):r=l[9],r}let i,f,d;l[10]===Symbol.for("react.memo_cache_sentinel")?(i=n(y,{dataKey:"label"}),f=n(N,{dataKey:"value"}),d=n(g,{}),l[10]=i,l[11]=f,l[12]=d):(i=l[10],f=l[11],d=l[12]);let h;return l[13]!==p?(h=n("div",{className:"h-80 w-full p-3","data-testid":"sql-chart",children:j(w,{className:"h-full w-full",config:B,data:p,children:[i,f,d]})}),l[13]=p,l[14]=h):h=l[14],h};export{X as j};
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{c as h}from"react/compiler-runtime";import{ScrollArea as i}from"@base-ui/react/scroll-area";import{c as u}from"./utils-bhneXptQ.js";import{jsx as s,jsxs as b}from"react/jsx-runtime";function z(n){const r=h(14);let a,o,t;r[0]!==n?({className:o,children:a,...t}=n,r[0]=n,r[1]=a,r[2]=o,r[3]=t):(a=r[1],o=r[2],t=r[3]);let e;r[4]!==o?(e=u("relative",o),r[4]=o,r[5]=e):e=r[5];let l;r[6]!==a?(l=s(i.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:a}),r[6]=a,r[7]=l):l=r[7];let c,d;r[8]===Symbol.for("react.memo_cache_sentinel")?(c=s(f,{}),d=s(i.Corner,{}),r[8]=c,r[9]=d):(c=r[8],d=r[9]);let m;return r[10]!==t||r[11]!==e||r[12]!==l?(m=b(i.Root,{"data-slot":"scroll-area",className:e,...t,children:[l,c,d]}),r[10]=t,r[11]=e,r[12]=l,r[13]=m):m=r[13],m}function f({className:n,orientation:r="vertical",...a}){return s(i.Scrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":r,orientation:r,className:u("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-s data-vertical:border-s-transparent",n),...a,children:s(i.Thumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-md bg-border"})})}export{z as p};
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{c as f}from"react/compiler-runtime";import"react";import{Select as l}from"@base-ui/react/select";import{c}from"./utils-bhneXptQ.js";import{HugeiconsIcon as m}from"@hugeicons/react";import{UnfoldMoreIcon as p,Tick02Icon as v,ArrowUp01Icon as h,ArrowDown01Icon as b}from"@hugeicons/core-free-icons";import{jsx as i,jsxs as g}from"react/jsx-runtime";const S=l.Root;function W(r){const e=f(8);let 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 o;e[3]!==t?(o=c("flex flex-1 text-start",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==a||e[6]!==o?(n=i(l.Value,{"data-slot":"select-value",className:o,...a}),e[5]=a,e[6]=o,e[7]=n):n=e[7],n}function T({className:r,size:e="default",children:t,...a}){return g(l.Trigger,{"data-slot":"select-trigger","data-size":e,className:c("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pe-2 ps-2.5 text-xs whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-md *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",r),...a,children:[t,i(l.Icon,{render:i(m,{icon:p,strokeWidth:2,className:"pointer-events-none size-4 text-muted-foreground"})})]})}function $({className:r,children:e,side:t="bottom",sideOffset:a=4,align:o="center",alignOffset:n=0,alignItemWithTrigger:s=!0,...d}){return i(l.Portal,{children:i(l.Positioner,{side:t,sideOffset:a,align:o,alignOffset:n,alignItemWithTrigger:s,className:"isolate z-50",children:g(l.Popup,{"data-slot":"select-content","data-align-trigger":s,className:c("isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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-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 animate-none! relative bg-popover before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!",r),...d,children:[i(x,{}),i(l.List,{children:e}),i(w,{})]})})})}function A(r){const e=f(13);let t,a,o;e[0]!==r?({className:a,children:t,...o}=r,e[0]=r,e[1]=t,e[2]=a,e[3]=o):(t=e[1],a=e[2],o=e[3]);let n;e[4]!==a?(n=c("relative flex w-full cursor-default items-center gap-2 rounded-md py-2 pe-8 ps-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",a),e[4]=a,e[5]=n):n=e[5];let s;e[6]!==t?(s=i(l.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),e[6]=t,e[7]=s):s=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=i(l.ItemIndicator,{render:i("span",{className:"pointer-events-none absolute end-2 flex size-4 items-center justify-center"}),children:i(m,{icon:v,strokeWidth:2,className:"pointer-events-none"})}),e[8]=d):d=e[8];let u;return e[9]!==o||e[10]!==n||e[11]!==s?(u=g(l.Item,{"data-slot":"select-item",className:n,...o,children:[s,d]}),e[9]=o,e[10]=n,e[11]=s,e[12]=u):u=e[12],u}function x(r){const e=f(9);let 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 o;e[3]!==t?(o=c("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i(m,{icon:h,strokeWidth:2}),e[5]=n):n=e[5];let s;return e[6]!==a||e[7]!==o?(s=i(l.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:o,...a,children:n}),e[6]=a,e[7]=o,e[8]=s):s=e[8],s}function w(r){const e=f(9);let 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 o;e[3]!==t?(o=c("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i(m,{icon:b,strokeWidth:2}),e[5]=n):n=e[5];let s;return e[6]!==a||e[7]!==o?(s=i(l.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:o,...a,children:n}),e[6]=a,e[7]=o,e[8]=s):s=e[8],s}export{W as N,$ as _,A as k,S as w,T as y};
@@ -0,0 +1 @@
1
+ import{s as a,l as i}from"./browser-storage-xjTyMKY0.js";const e="lunora-studio-recent-shards",c=10,t=()=>i(e,"session").filter(s=>typeof s=="string"),d=s=>{const r=s.trim();if(r==="")return t();const o=[r,...t().filter(n=>n!==r)].slice(0,c);return a(e,o,"session"),o};export{t as l,d as r};
@@ -0,0 +1 @@
1
+ import{c as l}from"react/compiler-runtime";import{c as m}from"./utils-bhneXptQ.js";import{jsx as n}from"react/jsx-runtime";function p(a){const t=l(8);let e,o;t[0]!==a?({className:e,...o}=a,t[0]=a,t[1]=e,t[2]=o):(e=t[1],o=t[2]);let s;t[3]!==e?(s=m("animate-pulse rounded-md bg-muted",e),t[3]=e,t[4]=s):s=t[4];let r;return t[5]!==o||t[6]!==s?(r=n("div",{"data-slot":"skeleton",className:s,...o}),t[5]=o,t[6]=s,t[7]=r):r=t[7],r}export{p as n};
@@ -0,0 +1 @@
1
+ import{c as u}from"react/compiler-runtime";import{B as p,E as h}from"./bar-chart-AryFCeoa.js";import{c as g}from"./utils-bhneXptQ.js";import{jsx as d}from"react/jsx-runtime";const v={value:{colors:{dark:["var(--foreground)"],light:["var(--foreground)"]},label:""}},S=i=>{const a=u(12),{ariaLabel:s,className:c,series:l,testId:m}=i;if(l.length<2)return null;let t;a[0]!==l?(t=l.slice(-40).map(b),a[0]=l,a[1]=t):t=a[1];const f=t;let e;a[2]!==c?(e=g("h-6 w-[120px]",c),a[2]=c,a[3]=e):e=a[3];let o;a[4]===Symbol.for("react.memo_cache_sentinel")?(o=d(p,{dataKey:"value"}),a[4]=o):o=a[4];let r;a[5]!==f?(r=d(h,{animationType:"none",barCategoryGap:1,className:"h-full w-full",config:v,data:f,children:o}),a[5]=f,a[6]=r):r=a[6];let n;return a[7]!==s||a[8]!==e||a[9]!==r||a[10]!==m?(n=d("div",{"aria-label":s,className:e,"data-testid":m,role:"img",children:r}),a[7]=s,a[8]=e,a[9]=r,a[10]=m,a[11]=n):n=a[11],n};function b(i,a){return{index:a,value:i}}export{S};
@@ -0,0 +1 @@
1
+ import{c as d}from"react/compiler-runtime";import{jsx as n,jsxs as h}from"react/jsx-runtime";const b={alignItems:"center",border:"1px solid",borderRadius:4,display:"inline-flex",fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:11,fontWeight:400,gap:6,letterSpacing:"0.06em",lineHeight:1.4,padding:"1px 8px",textTransform:"uppercase"},c={borderRadius:"50%",display:"inline-block",height:7,width:7},i=(l,e,t,a)=>({badgeStyle:{...b,borderColor:l,color:l},color:l,dotStyle:{...c,backgroundColor:l},hint:a,label:e,title:t}),p={global:i("var(--royal-amethyst)","Global · D1","Global table — a single D1 table shared across all shards","Declared .global() and stored once in Cloudflare D1, shared across every shard and tenant. Auth tables (user, session, …) live here too."),shard:i("var(--sky-sapphire)","Shard-local","Shard-local table — per-shard SQLite inside a Durable Object","Stored per shard key in a Durable Object's SQLite (.shardBy(...)). You are viewing one shard at a time — change the shard key to inspect another.")},S=l=>{const e=d(9),{tier:t}=l,a=p[t],s=`storage-tier-${t}`;let r;e[0]!==a.dotStyle?(r=n("span",{"aria-hidden":"true",style:a.dotStyle}),e[0]=a.dotStyle,e[1]=r):r=e[1];let o;return e[2]!==a.badgeStyle||e[3]!==a.label||e[4]!==a.title||e[5]!==s||e[6]!==r||e[7]!==t?(o=h("span",{"data-testid":s,"data-tier":t,style:a.badgeStyle,title:a.title,children:[r,a.label]}),e[2]=a.badgeStyle,e[3]=a.label,e[4]=a.title,e[5]=s,e[6]=r,e[7]=t,e[8]=o):o=e[8],o};export{p as d,S as g};
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{c as y}from"react/compiler-runtime";import{RouterProvider as Pa,createRootRoute as Aa,createRoute as Wt,createBrowserHistory as Ta,createMemoryHistory as za,createRouter as $a,useNavigate as ra,useRouterState as Ra,Outlet as Ia,useSearch as Va}from"@tanstack/react-router";import*as vt from"react";import{useState as It,useEffect as xt,use as Jt,createContext as na,lazy as z,Suspense as Za}from"react";import{c as M}from"./utils-bhneXptQ.js";import{jsx as r,jsxs as v,Fragment as ia}from"react/jsx-runtime";import{ErrorBoundary as Ka}from"./ErrorBoundary-DvzYskH7.js";import{useT as bt}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{LunoraError as oa}from"@lunora/errors";import{motion as Ea}from"motion/react";import{g as Ha}from"./badge-BbuuAio7.js";import{u as Oa}from"./input-JHu63lTv.js";import{Popover as yt}from"@base-ui/react/popover";import{Cancel01Icon as Ba,SidebarLeftIcon as Da}from"@hugeicons/core-free-icons";import{HugeiconsIcon as la}from"@hugeicons/react";import{mergeProps as da}from"@base-ui/react/merge-props";import{useRender as ca}from"@base-ui/react/use-render";import{cva as qa}from"class-variance-authority";import{u as ua}from"./button-BkCrNcAs.js";import{Dialog as V}from"@base-ui/react/dialog";import{Tooltip as I}from"@base-ui/react/tooltip";import{n as jt}from"./skeleton-C1wQ9M5t.js";import{H as Wa,S as ja}from"./home-panel-B-8BCffw.js";import{StudioI18nProvider as Fa}from"./StudioI18nProvider-CZ5h4nrV.js";import{v as Ua}from"./data-view-params-C8T3bW1z.js";import{f as Qt}from"./internal-AtZ4bTal.js";import{CommandPalette as Qa,openCommandPalette as Ga}from"./CommandPalette-CVIaY3j8.js";const ha="(prefers-color-scheme: dark)",ma=()=>{try{return globalThis.localStorage}catch{return}},Ja=t=>t==="system"||t==="light"||t==="dark",pa=()=>globalThis.matchMedia,ga="lunora-studio-theme",Ft=["system","light","dark"],Xa=(t="system")=>{try{const e=ma()?.getItem(ga);return Ja(e)?e:t}catch{return t}},Yt=t=>{const e=ma();if(e!==void 0)try{e.setItem(ga,t)}catch{}},Ya=()=>{try{return pa()?.(ha).matches?"dark":"light"}catch{return"light"}},es=(t,e)=>t==="system"?e:t,ts=t=>{let e;try{e=pa()?.(ha)}catch{e=void 0}if(e===void 0)return()=>{};const s=a=>{t(a.matches?"dark":"light")};return e.addEventListener("change",s),()=>{e.removeEventListener("change",s)}},Xt=na(null),as=({children:t,defaultTheme:e="system"})=>{const[s,a]=It(()=>Xa(e)),[n,i]=It(()=>Ya());xt(()=>ts(i),[]);const o=l=>{Yt(l),a(l)},d={cycleTheme:()=>{a(l=>{const c=Ft[(Ft.indexOf(l)+1)%Ft.length]??l;return Yt(c),c})},resolvedTheme:es(s,n),setTheme:o,systemTheme:n,theme:s};return r(Xt,{value:d,children:t})},ss=t=>{const e=y(3),{children:s}=t,a=Jt(Xt);let n;return e[0]!==s||e[1]!==a?(n=a===null?r(as,{children:s}):s,e[0]=s,e[1]=a,e[2]=n):n=e[2],n},rs=()=>{const t=Jt(Xt);if(t===null)throw new oa("INTERNAL","useTheme must be used within a <ThemeProvider>");return t};function Nn({delay:t=0,...e}){return r(I.Provider,{"data-slot":"tooltip-provider",delay:t,...e})}function ns(t){const e=y(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r(I.Root,{"data-slot":"tooltip",...s}),e[2]=s,e[3]=a):a=e[3],a}function is(t){const e=y(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r(I.Trigger,{"data-slot":"tooltip-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function os({className:t,side:e="top",sideOffset:s=4,align:a="center",alignOffset:n=0,children:i,...o}){return r(I.Portal,{children:r(I.Positioner,{align:a,alignOffset:n,side:e,sideOffset:s,className:"isolate z-50",children:v(I.Popup,{"data-slot":"tooltip-content",className:M("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),...o,children:[i,r(I.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"})]})})})}const ls=t=>{const e=y(5),{className:s}=t;let a;e[0]!==s?(a=M("h-full w-full text-foreground",s),e[0]=s,e[1]=a):a=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=r("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]=n):n=e[2];let i;return e[3]!==a?(i=r("svg",{"aria-hidden":"true",className:a,fill:"currentColor",viewBox:"0 0 543 446",children:n}),e[3]=a,e[4]=i):i=e[4],i},fa="lunora.studio.rulesBannerDismissed",ds=()=>{try{return globalThis.localStorage.getItem(fa)==="1"}catch{return!1}},cs=()=>{try{globalThis.localStorage.setItem(fa,"1")}catch{}},us=()=>{const t=y(18),e=bt(),[s,a]=It(hs);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{a(!0),cs()},t[0]=n):n=t[0];const i=n;if(s)return null;let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o=r("span",{"aria-hidden":"true",className:"text-warning",children:"⚠"}),t[1]=o):o=t[1];let d;t[2]!==e?(d=e("Lunora AI rules aren't installed."),t[2]=e,t[3]=d):d=t[3];let l;t[4]===Symbol.for("react.memo_cache_sentinel")?(l=r("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[11px]",children:"lunora rules install"}),t[4]=l):l=t[4];let c;t[5]!==e?(c=e("lets your coding agent use Lunora correctly."),t[5]=e,t[6]=c):c=t[6];let u;t[7]!==d||t[8]!==c?(u=v("span",{children:[d," ",l," ",c]}),t[7]=d,t[8]=c,t[9]=u):u=t[9];let g;t[10]!==e?(g=e("Dismiss"),t[10]=e,t[11]=g):g=t[11];let h;t[12]===Symbol.for("react.memo_cache_sentinel")?(h=r("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:r("path",{d:"M18 6 6 18M6 6l12 12"})}),t[12]=h):h=t[12];let b;t[13]!==g?(b=r("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:i,type:"button",children:h}),t[13]=g,t[14]=b):b=t[14];let p;return t[15]!==u||t[16]!==b?(p=v("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:[o,u,b]}),t[15]=u,t[16]=b,t[17]=p):p=t[17],p};function hs(){return ds()}const ms=()=>{const t=y(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=v("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:[r("rect",{height:"14",rx:"2",width:"20",x:"2",y:"3"}),r("path",{d:"M8 21h8M12 17v4"})]}),t[0]=e):e=t[0],e},ps=()=>{const t=y(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=v("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:[r("circle",{cx:"12",cy:"12",r:"4"}),r("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},gs=()=>{const t=y(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r("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:r("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},fs=[{Icon:ms,value:"system"},{Icon:ps,value:"light"},{Icon:gs,value:"dark"}],bs=()=>{const t=y(19),{theme:e,setTheme:s}=rs(),a=bt();let n;t[0]!==a?(n=a("Dark theme"),t[0]=a,t[1]=n):n=t[1];let i;t[2]!==a?(i=a("Light theme"),t[2]=a,t[3]=i):i=t[3];let o;t[4]!==a?(o=a("System theme"),t[4]=a,t[5]=o):o=t[5];let d;t[6]!==n||t[7]!==i||t[8]!==o?(d={dark:n,light:i,system:o},t[6]=n,t[7]=i,t[8]=o,t[9]=d):d=t[9];const l=d;let c;t[10]!==a?(c=a("Theme"),t[10]=a,t[11]=c):c=t[11];let u;t[12]!==l||t[13]!==s||t[14]!==e?(u=fs.map(h=>{const{Icon:b,value:p}=h,x=e===p;return v("button",{"aria-checked":x,"aria-label":l[p],className:M("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",x?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${p}`,onClick:()=>{s(p)},role:"radio",title:l[p],type:"button",children:[x&&r(Ea.span,{className:"absolute inset-0 rounded-md border border-muted-foreground/40 bg-background/40",layoutId:"studio-theme-active",transition:{bounce:.1,duration:.45,type:"spring"}}),r("span",{className:"relative",children:r(b,{})})]},p)}),t[12]=l,t[13]=s,t[14]=e,t[15]=u):u=t[15];let g;return t[16]!==c||t[17]!==u?(g=r("div",{"aria-label":c,className:"inline-flex items-center gap-0.5 overflow-hidden rounded-md border border-border bg-muted/60 p-0.5","data-testid":"dash-app-theme",role:"radiogroup",children:u}),t[16]=c,t[17]=u,t[18]=g):g=t[18],g};function ba(t){const e=y(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r(yt.Root,{"data-slot":"popover",...s}),e[2]=s,e[3]=a):a=e[3],a}function va(t){const e=y(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r(yt.Trigger,{"data-slot":"popover-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function ya({align:t="end",alignOffset:e=0,className:s,keepMounted:a=!1,side:n="bottom",sideOffset:i=6,...o}){return r(yt.Portal,{keepMounted:a,children:r(yt.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:n,sideOffset:i,children:r(yt.Popup,{className:M("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",s),"data-slot":"popover-content",...o})})})}const Ut=768;function vs(){const t=y(2),[e,s]=It(void 0);let a,n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{const i=globalThis.matchMedia(`(max-width: ${Ut-1}px)`),o=()=>{s(globalThis.innerWidth<Ut)};return i.addEventListener("change",o),s(globalThis.innerWidth<Ut),()=>{i.removeEventListener("change",o)}},n=[],t[0]=a,t[1]=n):(a=t[0],n=t[1]),xt(a,n),!!e}function ys(t){const e=y(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r(V.Root,{"data-slot":"sheet",...s}),e[2]=s,e[3]=a):a=e[3],a}function xs(t){const e=y(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r(V.Portal,{"data-slot":"sheet-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function ws(t){const e=y(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=M("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:",s),e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==a||e[6]!==n?(i=r(V.Backdrop,{"data-slot":"sheet-overlay",className:n,...a}),e[5]=a,e[6]=n,e[7]=i):i=e[7],i}function ks({className:t,children:e,side:s="right",showCloseButton:a=!0,...n}){return v(xs,{children:[r(ws,{}),v(V.Popup,{"data-slot":"sheet-content","data-side":s,className:M("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),...n,children:[e,a&&v(V.Close,{"data-slot":"sheet-close",render:r(ua,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"}),children:[r(la,{icon:Ba,strokeWidth:2}),r("span",{className:"sr-only",children:"Close"})]})]})]})}function Ns(t){const e=y(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=M("flex flex-col gap-0.5 p-4",s),e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==a||e[6]!==n?(i=r("div",{"data-slot":"sheet-header",className:n,...a}),e[5]=a,e[6]=n,e[7]=i):i=e[7],i}function Ms(t){const e=y(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=M("text-sm font-medium text-foreground",s),e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==a||e[6]!==n?(i=r(V.Title,{"data-slot":"sheet-title",className:n,...a}),e[5]=a,e[6]=n,e[7]=i):i=e[7],i}function Ss(t){const e=y(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=M("text-xs/relaxed text-muted-foreground",s),e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==a||e[6]!==n?(i=r(V.Description,{"data-slot":"sheet-description",className:n,...a}),e[5]=a,e[6]=n,e[7]=i):i=e[7],i}const Cs="sidebar_state",_s=3600*24*7,Ls="16rem",Ps="18rem",As="3rem",Ts="b",xa=vt.createContext(null);function Vt(){const t=vt.useContext(xa);if(!t)throw new oa("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}function zs({defaultOpen:t=!0,open:e,onOpenChange:s,className:a,style:n,children:i,...o}){const d=vs(),[l,c]=vt.useState(!1),[u,g]=vt.useState(t),h=e??u,b=f=>{const m=typeof f=="function"?f(h):f;s?s(m):g(m),document.cookie=`${Cs}=${m}; path=/; max-age=${_s}`},p=()=>d?c(f=>!f):b(f=>!f);vt.useEffect(()=>{const f=m=>{m.key===Ts&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),p())};return globalThis.addEventListener("keydown",f),()=>globalThis.removeEventListener("keydown",f)},[p]);const x={state:h?"expanded":"collapsed",open:h,setOpen:b,isMobile:d,openMobile:l,setOpenMobile:c,toggleSidebar:p};return r(xa.Provider,{value:x,children:r("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Ls,"--sidebar-width-icon":As,...n},className:M("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",a),...o,children:i})})}function $s({side:t="left",variant:e="sidebar",collapsible:s="offcanvas",className:a,children:n,dir:i,...o}){const{isMobile:d,state:l,openMobile:c,setOpenMobile:u}=Vt();return s==="none"?r("div",{"data-slot":"sidebar",className:M("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",a),...o,children:n}):d?r(ys,{open:c,onOpenChange:u,...o,children:v(ks,{dir:i,"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":Ps},side:t,children:[v(Ns,{className:"sr-only",children:[r(Ms,{children:"Sidebar"}),r(Ss,{children:"Displays the mobile sidebar."})]}),r("div",{className:"flex h-full w-full flex-col",children:n})]})}):v("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?s:"","data-variant":e,"data-side":t,"data-slot":"sidebar",children:[r("div",{"data-slot":"sidebar-gap",className:M("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)")}),r("div",{"data-slot":"sidebar-container","data-side":t,className:M("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",a),...o,children:r("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:n})})]})}function Rs(t){const e=y(15);let s,a,n;e[0]!==t?({className:s,onClick:a,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);const{toggleSidebar:i}=Vt();let o;e[4]!==s?(o=M(s),e[4]=s,e[5]=o):o=e[5];let d;e[6]!==a||e[7]!==i?(d=g=>{a?.(g),i()},e[6]=a,e[7]=i,e[8]=d):d=e[8];let l,c;e[9]===Symbol.for("react.memo_cache_sentinel")?(l=r(la,{icon:Da,strokeWidth:2,className:"rtl:rotate-180"}),c=r("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=l,e[10]=c):(l=e[9],c=e[10]);let u;return e[11]!==n||e[12]!==o||e[13]!==d?(u=v(ua,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:o,onClick:d,...n,children:[l,c]}),e[11]=n,e[12]=o,e[13]=d,e[14]=u):u=e[14],u}function Is(t){const e=y(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=M("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",s),e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==a||e[6]!==n?(i=r("main",{"data-slot":"sidebar-inset",className:n,...a}),e[5]=a,e[6]=n,e[7]=i):i=e[7],i}function Vs(t){const e=y(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=M("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==a||e[6]!==n?(i=r("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:n,...a}),e[5]=a,e[6]=n,e[7]=i):i=e[7],i}function Zs(t){const e=y(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=M("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==a||e[6]!==n?(i=r("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:n,...a}),e[5]=a,e[6]=n,e[7]=i):i=e[7],i}function Ks(t){const e=y(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=M("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",s),e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==a||e[6]!==n?(i=r("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n,...a}),e[5]=a,e[6]=n,e[7]=i):i=e[7],i}function Es(t){const e=y(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=M("relative flex w-full min-w-0 flex-col p-2",s),e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==a||e[6]!==n?(i=r("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n,...a}),e[5]=a,e[6]=n,e[7]=i):i=e[7],i}function Hs(t){const e=y(10);let s,a,n,i;if(e[0]!==t){const{className:l,render:c,...u}=t;s=c,i=ca,a="div",n=da({className:M("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",l)},u),e[0]=t,e[1]=s,e[2]=a,e[3]=n,e[4]=i}else s=e[1],a=e[2],n=e[3],i=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=o):o=e[5];let d;return e[6]!==s||e[7]!==a||e[8]!==n?(d={defaultTagName:a,props:n,render:s,state:o},e[6]=s,e[7]=a,e[8]=n,e[9]=d):d=e[9],i(d)}function Os(t){const e=y(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=M("w-full text-xs",s),e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==a||e[6]!==n?(i=r("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n,...a}),e[5]=a,e[6]=n,e[7]=i):i=e[7],i}function ea(t){const e=y(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=M("flex w-full min-w-0 flex-col gap-0",s),e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==a||e[6]!==n?(i=r("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n,...a}),e[5]=a,e[6]=n,e[7]=i):i=e[7],i}function ta(t){const e=y(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=M("group/menu-item relative",s),e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==a||e[6]!==n?(i=r("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n,...a}),e[5]=a,e[6]=n,e[7]=i):i=e[7],i}const Bs=qa("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 wa({render:t,isActive:e=!1,variant:s="default",size:a="default",tooltip:n,className:i,...o}){const{isMobile:d,state:l}=Vt(),c=ca({defaultTagName:"button",props:da({className:M(Bs({variant:s,size:a}),i)},o),render:n?r(is,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:a,active:e}});return n?(typeof n=="string"&&(n={children:n}),v(ns,{children:[c,r(os,{side:"right",align:"center",hidden:l!=="collapsed"||d,...n})]})):c}const w=(t,e)=>z(()=>t().then(s=>({default:s[e]}))),Ds=w(()=>import("../packem_chunks/InsightsPanel.js"),"InsightsPanel"),qs=z(()=>import("../packem_chunks/rls-panel.js")),Ws=z(()=>import("../packem_chunks/SecurityAdvisorPanel.js")),js=w(()=>import("../packem_chunks/agents-panel.js"),"AgentsPanel"),Fs=w(()=>import("../packem_chunks/analytics-panel.js"),"AnalyticsPanel"),Us=z(()=>import("../packem_chunks/ApiTab.js")),Qs=w(()=>import("../packem_chunks/auth-audit-panel.js"),"AuthAuditPanel"),Gs=w(()=>import("../packem_chunks/auth-config-panel.js"),"AuthConfigPanel"),Js=w(()=>import("../packem_chunks/auth-sessions-panel.js"),"AuthSessionsPanel"),Xs=w(()=>import("../packem_chunks/organizations-panel.js"),"OrganizationsPanel"),Ys=w(()=>import("../packem_chunks/users-panel.js"),"UsersPanel"),er=w(()=>import("../packem_chunks/containers-panel.js"),"ContainersPanel"),tr=w(()=>import("../packem_chunks/DeploymentHealthPanel.js"),"DeploymentHealthPanel"),ar=w(()=>import("../packem_chunks/TableEditor.js"),"TableEditor"),sr=w(()=>import("../packem_chunks/ExportImportPanel.js"),"ExportImportPanel"),rr=w(()=>import("../packem_chunks/MigrationsPanel.js"),"MigrationsPanel"),nr=w(()=>import("../packem_chunks/PitrPanel.js"),"PitrPanel"),ir=w(()=>import("../packem_chunks/flags-panel.js"),"FlagsPanel"),or=w(()=>import("../packem_chunks/FunctionRunner.js"),"FunctionRunner"),lr=w(()=>import("../packem_chunks/FunctionStatsPanel.js"),"FunctionStatsPanel"),dr=w(()=>import("../packem_chunks/issues-panel.js"),"IssuesPanel"),cr=w(()=>import("../packem_chunks/AuditPanel.js"),"AuditPanel"),ur=w(()=>import("../packem_chunks/log-drains-panel.js"),"LogDrainsPanel"),hr=z(()=>import("../packem_chunks/LogsPanel.js").then(t=>({default:t.LogsPanel}))),mr=w(()=>import("../packem_chunks/MailPanel.js"),"MailPanel"),pr=w(()=>import("../packem_chunks/schedule-panel.js"),"SchedulePanel"),gr=z(()=>import("../packem_chunks/subscriptions-panel.js")),fr=z(()=>import("../packem_chunks/sync-client-panel.js")),br=w(()=>import("../packem_chunks/kv-browser.js"),"KvBrowser"),vr=w(()=>import("../packem_chunks/NotificationsPanel.js"),"NotificationsPanel"),yr=w(()=>import("../packem_chunks/payments-panel.js"),"PaymentsPanel"),xr=w(()=>import("../packem_chunks/permissions-panel.js"),"PermissionsPanel"),wr=z(()=>import("../packem_chunks/queues-panel.js")),kr=z(()=>import("../packem_chunks/dashboards-panel.js")),Nr=z(()=>import("../packem_chunks/fanout-panel.js")),Mr=w(()=>import("../packem_chunks/HealthPanel.js"),"HealthPanel"),Sr=w(()=>import("../packem_chunks/MetricsPanel.js"),"MetricsPanel"),Cr=w(()=>import("../packem_chunks/SchemaViewer.js"),"SchemaViewer"),_r=w(()=>import("../packem_chunks/SettingsPanel.js"),"SettingsPanel"),Lr=w(()=>import("../packem_chunks/SqlEditorPanel.js"),"SqlEditorPanel"),Pr=w(()=>import("../packem_chunks/FileBrowser.js"),"FileBrowser"),Ar=w(()=>import("../packem_chunks/storage-rules-panel.js"),"StorageRulesPanel"),Tr=w(()=>import("../packem_chunks/traces-panel.js"),"TracesPanel"),zr=w(()=>import("../packem_chunks/vector-browser.js"),"VectorBrowser"),$r=z(()=>import("../packem_chunks/workflows-panel.js")),ka=na(null),Rr={analytics:r("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),api:r("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4M13 5l-2 14"}),audit:r("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:r("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:r("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:r("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:r("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),containers:r("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:r("path",{d:"M4 5h7v6H4V5Zm9 0h7v4h-7V5ZM4 14h7v5H4v-5Zm9-1h7v6h-7v-6Z"}),deploymentHealth:r("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:r("path",{d:"M5 5h14M7 5v6a5 5 0 0 0 10 0V5M10 16h4v3h-4zM12 19v2"}),data:r("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:r("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:r("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:r("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:r("path",{d:"M6 21V4m0 0h11l-2 3 2 3H6"}),functions:r("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4"}),health:r("path",{d:"M3 12h4l2 6 4-14 2 8h6"}),home:r("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:r("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:r("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:r("path",{d:"M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"}),logs:r("path",{d:"M5 6h14M5 10h14M5 14h9M5 18h11"}),mail:r("path",{d:"M4 5h16v14H4V5Zm0 1.5 8 6 8-6"}),payments:r("path",{d:"M3 7h18v10H3V7Zm0 3h18M7 14h4"}),metrics:r("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),migrations:r("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:r("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:r("path",{d:"M3 21V8l6-4 6 4v13M9 21v-5h2v5M15 11h6v10M18 14v.01M18 17v.01M6 9v.01M6 12v.01M6 15v.01"}),permissions:r("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:r("path",{d:"M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"}),queues:r("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"}),realtime:r("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:r("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:r("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),schema:r("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"}),sql:r("path",{d:"M4 5h16v14H4V5Zm3 4 3 3-3 3m6 0h4"}),storageRules:r("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"}),security:r("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:r("path",{d:"M3 6h9M6 12h12M10 18h7"}),settings:r("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:r("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:r("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"}),workflows:r("path",{d:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM7.5 10v2a2 2 0 0 0 2 2H14m2.5-4V8a2 2 0 0 0-2-2H10"})},aa=[{key:"overview",tabs:["home","dashboards"]},{key:"database",tabs:["data","sql","schema","migrations","vectors","pitr","export"]},{key:"functions",tabs:["functions","api","workflows","agents","queues"]},{key:"auth",tabs:["users","organizations","authSessions","authAudit","authConfig"]},{key:"storage",tabs:["files","storageRules","kv"]},{key:"observability",tabs:["issues","logs","traces","audit","realtime","fanout","containers","metrics","analytics","health","deploymentHealth"]},{key:"advisors",tabs:["security","rls","permissions","insights"]},{key:"operations",tabs:["schedule","mail","drains","notifications","payments","flags"]},{key:"settings",tabs:["settings"]}],Ir={analytics:"analytics",authConfig:"auth",authSessions:"auth",containers:"containers",files:"storage",flags:"flags",kv:"kv",mail:"mail",organizations:"auth",payments:"payments",queues:"queues",schedule:"scheduler",storageRules:"storage",users:"auth",vectors:"vectors",workflows:"workflows"},sa=(t,e)=>{const s=Ir[t];return s===void 0||e[s]},Gt=t=>{const e=y(2),{tab:s}=t,a=Rr[s];let n;return e[0]!==a?(n=r("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:a}),e[0]=a,e[1]=n):n=e[1],n},Vr=t=>t,Na=Vr(["home","data","sql","functions","api","workflows","agents","queues","containers","schema","migrations","vectors","export","pitr","users","organizations","authSessions","authAudit","authConfig","files","storageRules","kv","dashboards","metrics","analytics","health","deploymentHealth","security","rls","permissions","insights","issues","logs","traces","realtime","fanout","mail","notifications","payments","audit","schedule","drains","flags","settings"]),Zr=new Set(["api","data","sql"]),Kr=t=>{const e=t.split("/").findLast(Boolean)??"";return Na.includes(e)?e:"home"},Er=t=>{const e=y(19),{chrome:s,connected:a}=t,n=bt();let i;e[0]!==n?(i=n("admin token"),e[0]=n,e[1]=i):i=e[1];let o;e[2]!==i?(o=r("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:i}),e[2]=i,e[3]=o):o=e[3];let d;e[4]!==s.onTokenChange||e[5]!==s.token?(d=r(Oa,{className:"h-8","data-testid":"dash-app-token",id:"dash-app-token",onChange:s.onTokenChange,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:s.token}),e[4]=s.onTokenChange,e[5]=s.token,e[6]=d):d=e[6];let l;e[7]!==a||e[8]!==n?(l=a&&v("p",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground","data-testid":"dash-app-token-warning",role:"note",children:[r("span",{"aria-hidden":"true",className:"text-warning",children:"⚠"}),n("Token rides the WebSocket URL — it can surface in browser DevTools and server logs. Use a dev-only token.")]}),e[7]=a,e[8]=n,e[9]=l):l=e[9];let c;e[10]!==s.clearToken||e[11]!==a||e[12]!==n?(c=a&&r("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:s.clearToken,type:"button",children:n("Clear")}),e[10]=s.clearToken,e[11]=a,e[12]=n,e[13]=c):c=e[13];let u;return e[14]!==o||e[15]!==d||e[16]!==l||e[17]!==c?(u=v("div",{className:"flex flex-col gap-2",children:[o,d,l,c]}),e[14]=o,e[15]=d,e[16]=l,e[17]=c,e[18]=u):u=e[18],u},Hr=t=>{const e=y(25),{current:s,group:a,groupLabel:n,selectTab:i,tabDescription:o,tabLabel:d}=t,l=a.tabs.includes(s)?"page":void 0,c=n[a.key],u=a.tabs[0];let g;e[0]!==u?(g=r(Gt,{tab:u}),e[0]=u,e[1]=g):g=e[1];let h;e[2]!==l||e[3]!==c||e[4]!==g?(h=r(va,{"aria-current":l,"aria-label":c,className:"mx-auto flex size-8 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent data-[popup-open]:bg-sidebar-accent data-[popup-open]:text-sidebar-accent-foreground data-[popup-open]:shadow-xs aria-[current=page]:bg-sidebar-accent aria-[current=page]:text-sidebar-accent-foreground aria-[current=page]:shadow-xs",delay:120,openOnHover:!0,children:g}),e[2]=l,e[3]=c,e[4]=g,e[5]=h):h=e[5];const b=n[a.key];let p;e[6]!==b?(p=r("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:b}),e[6]=b,e[7]=p):p=e[7];let x;if(e[8]!==s||e[9]!==a.tabs||e[10]!==i||e[11]!==o||e[12]!==d){let k;e[14]!==s||e[15]!==i||e[16]!==o||e[17]!==d?(k=N=>v("button",{"aria-current":s===N?"page":void 0,className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-[13px] text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent aria-[current=page]:bg-accent aria-[current=page]:font-medium [&_svg]:opacity-70 aria-[current=page]:[&_svg]:opacity-100","data-tab":N,"data-testid":`dash-tab-${N}`,onClick:i,title:o[N],type:"button",children:[r(Gt,{tab:N}),r("span",{children:d[N]})]},N),e[14]=s,e[15]=i,e[16]=o,e[17]=d,e[18]=k):k=e[18],x=a.tabs.map(k),e[8]=s,e[9]=a.tabs,e[10]=i,e[11]=o,e[12]=d,e[13]=x}else x=e[13];let f;e[19]!==p||e[20]!==x?(f=v(ya,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[p,x]}),e[19]=p,e[20]=x,e[21]=f):f=e[21];let m;return e[22]!==h||e[23]!==f?(m=v(ba,{children:[h,f]}),e[22]=h,e[23]=f,e[24]=m):m=e[24],m},Or=t=>{const e=y(45),{chrome:s,collapsed:a,connected:n}=t,i=bt();if(s===null){let N;e[0]!==i?(N=i("Admin"),e[0]=i,e[1]=N):N=e[1];let _;e[2]===Symbol.for("react.memo_cache_sentinel")?(_=r("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"}),e[2]=_):_=e[2];let L;e[3]!==i?(L=i("Admin"),e[3]=i,e[4]=L):L=e[4];let C;e[5]!==L?(C=r("span",{className:"truncate text-[13px] font-medium",children:L}),e[5]=L,e[6]=C):C=e[6];let S;e[7]!==i?(S=i("Studio"),e[7]=i,e[8]=S):S=e[8];let P;e[9]!==S?(P=r("span",{className:"truncate text-[11px] text-muted-foreground",children:S}),e[9]=S,e[10]=P):P=e[10];let A;e[11]!==C||e[12]!==P?(A=v("span",{className:"grid flex-1 text-start leading-tight",children:[C,P]}),e[11]=C,e[12]=P,e[13]=A):A=e[13];let T;return e[14]!==N||e[15]!==A?(T=v(wa,{className:"data-active:bg-transparent",size:"lg",tooltip:N,children:[_,A]}),e[14]=N,e[15]=A,e[16]=T):T=e[16],T}const o=a?"mx-auto size-8 justify-center":"w-full p-2";let d;e[17]!==o?(d=M("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",o),e[17]=o,e[18]=d):d=e[18];let l;e[19]!==n||e[20]!==i?(l=i(n?"Connected":"Not connected"),e[19]=n,e[20]=i,e[21]=l):l=e[21];const c=n?"bg-success":"bg-muted-foreground/50";let u;e[22]!==c?(u=M("absolute -end-0.5 -bottom-0.5 size-2.5 rounded-full border-2 border-sidebar",c),e[22]=c,e[23]=u):u=e[23];let g;e[24]!==u?(g=v("span",{className:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:["C",r("span",{"aria-hidden":"true",className:u})]}),e[24]=u,e[25]=g):g=e[25];let h;e[26]!==a||e[27]!==n||e[28]!==i?(h=!a&&v(ia,{children:[v("span",{className:"grid flex-1 text-start leading-tight",children:[r("span",{className:"truncate text-[13px] font-medium",children:i("Admin")}),r("span",{className:"truncate text-[11px] text-muted-foreground",children:i(n?"Connected":"Not connected")})]}),r("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:r("path",{d:"m8 9 4-4 4 4M8 15l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e[26]=a,e[27]=n,e[28]=i,e[29]=h):h=e[29];let b;e[30]!==d||e[31]!==l||e[32]!==g||e[33]!==h?(b=v(va,{className:d,"data-testid":"dash-app-connect",title:l,children:[g,h]}),e[30]=d,e[31]=l,e[32]=g,e[33]=h,e[34]=b):b=e[34];const p=a?"end":"start",x=a?"right":"top";let f;e[35]!==s||e[36]!==n?(f=r(Er,{chrome:s,connected:n}),e[35]=s,e[36]=n,e[37]=f):f=e[37];let m;e[38]!==x||e[39]!==f||e[40]!==p?(m=r(ya,{align:p,keepMounted:!0,side:x,children:f}),e[38]=x,e[39]=f,e[40]=p,e[41]=m):m=e[41];let k;return e[42]!==m||e[43]!==b?(k=v(ba,{children:[b,m]}),e[42]=m,e[43]=b,e[44]=k):k=e[44],k},Br=t=>{const e=y(28),{chrome:s,connected:a,current:n,groupLabel:i,groups:o,selectTab:d,tabDescription:l,tabLabel:c}=t,u=bt(),{state:g}=Vt(),h=g==="collapsed",b=h&&"justify-center px-0";let p;e[0]!==b?(p=M("flex items-center gap-2.5 px-1.5 py-1",b),e[0]=b,e[1]=p):p=e[1];let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=r(ls,{className:"size-9 shrink-0 text-foreground"}),e[2]=x):x=e[2];let f;e[3]!==h||e[4]!==a||e[5]!==u?(f=!h&&v(ia,{children:[v("span",{className:"grid flex-1 leading-tight",children:[r("span",{className:"truncate text-sm font-semibold text-foreground",children:"lunora"}),r("span",{className:"truncate text-[11px] text-muted-foreground",children:u("Studio")})]}),r(Ha,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:u(a?"Live":"Local")})]}),e[3]=h,e[4]=a,e[5]=u,e[6]=f):f=e[6];let m;e[7]!==p||e[8]!==f?(m=r(Vs,{children:v("div",{className:p,children:[x,f]})}),e[7]=p,e[8]=f,e[9]=m):m=e[9];let k;e[10]!==h||e[11]!==n||e[12]!==i||e[13]!==o||e[14]!==d||e[15]!==l||e[16]!==c?(k=h?o.map(C=>r(Hr,{current:n,group:C,groupLabel:i,selectTab:d,tabDescription:l,tabLabel:c},C.key)):o.map(C=>v(Es,{children:[r(Hs,{className:"text-[11px] font-medium tracking-wider uppercase",children:i[C.key]}),r(Os,{children:r(ea,{children:C.tabs.map(S=>r(ta,{children:v(wa,{className:"data-active:text-foreground dark:data-active:text-royal-amethyst data-active:shadow-[inset_2px_0_0_0_var(--royal-amethyst)]","data-tab":S,"data-testid":`dash-tab-${S}`,isActive:n===S,onClick:d,title:l[S],tooltip:l[S],children:[r(Gt,{tab:S}),r("span",{children:c[S]})]})},S))})})]},C.key)),e[10]=h,e[11]=n,e[12]=i,e[13]=o,e[14]=d,e[15]=l,e[16]=c,e[17]=k):k=e[17];let N;e[18]!==k?(N=r(Ks,{children:k}),e[18]=k,e[19]=N):N=e[19];let _;e[20]!==s||e[21]!==h||e[22]!==a?(_=r(Zs,{children:r(ea,{children:r(ta,{children:r(Or,{chrome:s,collapsed:h,connected:a})})})}),e[20]=s,e[21]=h,e[22]=a,e[23]=_):_=e[23];let L;return e[24]!==m||e[25]!==N||e[26]!==_?(L=v($s,{collapsible:"icon",variant:"inset",children:[m,N,_]}),e[24]=m,e[25]=N,e[26]=_,e[27]=L):L=e[27],L},Ma=()=>{const t=y(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=v("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[v("div",{className:"flex items-center gap-2",children:[r(jt,{className:"h-8 w-40"}),r(jt,{className:"h-8 w-24"})]}),r(jt,{className:"h-72 w-full"})]}),t[0]=e):e=t[0],e},Dr=()=>{const t=y(330),e=bt(),s=ra();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:Ur},t[0]=a):a=t[0];const n=Ra(a);let i,o;t[1]!==n?(i=Kr(n),o=Zr.has(i),t[1]=n,t[2]=i,t[3]=o):(i=t[2],o=t[3]);const d=o,l=ja();let c;t[4]!==l?(c=R=>({...R,tabs:R.tabs.filter(Rt=>sa(Rt,l))}),t[4]=l,t[5]=c):c=t[5];const u=aa.map(c).filter(Qr);let g,h;t[6]!==i||t[7]!==l||t[8]!==s?(g=()=>{sa(i,l)||Qt(s({replace:!0,to:"/home"}))},h=[i,l,s],t[6]=i,t[7]=l,t[8]=s,t[9]=g,t[10]=h):(g=t[9],h=t[10]),xt(g,h);let b;t[11]!==e?(b=e("Agents"),t[11]=e,t[12]=b):b=t[12];let p;t[13]!==e?(p=e("Analytics"),t[13]=e,t[14]=p):p=t[14];let x;t[15]!==e?(x=e("API"),t[15]=e,t[16]=x):x=t[16];let f;t[17]!==e?(f=e("Audit"),t[17]=e,t[18]=f):f=t[18];let m;t[19]!==e?(m=e("Auth audit"),t[19]=e,t[20]=m):m=t[20];let k;t[21]!==e?(k=e("Configuration"),t[21]=e,t[22]=k):k=t[22];let N;t[23]!==e?(N=e("Sessions"),t[23]=e,t[24]=N):N=t[24];let _;t[25]!==e?(_=e("Containers"),t[25]=e,t[26]=_):_=t[26];let L;t[27]!==e?(L=e("Dashboards"),t[27]=e,t[28]=L):L=t[28];let C;t[29]!==e?(C=e("Data"),t[29]=e,t[30]=C):C=t[30];let S;t[31]!==e?(S=e("Deployment health"),t[31]=e,t[32]=S):S=t[32];let P;t[33]!==e?(P=e("Log drains"),t[33]=e,t[34]=P):P=t[34];let A;t[35]!==e?(A=e("Export / Import"),t[35]=e,t[36]=A):A=t[36];let T;t[37]!==e?(T=e("Fan-out"),t[37]=e,t[38]=T):T=t[38];let Z;t[39]!==e?(Z=e("Files"),t[39]=e,t[40]=Z):Z=t[40];let K;t[41]!==e?(K=e("Flags"),t[41]=e,t[42]=K):K=t[42];let E;t[43]!==e?(E=e("Functions"),t[43]=e,t[44]=E):E=t[44];let H;t[45]!==e?(H=e("Health"),t[45]=e,t[46]=H):H=t[46];let O;t[47]!==e?(O=e("Home"),t[47]=e,t[48]=O):O=t[48];let B;t[49]!==e?(B=e("Performance"),t[49]=e,t[50]=B):B=t[50];let D;t[51]!==e?(D=e("Issues"),t[51]=e,t[52]=D):D=t[52];let q;t[53]!==e?(q=e("KV"),t[53]=e,t[54]=q):q=t[54];let W;t[55]!==e?(W=e("Logs"),t[55]=e,t[56]=W):W=t[56];let j;t[57]!==e?(j=e("Metrics"),t[57]=e,t[58]=j):j=t[58];let F;t[59]!==e?(F=e("Migrations"),t[59]=e,t[60]=F):F=t[60];let U;t[61]!==e?(U=e("Notifications"),t[61]=e,t[62]=U):U=t[62];let Q;t[63]!==e?(Q=e("Organizations"),t[63]=e,t[64]=Q):Q=t[64];let G;t[65]!==e?(G=e("Time Travel"),t[65]=e,t[66]=G):G=t[66];let J;t[67]!==e?(J=e("Mail"),t[67]=e,t[68]=J):J=t[68];let X;t[69]!==e?(X=e("Payments"),t[69]=e,t[70]=X):X=t[70];let Y;t[71]!==e?(Y=e("Permissions"),t[71]=e,t[72]=Y):Y=t[72];let ee;t[73]!==e?(ee=e("Queues"),t[73]=e,t[74]=ee):ee=t[74];let te;t[75]!==e?(te=e("Realtime"),t[75]=e,t[76]=te):te=t[76];let ae;t[77]!==e?(ae=e("RLS Policies"),t[77]=e,t[78]=ae):ae=t[78];let se;t[79]!==e?(se=e("Scheduled"),t[79]=e,t[80]=se):se=t[80];let re;t[81]!==e?(re=e("Schema"),t[81]=e,t[82]=re):re=t[82];let ne;t[83]!==e?(ne=e("Security"),t[83]=e,t[84]=ne):ne=t[84];let ie;t[85]!==e?(ie=e("Settings"),t[85]=e,t[86]=ie):ie=t[86];let oe;t[87]!==e?(oe=e("SQL editor"),t[87]=e,t[88]=oe):oe=t[88];let le;t[89]!==e?(le=e("Traces"),t[89]=e,t[90]=le):le=t[90];let de;t[91]!==e?(de=e("Access Rules"),t[91]=e,t[92]=de):de=t[92];let ce;t[93]!==e?(ce=e("Users"),t[93]=e,t[94]=ce):ce=t[94];let ue;t[95]!==e?(ue=e("Vectors"),t[95]=e,t[96]=ue):ue=t[96];let he;t[97]!==e?(he=e("Workflows"),t[97]=e,t[98]=he):he=t[98];let wt;t[99]!==k||t[100]!==N||t[101]!==_||t[102]!==L||t[103]!==C||t[104]!==S||t[105]!==P||t[106]!==A||t[107]!==T||t[108]!==Z||t[109]!==K||t[110]!==E||t[111]!==H||t[112]!==O||t[113]!==B||t[114]!==D||t[115]!==q||t[116]!==W||t[117]!==j||t[118]!==F||t[119]!==U||t[120]!==Q||t[121]!==G||t[122]!==J||t[123]!==X||t[124]!==Y||t[125]!==ee||t[126]!==te||t[127]!==ae||t[128]!==se||t[129]!==re||t[130]!==ne||t[131]!==ie||t[132]!==oe||t[133]!==le||t[134]!==de||t[135]!==ce||t[136]!==ue||t[137]!==he||t[138]!==b||t[139]!==p||t[140]!==x||t[141]!==f||t[142]!==m?(wt={agents:b,analytics:p,api:x,audit:f,authAudit:m,authConfig:k,authSessions:N,containers:_,dashboards:L,data:C,deploymentHealth:S,drains:P,export:A,fanout:T,files:Z,flags:K,functions:E,health:H,home:O,insights:B,issues:D,kv:q,logs:W,metrics:j,migrations:F,notifications:U,organizations:Q,pitr:G,mail:J,payments:X,permissions:Y,queues:ee,realtime:te,rls:ae,schedule:se,schema:re,security:ne,settings:ie,sql:oe,traces:le,storageRules:de,users:ce,vectors:ue,workflows:he},t[99]=k,t[100]=N,t[101]=_,t[102]=L,t[103]=C,t[104]=S,t[105]=P,t[106]=A,t[107]=T,t[108]=Z,t[109]=K,t[110]=E,t[111]=H,t[112]=O,t[113]=B,t[114]=D,t[115]=q,t[116]=W,t[117]=j,t[118]=F,t[119]=U,t[120]=Q,t[121]=G,t[122]=J,t[123]=X,t[124]=Y,t[125]=ee,t[126]=te,t[127]=ae,t[128]=se,t[129]=re,t[130]=ne,t[131]=ie,t[132]=oe,t[133]=le,t[134]=de,t[135]=ce,t[136]=ue,t[137]=he,t[138]=b,t[139]=p,t[140]=x,t[141]=f,t[142]=m,t[143]=wt):wt=t[143];const $=wt,Zt={advisors:e("Advisors"),auth:e("Auth"),database:e("Database"),functions:e("Functions"),observability:e("Observability"),operations:e("Operations"),overview:e("Overview"),settings:e("Settings"),storage:e("Storage")};let me;t[144]!==e?(me=e("Inspect agent threads, message timelines, tool calls, and token usage."),t[144]=e,t[145]=me):me=t[145];let pe;t[146]!==e?(pe=e("Usage and latency from Analytics Engine — request volume, p50/p95, and hot shards."),t[146]=e,t[147]=pe):pe=t[147];let ge;t[148]!==e?(ge=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[148]=e,t[149]=ge):ge=t[149];let fe;t[150]!==e?(fe=e("A durable log of admin state-changing operations."),t[150]=e,t[151]=fe):fe=t[151];let be;t[152]!==e?(be=e("Authentication and security events — sign-ins, MFA, and session changes."),t[152]=e,t[153]=be):be=t[153];let ve;t[154]!==e?(ve=e("Enabled plugins and session config (read-only)."),t[154]=e,t[155]=ve):ve=t[155];let ye;t[156]!==e?(ye=e("Browse and revoke active sessions across all users."),t[156]=e,t[157]=ye):ye=t[157];let xe;t[158]!==e?(xe=e("Live Cloudflare Containers — current lifecycle state per instance from the log stream."),t[158]=e,t[159]=xe):xe=t[159];let we;t[160]!==e?(we=e("Chart widgets backed by saved read-only SQL queries."),t[160]=e,t[161]=we):we=t[161];let ke;t[162]!==e?(ke=e("Browse and edit rows across your shard and global tables."),t[162]=e,t[163]=ke):ke=t[163];let Ne;t[164]!==e?(Ne=e("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint."),t[164]=e,t[165]=Ne):Ne=t[165];let Me;t[166]!==e?(Me=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[166]=e,t[167]=Me):Me=t[167];let Se;t[168]!==e?(Se=e("Export a shard to NDJSON, or import rows from it."),t[168]=e,t[169]=Se):Se=t[169];let Ce;t[170]!==e?(Ce=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[170]=e,t[171]=Ce):Ce=t[171];let _e;t[172]!==e?(_e=e("Browse objects in your R2 storage buckets."),t[172]=e,t[173]=_e):_e=t[173];let Le;t[174]!==e?(Le=e("Inspect feature flags and their live evaluation under a targeting context."),t[174]=e,t[175]=Le):Le=t[175];let Pe;t[176]!==e?(Pe=e("Run registered queries, mutations, and actions."),t[176]=e,t[177]=Pe):Pe=t[177];let Ae;t[178]!==e?(Ae=e("At-a-glance connection, error, and shard signals."),t[178]=e,t[179]=Ae):Ae=t[179];let Te;t[180]!==e?(Te=e("Connection, health, and advisor summary for your deployment."),t[180]=e,t[181]=Te):Te=t[181];let ze;t[182]!==e?(ze=e("Surface slow functions, error spikes, and cache problems."),t[182]=e,t[183]=ze):ze=t[183];let $e;t[184]!==e?($e=e("Grouped error triage — Worker throws and container crashes folded by fingerprint."),t[184]=e,t[185]=$e):$e=t[185];let Re;t[186]!==e?(Re=e("A live stream of recent function logs."),t[186]=e,t[187]=Re):Re=t[187];let Ie;t[188]!==e?(Ie=e("Per-shard health and aggregate metrics."),t[188]=e,t[189]=Ie):Ie=t[189];let Ve;t[190]!==e?(Ve=e("Review migration status and run them."),t[190]=e,t[191]=Ve):Ve=t[191];let Ze;t[192]!==e?(Ze=e("Registered push devices — endpoint, kind, last-send status, and delivery errors."),t[192]=e,t[193]=Ze):Ze=t[193];let Ke;t[194]!==e?(Ke=e("Browse and manage organizations, members, and invitations."),t[194]=e,t[195]=Ke):Ke=t[195];let Ee;t[196]!==e?(Ee=e("Restore a shard to a point in the last 30 days."),t[196]=e,t[197]=Ee):Ee=t[197];let He;t[198]!==e?(He=e("Email your app sent, captured in dev."),t[198]=e,t[199]=He):He=t[199];let Oe;t[200]!==e?(Oe=e("Synced customers, subscriptions, and webhook events."),t[200]=e,t[201]=Oe):Oe=t[201];let Be;t[202]!==e?(Be=e("Inspect access policies per table, and probe a function as any identity."),t[202]=e,t[203]=Be):Be=t[203];let De;t[204]!==e?(De=e("Inspect declared Cloudflare Queues — their producer bindings, consumer mode, and dead-letter queue."),t[204]=e,t[205]=De):De=t[205];let qe;t[206]!==e?(qe=e("Active WebSocket subscriptions on this shard."),t[206]=e,t[207]=qe):qe=t[207];let We;t[208]!==e?(We=e("Inspect row-level-security policies and roles, per table."),t[208]=e,t[209]=We):We=t[209];let je;t[210]!==e?(je=e("Inspect and cancel scheduled jobs."),t[210]=e,t[211]=je):je=t[211];let Fe;t[212]!==e?(Fe=e("Inspect each table and its columns."),t[212]=e,t[213]=Fe):Fe=t[213];let Ue;t[214]!==e?(Ue=e("Review admin gates, credentials, and log redaction."),t[214]=e,t[215]=Ue):Ue=t[215];let Qe;t[216]!==e?(Qe=e("Read-only deployment config — vars, secrets, and bindings."),t[216]=e,t[217]=Qe):Qe=t[217];let Ge;t[218]!==e?(Ge=e("Run read-only SQL against a shard."),t[218]=e,t[219]=Ge):Ge=t[219];let Je;t[220]!==e?(Je=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[220]=e,t[221]=Je):Je=t[221];let Xe;t[222]!==e?(Xe=e("Inspect storage access rules — per bucket, operation, and key prefix."),t[222]=e,t[223]=Xe):Xe=t[223];let Ye;t[224]!==e?(Ye=e("Recent ctx.trace waterfalls for this shard — the drill-down from a log line."),t[224]=e,t[225]=Ye):Ye=t[225];let et;t[226]!==e?(et=e("Manage auth users — roles, bans, sessions, and identity."),t[226]=e,t[227]=et):et=t[227];let tt;t[228]!==e?(tt=e("Browse Vectorize indexes and run similarity searches."),t[228]=e,t[229]=tt):tt=t[229];let at;t[230]!==e?(at=e("Inspect declared Cloudflare Workflows and their bindings."),t[230]=e,t[231]=at):at=t[231];let kt;t[232]!==me||t[233]!==pe||t[234]!==ge||t[235]!==fe||t[236]!==be||t[237]!==ve||t[238]!==ye||t[239]!==xe||t[240]!==we||t[241]!==ke||t[242]!==Ne||t[243]!==Me||t[244]!==Se||t[245]!==Ce||t[246]!==_e||t[247]!==Le||t[248]!==Pe||t[249]!==Ae||t[250]!==Te||t[251]!==ze||t[252]!==$e||t[253]!==Re||t[254]!==Ie||t[255]!==Ve||t[256]!==Ze||t[257]!==Ke||t[258]!==Ee||t[259]!==He||t[260]!==Oe||t[261]!==Be||t[262]!==De||t[263]!==qe||t[264]!==We||t[265]!==je||t[266]!==Fe||t[267]!==Ue||t[268]!==Qe||t[269]!==Ge||t[270]!==Je||t[271]!==Xe||t[272]!==Ye||t[273]!==et||t[274]!==tt||t[275]!==at?(kt={agents:me,analytics:pe,api:ge,audit:fe,authAudit:be,authConfig:ve,authSessions:ye,containers:xe,dashboards:we,data:ke,deploymentHealth:Ne,drains:Me,export:Se,fanout:Ce,files:_e,flags:Le,functions:Pe,health:Ae,home:Te,insights:ze,issues:$e,logs:Re,metrics:Ie,migrations:Ve,notifications:Ze,organizations:Ke,pitr:Ee,mail:He,payments:Oe,permissions:Be,queues:De,realtime:qe,rls:We,schedule:je,schema:Fe,security:Ue,settings:Qe,sql:Ge,kv:Je,storageRules:Xe,traces:Ye,users:et,vectors:tt,workflows:at},t[232]=me,t[233]=pe,t[234]=ge,t[235]=fe,t[236]=be,t[237]=ve,t[238]=ye,t[239]=xe,t[240]=we,t[241]=ke,t[242]=Ne,t[243]=Me,t[244]=Se,t[245]=Ce,t[246]=_e,t[247]=Le,t[248]=Pe,t[249]=Ae,t[250]=Te,t[251]=ze,t[252]=$e,t[253]=Re,t[254]=Ie,t[255]=Ve,t[256]=Ze,t[257]=Ke,t[258]=Ee,t[259]=He,t[260]=Oe,t[261]=Be,t[262]=De,t[263]=qe,t[264]=We,t[265]=je,t[266]=Fe,t[267]=Ue,t[268]=Qe,t[269]=Ge,t[270]=Je,t[271]=Xe,t[272]=Ye,t[273]=et,t[274]=tt,t[275]=at,t[276]=kt):kt=t[276];const Sa=kt;let Nt;t[277]!==s?(Nt=R=>{Qt(s({to:`/${R.currentTarget.dataset.tab??""}`}))},t[277]=s,t[278]=Nt):Nt=t[278];const Ca=Nt;let Mt,St;t[279]!==i||t[280]!==$?(Mt=()=>{typeof document<"u"&&(document.title=`${$[i]} · lunora`)},St=[i,$],t[279]=i,t[280]=$,t[281]=Mt,t[282]=St):(Mt=t[281],St=t[282]),xt(Mt,St);const _a=u.find(R=>R.tabs.includes(i))??aa[0],Kt=u.flatMap(R=>R.tabs.map(Rt=>({group:Zt[R.key],label:$[Rt],to:`/${Rt}`}))),st=Jt(ka),La=st!==null&&st.token!=="";let Ct;t[283]!==Kt?(Ct=r(Qa,{items:Kt}),t[283]=Kt,t[284]=Ct):Ct=t[284];let _t;t[285]===Symbol.for("react.memo_cache_sentinel")?(_t=r(Rs,{className:"-ms-1"}),t[285]=_t):_t=t[285];let rt;t[286]!==e?(rt=e("Breadcrumb"),t[286]=e,t[287]=rt):rt=t[287];const Et=Zt[_a.key];let nt;t[288]!==Et?(nt=r("span",{className:"text-muted-foreground",children:Et}),t[288]=Et,t[289]=nt):nt=t[289];let Lt;t[290]===Symbol.for("react.memo_cache_sentinel")?(Lt=r("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:r("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})}),t[290]=Lt):Lt=t[290];const Ht=$[i];let it;t[291]!==Ht?(it=r("span",{className:"font-medium text-foreground",children:Ht}),t[291]=Ht,t[292]=it):it=t[292];let ot;t[293]!==rt||t[294]!==nt||t[295]!==it?(ot=v("nav",{"aria-label":rt,className:"flex items-center gap-1.5 text-[13px]",children:[nt,Lt,it]}),t[293]=rt,t[294]=nt,t[295]=it,t[296]=ot):ot=t[296];let Pt;t[297]===Symbol.for("react.memo_cache_sentinel")?(Pt=v("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[r("circle",{cx:"11",cy:"11",r:"7"}),r("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"})]}),t[297]=Pt):Pt=t[297];let lt;t[298]!==e?(lt=e("Search…"),t[298]=e,t[299]=lt):lt=t[299];let At;t[300]===Symbol.for("react.memo_cache_sentinel")?(At=r("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"⌘K"}),t[300]=At):At=t[300];let dt;t[301]!==lt?(dt=v("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:Ga,type:"button",children:[Pt,lt,At]}),t[301]=lt,t[302]=dt):dt=t[302];let Tt;t[303]===Symbol.for("react.memo_cache_sentinel")?(Tt=r("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:r(bs,{})}),t[303]=Tt):Tt=t[303];let ct;t[304]!==ot||t[305]!==dt?(ct=v("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[_t,ot,dt,Tt]}),t[304]=ot,t[305]=dt,t[306]=ct):ct=t[306];let ut;t[307]!==st?.rulesInstalled?(ut=st?.rulesInstalled===!1&&r(us,{}),t[307]=st?.rulesInstalled,t[308]=ut):ut=t[308];const Ot=`dash-tab-${i}`,Bt=d?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",Dt=$[i];let ht;t[309]!==e||t[310]!==Dt?(ht=e("{title} failed",{title:Dt}),t[309]=e,t[310]=Dt,t[311]=ht):ht=t[311];const qt=$[i];let mt;t[312]!==e?(mt=e("Try again"),t[312]=e,t[313]=mt):mt=t[313];let zt;t[314]===Symbol.for("react.memo_cache_sentinel")?(zt=r(Za,{fallback:r(Ma,{}),children:r(Ia,{})}),t[314]=zt):zt=t[314];let pt;t[315]!==i||t[316]!==ht||t[317]!==qt||t[318]!==mt?(pt=r(Ka,{fallbackTitle:ht,label:qt,retryLabel:mt,children:zt},i),t[315]=i,t[316]=ht,t[317]=qt,t[318]=mt,t[319]=pt):pt=t[319];let gt;t[320]!==Bt||t[321]!==pt?(gt=r("div",{className:Bt,children:pt}),t[320]=Bt,t[321]=pt,t[322]=gt):gt=t[322];let ft;t[323]!==Ot||t[324]!==gt?(ft=r("div",{"aria-labelledby":Ot,className:"flex min-w-0 flex-1 flex-col overflow-hidden","data-testid":"dash-panel",id:"dash-panel",role:"tabpanel",children:gt}),t[323]=Ot,t[324]=gt,t[325]=ft):ft=t[325];let $t;return t[326]!==ct||t[327]!==ut||t[328]!==ft?($t=v(Is,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[ct,ut,ft]}),t[326]=ct,t[327]=ut,t[328]=ft,t[329]=$t):$t=t[329],v(zs,{className:"min-h-0 flex-1","data-testid":"lunora-studio",children:[Ct,r(Br,{chrome:st,connected:La,current:i,groupLabel:Zt,groups:u,selectTab:Ca,tabDescription:Sa,tabLabel:$}),$t]})},qr=t=>{const e=y(5),{initialShardKey:s,schemaEditable:a}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const i=Va(n),{table:o}=i,d=typeof o=="string"?o:void 0;let l;return e[1]!==s||e[2]!==d||e[3]!==a?(l=r(Cr,{initialShardKey:s,initialTable:d,schemaEditable:a}),e[1]=s,e[2]=d,e[3]=a,e[4]=l):l=e[4],l},Wr=()=>{const t=y(3),e=ra();let s,a;return t[0]!==e?(s=()=>{Qt(e({replace:!0,to:"/home"}))},a=[e],t[0]=e,t[1]=s,t[2]=a):(s=t[1],a=t[2]),xt(s,a),null},jr=({basePath:t,dataEditable:e=!1,functions:s,initialShardKey:a,openApiSpec:n,openRpcSpec:i,runAsIdentity:o=!1,schemaEditable:d=!1,scheduledCancel:l,scheduledCron:c,scheduledLoad:u})=>{const g=Aa({component:Dr}),h={agents:r(js,{initialShardKey:a}),analytics:r(Fs,{}),api:r(Us,{functions:s,initialShardKey:a,openApiSpec:n,openRpcSpec:i}),audit:r(cr,{initialShardKey:a}),authAudit:r(Qs,{}),authConfig:r(Gs,{}),authSessions:r(Js,{}),containers:r(er,{}),dashboards:r(kr,{initialShardKey:a}),data:r(ar,{editable:e,initialShardKey:a}),deploymentHealth:r(tr,{}),drains:r(ur,{}),export:r(sr,{initialShardKey:a}),fanout:r(Nr,{initialShardKey:a}),files:r(Pr,{}),kv:r(br,{}),flags:r(ir,{initialShardKey:a}),functions:v("div",{className:"flex flex-col gap-8",children:[r(lr,{functions:s,initialShardKey:a}),r(or,{functions:s,runAsIdentity:o})]}),health:r(Mr,{initialShardKey:a}),home:r(Wa,{initialShardKey:a}),insights:r(Ds,{initialShardKey:a}),issues:r(dr,{initialShardKey:a}),logs:r(hr,{initialShardKey:a}),traces:r(Tr,{initialShardKey:a}),metrics:r(Sr,{initialShardKey:a}),migrations:r(rr,{initialShardKey:a}),notifications:r(vr,{}),organizations:r(Xs,{}),permissions:r(xr,{functions:s,runAsIdentity:o,schemaEditable:d}),pitr:r(nr,{initialShardKey:a}),mail:r(mr,{}),payments:r(yr,{}),queues:r(wr,{}),realtime:v("div",{className:"flex flex-col gap-8",children:[r(gr,{initialShardKey:a}),r(fr,{})]}),rls:r(qs,{}),schedule:r(pr,{loadCronJobs:c,scheduledCancel:l,scheduledLoad:u}),schema:r(qr,{initialShardKey:a,schemaEditable:d}),security:r(Ws,{}),settings:r(_r,{initialShardKey:a}),sql:r(Lr,{initialShardKey:a}),storageRules:r(Ar,{}),users:r(Ys,{}),vectors:r(zr,{}),workflows:r($r,{})},b=Wt({component:()=>h.home,getParentRoute:()=>g,path:"/"}),p=Na.map(m=>m==="data"?Wt({component:()=>h[m],getParentRoute:()=>g,path:`/${m}`,validateSearch:Ua}):Wt({component:()=>h[m],getParentRoute:()=>g,path:`/${m}`})),x=g.addChildren([b,...p]),f="window"in globalThis?Ta():za({initialEntries:["/home"]});return $a({...t===void 0||t==="/"?{}:{basepath:t},defaultNotFoundComponent:Wr,defaultPendingComponent:Ma,defaultPendingMinMs:0,defaultPendingMs:0,history:f,routeTree:x})},Fr=t=>{const e=y(17),{basePath:s,chrome:a,dataEditable:n,functions:i,initialShardKey:o,openApiSpec:d,openRpcSpec:l,runAsIdentity:c,schemaEditable:u,scheduledCancel:g,scheduledCron:h,scheduledLoad:b}=t;let p;e[0]!==s||e[1]!==n||e[2]!==i||e[3]!==o||e[4]!==d||e[5]!==l||e[6]!==c||e[7]!==g||e[8]!==h||e[9]!==b||e[10]!==u?(p=jr({basePath:s,dataEditable:n,functions:i,initialShardKey:o,openApiSpec:d,openRpcSpec:l,runAsIdentity:c,schemaEditable:u,scheduledCancel:g,scheduledCron:h,scheduledLoad:b}),e[0]=s,e[1]=n,e[2]=i,e[3]=o,e[4]=d,e[5]=l,e[6]=c,e[7]=g,e[8]=h,e[9]=b,e[10]=u,e[11]=p):p=e[11];const x=p,f=a??null;let m;e[12]!==x?(m=r(Pa,{router:x}),e[12]=x,e[13]=m):m=e[13];let k;return e[14]!==f||e[15]!==m?(k=r(ka,{value:f,children:m}),e[14]=f,e[15]=m,e[16]=k):k=e[16],k},Mn=t=>{const e=y(17),{basePath:s,chrome:a,dataEditable:n,functions:i,i18n:o,initialShardKey:d,locale:l,openApiSpec:c,openRpcSpec:u,runAsIdentity:g,schemaEditable:h,scheduledCancel:b,scheduledCron:p,scheduledLoad:x}=t;let f;e[0]!==s||e[1]!==a||e[2]!==n||e[3]!==i||e[4]!==d||e[5]!==c||e[6]!==u||e[7]!==g||e[8]!==b||e[9]!==p||e[10]!==x||e[11]!==h?(f=r(ss,{children:r(Fr,{basePath:s,chrome:a,dataEditable:n,functions:i,initialShardKey:d,openApiSpec:c,openRpcSpec:u,runAsIdentity:g,scheduledCancel:b,scheduledCron:p,scheduledLoad:x,schemaEditable:h})}),e[0]=s,e[1]=a,e[2]=n,e[3]=i,e[4]=d,e[5]=c,e[6]=u,e[7]=g,e[8]=b,e[9]=p,e[10]=x,e[11]=h,e[12]=f):f=e[12];const m=f;if(o===void 0&&l===void 0)return m;let k;return e[13]!==o||e[14]!==l||e[15]!==m?(k=r(Fa,{i18n:o,locale:l,children:m}),e[13]=o,e[14]=l,e[15]=m,e[16]=k):k=e[16],k};function Ur(t){return t.location.pathname}function Qr(t){return t.tabs.length>0}export{Ns as N,Mn as S,as as a,rs as b,ks as c,ls as f,ys as g,Nn as m,Ms as v};
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{c}from"react/compiler-runtime";import"react";import{c as d}from"./utils-bhneXptQ.js";import{jsx as o}from"react/jsx-runtime";function u(s){const e=c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,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 r;return e[5]!==a||e[6]!==l?(r=o("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto overflow-y-clip",children:o("table",{"data-slot":"table",className:l,...a})}),e[5]=a,e[6]=l,e[7]=r):r=e[7],r}function p(s){const e=c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,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 r;return e[5]!==a||e[6]!==l?(r=o("thead",{"data-slot":"table-header",className:l,...a}),e[5]=a,e[6]=l,e[7]=r):r=e[7],r}function f(s){const e=c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,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 r;return e[5]!==a||e[6]!==l?(r=o("tbody",{"data-slot":"table-body",className:l,...a}),e[5]=a,e[6]=l,e[7]=r):r=e[7],r}function h(s){const e=c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,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 r;return e[5]!==a||e[6]!==l?(r=o("tr",{"data-slot":"table-row",className:l,...a}),e[5]=a,e[6]=l,e[7]=r):r=e[7],r}function x(s){const e=c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,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 r;return e[5]!==a||e[6]!==l?(r=o("th",{"data-slot":"table-head",className:l,...a}),e[5]=a,e[6]=l,e[7]=r):r=e[7],r}function N(s){const e=c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,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 r;return e[5]!==a||e[6]!==l?(r=o("td",{"data-slot":"table-cell",className:l,...a}),e[5]=a,e[6]=l,e[7]=r):r=e[7],r}export{p as d,f,h as m,u as n,x as p,N as u};
@@ -0,0 +1 @@
1
+ import{c as k}from"react/compiler-runtime";import{useT as w}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{jsx as h,jsxs as N}from"react/jsx-runtime";import{useState as L,useRef as C,useMemo as T}from"react";import{f as F,e as P}from"./internal-AtZ4bTal.js";import{useVirtualizer as R}from"@tanstack/react-virtual";import{c as E}from"./utils-bhneXptQ.js";import{l as O}from"./virtual-rect-1o1veP7R.js";const S=v=>v==null?"∅":v===""?"(empty)":typeof v=="object"?JSON.stringify(v):String(v),I=v=>{const e=k(32),{column:t,onFacetFilter:i,state:r}=v,a=w();let n;e[0]!==t||e[1]!==i||e[2]!==r.result?.values?(n=u=>{const b=Number(u.currentTarget.dataset.index),x=r.result?.values[b];x!==void 0&&i(t,x.value)},e[0]=t,e[1]=i,e[2]=r.result?.values,e[3]=n):n=e[3];const s=n,o=`db-facet-${t}`;let c;e[4]!==t?(c=h("span",{className:"font-medium text-foreground",children:t}),e[4]=t,e[5]=c):c=e[5];let m;e[6]!==r.loading||e[7]!==r.result||e[8]!==a?(m=r.loading&&r.result===null&&h("span",{className:"text-muted-foreground",children:a("Loading…")}),e[6]=r.loading,e[7]=r.result,e[8]=a,e[9]=m):m=e[9];let f;e[10]!==r.error?(f=r.error!==null&&h("span",{className:"text-destructive",role:"alert",children:r.error}),e[10]=r.error,e[11]=f):f=e[11];let p;e[12]!==r.result?.values?(p=r.result?.values??[],e[12]=r.result?.values,e[13]=p):p=e[13];let d;if(e[14]!==t||e[15]!==s||e[16]!==p){let u;e[18]!==t||e[19]!==s?(u=(b,x)=>N("button",{className:"flex items-center justify-between gap-2 rounded px-1 py-0.5 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground","data-index":x,"data-testid":`db-facet-value-${t}`,onClick:s,type:"button",children:[h("span",{className:"truncate",children:S(b.value)}),h("span",{className:"shrink-0 tabular-nums text-foreground/70",children:b.count})]},S(b.value)),e[18]=t,e[19]=s,e[20]=u):u=e[20],d=p.map(u),e[14]=t,e[15]=s,e[16]=p,e[17]=d}else d=e[17];let g;e[21]!==t||e[22]!==r.result||e[23]!==a?(g=r.result?.truncated===!0&&h("span",{className:"text-muted-foreground","data-testid":`db-facet-truncated-${t}`,children:a("Showing the {n} most common values.",{n:r.result.values.length})}),e[21]=t,e[22]=r.result,e[23]=a,e[24]=g):g=e[24];let l;return e[25]!==o||e[26]!==c||e[27]!==m||e[28]!==f||e[29]!==d||e[30]!==g?(l=N("section",{className:"flex flex-col gap-1","data-testid":o,children:[c,m,f,d,g]}),e[25]=o,e[26]=c,e[27]=m,e[28]=f,e[29]=d,e[30]=g,e[31]=l):l=e[31],l},U=v=>{const e=k(26),{columns:t,facets:i,onFacetFilter:r,onToggleFacet:a}=v,n=w();let s;e[0]!==a?(s=b=>{const{column:x}=b.currentTarget.dataset;x!==void 0&&a(x)},e[0]=a,e[1]=s):s=e[1];const o=s;if(t.length===0)return null;let c;e[2]!==n?(c=n("Facets"),e[2]=n,e[3]=c):c=e[3];let m;e[4]!==c?(m=h("span",{className:"font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:c}),e[4]=c,e[5]=m):m=e[5];let f;if(e[6]!==t||e[7]!==i||e[8]!==o){let b;e[10]!==i||e[11]!==o?(b=x=>h("button",{"aria-pressed":x in i,className:"rounded border border-border px-1.5 py-0.5 text-muted-foreground transition-colors hover:bg-accent aria-pressed:bg-accent aria-pressed:text-accent-foreground","data-column":x,"data-testid":`db-facet-toggle-${x}`,onClick:o,type:"button",children:x},x),e[10]=i,e[11]=o,e[12]=b):b=e[12],f=t.map(b),e[6]=t,e[7]=i,e[8]=o,e[9]=f}else f=e[9];let p;e[13]!==f?(p=h("div",{className:"flex flex-wrap gap-1",children:f}),e[13]=f,e[14]=p):p=e[14];let d;e[15]!==m||e[16]!==p?(d=N("div",{className:"flex flex-col gap-1.5",children:[m,p]}),e[15]=m,e[16]=p,e[17]=d):d=e[17];let g;e[18]!==i?(g=Object.entries(i),e[18]=i,e[19]=g):g=e[19];let l;e[20]!==r||e[21]!==g?(l=g.map(b=>{const[x,$]=b;return h(I,{column:x,onFacetFilter:r,state:$},x)}),e[20]=r,e[21]=g,e[22]=l):l=e[22];let u;return e[23]!==d||e[24]!==l?(u=N("aside",{className:"flex w-56 shrink-0 flex-col gap-3 overflow-auto border-l border-border p-3 text-xs","data-testid":"db-facets",children:[d,l]}),e[23]=d,e[24]=l,e[25]=u):u=e[25],u},J=[25,50,100,250],V=v=>{const e=k(18),{onChange:t,options:i,prefix:r,value:a}=v,n=w();let s;e[0]!==t?(s=b=>{t(Number.parseInt(b.target.value,10))},e[0]=t,e[1]=s):s=e[1];const o=s,c=`${r}-page-size`;let m;e[2]!==n?(m=n("Rows per page"),e[2]=n,e[3]=m):m=e[3];let f;e[4]!==m?(f=h("span",{children:m}),e[4]=m,e[5]=f):f=e[5];const p=`${r}-page-size`,d=`${r}-page-size`;let g;e[6]!==i?(g=i.map(_),e[6]=i,e[7]=g):g=e[7];let l;e[8]!==o||e[9]!==p||e[10]!==d||e[11]!==g||e[12]!==a?(l=h("select",{className:"h-6 rounded-md border border-border bg-background px-1 tabular-nums outline-none focus-visible:border-ring","data-testid":p,id:d,onChange:o,value:a,children:g}),e[8]=o,e[9]=p,e[10]=d,e[11]=g,e[12]=a,e[13]=l):l=e[13];let u;return e[14]!==c||e[15]!==f||e[16]!==l?(u=N("label",{className:"flex items-center gap-1.5",htmlFor:c,children:[f,l]}),e[14]=c,e[15]=f,e[16]=l,e[17]=u):u=e[17],u},B=v=>{const e=k(25),{onJump:t,page:i,pages:r,prefix:a}=v,n=w();let s;e[0]!==t||e[1]!==r?(s=y=>{const j=Number.parseInt(y,10);Number.isNaN(j)||t(Math.min(Math.max(1,j),Math.max(1,r)))},e[0]=t,e[1]=r,e[2]=s):s=e[2];const o=s;let c;e[3]!==o?(c=y=>{y.key==="Enter"&&o(y.currentTarget.value)},e[3]=o,e[4]=c):c=e[4];const m=c;let f;e[5]!==o?(f=y=>{o(y.currentTarget.value)},e[5]=o,e[6]=f):f=e[6];const p=f;let d;e[7]!==n?(d=n("Page"),e[7]=n,e[8]=d):d=e[8];let g;e[9]!==n?(g=n("Page"),e[9]=n,e[10]=g):g=e[10];const l=`${a}-page-jump`,u=Math.max(1,r);let b;e[11]!==p||e[12]!==m||e[13]!==i||e[14]!==g||e[15]!==l||e[16]!==u?(b=h("input",{"aria-label":g,className:"h-6 w-12 rounded-md border border-border bg-background px-1 text-center tabular-nums outline-none focus-visible:border-ring","data-testid":l,defaultValue:i,max:u,min:1,onBlur:p,onKeyDown:m,type:"number"},i),e[11]=p,e[12]=m,e[13]=i,e[14]=g,e[15]=l,e[16]=u,e[17]=b):b=e[17];let x;e[18]!==r||e[19]!==n?(x=n("of {pages}",{pages:r}),e[18]=r,e[19]=n,e[20]=x):x=e[20];let $;return e[21]!==d||e[22]!==b||e[23]!==x?($=N("span",{className:"flex items-center gap-1.5 tabular-nums",children:[d,b,x]}),e[21]=d,e[22]=b,e[23]=x,e[24]=$):$=e[24],$},X=({hasNext:v,hasPrevious:e,onJumpToPage:t,onNext:i,onPageSizeChange:r,onPrevious:a,pageSize:n,pageSizeOptions:s=J,prefix:o,rangeEnd:c,rangeStart:m,total:f})=>{const p=w(),d="rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",g=n!==void 0&&n>0?Math.max(1,Math.ceil(f/n)):1,l=n!==void 0&&n>0?Math.floor(Math.max(0,m-1)/n)+1:1;return N("div",{className:"flex w-full items-center justify-between gap-3 text-xs text-muted-foreground",children:[N("div",{className:"flex items-center gap-3",children:[n!==void 0&&r!==void 0&&h(V,{onChange:r,options:s,prefix:o,value:n}),h("span",{className:"tabular-nums","data-testid":`${o}-page-info`,children:p("{rangeStart}-{rangeEnd} of {total}",{rangeEnd:c,rangeStart:m,total:f})})]}),N("div",{className:"flex items-center gap-3",children:[h("button",{className:d,"data-testid":`${o}-prev`,disabled:!e,onClick:a,type:"button",children:p("Previous")}),n!==void 0&&t!==void 0&&h(B,{onJump:t,page:l,pages:g,prefix:o}),h("button",{className:d,"data-testid":`${o}-next`,disabled:!v,onClick:i,type:"button",children:p("Next")})]})]})};function _(v){return h("option",{value:v,children:v},v)}const Z=()=>{const[v,e]=L({}),t=C(v);t.current=v;const i=C({}),r=async(a,n)=>{const s=(i.current[a]??0)+1;i.current[a]=s,e(o=>a in o?{...o,[a]:{error:null,loading:!0,result:o[a]?.result??null}}:o);try{const o=await n(a);if(i.current[a]!==s)return;e(c=>a in c?{...c,[a]:{error:null,loading:!1,result:o}}:c)}catch(o){if(i.current[a]!==s)return;e(c=>a in c?{...c,[a]:{error:P(o),loading:!1,result:null}}:c)}};return{clearFacets:()=>{e({}),t.current={}},facets:v,facetsRef:t,refetchFacets:a=>{for(const n of Object.keys(t.current))F(r(n,a))},toggleFacet:(a,n)=>{if(a in t.current){e(s=>Object.fromEntries(Object.entries(s).filter(([o])=>o!==a)));return}e(s=>({...s,[a]:{error:null,loading:!0,result:null}})),n!==null&&F(r(a,n))}}},M=34,z=600,A=v=>{const e=k(21),{item:t,onSelect:i,prefix:r,selected:a,start:n}=v;let s;e[0]!==t.name||e[1]!==i?(s=()=>{i(t.name)},e[0]=t.name,e[1]=i,e[2]=s):s=e[2];const o=s,c=`translateY(${String(n)}px)`;let m;e[3]!==c?(m={insetInline:0,position:"absolute",top:0,transform:c},e[3]=c,e[4]=m):m=e[4];const f=m,p=a?"bg-accent font-medium text-accent-foreground":"text-foreground";let d;e[5]!==p?(d=E("flex w-full items-center justify-between gap-2 rounded-md px-2 py-1.5 text-start text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent",p),e[5]=p,e[6]=d):d=e[6];const g=`${r}-table-${t.name}`;let l;e[7]!==t.name?(l=h("span",{className:"truncate",children:t.name}),e[7]=t.name,e[8]=l):l=e[8];let u;e[9]!==t.rowCount?(u=h("span",{className:"shrink-0 rounded bg-muted px-1.5 text-xs tabular-nums text-muted-foreground",children:t.rowCount}),e[9]=t.rowCount,e[10]=u):u=e[10];let b;e[11]!==o||e[12]!==a||e[13]!==d||e[14]!==g||e[15]!==l||e[16]!==u?(b=N("button",{"aria-pressed":a,className:d,"data-testid":g,onClick:o,type:"button",children:[l,u]}),e[11]=o,e[12]=a,e[13]=d,e[14]=g,e[15]=l,e[16]=u,e[17]=b):b=e[17];let x;return e[18]!==f||e[19]!==b?(x=h("li",{style:f,children:b}),e[18]=f,e[19]=b,e[20]=x):x=e[20],x},ee=({header:v,onReload:e,onSelect:t,prefix:i,reloadLabel:r,selected:a,tables:n})=>{const s=w(),[o,c]=L(""),m=C(null),f=l=>{c(l.target.value)},p=T(()=>{const l=o.trim().toLowerCase();return l===""?n:n.filter(u=>u.name.toLowerCase().includes(l))},[o,n]),d=R({count:p.length,estimateSize:()=>M,getScrollElement:()=>m.current,initialRect:{height:z,width:240},observeElementRect:(l,u)=>O(l,u,z),overscan:12}).getVirtualItems(),g={height:p.length*M};return N("aside",{className:"flex h-full w-60 shrink-0 flex-col border-e border-border bg-sidebar","data-testid":`${i}-table-list`,children:[v,N("div",{className:"flex h-9 shrink-0 items-center justify-between gap-2 border-b border-border px-3",children:[h("span",{className:"font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:s("Tables")}),e!==void 0&&h("button",{"aria-label":r??s("Refresh"),className:"flex size-6 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent","data-testid":`${i}-load-tables`,onClick:e,title:r??s("Refresh"),type:"button",children:h("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:h("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"})})})]}),h("div",{className:"shrink-0 border-b border-border p-2",children:h("input",{className:"h-7 w-full rounded-md border border-border bg-background px-2 text-xs outline-none placeholder:text-muted-foreground focus-visible:border-ring","data-testid":`${i}-table-search`,onChange:f,placeholder:s("search table…"),type:"search",value:o})}),N("ul",{className:"relative flex-1 overflow-y-auto p-1.5","data-testid":`${i}-table-list-rows`,ref:m,children:[h("li",{"aria-hidden":"true",style:g}),d.map(l=>{const u=p[l.index];return u===void 0?null:h(A,{item:u,onSelect:t,prefix:i,selected:a===u.name,start:l.start},u.name)})]})]})};export{U as $,ee as _,X as a,Z as u};
@@ -0,0 +1 @@
1
+ import{c as d}from"react/compiler-runtime";import"react";import{c as o}from"./utils-bhneXptQ.js";import{jsx as l}from"react/jsx-runtime";function p(n){const i=d(8);let r,e;i[0]!==n?({className:r,...e}=n,i[0]=n,i[1]=r,i[2]=e):(r=i[1],e=i[2]);let t;i[3]!==r?(t=o("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-xs transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-xs dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",r),i[3]=r,i[4]=t):t=i[4];let a;return i[5]!==e||i[6]!==t?(a=l("textarea",{"data-slot":"textarea",className:t,...e}),i[5]=e,i[6]=t,i[7]=a):a=i[7],a}export{p as l};
@@ -0,0 +1 @@
1
+ import{s as a,a as n}from"./browser-storage-xjTyMKY0.js";const t="lunora:traces:pending-filter",o=e=>{a(t,e,"session")},c=()=>{const e=n("session");if(e!==void 0)try{const s=e.getItem(t);if(s===null)return;const r=JSON.parse(s);return typeof r.traceId!="string"?void 0:{traceId:r.traceId,...typeof r.shardKey=="string"?{shardKey:r.shardKey}:{}}}catch{return}},d=()=>{try{n("session")?.removeItem(t)}catch{}};export{d as c,c as p,o as w};
@@ -0,0 +1 @@
1
+ import{c as P}from"react/compiler-runtime";import{useLunora as k}from"@lunora/react";import{useQueryClient as v,useQuery as E,keepPreviousData as I}from"@tanstack/react-query";import{useState as h,useEffect as q}from"react";import{a as f,c,f as p,e as K}from"./internal-AtZ4bTal.js";const y=(e,r,a)=>["lunora-admin",e,r,a.trim()];function N(e,r,a={}){const{enabled:t=!0,keepPreviousData:s=!1,staleTime:i=0}=a,o=E({enabled:t,queryFn:r,placeholderData:s?I:void 0,queryKey:e,staleTime:i});return{data:o.data,error:o.error?K(o.error):o.error,errorSource:o.error??void 0,isLoading:o.isLoading,liveError:void 0,refetch:()=>{p(o.refetch())}}}function _(e,r,a={}){const t=k(),s=v(),{enabled:i=!0,keepPreviousData:o=!1,live:n=!1,shardKey:u="",staleTime:b}=a,d=y(e,r,u),T=N(d,()=>t.query(f(e),r,c(u)),{enabled:i,keepPreviousData:o,staleTime:b??(n?Number.POSITIVE_INFINITY:0)}),[g,l]=h(void 0),D=JSON.stringify(d);return q(()=>{if(!(!i||!n))return l(void 0),t.subscribe(f(e),r,m=>{l(void 0),s.setQueryData(d,m)},{...c(u),onError:m=>{l(m.message)}})},[D,i,n]),{...T,liveError:i&&n?g:void 0}}const x=()=>{const e=P(2),r=v();let a;return e[0]!==r?(a=(t,s,i)=>{const o=s===void 0?["lunora-admin",t]:y(t,s,i??"");p(r.invalidateQueries({queryKey:o}))},e[0]=r,e[1]=a):a=e[1],a};export{_ as K,N as T,x as _};
@@ -0,0 +1 @@
1
+ import{c as u}from"react/compiler-runtime";import{useLunora as c}from"@lunora/react";import{T as m}from"./use-admin-query-Di3fLE8H.js";import{useState as f}from"react";import{f as d,e as g}from"./internal-AtZ4bTal.js";const p={capabilities:{accounts:!0,admin:!0,organization:!1,passkey:!1,twoFactor:!1},emailAndPassword:!1,organization:{enabled:!1,roles:!1,teams:!1},plugins:[],rateLimit:{enabled:!1},session:{},socialProviders:[],userFields:[]},L=()=>{const e=u(6),s=c();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=["lunora-auth-config"],e[0]=r):r=e[0];let a;e[1]!==s?(a=()=>s.getAuthConfig(),e[1]=s,e[2]=a):a=e[2];const{data:t,isLoading:n}=m(r,a),i=t??p,l=!n;let o;return e[3]!==i||e[4]!==l?(o={config:i,ready:l},e[3]=i,e[4]=l,e[5]=o):o=e[5],o},_=()=>{const[e,s]=f(!1),[r,a]=f(null);return{busy:e,error:r,run:t=>{d((async()=>{s(!0),a(null);try{await t()}catch(n){a(g(n))}finally{s(!1)}})())}}};export{L as a,_ as u};
@@ -0,0 +1 @@
1
+ import{c as m}from"react/compiler-runtime";import{useState as s,useEffect as a}from"react";const p=function(o,c){const e=m(4),t=c===void 0?300:c,[n,f]=s(o);let r,u;return e[0]!==t||e[1]!==o?(r=()=>{const i=setTimeout(()=>{f(o)},t);return()=>{clearTimeout(i)}},u=[o,t],e[0]=t,e[1]=o,e[2]=r,e[3]=u):(r=e[2],u=e[3]),a(r,u),n};export{p as default};
@@ -0,0 +1 @@
1
+ import{clsx as o}from"clsx";import{twMerge as t}from"tailwind-merge";function m(...r){return t(o(r))}export{m as c};
@@ -0,0 +1 @@
1
+ import{observeElementRect as o}from"@tanstack/react-virtual";const m=(e,h,i)=>o(e,t=>{h(t.height>0?t:{height:i,width:t.width})});export{m as l};