@lunora/studio 1.0.0-alpha.9 → 1.0.0-alpha.90

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 (312) hide show
  1. package/LICENSE.md +6 -0
  2. package/dist/index.d.ts +822 -781
  3. package/dist/index.js +1 -41
  4. package/dist/mount.d.ts +10 -10
  5. package/dist/mount.js +1 -26
  6. package/dist/packem_chunks/AdvisorHealthPanel.js +1 -0
  7. package/dist/packem_chunks/ApiTab.js +1 -0
  8. package/dist/packem_chunks/AuditPanel.js +1 -0
  9. package/dist/packem_chunks/DeploymentHealthPanel.js +1 -0
  10. package/dist/packem_chunks/ExportImportPanel.js +3 -0
  11. package/dist/packem_chunks/FileBrowser.js +4 -0
  12. package/dist/packem_chunks/FunctionRunner.js +1 -0
  13. package/dist/packem_chunks/FunctionStatsPanel.js +1 -0
  14. package/dist/packem_chunks/HealthPanel.js +1 -0
  15. package/dist/packem_chunks/InsightsPanel.js +1 -0
  16. package/dist/packem_chunks/LogsPanel.js +1 -0
  17. package/dist/packem_chunks/MailPanel.js +2 -0
  18. package/dist/packem_chunks/MetricsPanel.js +1 -0
  19. package/dist/packem_chunks/NotificationsPanel.js +1 -0
  20. package/dist/packem_chunks/PitrPanel.js +1 -0
  21. package/dist/packem_chunks/SchemaViewer.js +1 -0
  22. package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -0
  23. package/dist/packem_chunks/SettingsPanel.js +1 -0
  24. package/dist/packem_chunks/SqlEditorPanel.js +6 -0
  25. package/dist/packem_chunks/TableEditor.js +1 -0
  26. package/dist/packem_chunks/agents-panel.js +1 -0
  27. package/dist/packem_chunks/analytics-panel.js +1 -0
  28. package/dist/packem_chunks/auth-audit-panel.js +1 -0
  29. package/dist/packem_chunks/auth-config-panel.js +1 -0
  30. package/dist/packem_chunks/auth-sessions-panel.js +1 -0
  31. package/dist/packem_chunks/containers-panel.js +1 -0
  32. package/dist/packem_chunks/dashboards-panel.js +1 -0
  33. package/dist/packem_chunks/fanout-panel.js +1 -0
  34. package/dist/packem_chunks/flags-panel.js +1 -0
  35. package/dist/packem_chunks/issues-panel.js +1 -0
  36. package/dist/packem_chunks/kv-browser.js +1 -0
  37. package/dist/packem_chunks/log-drains-panel.js +4 -0
  38. package/dist/packem_chunks/migrations-route.js +1 -0
  39. package/dist/packem_chunks/organizations-panel.js +1 -0
  40. package/dist/packem_chunks/payments-panel.js +1 -0
  41. package/dist/packem_chunks/permissions-panel.js +1 -0
  42. package/dist/packem_chunks/queues-panel.js +1 -0
  43. package/dist/packem_chunks/rls-panel.js +1 -0
  44. package/dist/packem_chunks/schedule-panel.js +1 -0
  45. package/dist/packem_chunks/sparkline.js +1 -0
  46. package/dist/packem_chunks/storage-rules-panel.js +1 -0
  47. package/dist/packem_chunks/subscriptions-panel.js +1 -0
  48. package/dist/packem_chunks/sync-client-panel.js +1 -0
  49. package/dist/packem_chunks/traces-panel.js +1 -0
  50. package/dist/packem_chunks/users-panel.js +1 -0
  51. package/dist/packem_chunks/vector-browser.js +1 -0
  52. package/dist/packem_chunks/workflows-panel.js +1 -0
  53. package/dist/packem_shared/ADMIN_FUNCTIONS-4aE59aDq.js +1 -0
  54. package/dist/packem_shared/ApiDocsPanel-DLMeLZ5-.js +2 -0
  55. package/dist/packem_shared/ApiReferencePanel-9q8BbJl-.js +1 -0
  56. package/dist/packem_shared/CommandPalette--SQwfTW1.js +1 -0
  57. package/dist/packem_shared/ConfirmButton-CTL3f3kr.js +1 -0
  58. package/dist/packem_shared/ConnectionBadge-DOk0CQWo.js +1 -0
  59. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js +1 -0
  60. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-B-hcFVoi.js +1 -0
  61. package/dist/packem_shared/DEFAULT_LOCALE-BZ4NojpD.js +1 -0
  62. package/dist/packem_shared/DataBrowser-CZZ_WkJ-.js +1 -0
  63. package/dist/packem_shared/DataFilters-B26ZeqBZ.js +1 -0
  64. package/dist/packem_shared/ErrorBoundary-DvzYskH7.js +1 -0
  65. package/dist/packem_shared/GlobalDataBrowser-DpkjHfDg.js +1 -0
  66. package/dist/packem_shared/HomePanel-3baDsDBU.js +1 -0
  67. package/dist/packem_shared/MigrationsPanel-dygzHUvg.js +1 -0
  68. package/dist/packem_shared/OpenRpcReferencePanel-qOZcWXMs.js +1 -0
  69. package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.js +1 -0
  70. package/dist/packem_shared/ScheduledJobs-D8kBZWBu.js +1 -0
  71. package/dist/packem_shared/ShardInput-BVn2iCU0.js +1 -0
  72. package/dist/packem_shared/Studio-forQt-PC.js +1 -0
  73. package/dist/packem_shared/StudioApp-B1AWsBzi.js +1 -0
  74. package/dist/packem_shared/StudioI18nProvider-CZ5h4nrV.js +1 -0
  75. package/dist/packem_shared/advisor-view-Pa8HLtBv.js +1 -0
  76. package/dist/packem_shared/aggregateMetrics-BNfajLa2.js +1 -0
  77. package/dist/packem_shared/alert-CVcOFuDR.js +1 -0
  78. package/dist/packem_shared/app.d-DW7yZsfu.d.ts +252 -0
  79. package/dist/packem_shared/badge-BbuuAio7.js +1 -0
  80. package/dist/packem_shared/bar-chart-DraN_srt.js +9 -0
  81. package/dist/packem_shared/browser-storage-xjTyMKY0.js +1 -0
  82. package/dist/packem_shared/button-BkCrNcAs.js +1 -0
  83. package/dist/packem_shared/card-CIDGUN6K.js +1 -0
  84. package/dist/packem_shared/cf-links-Dmg86v1D.js +1 -0
  85. package/dist/packem_shared/checkbox-StT4Gob6.js +1 -0
  86. package/dist/packem_shared/data-grid-DcxyIXwG.js +1 -0
  87. package/dist/packem_shared/data-view-params-ClrV7XgF.js +1 -0
  88. package/dist/packem_shared/dropdown-menu-C3RQ_HlW.js +2 -0
  89. package/dist/packem_shared/empty-state-Cg7t_8qu.js +1 -0
  90. package/dist/packem_shared/error-alert-t6cpEi0z.js +1 -0
  91. package/dist/packem_shared/grid-features-jnrD0SpX.js +6 -0
  92. package/dist/packem_shared/home-panel-CeeqqV0z.js +3 -0
  93. package/dist/packem_shared/input-JHu63lTv.js +1 -0
  94. package/dist/packem_shared/internal-BSIsQVC6.js +2 -0
  95. package/dist/packem_shared/label-6uP1obNF.js +1 -0
  96. package/dist/packem_shared/live-status-CmuRLFKf.js +1 -0
  97. package/dist/packem_shared/log-fields-CoL3hsIQ.js +1 -0
  98. package/dist/packem_shared/modal-shell-CUwwWC2o.js +1 -0
  99. package/dist/packem_shared/operation-console-provider-BMJNtiyB.js +1 -0
  100. package/dist/packem_shared/recording-client-DRAZEmzE.js +1 -0
  101. package/dist/packem_shared/reference-view-DnYYWr7I.js +12 -0
  102. package/dist/packem_shared/result-chart-DzJOVsaw.js +1 -0
  103. package/dist/packem_shared/schema-diagram-cg-bz_VL.js +2 -0
  104. package/dist/packem_shared/scroll-area-DTEq6Jec.js +2 -0
  105. package/dist/packem_shared/select-Bul-DeII.js +2 -0
  106. package/dist/packem_shared/shard-history-DMEW5VBE.js +1 -0
  107. package/dist/packem_shared/skeleton-C1wQ9M5t.js +1 -0
  108. package/dist/packem_shared/sparkline-CgjeUU2I.js +1 -0
  109. package/dist/packem_shared/stat-card-fm_TF1mo.js +1 -0
  110. package/dist/packem_shared/storage-tier-DznqOf-q.js +1 -0
  111. package/dist/packem_shared/studio-BtC7WPbz.js +2 -0
  112. package/dist/packem_shared/table-DdJBrClo.js +2 -0
  113. package/dist/packem_shared/table-list-sidebar-D9Bd4qgi.js +1 -0
  114. package/dist/packem_shared/textarea-Bu2-jKAs.js +1 -0
  115. package/dist/packem_shared/trace-handoff-Dw7mwjxu.js +1 -0
  116. package/dist/packem_shared/use-admin-query-QJ-ibl5u.js +1 -0
  117. package/dist/packem_shared/use-async-submit-q3ymBJkD.js +1 -0
  118. package/dist/packem_shared/use-auth-config-BObBpdsi.js +1 -0
  119. package/dist/packem_shared/use-shard-key-B2JtNa5m.js +1 -0
  120. package/dist/packem_shared/use-sql-assistant-C6dl2_Ty.js +1 -0
  121. package/dist/packem_shared/useDebounced-CU-uftxO.js +1 -0
  122. package/dist/packem_shared/utils-bhneXptQ.js +1 -0
  123. package/dist/packem_shared/virtual-rect-1o1veP7R.js +1 -0
  124. package/dist/standalone/chunk-24JLZ2Z5.js +1 -0
  125. package/dist/standalone/chunk-2OUPA2WJ.js +1 -0
  126. package/dist/standalone/chunk-2PJNAWB3.js +1 -0
  127. package/dist/standalone/chunk-2QSHLBCO.js +1 -0
  128. package/dist/standalone/chunk-3AV5CV6K.js +1 -0
  129. package/dist/standalone/chunk-3C3CG7ZK.js +1 -0
  130. package/dist/standalone/chunk-3CWGJYBB.js +1 -0
  131. package/dist/standalone/chunk-3XIESWL4.js +1 -0
  132. package/dist/standalone/chunk-4COKHD2C.js +1 -0
  133. package/dist/standalone/chunk-4LCY5XUR.js +1 -0
  134. package/dist/standalone/chunk-4UOFSGUS.js +1 -0
  135. package/dist/standalone/chunk-53KJRSHE.js +1 -0
  136. package/dist/standalone/chunk-54MMVNPT.js +1 -0
  137. package/dist/standalone/chunk-5Y3QLNWX.js +1 -0
  138. package/dist/standalone/chunk-5ZXDB6LB.js +13 -0
  139. package/dist/standalone/chunk-62EKHKTS.js +1 -0
  140. package/dist/standalone/chunk-67DKQC23.js +1 -0
  141. package/dist/standalone/chunk-6MKDYZ7A.js +1 -0
  142. package/dist/standalone/chunk-6ST5ECQA.js +1 -0
  143. package/dist/standalone/chunk-6VTLIGVX.js +1 -0
  144. package/dist/standalone/chunk-7H7LZRLP.js +1 -0
  145. package/dist/standalone/chunk-7QIFDWQV.js +1 -0
  146. package/dist/standalone/chunk-7T7UOTYK.js +1 -0
  147. package/dist/standalone/chunk-AQX2QFCN.js +1 -0
  148. package/dist/standalone/chunk-ARP36PTE.js +1 -0
  149. package/dist/standalone/chunk-AUQKJYHL.js +1 -0
  150. package/dist/standalone/chunk-AVAC26HJ.js +1 -0
  151. package/dist/standalone/chunk-AZAGCJVI.js +1 -0
  152. package/dist/standalone/chunk-BGBLQ563.js +1 -0
  153. package/dist/standalone/chunk-BL6NO3U3.js +1 -0
  154. package/dist/standalone/chunk-BRQMMGOS.js +1 -0
  155. package/dist/standalone/chunk-BUTBQGUU.js +1 -0
  156. package/dist/standalone/chunk-C3HXK3A5.js +3 -0
  157. package/dist/standalone/chunk-CFPZYHPY.js +2 -0
  158. package/dist/standalone/chunk-CT6ZDXLL.js +1 -0
  159. package/dist/standalone/chunk-CTNB2KIA.js +1 -0
  160. package/dist/standalone/chunk-D3HXVA33.js +1 -0
  161. package/dist/standalone/chunk-DG7YINFM.js +1 -0
  162. package/dist/standalone/chunk-DMCYISRF.js +1 -0
  163. package/dist/standalone/chunk-E7TB4USI.js +1 -0
  164. package/dist/standalone/chunk-EQZTSISX.js +1 -0
  165. package/dist/standalone/chunk-ESVP44Y3.js +1 -0
  166. package/dist/standalone/chunk-FURI47Z2.js +1 -0
  167. package/dist/standalone/chunk-FW75RYZU.js +1 -0
  168. package/dist/standalone/chunk-FXCBF4XT.js +1 -0
  169. package/dist/standalone/chunk-GKSRVABT.js +1 -0
  170. package/dist/standalone/chunk-GMR677FL.js +1 -0
  171. package/dist/standalone/chunk-GRL5MG3Z.js +1 -0
  172. package/dist/standalone/chunk-GSKOAKQ2.js +1 -0
  173. package/dist/standalone/chunk-HPFLBYRI.js +1 -0
  174. package/dist/standalone/chunk-I6A5C46N.js +1 -0
  175. package/dist/standalone/chunk-IAKPXGTQ.js +8 -0
  176. package/dist/standalone/chunk-IC4L6G56.js +1 -0
  177. package/dist/standalone/chunk-IC64YIX5.js +1 -0
  178. package/dist/standalone/chunk-ILNELDFC.js +1 -0
  179. package/dist/standalone/chunk-IVFHIQOT.js +1 -0
  180. package/dist/standalone/chunk-JFW3YNVQ.js +1 -0
  181. package/dist/standalone/chunk-JN2Y24PY.js +1 -0
  182. package/dist/standalone/chunk-KUVMORDQ.js +1 -0
  183. package/dist/standalone/chunk-LAHYLAT4.js +1 -0
  184. package/dist/standalone/chunk-LEDWUPXM.js +1 -0
  185. package/dist/standalone/chunk-LJIFMW67.js +1 -0
  186. package/dist/standalone/chunk-LJISXTZJ.js +1 -0
  187. package/dist/standalone/chunk-LQAKPCFX.js +1 -0
  188. package/dist/standalone/chunk-MHAXZQVO.js +1 -0
  189. package/dist/standalone/chunk-MIQTKZAR.js +1 -0
  190. package/dist/standalone/chunk-MV4A2PAK.js +1 -0
  191. package/dist/standalone/chunk-OG2AMGOC.js +1 -0
  192. package/dist/standalone/chunk-OG4N2XHD.js +19 -0
  193. package/dist/standalone/chunk-PB7FNRDB.js +1 -0
  194. package/dist/standalone/chunk-PGC523I2.js +1 -0
  195. package/dist/standalone/chunk-PM37X2V3.js +1 -0
  196. package/dist/standalone/chunk-QBWRC5YX.js +1 -0
  197. package/dist/standalone/chunk-QLQADHFE.js +1 -0
  198. package/dist/standalone/chunk-QP7IQOKF.js +1 -0
  199. package/dist/standalone/chunk-QV6KV4SD.js +1 -0
  200. package/dist/standalone/chunk-QWBRD6PX.js +1 -0
  201. package/dist/standalone/chunk-QWGT25SE.js +1 -0
  202. package/dist/standalone/chunk-QXXIJAD5.js +1 -0
  203. package/dist/standalone/chunk-QYIOW7CD.js +4 -0
  204. package/dist/standalone/chunk-S3DWUXGY.js +62 -0
  205. package/dist/standalone/chunk-S4ILMYP5.js +4 -0
  206. package/dist/standalone/chunk-SD4BERSA.js +1 -0
  207. package/dist/standalone/chunk-SF4MF2FT.js +1 -0
  208. package/dist/standalone/chunk-SFDOII3B.js +1 -0
  209. package/dist/standalone/chunk-SHMNA6UL.js +1 -0
  210. package/dist/standalone/chunk-SMIESS7P.js +1 -0
  211. package/dist/standalone/chunk-SP5SBO2W.js +3 -0
  212. package/dist/standalone/chunk-T6OAYQTX.js +1 -0
  213. package/dist/standalone/chunk-T6VMSOBB.js +1 -0
  214. package/dist/standalone/chunk-TBBJPPZ3.js +2 -0
  215. package/dist/standalone/chunk-THIXMMZD.js +1 -0
  216. package/dist/standalone/chunk-U6TNNM5U.js +1 -0
  217. package/dist/standalone/chunk-ULCZDGWQ.js +1 -0
  218. package/dist/standalone/chunk-UU2QJMGJ.js +1 -0
  219. package/dist/standalone/chunk-UZERI5YC.js +1 -0
  220. package/dist/standalone/chunk-V2U5CL3S.js +11 -0
  221. package/dist/standalone/chunk-V53KNYRN.js +1 -0
  222. package/dist/standalone/chunk-VDW32UET.js +1 -0
  223. package/dist/standalone/chunk-VFQDHG7I.js +4 -0
  224. package/dist/standalone/chunk-WB5IUUUU.js +1 -0
  225. package/dist/standalone/chunk-WLZ7YPBH.js +6 -0
  226. package/dist/standalone/chunk-X665E2HU.js +1 -0
  227. package/dist/standalone/chunk-XBDKZZ67.js +1 -0
  228. package/dist/standalone/chunk-XF2B7P5A.js +1 -0
  229. package/dist/standalone/chunk-XNGYYOLS.js +14 -0
  230. package/dist/standalone/chunk-XQCVZAGU.js +1 -0
  231. package/dist/standalone/chunk-XR7RBXKA.js +1 -0
  232. package/dist/standalone/chunk-XXQUMVWH.js +1 -0
  233. package/dist/standalone/chunk-XZSGE5ST.js +1 -0
  234. package/dist/standalone/chunk-Y7JXGNXD.js +1 -0
  235. package/dist/standalone/chunk-YOUKADZH.js +1 -0
  236. package/dist/standalone/chunk-YU5CI2FD.js +6 -0
  237. package/dist/standalone/chunk-Z7G74IH4.js +1 -0
  238. package/dist/standalone/chunk-ZJGP6EKR.js +1 -0
  239. package/dist/standalone/chunk-ZPLWCC4I.js +1 -0
  240. package/dist/standalone/studio.js +9 -356
  241. package/dist/styles.css +2 -2
  242. package/package.json +16 -14
  243. package/dist/packem_shared/ADMIN_FUNCTIONS-DjXgvJb6.js +0 -46
  244. package/dist/packem_shared/ApiDocsPanel-yVSGHK3H.js +0 -842
  245. package/dist/packem_shared/ApiReferencePanel-1vubqG5s.js +0 -229
  246. package/dist/packem_shared/ApiTab-rwttyQ1-.js +0 -251
  247. package/dist/packem_shared/AuditPanel-BqXZAsu_.js +0 -212
  248. package/dist/packem_shared/CommandPalette-BtgkBzZI.js +0 -373
  249. package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
  250. package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
  251. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
  252. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
  253. package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
  254. package/dist/packem_shared/DataBrowser-BtT2NYcR.js +0 -4542
  255. package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
  256. package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
  257. package/dist/packem_shared/ExportImportPanel-Dq6rj0tI.js +0 -193
  258. package/dist/packem_shared/FileBrowser-0pCpdKPE.js +0 -2932
  259. package/dist/packem_shared/FunctionRunner-7NH3KcTg.js +0 -343
  260. package/dist/packem_shared/FunctionStatsPanel-Cn_EBpDy.js +0 -432
  261. package/dist/packem_shared/GlobalDataBrowser-BTEmGrph.js +0 -318
  262. package/dist/packem_shared/HealthPanel-CQ4LzVET.js +0 -640
  263. package/dist/packem_shared/HomePanel-CP0lN1eF.js +0 -1273
  264. package/dist/packem_shared/InsightsPanel-B1BaHaPL.js +0 -431
  265. package/dist/packem_shared/LogsPanel-C3W0mabf.js +0 -839
  266. package/dist/packem_shared/MailPanel-DozizrvV.js +0 -447
  267. package/dist/packem_shared/MetricsPanel-CujtUfpl.js +0 -1625
  268. package/dist/packem_shared/MigrationsPanel-RX5qIFSr.js +0 -246
  269. package/dist/packem_shared/OpenRpcReferencePanel-vbcYbv3V.js +0 -191
  270. package/dist/packem_shared/PitrPanel-LJGNP_IX.js +0 -252
  271. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
  272. package/dist/packem_shared/ScheduledJobs-CabfKbyM.js +0 -159
  273. package/dist/packem_shared/SchemaViewer-Bam6ylvw.js +0 -2512
  274. package/dist/packem_shared/SecurityAdvisorPanel-Bn2yq05G.js +0 -79
  275. package/dist/packem_shared/SettingsPanel-CBXQpYQA.js +0 -176
  276. package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
  277. package/dist/packem_shared/SqlEditorPanel-D5wMIxcg.js +0 -13
  278. package/dist/packem_shared/Studio-CccqZ-J1.js +0 -33
  279. package/dist/packem_shared/StudioApp-CQbULfaH.js +0 -657
  280. package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
  281. package/dist/packem_shared/TableEditor-Df_5NPaF.js +0 -371
  282. package/dist/packem_shared/advisor-view-CGcfMiPq.js +0 -159
  283. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
  284. package/dist/packem_shared/app.d-Nbhpihxv.d.ts +0 -300
  285. package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
  286. package/dist/packem_shared/bar-chart-CzJAgqkp.js +0 -3245
  287. package/dist/packem_shared/button-BhsN2uZH.js +0 -49
  288. package/dist/packem_shared/card-DURq3ElK.js +0 -175
  289. package/dist/packem_shared/cf-links-2cktDedA.js +0 -8
  290. package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
  291. package/dist/packem_shared/data-grid-B5CaV3wS.js +0 -183
  292. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
  293. package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
  294. package/dist/packem_shared/grid-features-CzUfqgsM.js +0 -840
  295. package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
  296. package/dist/packem_shared/internal-rXJEAhXS.js +0 -68
  297. package/dist/packem_shared/label-D8ykjn5J.js +0 -46
  298. package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
  299. package/dist/packem_shared/reference-view-B4E49Lip.js +0 -2180
  300. package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
  301. package/dist/packem_shared/sparkline-10dG-_f0.js +0 -93
  302. package/dist/packem_shared/sql-editor-panel-Smfl_FDF.js +0 -2562
  303. package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
  304. package/dist/packem_shared/studio-D93XGB-i.js +0 -10413
  305. package/dist/packem_shared/table-_RzNvy3R.js +0 -246
  306. package/dist/packem_shared/table-list-sidebar-Bg7uzbvC.js +0 -832
  307. package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
  308. package/dist/packem_shared/use-live-admin-Dq6g3daN.js +0 -73
  309. package/dist/packem_shared/use-live-shard-seed-Cuk3dnH0.js +0 -76
  310. package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
  311. package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
  312. package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
@@ -0,0 +1 @@
1
+ import{m as u,n as d}from"./chunk-S3DWUXGY.js";import"./chunk-4UOFSGUS.js";import"./chunk-ILNELDFC.js";import"./chunk-T6VMSOBB.js";import"./chunk-7QIFDWQV.js";import"./chunk-XNGYYOLS.js";import{a as c,e as f,g as p,h as y}from"./chunk-3XIESWL4.js";var h=f(p(),1);var n=f(y(),1);var b={value:{colors:{dark:["var(--foreground)"],light:["var(--foreground)"]},label:""}},_=c(o=>{let e=(0,h.c)(6),{data:i}=o,a,r;if(e[0]!==i){r=Symbol.for("react.early_return_sentinel");e:{let m=i.slice(-16);if(m.length<3){r=null;break e}a=m.map(g)}e[0]=i,e[1]=a,e[2]=r}else a=e[1],r=e[2];if(r!==Symbol.for("react.early_return_sentinel"))return r;let s=a,t;e[3]===Symbol.for("react.memo_cache_sentinel")?(t=(0,n.jsx)(d,{dataKey:"value"}),e[3]=t):t=e[3];let l;return e[4]!==s?(l=(0,n.jsx)("div",{"aria-hidden":"true",className:"h-8 w-28",children:(0,n.jsx)(u,{animationType:"none",barCategoryGap:1,className:"h-8 w-full",config:b,data:s,children:t})}),e[4]=s,e[5]=l):l=e[5],l},"b");function g(o,e){return{index:e,value:o}}c(g,"h");export{_ as Sparkline};
@@ -0,0 +1 @@
1
+ import{a as te}from"./chunk-V53KNYRN.js";import{R as Z}from"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import{c as I}from"./chunk-FXCBF4XT.js";import"./chunk-2OUPA2WJ.js";import"./chunk-6ST5ECQA.js";import{a as K}from"./chunk-VDW32UET.js";import{c as ee}from"./chunk-SHMNA6UL.js";import{f as M}from"./chunk-V2U5CL3S.js";import"./chunk-XBDKZZ67.js";import{a as q}from"./chunk-XQCVZAGU.js";import{a as z,b as D,c as F,d as h,e as o,f as i}from"./chunk-MIQTKZAR.js";import{a as T,e as j}from"./chunk-UZERI5YC.js";import{d as H,f as Q,g as V,h as W,m as $}from"./chunk-OG4N2XHD.js";import"./chunk-XNGYYOLS.js";import{a as n,e as Y,f as ne,h as le}from"./chunk-3XIESWL4.js";var c=Y(ne(),1);var e=Y(le(),1);var oe=["queued","running","paused","waiting","complete","errored","terminated"],ie=["pause","resume","terminate"],de="WORKFLOWS_NOT_CONFIGURED",ce=n(l=>typeof l=="object"&&l!==null&&l.code===de,"ie"),me=n(l=>{let r=l.error??l.output;if(r===void 0)return"\u2014";try{return JSON.stringify(r)}catch{return"(unserializable)"}},"de"),ue=n(({loadDetail:l,loadInstances:r,readOnly:N,runAction:R,workflowName:g})=>{let A=M(),s=H(),[p,k]=(0,c.useState)(null),[S,O]=(0,c.useState)(null),[v,_]=(0,c.useState)(""),[b,f]=(0,c.useState)(null),[J,C]=(0,c.useState)(!1),[L,P]=(0,c.useState)(null),w=l??(a=>A.getWorkflowInstance(a)),x=N?void 0:R??(r===void 0?a=>A.setWorkflowInstanceStatus(a):void 0),E=n(async()=>{f(null),C(!1);let a=v===""?void 0:v;try{if(r===void 0){let d=await A.listWorkflowInstances({name:g,status:a});if(d.configured===!1){k(null),C(!0);return}k(d.instances);return}k(await r({name:g,status:a}))}catch(d){k(null),ce(d)?C(!0):f(W(d))}},"O");(0,c.useEffect)(()=>{O(null),$(E())},[g,v]);let U=n(async a=>{f(null);try{O(await w({id:a,name:g}))}catch(d){f(W(d))}},"D"),B=n(async(a,d)=>{if(x!==void 0){P(a),f(null);try{await x({action:d,id:a,name:g}),await E()}catch(G){f(W(G))}P(null)}},"K");return(0,e.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-workflow-instances",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsx)("h3",{className:"text-sm font-medium",children:s("Instance history")}),(0,e.jsxs)("select",{"aria-label":s("Filter by status"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"workflow-instances-filter",onChange:n(a=>{_(a.target.value)},"onChange"),value:v,children:[(0,e.jsx)("option",{value:"",children:s("All statuses")}),oe.map(a=>(0,e.jsx)("option",{value:a,children:a},a))]})]}),b!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"workflow-instances-error",role:"alert",children:b}),J&&(0,e.jsx)(q,{description:s("Set CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN in your .dev.vars to enable workflow instance history."),testId:"workflow-instances-unconfigured",title:s("Workflow inspection not configured")}),!J&&p!==null&&p.length===0&&(0,e.jsx)(q,{description:s("No instances match this filter for the selected workflow."),testId:"workflow-instances-empty",title:s("No instances")}),p!==null&&p.length>0&&(0,e.jsx)(T,{className:"overflow-hidden py-0",children:(0,e.jsx)(j,{className:"px-0",children:(0,e.jsxs)(z,{"data-testid":"workflow-instances-table",children:[(0,e.jsx)(D,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:s("Instance id")}),(0,e.jsx)(o,{children:s("Status")}),(0,e.jsx)(o,{children:s("Created")}),(0,e.jsx)(o,{children:s("Ended")}),(0,e.jsx)(o,{"aria-label":s("Actions")})]})}),(0,e.jsx)(F,{children:p.map(a=>(0,e.jsxs)(h,{"data-testid":`workflow-instance-${a.id}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:a.id}),(0,e.jsx)(i,{className:"font-mono text-xs",children:a.status}),(0,e.jsx)(i,{className:"text-muted-foreground tabular-nums",children:a.createdOn??"\u2014"}),(0,e.jsx)(i,{className:"text-muted-foreground tabular-nums",children:a.endedOn??"\u2014"}),(0,e.jsx)(i,{className:"text-right",children:(0,e.jsxs)("div",{className:"flex justify-end gap-1.5",children:[(0,e.jsx)(I,{"data-testid":`workflow-instance-steps-${a.id}`,onClick:n(()=>{$(U(a.id))},"onClick"),size:"sm",type:"button",variant:"outline",children:s("Steps")}),x!==void 0&&ie.map(d=>(0,e.jsx)(I,{"data-testid":`workflow-instance-${d}-${a.id}`,disabled:L===a.id,onClick:n(()=>{$(B(a.id,d))},"onClick"),size:"sm",type:"button",variant:"ghost",children:s(d)},d))]})})]},a.id))})]})})}),S!==null&&(0,e.jsx)(T,{className:"overflow-hidden py-0","data-testid":"workflow-instance-detail",children:(0,e.jsxs)(j,{className:"flex flex-col gap-2 px-4 py-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("span",{className:"font-mono text-xs",children:[s("Steps")," \xB7 ",S.id]}),(0,e.jsx)(I,{"data-testid":"workflow-instance-detail-close",onClick:n(()=>{O(null)},"onClick"),size:"xs",type:"button",variant:"ghost",children:s("Close")})]}),S.steps.length===0?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:s("This instance has no recorded steps yet.")}):(0,e.jsxs)(z,{"data-testid":"workflow-instance-steps",children:[(0,e.jsx)(D,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:s("Step")}),(0,e.jsx)(o,{children:s("Type")}),(0,e.jsx)(o,{children:s("Attempts")}),(0,e.jsx)(o,{children:s("Started")}),(0,e.jsx)(o,{children:s("Output")})]})}),(0,e.jsx)(F,{children:S.steps.map((a,d)=>(0,e.jsxs)(h,{"data-testid":`workflow-step-${String(d)}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:a.name}),(0,e.jsx)(i,{className:"text-xs text-muted-foreground",children:a.type??"\u2014"}),(0,e.jsx)(i,{className:"tabular-nums",children:a.attempts??"\u2014"}),(0,e.jsx)(i,{className:"text-muted-foreground tabular-nums",children:a.start??"\u2014"}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:me(a)})]},`${a.name}:${String(d)}`))})]})]})})]})},"ce"),fe=Q(K.createWorkflowInstance),he=Q(K.getWorkflowInstanceStatus),pe=n(l=>{if(l.error)return`${l.error.name}: ${l.error.message}`;if(l.output===void 0)return"\u2014";try{return JSON.stringify(l.output)}catch{return"(unserializable)"}},"fe"),we=n((l,r)=>l.some(N=>N.exportName===r)?r:l[0]?.exportName??"","he"),We=n(()=>{let l=M(),r=H(),{data:N,error:R}=ee(K.listWorkflows,{}),[g,A]=(0,c.useState)(""),[s,p]=(0,c.useState)(""),[k,S]=(0,c.useState)(""),[O,v]=(0,c.useState)(!1),[_,b]=(0,c.useState)(null),[f,J]=(0,c.useState)([]),[C,L]=(0,c.useState)(null),P=N!==void 0,w=Array.isArray(N?.workflows)?[...N.workflows].toSorted((t,u)=>t.exportName.localeCompare(u.exportName)):[],x=we(w,g),E=w.find(t=>t.exportName===x),U=n(t=>{J(u=>{let m=u.filter(y=>!(y.exportName===t.exportName&&y.id===t.id));return[t,...m]})},"D"),B=n(async()=>{let t=x;if(t==="")return;let u,m=k.trim();if(m!=="")try{u=JSON.parse(m)}catch{b(r("Params must be valid JSON"));return}v(!0),b(null);try{let y=s.trim(),X=await l.query(fe,{exportName:t,id:y===""?void 0:y,params:u},V(""));U({exportName:t,id:X.id,status:X.status}),p("")}catch(y){b(W(y))}v(!1)},"K"),a=n(()=>{$(B())},"a"),d=n(async(t,u)=>{L(u);try{let m=await l.query(he,{exportName:t,id:u},V(""));U({error:m.error,exportName:t,id:m.id,output:m.output,status:m.status})}catch(m){b(W(m))}L(null)},"l"),G=n(t=>{A(t.target.value)},"P"),ae=n(t=>{p(t.target.value)},"Y"),re=n(t=>{S(t.target.value)},"Z"),se=n(t=>{let{export:u,id:m}=t.currentTarget.dataset;u!==void 0&&m!==void 0&&$(d(u,m))},"ee");return(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-workflows-panel",children:[R!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"workflows-error",role:"alert",children:R}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:r("Workflows are declared in code with defineWorkflow and run as durable Cloudflare Workflows. Start an instance and observe its status below.")}),P&&w.length===0?(0,e.jsx)(q,{description:r("No defineWorkflow is declared in lunora/workflows.ts in this deployment. Add one to run a durable, multi-step workflow."),testId:"workflows-empty",title:r("No workflows defined")}):(0,e.jsx)(T,{className:"overflow-hidden py-0",children:(0,e.jsx)(j,{className:"px-0",children:(0,e.jsxs)(z,{"data-testid":"workflows-table",children:[(0,e.jsx)(D,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:r("Export")}),(0,e.jsx)(o,{children:r("Name")}),(0,e.jsx)(o,{children:r("Class")}),(0,e.jsx)(o,{children:r("Binding")})]})}),(0,e.jsx)(F,{children:w.map(t=>(0,e.jsxs)(h,{"data-testid":`workflows-row-${t.exportName}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:t.exportName}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.name}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.className}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.binding})]},t.exportName))})]})})}),w.length>0&&(0,e.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"workflows-start",children:[(0,e.jsx)("h3",{className:"text-sm font-medium",children:r("Start instance")}),_!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"workflows-start-error",role:"alert",children:_}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)("select",{"aria-label":r("Workflow"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"workflows-start-select",onChange:G,value:x,children:w.map(t=>(0,e.jsx)("option",{value:t.exportName,children:t.exportName},t.exportName))}),(0,e.jsx)(Z,{"aria-label":r("Instance id (optional)"),className:"max-w-48","data-testid":"workflows-start-id",onChange:ae,placeholder:r("Instance id (optional)"),value:s}),(0,e.jsx)(I,{"data-testid":"workflows-start-button",disabled:O||x==="",onClick:a,children:r(O?"Starting\u2026":"Start instance")})]}),(0,e.jsx)(te,{"aria-label":r("Params (JSON)"),className:"font-mono","data-testid":"workflows-start-params",onChange:re,placeholder:r("Params (JSON, optional)"),value:k})]}),f.length>0&&(0,e.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"workflows-instances",children:[(0,e.jsx)("h3",{className:"text-sm font-medium",children:r("Instances")}),(0,e.jsx)(T,{className:"overflow-hidden py-0",children:(0,e.jsx)(j,{className:"px-0",children:(0,e.jsxs)(z,{"data-testid":"workflows-instances-table",children:[(0,e.jsx)(D,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:r("Workflow")}),(0,e.jsx)(o,{children:r("Instance id")}),(0,e.jsx)(o,{children:r("Status")}),(0,e.jsx)(o,{children:r("Output")}),(0,e.jsx)(o,{})]})}),(0,e.jsx)(F,{children:f.map(t=>(0,e.jsxs)(h,{"data-testid":`workflows-instance-${t.id}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:t.exportName}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.id}),(0,e.jsx)(i,{className:"font-mono text-xs",children:t.status}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:pe(t)}),(0,e.jsx)(i,{children:(0,e.jsx)(I,{"data-export":t.exportName,"data-id":t.id,"data-testid":`workflows-instance-refresh-${t.id}`,disabled:C===t.id,onClick:se,size:"xs",variant:"outline",children:C===t.id?r("Refreshing\u2026"):r("Refresh")})})]},`${t.exportName}:${t.id}`))})]})})})]}),E!==void 0&&(0,e.jsx)(ue,{workflowName:E.name})]})},"Oe");export{We as default};
@@ -0,0 +1,19 @@
1
+ import{a,c as ee,e as fe,f as Pe}from"./chunk-3XIESWL4.js";var he=ee((de,W)=>{(function(e,r){typeof define=="function"&&define.amd?define([],r):typeof W=="object"&&W.exports?W.exports=r():e.moo=r()})(de,function(){"use strict";var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,t=typeof new RegExp().sticky=="boolean";function s(n){return n&&r.call(n)==="[object RegExp]"}a(s,"isRegExp");function i(n){return n&&typeof n=="object"&&!s(n)&&!Array.isArray(n)}a(i,"isObject");function l(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,function(o){return o==="-"?"\\x2d":"\\"+o})}a(l,"reEscape");function c(n){var o=new RegExp("|"+n);return o.exec("").length-1}a(c,"reGroups");function h(n){return"("+n+")"}a(h,"reCapture");function v(n){if(!n.length)return"(?!)";var o=n.map(function(u){return"(?:"+u+")"}).join("|");return"(?:"+o+")"}a(v,"reUnion");function S(n){if(typeof n=="string")return"(?:"+l(n)+")";if(s(n)){if(n.ignoreCase)throw new Error("RegExp /i flag not allowed");if(n.global)throw new Error("RegExp /g flag is implied");if(n.sticky)throw new Error("RegExp /y flag is implied");if(n.multiline)throw new Error("RegExp /m flag is implied");return n.source}else throw new Error("Not a pattern: "+n)}a(S,"regexpOrLiteral");function k(n,o){return n.length>o?n:Array(o-n.length+1).join(" ")+n}a(k,"pad");function M(n,o){for(var u=n.length,f=0;;){var g=n.lastIndexOf(`
2
+ `,u-1);if(g===-1||(f++,u=g,f===o)||u===0)break}var d=f<o?0:u+1;return n.substring(d).split(`
3
+ `)}a(M,"lastNLines");function K(n){for(var o=Object.getOwnPropertyNames(n),u=[],f=0;f<o.length;f++){var g=o[f],d=n[g],y=[].concat(d);if(g==="include"){for(var w=0;w<y.length;w++)u.push({include:y[w]});continue}var m=[];y.forEach(function(p){i(p)?(m.length&&u.push($(g,m)),u.push($(g,p)),m=[]):m.push(p)}),m.length&&u.push($(g,m))}return u}a(K,"objectToRules");function O(n){for(var o=[],u=0;u<n.length;u++){var f=n[u];if(f.include){for(var g=[].concat(f.include),d=0;d<g.length;d++)o.push({include:g[d]});continue}if(!f.type)throw new Error("Rule has no type: "+JSON.stringify(f));o.push($(f.type,f))}return o}a(O,"arrayToRules");function $(n,o){if(i(o)||(o={match:o}),o.include)throw new Error("Matching rules cannot also include states");var u={defaultType:n,lineBreaks:!!o.error||!!o.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var f in o)e.call(o,f)&&(u[f]=o[f]);if(typeof u.type=="string"&&n!==u.type)throw new Error("Type transform cannot be a string (type '"+u.type+"' for token '"+n+"')");var g=u.match;return u.match=Array.isArray(g)?g:g?[g]:[],u.match.sort(function(d,y){return s(d)&&s(y)?0:s(y)?-1:s(d)?1:y.length-d.length}),u}a($,"ruleOptions");function D(n){return Array.isArray(n)?O(n):K(n)}a(D,"toRules");var N=$("error",{lineBreaks:!0,shouldThrow:!0});function F(n,o){for(var u=null,f=Object.create(null),g=!0,d=null,y=[],w=[],m=0;m<n.length;m++)n[m].fallback&&(g=!1);for(var m=0;m<n.length;m++){var p=n[m];if(p.include)throw new Error("Inheritance is not allowed in stateless lexers");if(p.error||p.fallback){if(u)throw!p.fallback==!u.fallback?new Error("Multiple "+(p.fallback?"fallback":"error")+" rules not allowed (for token '"+p.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+p.defaultType+"')");u=p}var _=p.match.slice();if(g)for(;_.length&&typeof _[0]=="string"&&_[0].length===1;){var q=_.shift();f[q.charCodeAt(0)]=p}if(p.pop||p.push||p.next){if(!o)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+p.defaultType+"')");if(p.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+p.defaultType+"')")}if(_.length!==0){g=!1,y.push(p);for(var C=0;C<_.length;C++){var P=_[C];if(s(P)){if(d===null)d=P.unicode;else if(d!==P.unicode&&p.fallback===!1)throw new Error("If one rule is /u then all must be")}}var I=v(_.map(S)),T=new RegExp(I);if(T.test(""))throw new Error("RegExp matches empty string: "+T);var U=c(I);if(U>0)throw new Error("RegExp has capture groups: "+T+`
4
+ Use (?: \u2026 ) instead`);if(!p.lineBreaks&&T.test(`
5
+ `))throw new Error("Rule should declare lineBreaks: "+T);w.push(h(I))}}var R=u&&u.fallback,L=t&&!R?"ym":"gm",H=t||R?"":"|";d===!0&&(L+="u");var Ce=new RegExp(v(w)+H,L);return{regexp:Ce,groups:y,fast:f,error:u||N}}a(F,"compileRules");function V(n){var o=F(D(n));return new b({start:o},"start")}a(V,"compile");function ue(n,o,u){var f=n&&(n.push||n.next);if(f&&!u[f])throw new Error("Missing state '"+f+"' (in token '"+n.defaultType+"' of state '"+o+"')");if(n&&n.pop&&+n.pop!=1)throw new Error("pop must be 1 (in token '"+n.defaultType+"' of state '"+o+"')")}a(ue,"checkStateGroup");function $e(n,o){var u=n.$all?D(n.$all):[];delete n.$all;var f=Object.getOwnPropertyNames(n);o||(o=f[0]);for(var g=Object.create(null),d=0;d<f.length;d++){var y=f[d];g[y]=D(n[y]).concat(u)}for(var d=0;d<f.length;d++)for(var y=f[d],w=g[y],m=Object.create(null),p=0;p<w.length;p++){var _=w[p];if(_.include){var q=[p,1];if(_.include!==y&&!m[_.include]){m[_.include]=!0;var C=g[_.include];if(!C)throw new Error("Cannot include nonexistent state '"+_.include+"' (in state '"+y+"')");for(var P=0;P<C.length;P++){var I=C[P];w.indexOf(I)===-1&&q.push(I)}}w.splice.apply(w,q),p--}}for(var T=Object.create(null),d=0;d<f.length;d++){var y=f[d];T[y]=F(g[y],!0)}for(var d=0;d<f.length;d++){for(var U=f[d],R=T[U],L=R.groups,p=0;p<L.length;p++)ue(L[p],U,T);for(var H=Object.getOwnPropertyNames(R.fast),p=0;p<H.length;p++)ue(R.fast[H[p]],U,T)}return new b(T,o)}a($e,"compileStates");function Be(n){for(var o=typeof Map<"u",u=o?new Map:Object.create(null),f=Object.getOwnPropertyNames(n),g=0;g<f.length;g++){var d=f[g],y=n[d],w=Array.isArray(y)?y:[y];w.forEach(function(m){if(typeof m!="string")throw new Error("keyword must be string (in keyword '"+d+"')");o?u.set(m,d):u[m]=d})}return function(m){return o?u.get(m):u[m]}}a(Be,"keywordTransform");var b=a(function(n,o){this.startState=o,this.states=n,this.buffer="",this.stack=[],this.reset()},"Lexer");b.prototype.reset=function(n,o){return this.buffer=n||"",this.index=0,this.line=o?o.line:1,this.col=o?o.col:1,this.queuedToken=o?o.queuedToken:null,this.queuedText=o?o.queuedText:"",this.queuedThrow=o?o.queuedThrow:null,this.setState(o?o.state:this.startState),this.stack=o&&o.stack?o.stack.slice():[],this},b.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},b.prototype.setState=function(n){if(!(!n||this.state===n)){this.state=n;var o=this.states[n];this.groups=o.groups,this.error=o.error,this.re=o.regexp,this.fast=o.fast}},b.prototype.popState=function(){this.setState(this.stack.pop())},b.prototype.pushState=function(n){this.stack.push(this.state),this.setState(n)};var De=t?function(n,o){return n.exec(o)}:function(n,o){var u=n.exec(o);return u[0].length===0?null:u};b.prototype._getGroup=function(n){for(var o=this.groups.length,u=0;u<o;u++)if(n[u+1]!==void 0)return this.groups[u];throw new Error("Cannot find token type for matched text")};function qe(){return this.value}if(a(qe,"tokenToString"),b.prototype.next=function(){var n=this.index;if(this.queuedGroup){var o=this._token(this.queuedGroup,this.queuedText,n);return this.queuedGroup=null,this.queuedText="",o}var u=this.buffer;if(n!==u.length){var y=this.fast[u.charCodeAt(n)];if(y)return this._token(y,u.charAt(n),n);var f=this.re;f.lastIndex=n;var g=De(f,u),d=this.error;if(g==null)return this._token(d,u.slice(n,u.length),n);var y=this._getGroup(g),w=g[0];return d.fallback&&g.index!==n?(this.queuedGroup=y,this.queuedText=w,this._token(d,u.slice(n,g.index),n)):this._token(y,w,n)}},b.prototype._token=function(n,o,u){var f=0;if(n.lineBreaks){var g=/\n/g,d=1;if(o===`
6
+ `)f=1;else for(;g.exec(o);)f++,d=g.lastIndex}var y={type:typeof n.type=="function"&&n.type(o)||n.defaultType,value:typeof n.value=="function"?n.value(o):o,text:o,toString:qe,offset:u,lineBreaks:f,line:this.line,col:this.col},w=o.length;if(this.index+=w,this.line+=f,f!==0?this.col=w-d+1:this.col+=w,n.shouldThrow){var m=new Error(this.formatError(y,"invalid syntax"));throw m}return n.pop?this.popState():n.push?this.pushState(n.push):n.next&&this.setState(n.next),y},typeof Symbol<"u"&&Symbol.iterator){var X=a(function(n){this.lexer=n},"LexerIterator");X.prototype.next=function(){var n=this.lexer.next();return{value:n,done:!n}},X.prototype[Symbol.iterator]=function(){return this},b.prototype[Symbol.iterator]=function(){return new X(this)}}return b.prototype.formatError=function(n,o){if(n==null)var u=this.buffer.slice(this.index),n={text:u,offset:this.index,lineBreaks:u.indexOf(`
7
+ `)===-1?0:1,line:this.line,col:this.col};var f=2,g=Math.max(n.line-f,1),d=n.line+f,y=String(d).length,w=M(this.buffer,this.line-n.line+f+1).slice(0,5),m=[];m.push(o+" at line "+n.line+" col "+n.col+":"),m.push("");for(var p=0;p<w.length;p++){var _=w[p],q=g+p;m.push(k(String(q),y)+" "+_),q===n.line&&m.push(k("",y+n.col+1)+"^")}return m.join(`
8
+ `)},b.prototype.clone=function(){return new b(this.states,this.state)},b.prototype.has=function(n){return!0},{compile:V,states:$e,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:Be}})});var pe=ee(A=>{"use strict";var Ne=A&&A.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:!0});A.lexer=A.states=void 0;var Fe=Ne(he());A.states={body:{doubleapos:{match:"''",value:a(()=>"'","value")},quoted:{lineBreaks:!0,match:/'[{}#](?:[^']|'')*'(?!')/u,value:a(e=>e.slice(1,-1).replace(/''/g,"'"),"value")},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:"arg",value:a(e=>e.substring(1).trim(),"value")},octothorpe:"#",end:{match:"}",pop:1},content:{lineBreaks:!0,match:/[^][^{}#']*/u}},arg:{select:{lineBreaks:!0,match:/,\s*(?:plural|select|selectordinal)\s*,\s*/u,next:"select",value:a(e=>e.split(",")[1].trim(),"value")},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:"body",value:a(e=>e.split(",")[1].trim(),"value")},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:a(e=>e.substring(1).trim(),"value")},end:{match:"}",pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:a(e=>e.split(":")[1].trim(),"value")},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:"body",value:a(e=>e.substring(0,e.indexOf("{")).trim(),"value")},end:{match:/\s*\}/u,pop:1}}};A.lexer=Fe.default.states(A.states)});var me=ee(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.ParseError=void 0;z.parse=Ue;var ye=pe(),j=a(e=>({offset:e.offset,line:e.line,col:e.col,text:e.text,lineBreaks:e.lineBreaks}),"getContext"),te=a(e=>e==="plural"||e==="select"||e==="selectordinal","isSelectType");function Ie(e,r){let t="",s="";for(let l of r){let c=l.ctx.text;switch(s+=c,l.type){case"content":t+=l.value;break;case"argument":case"function":case"octothorpe":t+=c;break;default:throw new x(e,`Unsupported part in strict mode function arg style: ${c}`)}}return[{type:"content",value:t.trim(),ctx:Object.assign({},r[0].ctx,{text:s})}]}a(Ie,"strictArgStyleParam");var Re=["number","date","time","spellout","ordinal","duration"],ge=["zero","one","two","few","many","other"],x=class extends Error{static{a(this,"ParseError")}constructor(r,t){super(ye.lexer.formatError(r,t))}};z.ParseError=x;var re=class{static{a(this,"Parser")}constructor(r,t){var s,i,l,c;this.lexer=ye.lexer.reset(r),this.cardinalKeys=(s=t?.cardinal)!==null&&s!==void 0?s:ge,this.ordinalKeys=(i=t?.ordinal)!==null&&i!==void 0?i:ge,this.strict=(l=t?.strict)!==null&&l!==void 0?l:!1,this.strictPluralKeys=(c=t?.strictPluralKeys)!==null&&c!==void 0?c:!0}parse(){return this.parseBody(!1,!0)}checkSelectKey(r,t,s){if(s[0]==="="){if(t==="select")throw new x(r,`The case ${s} is not valid with select`)}else if(t!=="select"){let i=t==="plural"?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&i.length>0&&!i.includes(s)){let l=`The ${t} case ${s} is not valid in this locale`;throw new x(r,l)}}}parseSelect({value:r},t,s,i){let l={type:i,arg:r,cases:[],ctx:s};i==="plural"||i==="selectordinal"?t=!0:this.strict&&(t=!1);for(let c of this.lexer)switch(c.type){case"offset":if(i==="select")throw new x(c,"Unexpected plural offset for select");if(l.cases.length>0)throw new x(c,"Plural offset must be set before cases");l.pluralOffset=Number(c.value),s.text+=c.text,s.lineBreaks+=c.lineBreaks;break;case"case":{this.checkSelectKey(c,i,c.value),l.cases.push({key:c.value,tokens:this.parseBody(t),ctx:j(c)});break}case"end":return l;default:throw new x(c,`Unexpected lexer token: ${c.type}`)}throw new x(null,"Unexpected message end")}parseArgToken(r,t){let s=j(r),i=this.lexer.next();if(!i)throw new x(null,"Unexpected message end");if(s.text+=i.text,s.lineBreaks+=i.lineBreaks,this.strict&&(i.type==="func-simple"||i.type==="func-args")&&!Re.includes(i.value)){let l=`Invalid strict mode function arg type: ${i.value}`;throw new x(r,l)}switch(i.type){case"end":return{type:"argument",arg:r.value,ctx:s};case"func-simple":{let l=this.lexer.next();if(!l)throw new x(null,"Unexpected message end");if(l.type!=="end")throw new x(l,`Unexpected lexer token: ${l.type}`);if(s.text+=l.text,te(i.value.toLowerCase()))throw new x(i,`Invalid type identifier: ${i.value}`);return{type:"function",arg:r.value,key:i.value,ctx:s}}case"func-args":{if(te(i.value.toLowerCase())){let c=`Invalid type identifier: ${i.value}`;throw new x(i,c)}let l=this.parseBody(this.strict?!1:t);return this.strict&&l.length>0&&(l=Ie(r,l)),{type:"function",arg:r.value,key:i.value,param:l,ctx:s}}case"select":if(te(i.value))return this.parseSelect(r,t,s,i.value);throw new x(i,`Unexpected select type ${i.value}`);default:throw new x(i,`Unexpected lexer token: ${i.type}`)}}parseBody(r,t){let s=[],i=null;for(let l of this.lexer)if(l.type==="argument")i&&(i=null),s.push(this.parseArgToken(l,r));else if(l.type==="octothorpe"&&r)i&&(i=null),s.push({type:"octothorpe",ctx:j(l)});else{if(l.type==="end"&&!t)return s;{let c=l.value;if(!r&&l.type==="quoted"&&c[0]==="#"){if(c.includes("{")){let h=`Unsupported escape pattern: ${c}`;throw new x(l,h)}c=l.text}i?(i.value+=c,i.ctx.text+=l.text,i.ctx.lineBreaks+=l.lineBreaks):(i={type:"content",value:c,ctx:j(l)},s.push(i))}}if(t)return s;throw new x(null,"Unexpected message end")}};function Ue(e,r={}){return new re(e,r).parse()}a(Ue,"parse")});var xe=fe(me(),1);var E=class extends Error{static{a(this,"DateFormatError")}constructor(r,t,s){super(r),this.token=t,this.type=s||"error"}},ve=a(e=>e<4?"short":e===4?"long":"narrow","alpha"),G=a(e=>e%2===0?"2-digit":"numeric","numeric");function Le(e,r){switch(e.char){case"y":return{year:G(e.width)};case"r":return{calendar:"gregory",year:"numeric"};default:return r(`${e.desc} is not supported; falling back to year:numeric`,E.WARNING),{year:"numeric"}}}a(Le,"yearOptions");function ze(e,r){switch(e.width){case 1:return"numeric";case 2:return"2-digit";case 3:return"short";case 4:return"long";case 5:return"narrow";default:r(`${e.desc} is not supported with width ${e.width}`);return}}a(ze,"monthStyle");function Ge(e,r){let{char:t,desc:s,width:i}=e;if(t==="d")return G(i);r(`${s} is not supported`)}a(Ge,"dayStyle");function Ke(e,r){let{char:t,desc:s,width:i}=e;if((t==="c"||t==="e")&&i<3){let l=`Numeric value is not supported for ${s}; falling back to weekday:short`;r(l,E.WARNING)}return ve(i)}a(Ke,"weekdayStyle");function He(e){let r=G(e.width),t;switch(e.char){case"h":t="h12";break;case"H":t="h23";break;case"k":t="h24";break;case"K":t="h11";break}return t?{hour:r,hourCycle:t}:{hour:r}}a(He,"hourOptions");function We(e,r){let{char:t,desc:s,width:i}=e;switch(t){case"v":case"z":return i===4?"long":"short";case"V":if(i===4)return"long";r(`${s} is not supported with width ${i}`);return;case"X":r(`${s} is not supported`);return}return"short"}a(We,"timeZoneNameStyle");function je(e,r){switch(e.field){case"era":return{era:ve(e.width)};case"year":return Le(e,r);case"month":return{month:ze(e,r)};case"day":return{day:Ge(e,r)};case"weekday":return{weekday:Ke(e,r)};case"period":return;case"hour":return He(e);case"min":return{minute:G(e.width)};case"sec":return{second:G(e.width)};case"tz":return{timeZoneName:We(e,r)};case"quarter":case"week":case"sec-frac":case"ms":r(`${e.desc} is not supported`)}}a(je,"compileOptions");function ne(e,r,t=s=>{throw s}){let s={timeZone:r},i=[];for(let l of e){let{error:c,field:h,str:v}=l;if(c){let k=new E(c.message,l);k.stack=c.stack,t(k)}if(v){let k=`Ignoring string part: ${v}`;t(new E(k,l,E.WARNING))}h&&(i.indexOf(h)===-1?i.push(h):t(new E(`Duplicate ${h} token`,l)));let S=je(l,(k,M)=>t(new E(k,l,M)));S&&Object.assign(s,S)}return s}a(ne,"getDateFormatOptions");var Ze={G:{field:"era",desc:"Era"},y:{field:"year",desc:"Year"},Y:{field:"year",desc:'Year of "Week of Year"'},u:{field:"year",desc:"Extended year"},U:{field:"year",desc:"Cyclic year name"},r:{field:"year",desc:"Related Gregorian year"},Q:{field:"quarter",desc:"Quarter"},q:{field:"quarter",desc:"Stand-alone quarter"},M:{field:"month",desc:"Month in year"},L:{field:"month",desc:"Stand-alone month in year"},w:{field:"week",desc:"Week of year"},W:{field:"week",desc:"Week of month"},d:{field:"day",desc:"Day in month"},D:{field:"day",desc:"Day of year"},F:{field:"day",desc:"Day of week in month"},g:{field:"day",desc:"Modified julian day"},E:{field:"weekday",desc:"Day of week"},e:{field:"weekday",desc:"Local day of week"},c:{field:"weekday",desc:"Stand-alone local day of week"},a:{field:"period",desc:"AM/PM marker"},b:{field:"period",desc:"AM/PM/noon/midnight marker"},B:{field:"period",desc:"Flexible day period"},h:{field:"hour",desc:"Hour in AM/PM (1~12)"},H:{field:"hour",desc:"Hour in day (0~23)"},k:{field:"hour",desc:"Hour in day (1~24)"},K:{field:"hour",desc:"Hour in AM/PM (0~11)"},j:{field:"hour",desc:"Hour in preferred cycle"},J:{field:"hour",desc:"Hour in preferred cycle without marker"},C:{field:"hour",desc:"Hour in preferred cycle with flexible marker"},m:{field:"min",desc:"Minute in hour"},s:{field:"sec",desc:"Second in minute"},S:{field:"sec-frac",desc:"Fractional second"},A:{field:"ms",desc:"Milliseconds in day"},z:{field:"tz",desc:"Time Zone: specific non-location"},Z:{field:"tz",desc:"Time Zone"},O:{field:"tz",desc:"Time Zone: localized"},v:{field:"tz",desc:"Time Zone: generic non-location"},V:{field:"tz",desc:"Time Zone: ID"},X:{field:"tz",desc:"Time Zone: ISO8601 with Z"},x:{field:"tz",desc:"Time Zone: ISO8601"}},we=a(e=>e>="A"&&e<="Z"||e>="a"&&e<="z","isLetter");function Je(e,r){let t=e[r],s=1;for(;e[++r]===t;)++s;let i=Ze[t];if(!i){let l=`The letter ${t} is not a valid field identifier`;return{char:t,error:new Error(l),width:s}}return{char:t,field:i.field,desc:i.desc,width:s}}a(Je,"readFieldToken");function Ye(e,r){let t=e[++r],s=2;if(t==="'")return{char:"'",str:t,width:s};for(;;){let i=e[++r];if(++s,i===void 0){let l=`Unterminated quoted literal in pattern: ${t||e}`;return{char:"'",error:new Error(l),str:t,width:s}}else if(i==="'"){if(e[++r]!=="'")return{char:"'",str:t,width:s};++s}t+=i}}a(Ye,"readQuotedToken");function Qe(e,r){let t=e[r];if(!t)return null;if(we(t))return Je(e,r);if(t==="'")return Ye(e,r);let s=t,i=1;for(;;){let l=e[++r];if(!l||we(l)||l==="'")return{char:t,str:s,width:i};s+=l,i+=1}}a(Qe,"readToken");function Z(e){let r=[],t=0;for(;;){let s=Qe(e,t);if(!s)return r;r.push(s),t+=s.width}}a(Z,"parseDateTokens");function _e(e,r){return e.filter(t=>t.type!=="content").length?e.map(t=>{if(t.type==="content")return r(t.value);if(t.type==="octothorpe")return"#";if(t.type==="argument")return[t.arg];if(t.type==="function"){let l=t?.param?.[0];if(t.key==="date"&&l){let c=Ve(l.value.trim(),h=>{throw new Error(`Unable to compile date expression: ${h.message}`)});return[t.arg,t.key,c]}return l?[t.arg,t.key,l.value.trim()]:[t.arg,t.key]}let s=t.pluralOffset,i={};return t.cases.forEach(({key:l,tokens:c})=>{let h=l[0]==="="?l.slice(1):l;i[h]=_e(c,r)}),[t.arg,t.type,{offset:s,...i}]}):e.map(t=>r(t.value))}a(_e,"processTokens");function Ve(e,r){if(/^::/.test(e)){let t=Z(e.substring(2));return ne(t,void 0,r)}return e}a(Ve,"compileDateExpression");function Xe(e,r=t=>t){return _e((0,xe.parse)(e),r)}a(Xe,"compileMessageOrThrow");function be(e,r=t=>t){try{return Xe(e,r)}catch(t){return console.error(`${t.message}
9
+
10
+ Message: ${e}`),[e]}}a(be,"compileMessage");var B=a(e=>typeof e=="string","isString"),et=a(e=>typeof e=="function","isFunction"),ke=new Map,Te="en";function oe(e){return[...Array.isArray(e)?e:[e],Te]}a(oe,"normalizeLocales");function le(e,r,t){let s=oe(e);t||(t="default");let i;if(typeof t=="string")switch(i={day:"numeric",month:"short",year:"numeric"},t){case"full":i.weekday="long";case"long":i.month="long";break;case"short":i.month="numeric";break}else i=t;return J(()=>Y("date",s,t),()=>new Intl.DateTimeFormat(s,i)).format(B(r)?new Date(r):r)}a(le,"date");function tt(e,r,t){let s;if(t||(t="default"),typeof t=="string")switch(s={second:"numeric",minute:"numeric",hour:"numeric"},t){case"full":case"long":s.timeZoneName="short";break;case"short":delete s.second}else s=t;return le(e,r,s)}a(tt,"time");function se(e,r,t){let s=oe(e);return J(()=>Y("number",s,t),()=>new Intl.NumberFormat(s,t)).format(r)}a(se,"number");function Se(e,r,t,{offset:s=0,...i}){let l=oe(e),c=r?J(()=>Y("plural-ordinal",l),()=>new Intl.PluralRules(l,{type:"ordinal"})):J(()=>Y("plural-cardinal",l),()=>new Intl.PluralRules(l,{type:"cardinal"}));return i[t]??i[c.select(t-s)]??i.other}a(Se,"plural");function J(e,r){let t=e(),s=ke.get(t);return s||(s=r(),ke.set(t,s)),s}a(J,"getMemoized");function Y(e,r,t){let s=r.join("-");return`${e}-${s}-${JSON.stringify(t)}`}a(Y,"cacheKey");var Ee=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,Oe=a(e=>e.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(r,t,s)=>{if(t){let i=parseInt(t,16);return String.fromCharCode(i)}else{let i=parseInt(s,16);return String.fromCharCode(i)}}),"decodeEscapeSequences"),Ae="%__lingui_octothorpe__%",rt=a((e,r,t={})=>{let s=r||e,i=a(c=>typeof c=="object"?c:t[c],"style"),l=a((c,h)=>{let v=Object.keys(t).length?i("number"):void 0,S=se(s,c,v);return h.replace(new RegExp(Ae,"g"),S)},"replaceOctothorpe");return{plural:a((c,h)=>{let{offset:v=0}=h,S=Se(s,!1,c,h);return l(c-v,S)},"plural"),selectordinal:a((c,h)=>{let{offset:v=0}=h,S=Se(s,!0,c,h);return l(c-v,S)},"selectordinal"),select:nt,number:a((c,h)=>se(s,c,i(h)||{style:h}),"number"),date:a((c,h)=>le(s,c,i(h)||h),"date"),time:a((c,h)=>tt(s,c,i(h)||h),"time")}},"getDefaultFormats"),nt=a((e,r)=>r[e]??r.other,"selectFormatter");function st(e,r,t){return(s={},i)=>{let l=rt(r,t,i),c=a((v,S=!1)=>Array.isArray(v)?v.reduce((k,M)=>{if(M==="#"&&S)return k+Ae;if(B(M))return k+M;let[K,O,$]=M,D={};O==="plural"||O==="selectordinal"||O==="select"?Object.entries($).forEach(([F,V])=>{D[F]=c(V,O==="plural"||O==="selectordinal")}):D=$;let N;if(O){let F=l[O];N=F(s[K],D)}else N=s[K];return N==null?k:k+N},""):v,"formatMessage"),h=c(e);return B(h)&&Ee.test(h)?Oe(h):B(h)?h:h?String(h):""}}a(st,"interpolate");var ie=class{static{a(this,"EventEmitter")}_events={};on(r,t){return this._events[r]??=new Set,this._events[r].add(t),()=>this.removeListener(r,t)}removeListener(r,t){let s=this._events[r];s?.delete(t),s?.size===0&&delete this._events[r]}emit(r,...t){let s=this._events[r];if(s)for(let i of[...s])i.apply(this,t)}},ae=class extends ie{static{a(this,"I18n")}_locale="";_locales;_messages={};_missing;_messageCompiler;constructor(r){super(),r.missing!=null&&(this._missing=r.missing),r.messages!=null&&this.load(r.messages),(typeof r.locale=="string"||r.locales)&&this.activate(r.locale??Te,r.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}setMessagesCompiler(r){return this._messageCompiler=r,this}_load(r,t){let s=this._messages[r];s?Object.assign(s,t):this._messages[r]=t}load(r,t){typeof r=="string"&&typeof t=="object"?this._load(r,t):Object.entries(r).forEach(([s,i])=>this._load(s,i)),this.emit("change")}loadAndActivate({locale:r,locales:t,messages:s}){this._locale=r,this._locales=t||void 0,this._messages[this._locale]=s,this.emit("change")}activate(r,t){this._locale=r,this._locales=t,this.emit("change")}_(r,t,s){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let i=s?.message;r||(r=""),B(r)||(t=r.values||t,i=r.message,r=r.id);let l=this.messages[r],c=l===void 0,h=this._missing;if(h&&c)return et(h)?h(this._locale,r):h;c&&this.emit("missing",{id:r,locale:this._locale});let v=l||i||r;return B(v)&&(this._messageCompiler?v=this._messageCompiler(v):console.warn(`Uncompiled message detected! Message:
11
+
12
+ > ${v}
13
+
14
+ That means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.
15
+ ICU features such as interpolation and plurals will not work properly for that message.
16
+
17
+ Please compile your catalog first.
18
+ `)),B(v)&&Ee.test(v)?Oe(v):B(v)?v:st(v,this._locale,this._locales)(t,s?.formats)}t=this._.bind(this);date(r,t){return le(this._locales||this._locale,r,t)}number(r,t){return se(this._locales||this._locale,r,t)}};function ce(e={}){return new ae(e)}a(ce,"setupI18n");var Ct=ce();var Q=fe(Pe(),1);var it={},Me="en",at={en:it},ot=a((e=Me,r=at)=>{let t=ce();t.setMessagesCompiler(be);for(let[s,i]of Object.entries(r))t.load(s,i);return t.activate(r[e]===void 0?Me:e),t},"f"),lt=ot(),ct=(0,Q.createContext)(lt),Rt=a(()=>{let e=(0,Q.use)(ct);return(r,t)=>e._(r,t)},"L");var zt=a((e,r,t,s,i)=>{switch(r){case"action":return e.action(t,s,i);case"mutation":return e.mutation(t,s,i);default:return e.query(t,s,i)}},"n"),Gt=a(e=>({__lunoraRef:e}),"s"),Kt=a(e=>{let r=e.trim();return r===""?{}:{shardKey:r}},"c"),Ht=a(e=>e instanceof Error?e.message:String(e),"l"),Wt=a(e=>{if(e===null||typeof e!="object"||!("code"in e))return;let{code:r}=e;return typeof r=="string"?r:void 0},"u"),jt=a(e=>{if(e===null||typeof e!="object"||!("hint"in e))return;let{hint:r}=e;return typeof r=="string"?r:Array.isArray(r)?r.filter(t=>typeof t=="string").join(`
19
+ `):void 0},"f"),Zt=a(e=>{if(e===null||typeof e!="object"||!("docsUrl"in e))return;let r=e.docsUrl;if(typeof r=="string")try{let{protocol:t}=new URL(r);return t==="http:"||t==="https:"?r:void 0}catch{return}},"g"),Jt=a(e=>{if(e==null)return"";switch(typeof e){case"bigint":case"boolean":case"number":return e.toString();case"string":return e;case"symbol":return e.toString();default:return JSON.stringify(e)}},"d"),ut=a((e,r)=>{e.catch(t=>{})},"a"),Yt=a(e=>{if(e!==void 0&&e!=="")return e;let r=globalThis.location;return r?.origin!==void 0&&r.origin!==""?r.origin:"http://localhost:5173"},"p"),Qt=a(e=>{let r="navigator"in globalThis?globalThis.navigator.clipboard:void 0;return r===void 0?!1:(ut(r.writeText(e)),!0)},"y"),Vt=a(e=>{if(e==null)return"\u2014";if(e<1024)return`${e.toString()} B`;let r=["KB","MB","GB","TB"],t=e/1024,s=0;for(;t>=1024&&s<r.length-1;)t/=1024,s+=1;return`${t.toFixed(1)} ${r[s]??"TB"}`},"h"),Xt=a((e,r="")=>{if(e==null||e==="")return r;let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString()},"m");export{ot as a,lt as b,ct as c,Rt as d,zt as e,Gt as f,Kt as g,Ht as h,Wt as i,jt as j,Zt as k,Jt as l,ut as m,Yt as n,Qt as o,Vt as p,Xt as q};
@@ -0,0 +1 @@
1
+ import{a as In,b as _n}from"./chunk-SP5SBO2W.js";import{a as An,d as Vn}from"./chunk-3C3CG7ZK.js";import{a as $t,b as qt,c as Gt,d as Nn,e as Bo}from"./chunk-I6A5C46N.js";import{$ as Cn,A as Bt,C as hn,D as Z,E as vn,F as bn,I as Ft,L as _e,M as So,N as jt,P as No,Q as xn,R as yn,S as To,T as Kt,U as zt,V as Ut,W as Zt,X as wo,Y as Wt,_ as Pn,aa as Eo,b as on,ba as ko,ea as Oo,fa as Ce,ga as Rn,ha as Yt,i as sn,ia as Sn,j as ln,ja as de,k as cn,ka as Mo,l as fr,m as xo,ma as Do,na as Io,o as yo,oa as _o,p as dn,pa as Ao,q as Po,qa as Vo,ra as Lo,s as pn,sa as Tn,ta as wn,u as un,ua as Ho,v as mn,va as En,w as fn,x as Co,y as Ro,z as gn}from"./chunk-2QSHLBCO.js";import{c as kn,h as On,k as gr}from"./chunk-QBWRC5YX.js";import{a as Fo}from"./chunk-HPFLBYRI.js";import{f as Dn}from"./chunk-ILNELDFC.js";import{a as Br,b as Fr,d as jr,e as no,f as pr,g as Kr,h as zr,i as Ur,j as Zr,k as Wr}from"./chunk-SMIESS7P.js";import{B as rn,C as nn,I as ve,J as an,K as Ht,O as L,P as Y,R as mr,e as fe,p as ao,q as tn}from"./chunk-CFPZYHPY.js";import{a as Hr}from"./chunk-7QIFDWQV.js";import{b as Ae,c as hr}from"./chunk-FXCBF4XT.js";import{a as Ie,c as Xr,h as bo,i as en}from"./chunk-2OUPA2WJ.js";import{a as ur,b as Lt}from"./chunk-THIXMMZD.js";import{a as Ee,c as G,i as je,j as F}from"./chunk-6ST5ECQA.js";import{a as $r,b as qr}from"./chunk-QLQADHFE.js";import{a as so}from"./chunk-SHMNA6UL.js";import{a as Qr}from"./chunk-XBDKZZ67.js";import{a as Gr,b as Yr,c as Jr,d as ge,m as Jt,o as Mn}from"./chunk-OG4N2XHD.js";import{c as cr}from"./chunk-XNGYYOLS.js";import{a as i,d as lr,e as R,f as M,g as dr,h as se,j as $}from"./chunk-3XIESWL4.js";var I=R(dr(),1);var ye=R(M(),1),z=R(M(),1);var a=R(se(),1);var Ln=R(M(),1),ke=R(se(),1);var Os={border:"1px solid var(--destructive)",color:"var(--destructive)",padding:12},Ms={overflow:"auto",whiteSpace:"pre-wrap"},jo=class extends Ln.Component{static{i(this,"g")}static getDerivedStateFromError(e){return{error:e}}state={error:null};componentDidCatch(e,o){console.error("[lunora-studio] panel error",e,o.componentStack)}reset=i(()=>{this.setState({error:null})},"reset");render(){let{children:e,fallbackTitle:o,label:r,retryLabel:n}=this.props,{error:s}=this.state;if(s===null)return(0,ke.jsx)(ke.Fragment,{children:e});let l=o??(r===void 0?"Something went wrong":`${r} failed`);return(0,ke.jsxs)("div",{"data-testid":"dash-error-boundary",role:"alert",style:Os,children:[(0,ke.jsx)("strong",{children:l}),(0,ke.jsx)("pre",{"data-testid":"dash-error-message",style:Ms,children:s.message}),(0,ke.jsx)("button",{"data-testid":"dash-error-retry",onClick:this.reset,type:"button",children:n??"Try again"})]})}};var Be={};lr(Be,{Arrow:()=>Xn,Backdrop:()=>ta,Close:()=>ia,Description:()=>aa,Handle:()=>lo,Popup:()=>Jn,Portal:()=>Un,Positioner:()=>Zn,Root:()=>Fn,Title:()=>ra,Trigger:()=>jn,Viewport:()=>da,createHandle:()=>pa});var Oe=R(M(),1);var Ko=R(M(),1);var vr=Ko.createContext(void 0);function X(t){let e=Ko.useContext(vr);if(e===void 0&&!t)throw new Error(G(47));return e}i(X,"usePopoverRootContext");var Ve=R(M(),1),Hn=R(Hr(),1);function Ds(){return{...$t(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}i(Ds,"createInitialState");var Is={...Gt,disabled:Z(t=>t.disabled),instantType:Z(t=>t.instantType),openMethod:Z(t=>t.openMethod),openChangeReason:Z(t=>t.openChangeReason),modal:Z(t=>t.modal),focusManagerModal:Z(t=>t.focusManagerModal),stickIfOpen:Z(t=>t.stickIfOpen),titleElementId:Z(t=>t.titleElementId),descriptionElementId:Z(t=>t.descriptionElementId),openOnHover:Z(t=>t.openOnHover),closeDelay:Z(t=>t.closeDelay),hasViewport:Z(t=>t.hasViewport)},Qt=class t extends Ft{static{i(this,"PopoverStore")}constructor(e,o,r=!1){let n={...Ds(),...e},s=new Wt;n.open&&e?.mounted===void 0&&(n.mounted=!0),n.floatingRootContext=qt(s,o,r),super(n,{popupRef:Ve.createRef(),backdropRef:Ve.createRef(),internalBackdropRef:Ve.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:Ve.createRef(),beforeContentFocusGuardRef:Ve.createRef(),stickIfOpenTimeout:new rn,triggerElements:s},Is)}setOpen=i((e,o)=>{let r=o.reason===L.triggerHover,n=o.reason===L.triggerPress&&o.event.detail===0,s=!e&&(o.reason===L.escapeKey||o.reason==null),l=xn(o),d=this.select("activeTriggerId");if(!e&&o.reason===L.closePress&&o.trigger==null&&d!=null&&(o.trigger=this.context.triggerElements.getById(d)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let p=i(()=>{let c={open:e,openChangeReason:o.reason};No(c,e,o.trigger,l()),this.update(c)},"changeState");r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set("stickIfOpen",!1)}),Hn.flushSync(p)):p(),n||s?this.set("instantType",n?"click":"dismiss"):o.reason===L.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)},"setOpen");static useStore(e,o){let{store:r,internalStore:n}=jt(e,(s,l)=>new t(o,s,l));return Ve.useEffect(()=>n?.disposeEffect(),[n]),r}disposeEffect=i(()=>this.context.stickIfOpenTimeout.disposeEffect(),"disposeEffect")};var Ke=R(se(),1);function Bn({props:t}){let{children:e,open:o,defaultOpen:r=!1,onOpenChange:n,onOpenChangeComplete:s,modal:l=!1,handle:d,triggerId:p,defaultTriggerId:c=null}=t,u=Qt.useStore(d?.store,{modal:l,open:r,openProp:o,activeTriggerId:c,triggerIdProp:p});To(u,o,r,c),u.useControlledProp("openProp",o),u.useControlledProp("triggerIdProp",p);let h=u.useState("open"),v=u.useState("mounted"),f=u.useState("payload"),m=pn()!=null;u.useContextCallback("onOpenChange",n),u.useContextCallback("onOpenChangeComplete",s),wo(u,h),zt(u);let{forceUnmount:g}=Ut(h,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:l,nested:m}),Oe.useEffect(()=>{h||u.context.stickIfOpenTimeout.clear()},[u,h]);let b=Oe.useCallback(()=>{u.setOpen(!1,Y(L.imperativeAction))},[u]);Oe.useImperativeHandle(t.actionsRef,()=>({unmount:g,close:b}),[g,b]);let x=h||v,P=Oe.useMemo(()=>({store:u}),[u]);return(0,Ke.jsxs)(vr.Provider,{value:P,children:[x&&(0,Ke.jsx)(_s,{store:u,modal:l}),typeof e=="function"?e({payload:f}):e]})}i(Bn,"PopoverRootComponent");function Fn(t){return X(!0)?(0,Ke.jsx)(Bn,{props:t}):(0,Ke.jsx)(fn,{children:(0,Ke.jsx)(Bn,{props:t})})}i(Fn,"PopoverRoot");function _s({store:t,modal:e}){let o=t.useState("floatingRootContext"),r=Bt(o,{outsidePressEvent:{mouse:e==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),n=r.reference??je,s=r.trigger??je,l=Oe.useMemo(()=>Ee(_e,r.floating),[r.floating]);return Zt(t,{activeTriggerProps:n,inactiveTriggerProps:s,popupProps:l}),null}i(_s,"PopoverInteractions");var Le=R(M(),1);var ze=R(se(),1);var jn=Le.forwardRef(i(function(e,o){let{render:r,className:n,style:s,disabled:l=!1,nativeButton:d=!0,handle:p,payload:c,openOnHover:u=!1,delay:h=300,closeDelay:v=0,id:f,...m}=e,g=X(!0),b=p?.store??g?.store;if(!b)throw new Error(G(74));let x=fe(f),P=b.useState("isTriggerActive",x),y=b.useState("floatingRootContext"),S=b.useState("isOpenedByTrigger",x),C=b.useState("triggerPopupId",x),w=Le.useRef(null),{registerTrigger:N,isMountedByThisTrigger:E}=Kt(x,w,b,{payload:c,disabled:l,openOnHover:u,closeDelay:v}),T=b.useState("openChangeReason"),k=b.useState("stickIfOpen"),O=b.useState("openMethod"),B=b.useState("focusManagerModal"),D=ko(y,{enabled:!l&&y!=null&&u&&(O!=="touch"||T!==L.triggerPress),mouseOnly:!0,move:!1,handleClose:Oo(),restMs:h,delay:{close:v},triggerElementRef:w,isActiveTrigger:P,isClosing:i(()=>b.select("transitionStatus")==="ending","isClosing")}),j=Ro(y,{enabled:y!=null,stickIfOpen:k}),H=Mo(()=>b.select("open"),Q=>{b.set("openMethod",Q)}),K=b.useState("triggerProps",E),{getButtonProps:W,buttonRef:_}=Ae({disabled:l,native:d}),A={open(Q){return Q&&T===L.triggerPress?Sn.open(Q):Yt.open(Q)}},{preFocusGuardRef:V,handlePreFocusGuardFocus:oe,handleFocusTargetFocus:te}=Nn(b,w),J=F("button",e,{state:{disabled:l,open:S},ref:[_,o,N,w],props:[j.reference,D,K,H,{[xo]:"",id:x,"aria-haspopup":"dialog","aria-expanded":S,"aria-controls":C},m,W],stateAttributesMapping:A});return E&&!B?(0,ze.jsxs)(Le.Fragment,{children:[(0,ze.jsx)(fr,{ref:V,onFocus:oe}),(0,ze.jsx)(Le.Fragment,{children:J},x),(0,ze.jsx)(fr,{ref:b.context.triggerFocusTargetRef,onFocus:te})]}):(0,ze.jsx)(Le.Fragment,{children:J},x)},"PopoverTrigger"));var zn=R(M(),1);var zo=R(M(),1);var br=zo.createContext(void 0);function Kn(){let t=zo.useContext(br);if(t===void 0)throw new Error(G(45));return t}i(Kn,"usePopoverPortalContext");var xr=R(se(),1);var Un=zn.forwardRef(i(function(e,o){let{keepMounted:r=!1,...n}=e,{store:s}=X();return s.useState("mounted")||r?(0,xr.jsx)(br.Provider,{value:r,children:(0,xr.jsx)(Po,{ref:o,...n})}):null},"PopoverPortal"));var eo=R(M(),1);var Uo=R(M(),1);var yr=Uo.createContext(void 0);function Xt(){let t=Uo.useContext(yr);if(!t)throw new Error(G(46));return t}i(Xt,"usePopoverPositionerContext");var io=R(se(),1);var Zn=eo.forwardRef(i(function(e,o){let{render:r,className:n,style:s,anchor:l,positionMethod:d="absolute",side:p="bottom",align:c="center",sideOffset:u=0,alignOffset:h=0,collisionBoundary:v="clipping-ancestors",collisionPadding:f=5,arrowPadding:m=5,sticky:g=!1,disableAnchorTracking:b=!1,collisionAvoidance:x=yo,...P}=e,{store:y}=X(),S=Kn(),C=un(),w=y.useState("floatingRootContext"),N=y.useState("mounted"),E=y.useState("open"),T=y.useState("openChangeReason"),k=y.useState("activeTriggerElement"),O=y.useState("modal"),B=y.useState("openMethod"),D=y.useState("positionerElement"),j=y.useState("instantType"),H=y.useState("transitionStatus"),K=y.useState("hasViewport"),W=eo.useRef(null),_=an(D,!1,!1),A=_o({anchor:l,floatingRootContext:w,positionMethod:d,mounted:N,side:p,sideOffset:u,align:c,alignOffset:h,arrowPadding:m,collisionBoundary:v,collisionPadding:f,sticky:g,disableAnchorTracking:b,keepMounted:S,nodeId:C,collisionAvoidance:x,adaptiveOrigin:K?Io:void 0}),V=w.useState("domReferenceElement");Ie(()=>{let J=V,Q=W.current;if(J&&(W.current=J),Q&&J&&J!==Q){y.set("instantType",void 0);let ne=new AbortController;return _(()=>{y.set("instantType","trigger-change")},ne.signal),()=>{ne.abort()}}},[V,_,y]),wn(E&&O===!0&&T!==L.triggerHover,B==="touch",D,k);let oe=eo.useCallback(J=>{y.set("positionerElement",J)},[y]),te={open:E,side:A.side,align:A.align,anchorHidden:A.anchorHidden,instant:j},le=Lo(e,te,{styles:A.positionerStyles,transitionStatus:H,props:P,refs:[o,oe],hidden:!N,inert:!E});return(0,io.jsxs)(yr.Provider,{value:A,children:[N&&O===!0&&T!==L.triggerHover&&(0,io.jsx)(Ao,{ref:y.context.internalBackdropRef,inert:Do(!E),cutout:k}),(0,io.jsx)(mn,{id:C,children:le})]})},"PopoverPositioner"));var Zo=R(M(),1);var He=R(M(),1);var Wn=R(se(),1);var $n=He.createContext(void 0);function qn(){let[t,e]=He.useState(0),o=Xr(()=>(e(n=>n+1),()=>{e(n=>Math.max(0,n-1))}));return{context:He.useMemo(()=>({register:o}),[o]),hasClosePart:t>0}}i(qn,"useClosePartCount");function Gn(t){let{value:e,children:o}=t;return(0,Wn.jsx)($n.Provider,{value:e,children:o})}i(Gn,"ClosePartProvider");function Yn(){let t=He.useContext($n);Ie(()=>t?.register(),[t])}i(Yn,"useClosePartRegistration");var Pr=R(se(),1);var As={...de,...ve},Jn=Zo.forwardRef(i(function(e,o){let{render:r,className:n,style:s,initialFocus:l,finalFocus:d,...p}=e,{store:c}=X(),u=Xt(),h=En(!0)!=null,{context:v,hasClosePart:f}=qn(),m=c.useState("open"),g=c.useState("openMethod"),b=c.useState("instantType"),x=c.useState("transitionStatus"),P=c.useState("popupProps"),y=c.useState("titleElementId"),S=c.useState("descriptionElementId"),C=c.useState("modal"),w=c.useState("mounted"),N=c.useState("openChangeReason"),E=c.useState("activeTriggerElement"),T=c.useState("floatingRootContext"),k=T.useState("floatingId"),O=c.useState("disabled"),B=c.useState("openOnHover"),D=c.useState("closeDelay"),j=p.id??k;Ht({open:m,ref:c.context.popupRef,onComplete(){m&&c.context.onOpenChangeComplete?.(!0)}}),Eo(T,{enabled:B&&!O,closeDelay:D});let H=l===void 0?So(c.context.popupRef):l,K=C!==!1&&f;c.useSyncedValue("focusManagerModal",K);let W=Zo.useCallback(V=>{c.set("popupElement",V)},[c]),_={open:m,side:u.side,align:u.align,instant:b,transitionStatus:x},A=F("div",e,{state:_,ref:[o,c.context.popupRef,W],props:[P,{id:j,role:"dialog",..._e,"aria-labelledby":y,"aria-describedby":S,onKeyDown(V){h&&Ho.has(V.key)&&V.stopPropagation()}},Vo(x),p],stateAttributesMapping:As});return(0,Pr.jsx)(Co,{context:T,openInteractionType:g,modal:K,disabled:!w||N===L.triggerHover,initialFocus:H,returnFocus:d,restoreFocus:"popup",previousFocusableElement:en(E)?E:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,Pr.jsx)(Gn,{value:v,children:A})})},"PopoverPopup"));var Qn=R(M(),1);var Xn=Qn.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,{store:d}=X(),p=d.useState("open"),{arrowRef:c,side:u,align:h,arrowUncentered:v,arrowStyles:f}=Xt();return F("div",e,{state:{open:p,side:u,align:h,uncentered:v},ref:[o,c],props:[{style:f,"aria-hidden":!0},l],stateAttributesMapping:de})},"PopoverArrow"));var ea=R(M(),1);var Vs={...de,...ve},ta=ea.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,{store:d}=X(),p=d.useState("open"),c=d.useState("mounted"),u=d.useState("transitionStatus"),h=d.useState("openChangeReason");return F("div",e,{state:{open:p,transitionStatus:u},ref:[d.context.backdropRef,o],props:[{role:"presentation",hidden:!c,style:{pointerEvents:h===L.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:Vs})},"PopoverBackdrop"));var oa=R(M(),1);var ra=oa.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,{store:d}=X(),p=fe(l.id);return d.useSyncedValueWithCleanup("titleElementId",p),F("h2",e,{ref:o,props:[{id:p},l]})},"PopoverTitle"));var na=R(M(),1);var aa=na.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,{store:d}=X(),p=fe(l.id);return d.useSyncedValueWithCleanup("descriptionElementId",p),F("p",e,{ref:o,props:[{id:p},l]})},"PopoverDescription"));var sa=R(M(),1);var ia=sa.forwardRef(i(function(e,o){let{render:r,className:n,style:s,disabled:l=!1,nativeButton:d=!0,...p}=e,{buttonRef:c,getButtonProps:u}=Ae({disabled:l,focusableWhenDisabled:!1,native:d}),{store:h}=X();return Yn(),F("button",e,{ref:[o,c],props:[{onClick(f){h.setOpen(!1,Y(L.closePress,f.nativeEvent))}},p,u]})},"PopoverClose"));var ca=R(M(),1);var la=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var Ls={activationDirection:i(t=>t?{"data-activation-direction":t}:null,"activationDirection")},da=ca.forwardRef(i(function(e,o){let{render:r,className:n,style:s,children:l,...d}=e,{store:p}=X(),{side:c}=Xt(),u=p.useState("instantType"),{children:h,state:v}=Bo({store:p,side:c,cssVars:la,children:l}),f={activationDirection:v.activationDirection,transitioning:v.transitioning,instant:u};return F("div",e,{state:f,ref:o,props:[d,{children:h}],stateAttributesMapping:Ls})},"PopoverViewport"));var lo=class{static{i(this,"PopoverHandle")}constructor(){this.store=new Qt}open(e){let o=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!o)throw new Error(G(80,e));this.store.setOpen(!0,Y(L.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(L.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function pa(){return new lo}i(pa,"createPopoverHandle");var pe={};lr(pe,{Backdrop:()=>ma,Close:()=>ga,Description:()=>va,Handle:()=>mo,Popup:()=>Ca,Portal:()=>Sa,Root:()=>Oa,Title:()=>_a,Trigger:()=>Aa,Viewport:()=>Da,createHandle:()=>Va});var ua=R(M(),1);var co=R(M(),1);var Wo=co.createContext(!1),Cr=co.createContext(void 0);function ie(t){let e=co.useContext(Cr);if(t===!1&&e===void 0)throw new Error(G(27));return e}i(ie,"useDialogRootContext");var Hs={...de,...ve},ma=ua.forwardRef(i(function(e,o){let{render:r,className:n,style:s,forceRender:l=!1,...d}=e,{store:p}=ie(),c=p.useState("open"),u=p.useState("nested"),h=p.useState("mounted"),v=p.useState("transitionStatus");return F("div",e,{state:{open:c,transitionStatus:v},ref:[p.context.backdropRef,o],stateAttributesMapping:Hs,props:[{role:"presentation",hidden:!h,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:l||!u})},"DialogBackdrop"));var fa=R(M(),1);var ga=fa.forwardRef(i(function(e,o){let{render:r,className:n,style:s,disabled:l=!1,nativeButton:d=!0,...p}=e,{store:c}=ie(),u=c.useState("open"),{getButtonProps:h,buttonRef:v}=Ae({disabled:l,native:d}),f={disabled:l};function m(g){u&&c.setOpen(!1,Y(L.closePress,g.nativeEvent))}return i(m,"handleClick"),F("button",e,{state:f,ref:[o,v],props:[{onClick:m},p,h]})},"DialogClose"));var ha=R(M(),1);var va=ha.forwardRef(i(function(e,o){let{render:r,className:n,style:s,id:l,...d}=e,{store:p}=ie(),c=fe(l);return p.useSyncedValueWithCleanup("descriptionElementId",c),F("p",e,{ref:o,props:[{id:c},d]})},"DialogDescription"));var ya=R(M(),1);var ba=(function(t){return t.nestedDialogs="--nested-dialogs",t})({});var xa=(function(t){return t[t.open=Ce.open]="open",t[t.closed=Ce.closed]="closed",t[t.startingStyle=Ce.startingStyle]="startingStyle",t[t.endingStyle=Ce.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var $o=R(M(),1);var Rr=$o.createContext(void 0);function qo(){let t=$o.useContext(Rr);if(t===void 0)throw new Error(G(26));return t}i(qo,"useDialogPortalContext");var Pa=R(se(),1);var Bs={...de,...ve,nestedDialogOpen(t){return t?{[xa.nestedDialogOpen]:""}:null}},Ca=ya.forwardRef(i(function(e,o){let{render:r,className:n,style:s,finalFocus:l,initialFocus:d,...p}=e,{store:c}=ie(),u=c.useState("descriptionElementId"),h=c.useState("disablePointerDismissal"),v=c.useState("floatingRootContext"),f=c.useState("popupProps"),m=c.useState("modal"),g=c.useState("mounted"),b=c.useState("nested"),x=c.useState("nestedOpenDialogCount"),P=c.useState("open"),y=c.useState("openMethod"),S=c.useState("titleElementId"),C=c.useState("transitionStatus"),w=c.useState("role"),N=v.useState("floatingId"),E=p.id??N;qo(),Ht({open:P,ref:c.context.popupRef,onComplete(){P&&c.context.onOpenChangeComplete?.(!0)}});let T=d===void 0?So(c.context.popupRef):d,k=x>0,O=c.useStateSetter("popupElement"),D=F("div",e,{state:{open:P,nested:b,transitionStatus:C,nestedDialogOpen:k},props:[f,{id:E,"aria-labelledby":S??void 0,"aria-describedby":u??void 0,role:w,..._e,hidden:!g,onKeyDown(j){Ho.has(j.key)&&j.stopPropagation()},style:{[ba.nestedDialogs]:x}},p],ref:[o,c.context.popupRef,O],stateAttributesMapping:Bs});return(0,Pa.jsx)(Co,{context:v,openInteractionType:y,disabled:!g,closeOnFocusOut:!h,initialFocus:T,returnFocus:l,modal:m!==!1,restoreFocus:"popup",children:D})},"DialogPopup"));var Ra=R(M(),1);var po=R(se(),1);var Sa=Ra.forwardRef(i(function(e,o){let{keepMounted:r=!1,...n}=e,{store:s}=ie(),l=s.useState("mounted"),d=s.useState("modal"),p=s.useState("open");return l||r?(0,po.jsx)(Rr.Provider,{value:r,children:(0,po.jsxs)(Po,{ref:o,...n,children:[l&&d===!0&&(0,po.jsx)(Ao,{ref:s.context.internalBackdropRef,inert:Do(!p)}),e.children]})}):null},"DialogPortal"));var ka=R(M(),1);var wa=R(M(),1);var Me=R(M(),1);function Na(t){let{store:e,actionsRef:o}=t,r=e.useState("open");wo(e,r),zt(e);let{forceUnmount:n}=Ut(r,e),s=Me.useCallback(()=>{e.setOpen(!1,Y(L.imperativeAction))},[e]);Me.useImperativeHandle(o,()=>({unmount:n,close:s}),[n,s])}i(Na,"useDialogRoot");function Ta({store:t,parentContext:e,isDrawer:o}){let r=t.useState("open"),n=t.useState("disablePointerDismissal"),s=t.useState("modal"),l=t.useState("popupElement"),d=t.useState("floatingRootContext"),[p,c]=Me.useState(0),[u,h]=Me.useState(0),v=p===0,f=Bt(d,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:s==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(x){if(!t.context.outsidePressEnabledRef.current||"button"in x&&x.button!==0||"touches"in x&&x.touches.length!==1)return!1;let P=tn(x);return v&&!n?s&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===P||t.context.backdropRef.current===P||ao(P,l)&&!P?.hasAttribute("data-base-ui-portal"):!0:!1},escapeKey:v});Tn(r&&s===!0,l),t.useContextCallback("onNestedDialogOpen",(x,P)=>{c(x),h(P)}),t.useContextCallback("onNestedDialogClose",()=>{c(0),h(0)}),Me.useEffect(()=>(e?.onNestedDialogOpen&&r&&e.onNestedDialogOpen(p+1,u+(o?1:0)),e?.onNestedDialogClose&&!r&&e.onNestedDialogClose(),()=>{e?.onNestedDialogClose&&r&&e.onNestedDialogClose()}),[o,r,p,u,e]);let m=f.reference??je,g=f.trigger??je,b=f.floating??je;return Zt(t,{activeTriggerProps:m,inactiveTriggerProps:g,popupProps:b,nestedOpenDialogCount:p,nestedOpenDrawerCount:u}),null}i(Ta,"DialogInteractions");var Go=R(M(),1);var Fs={...Gt,modal:Z(t=>t.modal),nested:Z(t=>t.nested),nestedOpenDialogCount:Z(t=>t.nestedOpenDialogCount),nestedOpenDrawerCount:Z(t=>t.nestedOpenDrawerCount),disablePointerDismissal:Z(t=>t.disablePointerDismissal),openMethod:Z(t=>t.openMethod),descriptionElementId:Z(t=>t.descriptionElementId),titleElementId:Z(t=>t.titleElementId),viewportElement:Z(t=>t.viewportElement),role:Z(t=>t.role)},to=class t extends Ft{static{i(this,"DialogStore")}constructor(e,o,r=!1){let n=new Wt,s=js(e);s.floatingRootContext=qt(n,o,r),super(s,{popupRef:Go.createRef(),backdropRef:Go.createRef(),internalBackdropRef:Go.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:n,onOpenChange:void 0,onOpenChangeComplete:void 0},Fs)}setOpen=i((e,o)=>{if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!e&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let r={open:e};No(r,e,o.trigger),this.update(r)},"setOpen");static useStore(e,o){return jt(e,(n,s)=>new t(o,n,s),!0).store}};function js(t={}){return{...$t(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...t}}i(js,"createInitialState");var uo=R(se(),1);function Ea(t,e="dialog"){let{children:o,open:r,defaultOpen:n=!1,onOpenChange:s,onOpenChangeComplete:l,disablePointerDismissal:d=!1,modal:p=!0,actionsRef:c,handle:u,triggerId:h,defaultTriggerId:v=null}=t,f=e==="drawer",m=e==="alert-dialog",g=m?!0:p,b=m||d,x=m?"alertdialog":"dialog",P=ie(!0),S={modal:g,disablePointerDismissal:b,nested:!!P,role:x},C=to.useStore(u?.store,{open:n,openProp:r,activeTriggerId:v,triggerIdProp:h,...S});hn(()=>{let O=r===void 0&&C.state.open===!1&&n===!0?{open:!0,activeTriggerId:v}:null;m?C.update(O?{...S,...O}:S):O&&C.update(O)}),C.useControlledProp("openProp",r),C.useControlledProp("triggerIdProp",h),C.useSyncedValues(S),C.useContextCallback("onOpenChange",s),C.useContextCallback("onOpenChangeComplete",l);let w=C.useState("open"),N=C.useState("mounted"),E=C.useState("payload");Na({store:C,actionsRef:c});let T=w||N,k=wa.useMemo(()=>({store:C}),[C]);return(0,uo.jsx)(Wo.Provider,{value:!1,children:(0,uo.jsxs)(Cr.Provider,{value:k,children:[T&&(0,uo.jsx)(Ta,{store:C,parentContext:P?.store.context,isDrawer:f}),typeof o=="function"?o({payload:E}):o]})})}i(Ea,"useRenderDialogRoot");function Oa(t){let e=ka.useContext(Wo)?"drawer":"dialog";return Ea(t,e)}i(Oa,"DialogRoot");var Ma=R(M(),1);var Sr=(function(t){return t[t.open=Ce.open]="open",t[t.closed=Ce.closed]="closed",t[t.startingStyle=Ce.startingStyle]="startingStyle",t[t.endingStyle=Ce.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var Ks={...de,...ve,nested(t){return t?{[Sr.nested]:""}:null},nestedDialogOpen(t){return t?{[Sr.nestedDialogOpen]:""}:null}},Da=Ma.forwardRef(i(function(e,o){let{render:r,className:n,style:s,children:l,...d}=e,p=qo(),{store:c}=ie(),u=c.useState("open"),h=c.useState("nested"),v=c.useState("transitionStatus"),f=c.useState("nestedOpenDialogCount"),m=c.useState("mounted"),g=c.useStateSetter("viewportElement"),b=f>0;return F("div",e,{enabled:p||m,state:{open:u,nested:h,transitionStatus:v,nestedDialogOpen:b},ref:[o,g],stateAttributesMapping:Ks,props:[{role:"presentation",hidden:!m,style:{pointerEvents:u?void 0:"none"},children:l},d]})},"DialogViewport"));var Ia=R(M(),1);var _a=Ia.forwardRef(i(function(e,o){let{render:r,className:n,style:s,id:l,...d}=e,{store:p}=ie(),c=fe(l);return p.useSyncedValueWithCleanup("titleElementId",c),F("h2",e,{ref:o,props:[{id:c},d]})},"DialogTitle"));var Yo=R(M(),1);var Aa=Yo.forwardRef(i(function(e,o){let{render:r,className:n,style:s,disabled:l=!1,nativeButton:d=!0,id:p,payload:c,handle:u,...h}=e,v=ie(!0),f=u?.store??v?.store;if(!f)throw new Error(G(79));let m=fe(p),g=f.useState("floatingRootContext"),b=f.useState("isOpenedByTrigger",m),x=f.useState("triggerPopupId",m),P=Yo.useRef(null),{registerTrigger:y,isMountedByThisTrigger:S}=Kt(m,P,f,{payload:c}),{getButtonProps:C,buttonRef:w}=Ae({disabled:l,native:d}),N=Ro(g,{enabled:g!=null}),E=Mo(()=>f.select("open"),O=>{f.set("openMethod",O)}),T={disabled:l,open:b},k=f.useState("triggerProps",S);return F("button",e,{state:T,ref:[w,o,y,P],props:[N.reference,k,E,{[xo]:"",id:m,"aria-haspopup":"dialog","aria-expanded":b,"aria-controls":x},h,C],stateAttributesMapping:Yt})},"DialogTrigger"));var mo=class{static{i(this,"DialogHandle")}constructor(e){this.store=e??new to}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,Y(L.imperativeAction,void 0,o))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,Y(L.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,Y(L.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function Va(){return new mo}i(Va,"createDialogHandle");var Se={};lr(Se,{Arrow:()=>ts,Handle:()=>fo,Popup:()=>Xa,Portal:()=>Ga,Positioner:()=>Ja,Provider:()=>os,Root:()=>Ha,Trigger:()=>za,Viewport:()=>as,createHandle:()=>ss});var Re=R(M(),1);var Jo=R(M(),1);var Nr=Jo.createContext(void 0);function be(t){let e=Jo.useContext(Nr);if(e===void 0&&!t)throw new Error(G(72));return e}i(be,"useTooltipRootContext");var La=R(M(),1);var zs={...Gt,disabled:Z(t=>t.disabled),instantType:Z(t=>t.instantType),isInstantPhase:Z(t=>t.isInstantPhase),trackCursorAxis:Z(t=>t.trackCursorAxis),disableHoverablePopup:Z(t=>t.disableHoverablePopup),lastOpenChangeReason:Z(t=>t.openChangeReason),closeOnClick:Z(t=>t.closeOnClick),closeDelay:Z(t=>t.closeDelay),hasViewport:Z(t=>t.hasViewport)},oo=class t extends Ft{static{i(this,"TooltipStore")}constructor(e,o,r=!1){let n=new Wt,s={...Us(),...e};s.floatingRootContext=qt(n,o,r),super(s,{popupRef:La.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n},zs)}setOpen=i((e,o)=>{yn(this,e,o,{extraState:{openChangeReason:o.reason}})},"setOpen");cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Y(L.triggerPress,e))}static useStore(e,o){return jt(e,(n,s)=>new t(o,n,s)).store}};function Us(){return{...$t(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}i(Us,"createInitialState");var Qo=R(se(),1);var Ha=vn(i(function(e){let{disabled:o=!1,defaultOpen:r=!1,open:n,disableHoverablePopup:s=!1,trackCursorAxis:l="none",actionsRef:d,onOpenChange:p,onOpenChangeComplete:c,handle:u,triggerId:h,defaultTriggerId:v=null,children:f}=e,m=oo.useStore(u?.store,{open:r,openProp:n,activeTriggerId:v,triggerIdProp:h});To(m,n,r,v),m.useControlledProp("openProp",n),m.useControlledProp("triggerIdProp",h),m.useContextCallback("onOpenChange",p),m.useContextCallback("onOpenChangeComplete",c);let g=m.useState("open"),b=!o&&g,x=m.useState("activeTriggerId"),P=m.useState("mounted"),y=m.useState("payload");m.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:s}),m.useSyncedValue("disabled",o),zt(m,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:S,transitionStatus:C}=Ut(b,m),w=m.useState("isInstantPhase"),N=m.useState("instantType"),E=m.useState("lastOpenChangeReason"),T=Re.useRef(null);Ie(()=>{g&&o&&m.setOpen(!1,Y(L.disabled))},[g,o,m]),Ie(()=>{C==="ending"&&E===L.none||C!=="ending"&&w?(N!=="delay"&&(T.current=N),m.set("instantType","delay")):T.current!==null&&(m.set("instantType",T.current),T.current=null)},[C,w,E,N,m]),Ie(()=>{b&&x==null&&m.set("payload",void 0)},[m,x,b]);let k=Re.useCallback(()=>{m.setOpen(!1,Y(L.imperativeAction))},[m]);Re.useImperativeHandle(d,()=>({unmount:S,close:k}),[S,k]);let O=b||P||!o&&l!=="none";return(0,Qo.jsxs)(Nr.Provider,{value:m,children:[O&&(0,Qo.jsx)(Zs,{store:m,disabled:o,trackCursorAxis:l}),typeof f=="function"?f({payload:y}):f]})},"TooltipRoot"));function Zs({store:t,disabled:e,trackCursorAxis:o}){let r=t.useState("floatingRootContext"),n=Bt(r,{enabled:!e,referencePress:i(()=>t.select("closeOnClick"),"referencePress")}),s=gn(r,{enabled:!e&&o!=="none",axis:o==="none"?void 0:o}),l=Re.useMemo(()=>Ee(s.reference,n.reference),[s.reference,n.reference]),d=Re.useMemo(()=>Ee(s.trigger,n.trigger),[s.trigger,n.trigger]),p=Re.useMemo(()=>Ee(_e,s.floating,n.floating),[s.floating,n.floating]);return Zt(t,{activeTriggerProps:l,inactiveTriggerProps:d,popupProps:p}),null}i(Zs,"TooltipInteractions");var er=R(M(),1);var Xo=R(M(),1);var Tr=Xo.createContext(void 0);function Ba(){return Xo.useContext(Tr)}i(Ba,"useTooltipProviderContext");var Fa=(function(t){return t[t.popupOpen=Rn.popupOpen]="popupOpen",t.triggerDisabled="data-trigger-disabled",t})({});var Ka="data-base-ui-tooltip-trigger";function ja(t){if("composedPath"in t){let o=t.composedPath();for(let r=0;r<o.length;r+=1){let n=o[r];if(bo(n))return n}}let e=t.target;return bo(e)?e:null}i(ja,"getTargetElement");function Ws(t){let e=t;for(;e;){if(e.hasAttribute(Ka))return e;let o=e.parentElement;if(o){e=o;continue}let r=e.getRootNode();e="host"in r&&bo(r.host)?r.host:null}return null}i(Ws,"closestEnabledTooltipTrigger");var za=bn(i(function(e,o){let{render:r,className:n,style:s,handle:l,payload:d,disabled:p,delay:c,closeOnClick:u=!0,closeDelay:h,id:v,...f}=e,m=be(!0),g=l?.store??m;if(!g)throw new Error(G(82));let b=fe(v),x=g.useState("isTriggerActive",b),P=g.useState("isOpenedByTrigger",b),y=g.useState("floatingRootContext"),S=er.useRef(null),C=c??600,w=h??0,{registerTrigger:N,isMountedByThisTrigger:E}=Kt(b,S,g,{payload:d,closeOnClick:u,closeDelay:w}),T=Ba(),{delayRef:k,isInstantPhase:O,hasProvider:B}=ln(y,{open:P}),D=Cn(y);g.useSyncedValue("isInstantPhase",O);let j=g.useState("disabled"),H=p??j,K=cn(H),W=g.useState("trackCursorAxis"),_=g.useState("disableHoverablePopup"),A=er.useRef(!1),V=nn(),oe=er.useRef(void 0);function te(){let q=T?.delay,ee=typeof k.current=="object"?k.current.open:void 0,ae=C;return B&&(ee!==0?ae=c??q??C:ae=0),ae}i(te,"getOpenDelay");function le(q){let ee=S.current;if(!ee||!q)return!1;let ae=Ws(q);return ae!==null&&ae!==ee&&ao(ee,ae)}i(le,"isEnabledNestedTriggerTarget");function J(q){let ee=le(q);return A.current=ee,ee&&(D.openChangeTimeout.clear(),D.restTimeout.clear(),D.restTimeoutPending=!1,V.clear()),ee}i(J,"detectNestedTriggerHover");let Q=ko(y,{enabled:!H,mouseOnly:!0,move:!1,handleClose:!_&&W!=="both"?Oo():null,restMs:te,delay(){let q=typeof k.current=="object"?k.current.close:void 0,ee=w;return h==null&&B&&(ee=q),{close:ee}},triggerElementRef:S,isActiveTrigger:x,isClosing:i(()=>g.select("transitionStatus")==="ending","isClosing"),shouldOpen(){return!A.current}}),ne=Pn(y,{enabled:!H}).reference,ue=i(q=>{let ee=A.current,ae=ja(q),Ne=J(ae),xe=S.current,De=xe&&ae&&ao(xe,ae);if(Ne&&g.select("open")&&g.select("lastOpenChangeReason")===L.triggerHover){g.setOpen(!1,Y(L.triggerHover,q));return}if(ee&&!Ne&&De&&!K.current&&!g.select("open")&&xe&&on(oe.current)){let Te=i(()=>{!A.current&&!K.current&&!g.select("open")&&g.setOpen(!0,Y(L.triggerHover,q,xe))},"open"),we=te();we===0?(V.clear(),Te()):V.start(we,Te)}},"handleNestedTriggerHover"),me=g.useState("triggerProps",E);return F("button",e,{state:{open:P},ref:[o,N,S],props:[Q,ne,E||W!=="none"?me:void 0,{onMouseOver(q){ue(q.nativeEvent)},onFocus(q){le(ja(q.nativeEvent))&&q.preventBaseUIHandler()},onMouseLeave(){A.current=!1,V.clear(),oe.current=void 0},onPointerEnter(q){oe.current=q.pointerType},onPointerDown(q){oe.current=q.pointerType,g.set("closeOnClick",u),u&&!g.select("open")&&g.cancelPendingOpen(q.nativeEvent)},onClick(q){u&&!g.select("open")&&g.cancelPendingOpen(q.nativeEvent)},id:b,[Fa.triggerDisabled]:H?"":void 0,[Ka]:H?void 0:""},f],stateAttributesMapping:Yt})},"TooltipTrigger"));var qa=R(M(),1);var tr=R(M(),1);var wr=tr.createContext(void 0);function Ua(){let t=tr.useContext(wr);if(t===void 0)throw new Error(G(70));return t}i(Ua,"useTooltipPortalContext");var or=R(M(),1),Za=R(Hr(),1);var Wa=R(se(),1);var $a=or.forwardRef(i(function(e,o){let{children:r,container:n,className:s,render:l,style:d,...p}=e,{portalNode:c,portalSubtree:u}=dn({container:n,ref:o,componentProps:e,elementProps:p});return!u&&!c?null:(0,Wa.jsxs)(or.Fragment,{children:[u,c&&Za.createPortal(r,c)]})},"FloatingPortalLite"));var Er=R(se(),1);var Ga=qa.forwardRef(i(function(e,o){let{keepMounted:r=!1,...n}=e;return be().useState("mounted")||r?(0,Er.jsx)(wr.Provider,{value:r,children:(0,Er.jsx)($a,{ref:o,...n})}):null},"TooltipPortal"));var nr=R(M(),1);var rr=R(M(),1);var kr=rr.createContext(void 0);function ro(){let t=rr.useContext(kr);if(t===void 0)throw new Error(G(71));return t}i(ro,"useTooltipPositionerContext");var Ya=R(se(),1);var Ja=nr.forwardRef(i(function(e,o){let{render:r,className:n,anchor:s,positionMethod:l="absolute",side:d="top",align:p="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:h="clipping-ancestors",collisionPadding:v=5,arrowPadding:f=5,sticky:m=!1,disableAnchorTracking:g=!1,collisionAvoidance:b=yo,style:x,...P}=e,y=be(),S=Ua(),C=y.useState("open"),w=y.useState("mounted"),N=y.useState("trackCursorAxis"),E=y.useState("disableHoverablePopup"),T=y.useState("floatingRootContext"),k=y.useState("instantType"),O=y.useState("transitionStatus"),B=y.useState("hasViewport"),D=_o({anchor:s,positionMethod:l,floatingRootContext:T,mounted:w,side:d,sideOffset:c,align:p,alignOffset:u,collisionBoundary:h,collisionPadding:v,sticky:m,arrowPadding:f,disableAnchorTracking:g,keepMounted:S,collisionAvoidance:b,adaptiveOrigin:B?Io:void 0}),j=nr.useMemo(()=>({open:C,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:N!=="none"?"tracking-cursor":k}),[C,D.side,D.align,D.anchorHidden,N,k]),H=Lo(e,j,{styles:D.positionerStyles,transitionStatus:O,props:P,refs:[o,y.useStateSetter("positionerElement")],hidden:!w,inert:!C||N==="both"||E});return(0,Ya.jsx)(kr.Provider,{value:D,children:H})},"TooltipPositioner"));var Qa=R(M(),1);var $s={...de,...ve},Xa=Qa.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,d=be(),{side:p,align:c}=ro(),u=d.useState("open"),h=d.useState("instantType"),v=d.useState("transitionStatus"),f=d.useState("popupProps"),m=d.useState("floatingRootContext"),g=d.useState("disabled"),b=d.useState("closeDelay");Ht({open:u,ref:d.context.popupRef,onComplete(){u&&d.context.onOpenChangeComplete?.(!0)}}),Eo(m,{enabled:!g,closeDelay:b});let x=d.useStateSetter("popupElement");return F("div",e,{state:{open:u,side:p,align:c,instant:h,transitionStatus:v},ref:[o,d.context.popupRef,x],props:[f,Vo(v),l],stateAttributesMapping:$s})},"TooltipPopup"));var es=R(M(),1);var ts=es.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,d=be(),{arrowRef:p,side:c,align:u,arrowUncentered:h,arrowStyles:v}=ro(),f=d.useState("open"),m=d.useState("instantType");return F("div",e,{state:{open:f,side:c,align:u,uncentered:h,instant:m},ref:[o,p],props:[{style:v,"aria-hidden":!0},l],stateAttributesMapping:de})},"TooltipArrow"));var Or=R(M(),1);var Mr=R(se(),1);var os=i(function(e){let{delay:o,closeDelay:r,timeout:n=400}=e,s=Or.useMemo(()=>({delay:o,closeDelay:r}),[o,r]),l=Or.useMemo(()=>({open:o,close:r}),[o,r]);return(0,Mr.jsx)(Tr.Provider,{value:s,children:(0,Mr.jsx)(sn,{delay:l,timeoutMs:n,children:e.children})})},"TooltipProvider");var ns=R(M(),1);var rs=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var qs={activationDirection:i(t=>t?{"data-activation-direction":t}:null,"activationDirection")},as=ns.forwardRef(i(function(e,o){let{render:r,className:n,style:s,children:l,...d}=e,p=be(),c=ro(),u=p.useState("instantType"),{children:h,state:v}=Bo({store:p,side:c.side,cssVars:rs,children:l}),f={activationDirection:v.activationDirection,transitioning:v.transitioning,instant:u};return F("div",e,{state:f,ref:o,props:[d,{children:h}],stateAttributesMapping:qs})},"TooltipViewport"));var fo=class{static{i(this,"TooltipHandle")}constructor(){this.store=new oo}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!o)throw new Error(G(81,e));this.store.setOpen(!0,Y(L.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(L.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function ss(){return new fo}i(ss,"createTooltipHandle");var is=R(dr(),1);var ls=R(se(),1);var Gs=i((t,e,o)=>t!==void 0?t:e===void 0&&o===void 0?Yr:Gr(e,o),"p"),cs=i(t=>{let e=(0,is.c)(7),{catalogs:o,children:r,i18n:n,locale:s}=t,l;e[0]!==o||e[1]!==n||e[2]!==s?(l=Gs(n,s,o),e[0]=o,e[1]=n,e[2]=s,e[3]=l):l=e[3];let d=l,p;return e[4]!==r||e[5]!==d?(p=(0,ls.jsx)(Jr,{value:d,children:r}),e[4]=r,e[5]=d,e[6]=p):p=e[6],p},"S");var Ir=R(dr(),1);var Fe=R(M(),1);var re=R(se(),1);var Dr="lunora:command-palette",ds=i(()=>{"window"in globalThis&&globalThis.dispatchEvent(new Event(Dr))},"re"),Ys=i(t=>{let e=(0,Ir.c)(18),{active:o,index:r,item:n,onActivate:s,onSelect:l}=t,d;e[0]!==n||e[1]!==l?(d=i(()=>{l(n)},"s"),e[0]=n,e[1]=l,e[2]=d):d=e[2];let p=d,c;e[3]!==r||e[4]!==s?(c=i(()=>{s(r)},"c"),e[3]=r,e[4]=s,e[5]=c):c=e[5];let u=c,h=o?"bg-accent text-accent-foreground":"text-foreground",v;e[6]!==h?(v=$("flex w-full items-center justify-between gap-3 rounded-md px-3 py-2 text-start text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground",h),e[6]=h,e[7]=v):v=e[7];let f;e[8]!==n.label?(f=(0,re.jsx)("span",{children:n.label}),e[8]=n.label,e[9]=f):f=e[9];let m;e[10]!==n.group?(m=(0,re.jsx)("span",{className:"text-xs text-muted-foreground",children:n.group}),e[10]=n.group,e[11]=m):m=e[11];let g;return e[12]!==p||e[13]!==u||e[14]!==v||e[15]!==f||e[16]!==m?(g=(0,re.jsx)("li",{children:(0,re.jsxs)("button",{className:v,onClick:p,onMouseEnter:u,type:"button",children:[f,m]})}),e[12]=p,e[13]=u,e[14]=v,e[15]=f,e[16]=m,e[17]=g):g=e[17],g},"q"),Js=i((t,e)=>{let o=e.trim().toLowerCase();return o===""?t:t.filter(r=>r.label.toLowerCase().includes(o)||r.group.toLowerCase().includes(o))},"G"),ps=i(t=>{let e=(0,Ir.c)(39),{items:o}=t,r=ge(),n=no(),[s,l]=(0,Fe.useState)(!1),[d,p]=(0,Fe.useState)(""),[c,u]=(0,Fe.useState)(0),h=(0,Fe.useRef)(null),v,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=i(()=>{let _=i(V=>{(V.metaKey||V.ctrlKey)&&V.key.toLowerCase()==="k"&&(V.preventDefault(),l(!0))},"o"),A=i(()=>{l(!0)},"r");return globalThis.addEventListener("keydown",_),globalThis.addEventListener(Dr,A),()=>{globalThis.removeEventListener("keydown",_),globalThis.removeEventListener(Dr,A)}},"i"),f=[],e[0]=v,e[1]=f):(v=e[0],f=e[1]),(0,Fe.useEffect)(v,f);let m;e[2]!==o||e[3]!==d?(m=Js(o,d),e[2]=o,e[3]=d,e[4]=m):m=e[4];let g=m,b;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=i(_=>{l(_),_||(p(""),u(0))},"T"),e[5]=b):b=e[5];let x=b,P;e[6]!==n?(P=i(_=>{x(!1),Jt(n({to:_.to}))},"D"),e[6]=n,e[7]=P):P=e[7];let y=P,S;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=i(_=>{p(_.target.value),u(0)},"A"),e[8]=S):S=e[8];let C=S,w;e[9]!==c||e[10]!==g||e[11]!==y?(w=i(_=>{e:switch(_.key){case"ArrowDown":{_.preventDefault(),u(A=>g.length===0?0:(A+1)%g.length);break e}case"ArrowUp":{_.preventDefault(),u(A=>g.length===0?0:(A-1+g.length)%g.length);break e}case"Enter":{_.preventDefault();let A=g[c];A!==void 0&&y(A);break e}}},"j"),e[9]=c,e[10]=g,e[11]=y,e[12]=w):w=e[12];let N=w,E;e[13]===Symbol.for("react.memo_cache_sentinel")?(E=(0,re.jsx)(pe.Backdrop,{className:"fixed inset-0 z-50 bg-black/40 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"}),e[13]=E):E=e[13];let T;e[14]!==r?(T=r("Command palette"),e[14]=r,e[15]=T):T=e[15];let k;e[16]!==T?(k=(0,re.jsx)(pe.Title,{className:"sr-only",children:T}),e[16]=T,e[17]=k):k=e[17];let O;e[18]===Symbol.for("react.memo_cache_sentinel")?(O=(0,re.jsxs)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,re.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,re.jsx)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"})]}),e[18]=O):O=e[18];let B;e[19]!==r?(B=r("Search\u2026"),e[19]=r,e[20]=B):B=e[20];let D;e[21]!==N||e[22]!==d||e[23]!==B?(D=(0,re.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[O,(0,re.jsx)("input",{className:"h-11 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground","data-testid":"dash-command-input",onChange:C,onKeyDown:N,placeholder:B,ref:h,type:"text",value:d})]}),e[21]=N,e[22]=d,e[23]=B,e[24]=D):D=e[24];let j;e[25]!==c||e[26]!==g||e[27]!==y||e[28]!==r?(j=g.length===0?(0,re.jsx)("li",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:r("No results.")}):g.map((_,A)=>(0,re.jsx)(Ys,{active:A===c,index:A,item:_,onActivate:u,onSelect:y},_.to)),e[25]=c,e[26]=g,e[27]=y,e[28]=r,e[29]=j):j=e[29];let H;e[30]!==j?(H=(0,re.jsx)("ul",{className:"max-h-80 overflow-y-auto p-1.5","data-testid":"dash-command-list",children:j}),e[30]=j,e[31]=H):H=e[31];let K;e[32]!==k||e[33]!==D||e[34]!==H?(K=(0,re.jsxs)(pe.Portal,{children:[E,(0,re.jsxs)(pe.Popup,{className:"fixed start-1/2 top-24 z-50 w-[36rem] max-w-[90vw] -translate-x-1/2 overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-lg outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95","data-testid":"dash-command-palette",initialFocus:h,children:[k,D,H]})]}),e[32]=k,e[33]=D,e[34]=H,e[35]=K):K=e[35];let W;return e[36]!==s||e[37]!==K?(W=(0,re.jsx)(pe.Root,{onOpenChange:x,open:s,children:K}),e[36]=s,e[37]=K,e[38]=W):W=e[38],W},"le");var vs="(prefers-color-scheme: dark)",bs=i(()=>{try{return globalThis.localStorage}catch{return}},"Vt"),Qs=i(t=>t==="system"||t==="light"||t==="dark","wa"),xs=i(()=>globalThis.matchMedia,"Zt"),ys="lunora-studio-theme",_r=["system","light","dark"],Xs=i((t="system")=>{try{let e=bs()?.getItem(ys);return Qs(e)?e:t}catch{return t}},"Na"),us=i(t=>{let e=bs();if(e!==void 0)try{e.setItem(ys,t)}catch{}},"St"),ei=i(()=>{try{return xs()?.(vs).matches?"dark":"light"}catch{return"light"}},"Sa"),ti=i((t,e)=>t==="system"?e:t,"Ma"),oi=i(t=>{let e;try{e=xs()?.(vs)}catch{e=void 0}if(e===void 0)return()=>{};let o=i(r=>{t(r.matches?"dark":"light")},"a");return e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}},"Ca"),Lr=(0,z.createContext)(null),ri=i(({children:t,defaultTheme:e="system"})=>{let[o,r]=(0,z.useState)(()=>Xs(e)),[n,s]=(0,z.useState)(()=>ei());(0,z.useEffect)(()=>oi(s),[]);let l=i(p=>{us(p),r(p)},"i"),d={cycleTheme:i(()=>{r(p=>{let c=_r[(_r.indexOf(p)+1)%_r.length]??p;return us(c),c})},"cycleTheme"),resolvedTheme:ti(o,n),setTheme:l,systemTheme:n,theme:o};return(0,a.jsx)(Lr,{value:d,children:t})},"_a"),ni=i(t=>{let e=(0,I.c)(3),{children:o}=t,r=(0,z.use)(Lr),n;return e[0]!==o||e[1]!==r?(n=r===null?(0,a.jsx)(ri,{children:o}):o,e[0]=o,e[1]=r,e[2]=n):n=e[2],n},"La"),ai=i(()=>{let t=(0,z.use)(Lr);if(t===null)throw new cr("INTERNAL","useTheme must be used within a <ThemeProvider>");return t},"Pa");function Vg({delay:t=0,...e}){return(0,a.jsx)(Se.Provider,{"data-slot":"tooltip-provider",delay:t,...e})}i(Vg,"dn");function si(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(Se.Root,{"data-slot":"tooltip",...o}),e[2]=o,e[3]=r):r=e[3],r}i(si,"$a");function ii(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(Se.Trigger,{"data-slot":"tooltip-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}i(ii,"Aa");function li({className:t,side:e="top",sideOffset:o=4,align:r="center",alignOffset:n=0,children:s,...l}){return(0,a.jsx)(Se.Portal,{children:(0,a.jsx)(Se.Positioner,{align:r,alignOffset:n,side:e,sideOffset:o,className:"isolate z-50",children:(0,a.jsxs)(Se.Popup,{"data-slot":"tooltip-content",className:$("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-md data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...l,children:[s,(0,a.jsx)(Se.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-md bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-start-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-end-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}i(li,"Ta");var ci=i(t=>{let e=(0,I.c)(5),{className:o}=t,r;e[0]!==o?(r=$("h-full w-full text-foreground",o),e[0]=o,e[1]=r):r=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.jsx)("path",{d:"M 259.500 10.552 C 220.080 15.859, 182.424 32.566, 152.500 58.025 C 110.179 94.031, 85.380 137.183, 77.518 188.500 C 75.410 202.255, 74.569 225.677, 75.796 236.466 C 76.757 244.917, 76.683 245.692, 74.518 249.966 C 63.118 272.466, 53.141 303.876, 51.382 322.799 L 50.718 329.943 71.960 320.471 C 83.643 315.262, 93.326 311, 93.478 311 C 93.630 311, 96.547 316.063, 99.959 322.250 C 103.371 328.438, 107.249 334.850, 108.577 336.500 L 110.990 339.500 110.981 336 C 110.977 334.075, 111.499 324.991, 112.143 315.813 L 113.312 299.127 121.406 293.336 C 132.495 285.403, 149.593 271.554, 161 261.268 C 171.556 251.748, 189.116 235, 188.540 235 C 188.337 235, 183.069 238.648, 176.835 243.106 C 142.318 267.789, 68.537 314, 63.646 314 C 61.843 314, 72.791 281.179, 80.905 262.259 C 92.233 235.845, 107.473 212.389, 132.106 183.453 L 138.451 176 148.268 176 C 176.192 176, 197.512 187.154, 212.868 209.797 C 216.470 215.108, 217.035 216.595, 216.477 219.297 C 211.386 243.968, 202.359 274.496, 193.797 296 C 183.898 320.861, 167.147 352.101, 152.395 373.215 L 147.004 380.930 152.891 385.830 C 161.400 392.911, 165.563 396, 166.594 395.998 C 167.092 395.998, 168.772 391.641, 170.327 386.317 C 176.279 365.934, 188.422 338.749, 200.942 317.778 C 223.060 280.731, 256.432 244.369, 294.500 215.836 C 309.956 204.252, 313.937 201.603, 314.719 202.385 C 315.116 202.783, 315.449 213.096, 315.460 225.304 C 315.474 241.855, 315.021 250.405, 313.680 258.924 C 307.009 301.272, 291.175 336.677, 263.112 372 C 255.259 381.883, 227.182 410.673, 218.516 417.727 L 213.532 421.783 223.439 424.880 C 281.705 443.093, 349.165 436.018, 398.616 406.508 C 446.728 377.797, 483.322 331.466, 497.366 281.481 C 503.381 260.075, 504.480 250.741, 504.491 221 C 504.501 191.997, 503.598 184.047, 497.987 163.732 C 484.768 115.871, 452.505 72.708, 407.718 42.964 C 381.051 25.254, 352.818 14.828, 319.695 10.460 C 305.932 8.645, 273.298 8.695, 259.500 10.552",fillRule:"evenodd"}),e[2]=n):n=e[2];let s;return e[3]!==r?(s=(0,a.jsx)("svg",{"aria-hidden":"true",className:r,fill:"currentColor",viewBox:"0 0 543 446",children:n}),e[3]=r,e[4]=s):s=e[4],s},"za"),Ps="lunora.studio.rulesBannerDismissed",di=i(()=>{try{return globalThis.localStorage.getItem(Ps)==="1"}catch{return!1}},"Ea"),pi=i(()=>{try{globalThis.localStorage.setItem(Ps,"1")}catch{}},"Ra"),ui=i(()=>{let t=(0,I.c)(18),e=ge(),[o,r]=(0,z.useState)(mi),n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=i(()=>{r(!0),pi()},"n"),t[0]=n):n=t[0];let s=n;if(o)return null;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"}),t[1]=l):l=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 p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[11px]",children:"lunora rules install"}),t[4]=p):p=t[4];let 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=(0,a.jsxs)("span",{children:[d," ",p," ",c]}),t[7]=d,t[8]=c,t[9]=u):u=t[9];let h;t[10]!==e?(h=e("Dismiss"),t[10]=e,t[11]=h):h=t[11];let v;t[12]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M18 6 6 18M6 6l12 12"})}),t[12]=v):v=t[12];let f;t[13]!==h?(f=(0,a.jsx)("button",{"aria-label":h,className:"ms-auto flex size-5 items-center justify-center rounded text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent","data-testid":"dash-app-rules-banner-dismiss",onClick:s,type:"button",children:v}),t[13]=h,t[14]=f):f=t[14];let m;return t[15]!==u||t[16]!==f?(m=(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2 border-b border-warning/30 bg-warning/10 px-6 py-2 text-[12px] text-foreground","data-testid":"dash-app-rules-banner",role:"note",children:[l,u,f]}),t[15]=u,t[16]=f,t[17]=m):m=t[17],m},"Ia");function mi(){return di()}i(mi,"Ha");function Cs(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(Be.Root,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}i(Cs,"Bt");function Rs(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(Be.Trigger,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}i(Rs,"Dt");function Ss({align:t="end",alignOffset:e=0,className:o,keepMounted:r=!1,side:n="bottom",sideOffset:s=6,...l}){return(0,a.jsx)(Be.Portal,{keepMounted:r,children:(0,a.jsx)(Be.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:n,sideOffset:s,children:(0,a.jsx)(Be.Popup,{className:$("z-50 w-72 origin-(--transform-origin) rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-md outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o),"data-slot":"popover-content",...l})})})}i(Ss,"Wt");var Ar=768;function fi(){let t=(0,I.c)(2),[e,o]=(0,z.useState)(void 0),r,n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=i(()=>{let s=globalThis.matchMedia(`(max-width: ${Ar-1}px)`),l=i(()=>{o(globalThis.innerWidth<Ar)},"i");return s.addEventListener("change",l),o(globalThis.innerWidth<Ar),()=>{s.removeEventListener("change",l)}},"r"),n=[],t[0]=r,t[1]=n):(r=t[0],n=t[1]),(0,z.useEffect)(r,n),!!e}i(fi,"Ka");function gi(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(pe.Root,{"data-slot":"sheet",...o}),e[2]=o,e[3]=r):r=e[3],r}i(gi,"Va");function hi(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(pe.Portal,{"data-slot":"sheet-portal",...o}),e[2]=o,e[3]=r):r=e[3],r}i(hi,"Za");function vi(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("fixed inset-0 z-50 bg-black/10 text-xs/relaxed transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)(pe.Backdrop,{"data-slot":"sheet-overlay",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(vi,"Oa");function bi({className:t,children:e,side:o="right",showCloseButton:r=!0,...n}){return(0,a.jsxs)(hi,{children:[(0,a.jsx)(vi,{}),(0,a.jsxs)(pe.Popup,{"data-slot":"sheet-content","data-side":o,className:$("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,r&&(0,a.jsxs)(pe.Close,{"data-slot":"sheet-close",render:(0,a.jsx)(hr,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"}),children:[(0,a.jsx)(gr,{icon:kn,strokeWidth:2}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}i(bi,"qa");function xi(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("flex flex-col gap-0.5 p-4",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sheet-header",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(xi,"Ba");function yi(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("text-sm font-medium text-foreground",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)(pe.Title,{"data-slot":"sheet-title",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(yi,"Da");function Pi(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("text-xs/relaxed text-muted-foreground",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)(pe.Description,{"data-slot":"sheet-description",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Pi,"Wa");var Ci="sidebar_state",Ri=3600*24*7,Si="16rem",Ni="18rem",Ti="3rem",wi="b",Ns=ye.createContext(null);function ar(){let t=ye.useContext(Ns);if(!t)throw new cr("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}i(ar,"ht");function Ei({defaultOpen:t=!0,open:e,onOpenChange:o,className:r,style:n,children:s,...l}){let d=fi(),[p,c]=ye.useState(!1),[u,h]=ye.useState(t),v=e??u,f=i(x=>{let P=typeof x=="function"?x(v):x;o?o(P):h(P),document.cookie=`${Ci}=${P}; path=/; max-age=${Ri}`},"h"),m=i(()=>d?c(x=>!x):f(x=>!x),"f"),g=ye.useEffectEvent(()=>{m()});ye.useEffect(()=>{let x=i(P=>{P.key===wi&&(P.metaKey||P.ctrlKey)&&(P.preventDefault(),g())},"m");return globalThis.addEventListener("keydown",x),()=>globalThis.removeEventListener("keydown",x)},[]);let b={state:v?"expanded":"collapsed",open:v,setOpen:f,isMobile:d,openMobile:p,setOpenMobile:c,toggleSidebar:m};return(0,a.jsx)(Ns.Provider,{value:b,children:(0,a.jsx)("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Si,"--sidebar-width-icon":Ti,...n},className:$("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),...l,children:s})})}i(Ei,"Ya");function ki({side:t="left",variant:e="sidebar",collapsible:o="offcanvas",className:r,children:n,dir:s,...l}){let{isMobile:d,state:p,openMobile:c,setOpenMobile:u}=ar();return o==="none"?(0,a.jsx)("div",{"data-slot":"sidebar",className:$("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...l,children:n}):d?(0,a.jsx)(gi,{open:c,onOpenChange:u,...l,children:(0,a.jsxs)(bi,{dir:s,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Ni},side:t,children:[(0,a.jsxs)(xi,{className:"sr-only",children:[(0,a.jsx)(yi,{children:"Sidebar"}),(0,a.jsx)(Pi,{children:"Displays the mobile sidebar."})]}),(0,a.jsx)("div",{className:"flex h-full w-full flex-col",children:n})]})}):(0,a.jsxs)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":p,"data-collapsible":p==="collapsed"?o:"","data-variant":e,"data-side":t,"data-slot":"sidebar",children:[(0,a.jsx)("div",{"data-slot":"sidebar-gap",className:$("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),(0,a.jsx)("div",{"data-slot":"sidebar-container","data-side":t,className:$("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e group-data-[side=right]:border-s",r),...l,children:(0,a.jsx)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-none group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:n})})]})}i(ki,"Ga");function Oi(t){let e=(0,I.c)(15),o,r,n;e[0]!==t?({className:o,onClick:r,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n):(o=e[1],r=e[2],n=e[3]);let{toggleSidebar:s}=ar(),l;e[4]!==o?(l=$(o),e[4]=o,e[5]=l):l=e[5];let d;e[6]!==r||e[7]!==s?(d=i(h=>{r?.(h),s()},"l"),e[6]=r,e[7]=s,e[8]=d):d=e[8];let p,c;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)(gr,{icon:On,strokeWidth:2,className:"rtl:rotate-180"}),c=(0,a.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=p,e[10]=c):(p=e[9],c=e[10]);let u;return e[11]!==n||e[12]!==l||e[13]!==d?(u=(0,a.jsxs)(hr,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:l,onClick:d,...n,children:[p,c]}),e[11]=n,e[12]=l,e[13]=d,e[14]=u):u=e[14],u}i(Oi,"er");function Mi(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-none md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("main",{"data-slot":"sidebar-inset",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Mi,"tr");function Di(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Di,"ar");function Ii(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Ii,"rr");function _i(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("flex min-h-0 flex-1 flex-col gap-0 overflow-x-hidden overflow-y-auto [scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_25%,transparent)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/25 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5 hover:[scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_50%,transparent)_transparent] hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/50",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(_i,"sr");function Ai(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("relative flex w-full min-w-0 flex-col p-2",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Ai,"nr");function Vi(t){let e=(0,I.c)(10),o,r,n,s;if(e[0]!==t){let{className:p,render:c,...u}=t;o=c,s=ur,r="div",n=Ee({className:$("flex h-8 shrink-0 items-center rounded-none px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",p)},u),e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s}else o=e[1],r=e[2],n=e[3],s=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=l):l=e[5];let d;return e[6]!==o||e[7]!==r||e[8]!==n?(d={defaultTagName:r,props:n,render:o,state:l},e[6]=o,e[7]=r,e[8]=n,e[9]=d):d=e[9],s(d)}i(Vi,"or");function Li(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("w-full text-xs",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Li,"ir");function ms(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("flex w-full min-w-0 flex-col gap-0",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(ms,"Mt");function fs(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("group/menu-item relative",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(fs,"Ct");var Hi=Qr("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 Ts({render:t,isActive:e=!1,variant:o="default",size:r="default",tooltip:n,className:s,...l}){let{isMobile:d,state:p}=ar(),c=ur({defaultTagName:"button",props:Ee({className:$(Hi({variant:o,size:r}),s)},l),render:n?(0,a.jsx)(ii,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:r,active:e}});return n?(typeof n=="string"&&(n={children:n}),(0,a.jsxs)(si,{children:[c,(0,a.jsx)(li,{side:"right",align:"center",hidden:p!=="collapsed"||d,...n})]})):c}i(Ts,"jt");var Bi=i(t=>t.replace("__lunora_admin__:",""),"dr"),Fi=i(()=>(0,z.useSyncExternalStore)(so.subscribe,so.getSnapshot,so.getSnapshot),"cr"),ji=i(t=>t==="error"?"destructive":t==="pending"?"secondary":"default","ur"),Ki=i(t=>{let e=(0,I.c)(56),{entry:o,focused:r}=t,n=ge(),s;e[0]!==r?(s=i(B=>{B!==null&&r&&B.scrollIntoView({block:"nearest"})},"o"),e[0]=r,e[1]=s):s=e[1];let l=s,d;e[2]!==o.functionPath||e[3]!==o.shardKey||e[4]!==o.summary?(d=i(()=>{Mn(`${o.functionPath} ${o.summary}${o.shardKey===""?"":` (shard ${o.shardKey})`}`)},"l"),e[2]=o.functionPath,e[3]=o.shardKey,e[4]=o.summary,e[5]=d):d=e[5];let p=d,c=r&&"bg-accent ring-1 ring-inset ring-primary/40",u;e[6]!==c?(u=$("border-b border-border/60 last:border-b-0",c),e[6]=c,e[7]=u):u=e[7];let h;e[8]!==o.status?(h=ji(o.status),e[8]=o.status,e[9]=h):h=e[9];let v=o.status==="pending"?"\u2026":o.status,f;e[10]!==h||e[11]!==v?(f=(0,a.jsx)(Lt,{className:"mt-px shrink-0",variant:h,children:v}),e[10]=h,e[11]=v,e[12]=f):f=e[12];let m;e[13]!==o.functionPath?(m=Bi(o.functionPath),e[13]=o.functionPath,e[14]=m):m=e[14];let g;e[15]!==m?(g=(0,a.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-foreground",children:m}),e[15]=m,e[16]=g):g=e[16];let b;e[17]!==o.kind||e[18]!==n?(b=o.kind==="subscription"&&(0,a.jsx)(Lt,{className:"shrink-0",variant:"outline",children:n("live")}),e[17]=o.kind,e[18]=n,e[19]=b):b=e[19];let x;e[20]!==o.summary?(x=o.summary!==""&&(0,a.jsx)("span",{className:"min-w-0 truncate text-muted-foreground",children:o.summary}),e[20]=o.summary,e[21]=x):x=e[21];let P;e[22]!==o.shardKey?(P=o.shardKey!==""&&(0,a.jsx)("span",{className:"font-mono",children:o.shardKey}),e[22]=o.shardKey,e[23]=P):P=e[23];let y;e[24]!==o.resultCount||e[25]!==n?(y=o.resultCount!==void 0&&(0,a.jsx)("span",{children:n("{count} rows",{count:o.resultCount})}),e[24]=o.resultCount,e[25]=n,e[26]=y):y=e[26];let S;e[27]!==o.pushes||e[28]!==n?(S=o.pushes!==void 0&&o.pushes>0&&(0,a.jsx)("span",{children:n("{count} pushes",{count:o.pushes})}),e[27]=o.pushes,e[28]=n,e[29]=S):S=e[29];let C;e[30]!==o.durationMs?(C=o.durationMs!==void 0&&(0,a.jsxs)("span",{children:[o.durationMs,"ms"]}),e[30]=o.durationMs,e[31]=C):C=e[31];let w;e[32]!==n?(w=n("Copy"),e[32]=n,e[33]=w):w=e[33];let N;e[34]!==p||e[35]!==w?(N=(0,a.jsx)("button",{"aria-label":w,className:"rounded px-1 outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-copy",onClick:p,type:"button",children:"\u29C9"}),e[34]=p,e[35]=w,e[36]=N):N=e[36];let E;e[37]!==P||e[38]!==y||e[39]!==S||e[40]!==C||e[41]!==N?(E=(0,a.jsxs)("span",{className:"ms-auto flex shrink-0 items-center gap-2 text-[11px] text-muted-foreground",children:[P,y,S,C,N]}),e[37]=P,e[38]=y,e[39]=S,e[40]=C,e[41]=N,e[42]=E):E=e[42];let T;e[43]!==b||e[44]!==x||e[45]!==E||e[46]!==f||e[47]!==g?(T=(0,a.jsxs)("div",{className:"flex items-start gap-2 px-3 py-1.5 text-xs",children:[f,g,b,x,E]}),e[43]=b,e[44]=x,e[45]=E,e[46]=f,e[47]=g,e[48]=T):T=e[48];let k;e[49]!==o.error?(k=o.error!==void 0&&(0,a.jsx)("p",{className:"px-3 pb-1.5 font-mono text-[11px] text-destructive","data-testid":"oc-error",children:o.error}),e[49]=o.error,e[50]=k):k=e[50];let O;return e[51]!==l||e[52]!==T||e[53]!==k||e[54]!==u?(O=(0,a.jsxs)("li",{className:u,"data-testid":"oc-row",ref:l,children:[T,k]}),e[51]=l,e[52]=T,e[53]=k,e[54]=u,e[55]=O):O=e[55],O},"hr"),zi=i(t=>{let e=(0,I.c)(62),{focusSeq:o,onClose:r,onShownChange:n,shown:s}=t,l=ge(),d=Fi(),[p,c]=(0,z.useState)(""),u;if(e[0]!==d||e[1]!==o||e[2]!==p||e[3]!==r||e[4]!==n||e[5]!==s||e[6]!==l){let h=p.trim().toLowerCase(),v=d.filter(V=>(s==="errors"?V.status==="error":!0)&&(h===""||`${V.functionPath} ${V.summary} ${V.shardKey}`.toLowerCase().includes(h))).toReversed(),f;e[8]!==d?(f=d.filter(Ui),e[8]=d,e[9]=f):f=e[9];let m=f.length,g;e[10]!==l?(g=l("Operation console"),e[10]=l,e[11]=g):g=e[11];let b;e[12]!==l?(b=l("Operation console"),e[12]=l,e[13]=b):b=e[13];let x;e[14]!==b?(x=(0,a.jsx)("span",{className:"text-xs font-medium",children:b}),e[14]=b,e[15]=x):x=e[15];let P;e[16]!==d.length||e[17]!==l?(P=l("{count} calls",{count:d.length}),e[16]=d.length,e[17]=l,e[18]=P):P=e[18];let y;e[19]!==P?(y=(0,a.jsx)(Lt,{variant:"secondary",children:P}),e[19]=P,e[20]=y):y=e[20];let S;e[21]!==m||e[22]!==l?(S=m>0&&(0,a.jsx)(Lt,{variant:"destructive",children:l("{count} failed",{count:m})}),e[21]=m,e[22]=l,e[23]=S):S=e[23];let C=s==="errors",w=s==="errors"&&"bg-accent",N;e[24]!==w?(N=$("rounded px-2 py-0.5 text-xs outline-none hover:bg-accent focus-visible:bg-accent",w),e[24]=w,e[25]=N):N=e[25];let E;e[26]!==n||e[27]!==s?(E=i(()=>{n(s==="errors"?"all":"errors")},"P"),e[26]=n,e[27]=s,e[28]=E):E=e[28];let T;e[29]!==l?(T=l("Errors"),e[29]=l,e[30]=T):T=e[30];let k;e[31]!==N||e[32]!==E||e[33]!==T||e[34]!==C?(k=(0,a.jsx)("button",{"aria-pressed":C,className:N,"data-testid":"oc-filter-errors",onClick:E,type:"button",children:T}),e[31]=N,e[32]=E,e[33]=T,e[34]=C,e[35]=k):k=e[35];let O;e[36]!==l?(O=l("Filter"),e[36]=l,e[37]=O):O=e[37];let B;e[38]===Symbol.for("react.memo_cache_sentinel")?(B=i(V=>{c(V.target.value)},"E"),e[38]=B):B=e[38];let D;e[39]!==l?(D=l("Filter"),e[39]=l,e[40]=D):D=e[40];let j;e[41]!==p||e[42]!==O||e[43]!==D?(j=(0,a.jsx)(mr,{"aria-label":O,className:"h-7 w-40 text-xs","data-testid":"oc-search",onChange:B,placeholder:D,value:p}),e[41]=p,e[42]=O,e[43]=D,e[44]=j):j=e[44];let H;e[45]!==l?(H=l("Clear"),e[45]=l,e[46]=H):H=e[46];let K;e[47]!==H?(K=(0,a.jsx)("button",{className:"ms-auto rounded px-2 py-0.5 text-xs text-muted-foreground outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-clear",onClick:Zi,type:"button",children:H}),e[47]=H,e[48]=K):K=e[48];let W;e[49]!==l?(W=l("Hide"),e[49]=l,e[50]=W):W=e[50];let _;e[51]!==r||e[52]!==W?(_=(0,a.jsx)("button",{"aria-label":W,className:"rounded px-2 py-0.5 text-xs text-muted-foreground outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-close",onClick:r,type:"button",children:"\u2715"}),e[51]=r,e[52]=W,e[53]=_):_=e[53];let A;e[54]!==k||e[55]!==j||e[56]!==K||e[57]!==_||e[58]!==x||e[59]!==y||e[60]!==S?(A=(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-1.5",children:[x,y,S,k,j,K,_]}),e[54]=k,e[55]=j,e[56]=K,e[57]=_,e[58]=x,e[59]=y,e[60]=S,e[61]=A):A=e[61],u=(0,a.jsxs)("section",{"aria-label":g,className:"flex max-h-80 flex-col border-t border-border bg-card","data-testid":"lunora-operation-console",children:[A,v.length===0?(0,a.jsx)("p",{className:"p-3 text-xs text-muted-foreground","data-testid":"oc-empty",children:l("Every admin call this studio makes is recorded here.")}):(0,a.jsx)("ul",{className:"min-h-0 flex-1 overflow-y-auto","data-testid":"oc-rows",children:v.map(V=>(0,a.jsx)(Ki,{entry:V,focused:V.seq===o},V.seq))})]}),e[0]=d,e[1]=o,e[2]=p,e[3]=r,e[4]=n,e[5]=s,e[6]=l,e[7]=u}else u=e[7];return u},"mr");function Ui(t){return t.status==="error"}i(Ui,"pr");function Zi(){so.clear()}i(Zi,"fr");var Wi=i(()=>{let t=(0,I.c)(304),e=ge(),o;t[0]!==e?(o=e("Health score"),t[0]=e,t[1]=o):o=t[1];let r;t[2]!==e?(r=e("Agents"),t[2]=e,t[3]=r):r=t[3];let n;t[4]!==e?(n=e("Analytics"),t[4]=e,t[5]=n):n=t[5];let s;t[6]!==e?(s=e("API"),t[6]=e,t[7]=s):s=t[7];let l;t[8]!==e?(l=e("Audit"),t[8]=e,t[9]=l):l=t[9];let d;t[10]!==e?(d=e("Auth audit"),t[10]=e,t[11]=d):d=t[11];let p;t[12]!==e?(p=e("Configuration"),t[12]=e,t[13]=p):p=t[13];let c;t[14]!==e?(c=e("Sessions"),t[14]=e,t[15]=c):c=t[15];let u;t[16]!==e?(u=e("Containers"),t[16]=e,t[17]=u):u=t[17];let h;t[18]!==e?(h=e("Dashboards"),t[18]=e,t[19]=h):h=t[19];let v;t[20]!==e?(v=e("Data"),t[20]=e,t[21]=v):v=t[21];let f;t[22]!==e?(f=e("Deployment health"),t[22]=e,t[23]=f):f=t[23];let m;t[24]!==e?(m=e("Log drains"),t[24]=e,t[25]=m):m=t[25];let g;t[26]!==e?(g=e("Export / Import"),t[26]=e,t[27]=g):g=t[27];let b;t[28]!==e?(b=e("Fan-out"),t[28]=e,t[29]=b):b=t[29];let x;t[30]!==e?(x=e("Files"),t[30]=e,t[31]=x):x=t[31];let P;t[32]!==e?(P=e("Flags"),t[32]=e,t[33]=P):P=t[33];let y;t[34]!==e?(y=e("Functions"),t[34]=e,t[35]=y):y=t[35];let S;t[36]!==e?(S=e("Health"),t[36]=e,t[37]=S):S=t[37];let C;t[38]!==e?(C=e("Home"),t[38]=e,t[39]=C):C=t[39];let w;t[40]!==e?(w=e("Performance"),t[40]=e,t[41]=w):w=t[41];let N;t[42]!==e?(N=e("Issues"),t[42]=e,t[43]=N):N=t[43];let E;t[44]!==e?(E=e("KV"),t[44]=e,t[45]=E):E=t[45];let T;t[46]!==e?(T=e("Logs"),t[46]=e,t[47]=T):T=t[47];let k;t[48]!==e?(k=e("Metrics"),t[48]=e,t[49]=k):k=t[49];let O;t[50]!==e?(O=e("Migrations"),t[50]=e,t[51]=O):O=t[51];let B;t[52]!==e?(B=e("Notifications"),t[52]=e,t[53]=B):B=t[53];let D;t[54]!==e?(D=e("Organizations"),t[54]=e,t[55]=D):D=t[55];let j;t[56]!==e?(j=e("Time Travel"),t[56]=e,t[57]=j):j=t[57];let H;t[58]!==e?(H=e("Mail"),t[58]=e,t[59]=H):H=t[59];let K;t[60]!==e?(K=e("Payments"),t[60]=e,t[61]=K):K=t[61];let W;t[62]!==e?(W=e("Permissions"),t[62]=e,t[63]=W):W=t[63];let _;t[64]!==e?(_=e("Queues"),t[64]=e,t[65]=_):_=t[65];let A;t[66]!==e?(A=e("Realtime"),t[66]=e,t[67]=A):A=t[67];let V;t[68]!==e?(V=e("RLS Policies"),t[68]=e,t[69]=V):V=t[69];let oe;t[70]!==e?(oe=e("Scheduled"),t[70]=e,t[71]=oe):oe=t[71];let te;t[72]!==e?(te=e("Schema"),t[72]=e,t[73]=te):te=t[73];let le;t[74]!==e?(le=e("Security"),t[74]=e,t[75]=le):le=t[75];let J;t[76]!==e?(J=e("Settings"),t[76]=e,t[77]=J):J=t[77];let Q;t[78]!==e?(Q=e("SQL editor"),t[78]=e,t[79]=Q):Q=t[79];let ne;t[80]!==e?(ne=e("Traces"),t[80]=e,t[81]=ne):ne=t[81];let ue;t[82]!==e?(ue=e("Access Rules"),t[82]=e,t[83]=ue):ue=t[83];let me;t[84]!==e?(me=e("Users"),t[84]=e,t[85]=me):me=t[85];let he;t[86]!==e?(he=e("Vectors"),t[86]=e,t[87]=he):he=t[87];let ce;t[88]!==e?(ce=e("Workflows"),t[88]=e,t[89]=ce):ce=t[89];let Pe;t[90]!==o||t[91]!==r||t[92]!==v||t[93]!==f||t[94]!==m||t[95]!==g||t[96]!==b||t[97]!==x||t[98]!==P||t[99]!==y||t[100]!==S||t[101]!==C||t[102]!==n||t[103]!==w||t[104]!==N||t[105]!==E||t[106]!==T||t[107]!==k||t[108]!==O||t[109]!==B||t[110]!==D||t[111]!==j||t[112]!==H||t[113]!==s||t[114]!==K||t[115]!==W||t[116]!==_||t[117]!==A||t[118]!==V||t[119]!==oe||t[120]!==te||t[121]!==le||t[122]!==J||t[123]!==Q||t[124]!==l||t[125]!==ne||t[126]!==ue||t[127]!==me||t[128]!==he||t[129]!==ce||t[130]!==d||t[131]!==p||t[132]!==c||t[133]!==u||t[134]!==h?(Pe={advisorHealth:o,agents:r,analytics:n,api:s,audit:l,authAudit:d,authConfig:p,authSessions:c,containers:u,dashboards:h,data:v,deploymentHealth:f,drains:m,export:g,fanout:b,files:x,flags:P,functions:y,health:S,home:C,insights:w,issues:N,kv:E,logs:T,metrics:k,migrations:O,notifications:B,organizations:D,pitr:j,mail:H,payments:K,permissions:W,queues:_,realtime:A,rls:V,schedule:oe,schema:te,security:le,settings:J,sql:Q,traces:ne,storageRules:ue,users:me,vectors:he,workflows:ce},t[90]=o,t[91]=r,t[92]=v,t[93]=f,t[94]=m,t[95]=g,t[96]=b,t[97]=x,t[98]=P,t[99]=y,t[100]=S,t[101]=C,t[102]=n,t[103]=w,t[104]=N,t[105]=E,t[106]=T,t[107]=k,t[108]=O,t[109]=B,t[110]=D,t[111]=j,t[112]=H,t[113]=s,t[114]=K,t[115]=W,t[116]=_,t[117]=A,t[118]=V,t[119]=oe,t[120]=te,t[121]=le,t[122]=J,t[123]=Q,t[124]=l,t[125]=ne,t[126]=ue,t[127]=me,t[128]=he,t[129]=ce,t[130]=d,t[131]=p,t[132]=c,t[133]=u,t[134]=h,t[135]=Pe):Pe=t[135];let q=Pe,ee;t[136]!==e?(ee=e("Advisors"),t[136]=e,t[137]=ee):ee=t[137];let ae;t[138]!==e?(ae=e("Auth"),t[138]=e,t[139]=ae):ae=t[139];let Ne;t[140]!==e?(Ne=e("Database"),t[140]=e,t[141]=Ne):Ne=t[141];let xe;t[142]!==e?(xe=e("Functions"),t[142]=e,t[143]=xe):xe=t[143];let De;t[144]!==e?(De=e("Observability"),t[144]=e,t[145]=De):De=t[145];let Te;t[146]!==e?(Te=e("Operations"),t[146]=e,t[147]=Te):Te=t[147];let we;t[148]!==e?(we=e("Overview"),t[148]=e,t[149]=we):we=t[149];let Ue;t[150]!==e?(Ue=e("Settings"),t[150]=e,t[151]=Ue):Ue=t[151];let Ze;t[152]!==e?(Ze=e("Storage"),t[152]=e,t[153]=Ze):Ze=t[153];let go;t[154]!==ee||t[155]!==ae||t[156]!==Ne||t[157]!==xe||t[158]!==De||t[159]!==Te||t[160]!==we||t[161]!==Ue||t[162]!==Ze?(go={advisors:ee,auth:ae,database:Ne,functions:xe,observability:De,operations:Te,overview:we,settings:Ue,storage:Ze},t[154]=ee,t[155]=ae,t[156]=Ne,t[157]=xe,t[158]=De,t[159]=Te,t[160]=we,t[161]=Ue,t[162]=Ze,t[163]=go):go=t[163];let sr=go,We;t[164]!==e?(We=e("Score your app's advisor findings: a grade, the coverage split, and every procedure ranked worst-first."),t[164]=e,t[165]=We):We=t[165];let $e;t[166]!==e?($e=e("Inspect agent threads, message timelines, tool calls, and token usage."),t[166]=e,t[167]=$e):$e=t[167];let qe;t[168]!==e?(qe=e("Usage and latency from Analytics Engine \u2014 request volume, p50/p95, and hot shards."),t[168]=e,t[169]=qe):qe=t[169];let Ge;t[170]!==e?(Ge=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[170]=e,t[171]=Ge):Ge=t[171];let Ye;t[172]!==e?(Ye=e("A durable log of admin state-changing operations."),t[172]=e,t[173]=Ye):Ye=t[173];let Je;t[174]!==e?(Je=e("Authentication and security events \u2014 sign-ins, MFA, and session changes."),t[174]=e,t[175]=Je):Je=t[175];let Qe;t[176]!==e?(Qe=e("Enabled plugins and session config (read-only)."),t[176]=e,t[177]=Qe):Qe=t[177];let Xe;t[178]!==e?(Xe=e("Browse and revoke active sessions across all users."),t[178]=e,t[179]=Xe):Xe=t[179];let et;t[180]!==e?(et=e("Live Cloudflare Containers \u2014 current lifecycle state per instance from the log stream."),t[180]=e,t[181]=et):et=t[181];let tt;t[182]!==e?(tt=e("Chart widgets backed by saved read-only SQL queries."),t[182]=e,t[183]=tt):tt=t[183];let ot;t[184]!==e?(ot=e("Browse and edit rows across your shard and global tables."),t[184]=e,t[185]=ot):ot=t[185];let rt;t[186]!==e?(rt=e("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint."),t[186]=e,t[187]=rt):rt=t[187];let nt;t[188]!==e?(nt=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[188]=e,t[189]=nt):nt=t[189];let at;t[190]!==e?(at=e("Export a shard to NDJSON, or import rows from it."),t[190]=e,t[191]=at):at=t[191];let st;t[192]!==e?(st=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[192]=e,t[193]=st):st=t[193];let it;t[194]!==e?(it=e("Browse objects in your R2 storage buckets."),t[194]=e,t[195]=it):it=t[195];let lt;t[196]!==e?(lt=e("Inspect feature flags and their live evaluation under a targeting context."),t[196]=e,t[197]=lt):lt=t[197];let ct;t[198]!==e?(ct=e("Run registered queries, mutations, and actions."),t[198]=e,t[199]=ct):ct=t[199];let dt;t[200]!==e?(dt=e("At-a-glance connection, error, and shard signals."),t[200]=e,t[201]=dt):dt=t[201];let pt;t[202]!==e?(pt=e("Connection, health, and advisor summary for your deployment."),t[202]=e,t[203]=pt):pt=t[203];let ut;t[204]!==e?(ut=e("Surface slow functions, error spikes, and cache problems."),t[204]=e,t[205]=ut):ut=t[205];let mt;t[206]!==e?(mt=e("Grouped error triage \u2014 Worker throws and container crashes folded by fingerprint."),t[206]=e,t[207]=mt):mt=t[207];let ft;t[208]!==e?(ft=e("A live stream of recent function logs."),t[208]=e,t[209]=ft):ft=t[209];let gt;t[210]!==e?(gt=e("Per-shard health and aggregate metrics."),t[210]=e,t[211]=gt):gt=t[211];let ht;t[212]!==e?(ht=e("Review migration status and run them."),t[212]=e,t[213]=ht):ht=t[213];let vt;t[214]!==e?(vt=e("Registered push devices \u2014 endpoint, kind, last-send status, and delivery errors."),t[214]=e,t[215]=vt):vt=t[215];let bt;t[216]!==e?(bt=e("Browse and manage organizations, members, and invitations."),t[216]=e,t[217]=bt):bt=t[217];let xt;t[218]!==e?(xt=e("Restore a shard to a point in the last 30 days."),t[218]=e,t[219]=xt):xt=t[219];let yt;t[220]!==e?(yt=e("Email your app sent, captured in dev."),t[220]=e,t[221]=yt):yt=t[221];let Pt;t[222]!==e?(Pt=e("Synced customers, subscriptions, and webhook events."),t[222]=e,t[223]=Pt):Pt=t[223];let Ct;t[224]!==e?(Ct=e("Inspect access policies per table, and probe a function as any identity."),t[224]=e,t[225]=Ct):Ct=t[225];let Rt;t[226]!==e?(Rt=e("Inspect declared Cloudflare Queues \u2014 their producer bindings, consumer mode, and dead-letter queue."),t[226]=e,t[227]=Rt):Rt=t[227];let St;t[228]!==e?(St=e("Active WebSocket subscriptions on this shard."),t[228]=e,t[229]=St):St=t[229];let Nt;t[230]!==e?(Nt=e("Inspect row-level-security policies and roles, per table."),t[230]=e,t[231]=Nt):Nt=t[231];let Tt;t[232]!==e?(Tt=e("Inspect and cancel scheduled jobs."),t[232]=e,t[233]=Tt):Tt=t[233];let wt;t[234]!==e?(wt=e("Inspect each table and its columns."),t[234]=e,t[235]=wt):wt=t[235];let Et;t[236]!==e?(Et=e("Review admin gates, credentials, and log redaction."),t[236]=e,t[237]=Et):Et=t[237];let kt;t[238]!==e?(kt=e("Read-only deployment config \u2014 vars, secrets, and bindings."),t[238]=e,t[239]=kt):kt=t[239];let Ot;t[240]!==e?(Ot=e("Run read-only SQL against a shard."),t[240]=e,t[241]=Ot):Ot=t[241];let Mt;t[242]!==e?(Mt=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[242]=e,t[243]=Mt):Mt=t[243];let Dt;t[244]!==e?(Dt=e("Inspect storage access rules \u2014 per bucket, operation, and key prefix."),t[244]=e,t[245]=Dt):Dt=t[245];let It;t[246]!==e?(It=e("Recent ctx.trace waterfalls for this shard \u2014 the drill-down from a log line."),t[246]=e,t[247]=It):It=t[247];let _t;t[248]!==e?(_t=e("Manage auth users \u2014 roles, bans, sessions, and identity."),t[248]=e,t[249]=_t):_t=t[249];let At;t[250]!==e?(At=e("Browse Vectorize indexes and run similarity searches."),t[250]=e,t[251]=At):At=t[251];let Vt;t[252]!==e?(Vt=e("Inspect declared Cloudflare Workflows and their bindings."),t[252]=e,t[253]=Vt):Vt=t[253];let ho;t[254]!==Vt||t[255]!==We||t[256]!==$e||t[257]!==qe||t[258]!==Ge||t[259]!==Ye||t[260]!==Je||t[261]!==Qe||t[262]!==Xe||t[263]!==et||t[264]!==tt||t[265]!==ot||t[266]!==rt||t[267]!==nt||t[268]!==at||t[269]!==st||t[270]!==it||t[271]!==lt||t[272]!==ct||t[273]!==dt||t[274]!==pt||t[275]!==ut||t[276]!==mt||t[277]!==ft||t[278]!==gt||t[279]!==ht||t[280]!==vt||t[281]!==bt||t[282]!==xt||t[283]!==yt||t[284]!==Pt||t[285]!==Ct||t[286]!==Rt||t[287]!==St||t[288]!==Nt||t[289]!==Tt||t[290]!==wt||t[291]!==Et||t[292]!==kt||t[293]!==Ot||t[294]!==Mt||t[295]!==Dt||t[296]!==It||t[297]!==_t||t[298]!==At?(ho={advisorHealth:We,agents:$e,analytics:qe,api:Ge,audit:Ye,authAudit:Je,authConfig:Qe,authSessions:Xe,containers:et,dashboards:tt,data:ot,deploymentHealth:rt,drains:nt,export:at,fanout:st,files:it,flags:lt,functions:ct,health:dt,home:pt,insights:ut,issues:mt,logs:ft,metrics:gt,migrations:ht,notifications:vt,organizations:bt,pitr:xt,mail:yt,payments:Pt,permissions:Ct,queues:Rt,realtime:St,rls:Nt,schedule:Tt,schema:wt,security:Et,settings:kt,sql:Ot,kv:Mt,storageRules:Dt,traces:It,users:_t,vectors:At,workflows:Vt},t[254]=Vt,t[255]=We,t[256]=$e,t[257]=qe,t[258]=Ge,t[259]=Ye,t[260]=Je,t[261]=Qe,t[262]=Xe,t[263]=et,t[264]=tt,t[265]=ot,t[266]=rt,t[267]=nt,t[268]=at,t[269]=st,t[270]=it,t[271]=lt,t[272]=ct,t[273]=dt,t[274]=pt,t[275]=ut,t[276]=mt,t[277]=ft,t[278]=gt,t[279]=ht,t[280]=vt,t[281]=bt,t[282]=xt,t[283]=yt,t[284]=Pt,t[285]=Ct,t[286]=Rt,t[287]=St,t[288]=Nt,t[289]=Tt,t[290]=wt,t[291]=Et,t[292]=kt,t[293]=Ot,t[294]=Mt,t[295]=Dt,t[296]=It,t[297]=_t,t[298]=At,t[299]=ho):ho=t[299];let ir=ho,vo;return t[300]!==sr||t[301]!==ir||t[302]!==q?(vo={groupLabel:sr,tabDescription:ir,tabLabel:q},t[300]=sr,t[301]=ir,t[302]=q,t[303]=vo):vo=t[303],vo},"gr"),$i=i(()=>{let t=(0,I.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,a.jsx)("rect",{height:"14",rx:"2",width:"20",x:"2",y:"3"}),(0,a.jsx)("path",{d:"M8 21h8M12 17v4"})]}),t[0]=e):e=t[0],e},"br"),qi=i(()=>{let t=(0,I.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,a.jsx)("path",{d:"M12 2v2m0 16v2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M2 12h2m16 0h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"})]}),t[0]=e):e=t[0],e},"vr"),Gi=i(()=>{let t=(0,I.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"})}),t[0]=e):e=t[0],e},"yr"),Yi=[{Icon:$i,value:"system"},{Icon:qi,value:"light"},{Icon:Gi,value:"dark"}],Ji=i(()=>{let t=(0,I.c)(19),{theme:e,setTheme:o}=ai(),r=ge(),n;t[0]!==r?(n=r("Dark theme"),t[0]=r,t[1]=n):n=t[1];let s;t[2]!==r?(s=r("Light theme"),t[2]=r,t[3]=s):s=t[3];let l;t[4]!==r?(l=r("System theme"),t[4]=r,t[5]=l):l=t[5];let d;t[6]!==n||t[7]!==s||t[8]!==l?(d={dark:n,light:s,system:l},t[6]=n,t[7]=s,t[8]=l,t[9]=d):d=t[9];let p=d,c;t[10]!==r?(c=r("Theme"),t[10]=r,t[11]=c):c=t[11];let u;t[12]!==p||t[13]!==o||t[14]!==e?(u=Yi.map(v=>{let{Icon:f,value:m}=v,g=e===m;return(0,a.jsxs)("button",{"aria-checked":g,"aria-label":p[m],className:$("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",g?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${m}`,onClick:i(()=>{o(m)},"onClick"),role:"radio",title:p[m],type:"button",children:[g&&(0,a.jsx)(Dn.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"}}),(0,a.jsx)("span",{className:"relative",children:(0,a.jsx)(f,{})})]},m)}),t[12]=p,t[13]=o,t[14]=e,t[15]=u):u=t[15];let h;return t[16]!==c||t[17]!==u?(h=(0,a.jsx)("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]=h):h=t[18],h},"kr"),Qi=i(t=>{let e=(0,I.c)(23),{domain:o,onOpenCommandPalette:r,page:n}=t,s=ge(),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(Oi,{className:"-ms-1"}),e[0]=l):l=e[0];let d;e[1]!==s?(d=s("Breadcrumb"),e[1]=s,e[2]=d):d=e[2];let p;e[3]!==o?(p=(0,a.jsx)("span",{className:"text-muted-foreground",children:o}),e[3]=o,e[4]=p):p=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,a.jsx)("svg",{"aria-hidden":"true",className:"size-3.5 text-muted-foreground/60",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})}),e[5]=c):c=e[5];let u;e[6]!==n?(u=(0,a.jsx)("span",{className:"font-medium text-foreground",children:n}),e[6]=n,e[7]=u):u=e[7];let h;e[8]!==d||e[9]!==p||e[10]!==u?(h=(0,a.jsxs)("nav",{"aria-label":d,className:"flex items-center gap-1.5 text-[13px]",children:[p,c,u]}),e[8]=d,e[9]=p,e[10]=u,e[11]=h):h=e[11];let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsxs)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,a.jsx)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"})]}),e[12]=v):v=e[12];let f;e[13]!==s?(f=s("Search\u2026"),e[13]=s,e[14]=f):f=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"\u2318K"}),e[15]=m):m=e[15];let g;e[16]!==r||e[17]!==f?(g=(0,a.jsxs)("button",{className:"mx-auto hidden h-8 w-72 items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 text-xs text-muted-foreground transition-colors hover:bg-muted md:flex","data-testid":"dash-app-search",onClick:r,type:"button",children:[v,f,m]}),e[16]=r,e[17]=f,e[18]=g):g=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=(0,a.jsx)("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:(0,a.jsx)(Ji,{})}),e[19]=b):b=e[19];let x;return e[20]!==g||e[21]!==h?(x=(0,a.jsxs)("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[l,h,g,b]}),e[20]=g,e[21]=h,e[22]=x):x=e[22],x},"wr"),Xi=i(t=>{let e=(0,I.c)(3),o,r;e[0]!==t?(o=i(()=>{if(t===void 0)return;let n=i(s=>{if(!s.ctrlKey||s.metaKey||s.altKey||s.shiftKey||s.repeat||s.key!=="`")return;let{target:l}=s;l instanceof HTMLElement&&(l.isContentEditable||["INPUT","SELECT","TEXTAREA"].includes(l.tagName))||(s.preventDefault(),t())},"n");return globalThis.addEventListener("keydown",n),()=>{globalThis.removeEventListener("keydown",n)}},"a"),r=[t],e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]),(0,z.useEffect)(o,r)},"Nr"),U=i((t,e)=>(0,z.lazy)(()=>t().then(o=>({default:o[e]}))),"C"),el=U(()=>import("./chunk-LJISXTZJ.js"),"InsightsPanel"),tl=(0,z.lazy)(()=>import("./chunk-PGC523I2.js")),ol=(0,z.lazy)(()=>import("./chunk-3AV5CV6K.js")),rl=(0,z.lazy)(()=>import("./chunk-AQX2QFCN.js")),nl=U(()=>import("./chunk-AUQKJYHL.js"),"AgentsPanel"),al=U(()=>import("./chunk-QP7IQOKF.js"),"AnalyticsPanel"),sl=(0,z.lazy)(()=>import("./chunk-5ZXDB6LB.js")),il=U(()=>import("./chunk-BL6NO3U3.js"),"AuthAuditPanel"),ll=U(()=>import("./chunk-BUTBQGUU.js"),"AuthConfigPanel"),cl=U(()=>import("./chunk-CT6ZDXLL.js"),"AuthSessionsPanel"),dl=U(()=>import("./chunk-GKSRVABT.js"),"OrganizationsPanel"),pl=U(()=>import("./chunk-MHAXZQVO.js"),"UsersPanel"),ul=U(()=>import("./chunk-67DKQC23.js"),"ContainersPanel"),ml=U(()=>import("./chunk-53KJRSHE.js"),"DeploymentHealthPanel"),fl=U(()=>import("./chunk-VFQDHG7I.js"),"TableEditor"),gl=U(()=>import("./chunk-C3HXK3A5.js"),"ExportImportPanel"),hl=U(()=>import("./chunk-6MKDYZ7A.js"),"MigrationsRoutePanel"),vl={data:An,migrations:Vn},bl=U(()=>import("./chunk-24JLZ2Z5.js"),"PitrPanel"),xl=U(()=>import("./chunk-LAHYLAT4.js"),"FlagsPanel"),yl=U(()=>import("./chunk-DG7YINFM.js"),"FunctionRunner"),Pl=U(()=>import("./chunk-IC64YIX5.js"),"FunctionStatsPanel"),Cl=U(()=>import("./chunk-E7TB4USI.js"),"IssuesPanel"),Rl=U(()=>import("./chunk-LQAKPCFX.js"),"AuditPanel"),Sl=U(()=>import("./chunk-S4ILMYP5.js"),"LogDrainsPanel"),Nl=(0,z.lazy)(()=>import("./chunk-ULCZDGWQ.js").then(t=>({default:t.LogsPanel}))),Tl=U(()=>import("./chunk-TBBJPPZ3.js"),"MailPanel"),wl=U(()=>import("./chunk-6VTLIGVX.js"),"SchedulePanel"),El=(0,z.lazy)(()=>import("./chunk-D3HXVA33.js")),kl=(0,z.lazy)(()=>import("./chunk-62EKHKTS.js")),Ol=U(()=>import("./chunk-T6OAYQTX.js"),"KvBrowser"),Ml=U(()=>import("./chunk-PM37X2V3.js"),"NotificationsPanel"),Dl=U(()=>import("./chunk-4COKHD2C.js"),"PaymentsPanel"),Il=U(()=>import("./chunk-SF4MF2FT.js"),"PermissionsPanel"),_l=(0,z.lazy)(()=>import("./chunk-XZSGE5ST.js")),Al=(0,z.lazy)(()=>import("./chunk-Z7G74IH4.js")),Vl=(0,z.lazy)(()=>import("./chunk-Y7JXGNXD.js")),Ll=U(()=>import("./chunk-ZPLWCC4I.js"),"HealthPanel"),Hl=U(()=>import("./chunk-ARP36PTE.js"),"MetricsPanel"),Bl=U(()=>import("./chunk-BRQMMGOS.js"),"SchemaViewer"),Fl=U(()=>import("./chunk-AZAGCJVI.js"),"SettingsPanel"),jl=U(()=>import("./chunk-YU5CI2FD.js"),"SqlEditorPanel"),Kl=U(()=>import("./chunk-QYIOW7CD.js"),"FileBrowser"),zl=U(()=>import("./chunk-DMCYISRF.js"),"StorageRulesPanel"),Ul=U(()=>import("./chunk-GSKOAKQ2.js"),"TracesPanel"),Zl=U(()=>import("./chunk-QV6KV4SD.js"),"VectorBrowser"),Wl=(0,z.lazy)(()=>import("./chunk-OG2AMGOC.js")),ws=(0,z.createContext)(null),$l={analytics:(0,a.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),api:(0,a.jsx)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4M13 5l-2 14"}),audit:(0,a.jsx)("path",{d:"M7 4h7l4 4v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm6 0v5h5M9 13h6M9 16h6M9 10h2"}),authAudit:(0,a.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8h6m-6 3h6"}),authConfig:(0,a.jsx)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6h-3.6l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"}),agents:(0,a.jsx)("path",{d:"M12 8V5m0 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM6 8h12a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2Zm3 5h.01M15 13h.01M9 21h6"}),authSessions:(0,a.jsx)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),containers:(0,a.jsx)("path",{d:"M3 7.5 12 3l9 4.5v9L12 21l-9-4.5v-9Zm0 0 9 4.5m0 0 9-4.5m-9 4.5V21"}),dashboards:(0,a.jsx)("path",{d:"M4 5h7v6H4V5Zm9 0h7v4h-7V5ZM4 14h7v5H4v-5Zm9-1h7v6h-7v-6Z"}),deploymentHealth:(0,a.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2 3 4-5"}),drains:(0,a.jsx)("path",{d:"M5 5h14M7 5v6a5 5 0 0 0 10 0V5M10 16h4v3h-4zM12 19v2"}),data:(0,a.jsx)("path",{d:"M5 6c0-1.4 3.1-2.5 7-2.5s7 1.1 7 2.5-3.1 2.5-7 2.5S5 7.4 5 6Zm0 0v12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5V6M5 12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5"}),export:(0,a.jsx)("path",{d:"M12 3v11m0 0 4-4m-4 4-4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"}),fanout:(0,a.jsx)("path",{d:"M12 5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm-7 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm14 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 7v3.5M12 10.5 6 17m6-6.5 6 6.5"}),files:(0,a.jsx)("path",{d:"M4 7a2 2 0 0 1 2-2h3l2 2.5h7a2 2 0 0 1 2 2V18a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7Z"}),flags:(0,a.jsx)("path",{d:"M6 21V4m0 0h11l-2 3 2 3H6"}),functions:(0,a.jsx)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4"}),health:(0,a.jsx)("path",{d:"M3 12h4l2 6 4-14 2 8h6"}),home:(0,a.jsx)("path",{d:"M3 11.5 12 4l9 7.5M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9"}),insights:(0,a.jsx)("path",{d:"M12 3a6 6 0 0 0-3.6 10.8c.5.4.8.9.9 1.5l.2 1.2h5l.2-1.2c.1-.6.4-1.1.9-1.5A6 6 0 0 0 12 3ZM9.5 20.5h5M10 18h4"}),issues:(0,a.jsx)("path",{d:"M10.3 4.3 2.5 18a2 2 0 0 0 1.7 3h15.6a2 2 0 0 0 1.7-3L13.7 4.3a2 2 0 0 0-3.4 0ZM12 9v4m0 3v.01"}),kv:(0,a.jsx)("path",{d:"M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"}),logs:(0,a.jsx)("path",{d:"M5 6h14M5 10h14M5 14h9M5 18h11"}),mail:(0,a.jsx)("path",{d:"M4 5h16v14H4V5Zm0 1.5 8 6 8-6"}),payments:(0,a.jsx)("path",{d:"M3 7h18v10H3V7Zm0 3h18M7 14h4"}),metrics:(0,a.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),migrations:(0,a.jsx)("path",{d:"M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"}),notifications:(0,a.jsx)("path",{d:"M15 17h5l-1.4-1.4A2 2 0 0 1 18 14.2V11a6 6 0 0 0-4-5.7V5a2 2 0 1 0-4 0v.3A6 6 0 0 0 6 11v3.2a2 2 0 0 1-.6 1.4L4 17h5m6 0v1a3 3 0 1 1-6 0v-1m6 0H9"}),organizations:(0,a.jsx)("path",{d:"M3 21V8l6-4 6 4v13M9 21v-5h2v5M15 11h6v10M18 14v.01M18 17v.01M6 9v.01M6 12v.01M6 15v.01"}),permissions:(0,a.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2.2 2.2L15 9.5M8.5 16h7"}),pitr:(0,a.jsx)("path",{d:"M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"}),queues:(0,a.jsx)("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"}),realtime:(0,a.jsx)("path",{d:"M5 12a7 7 0 0 1 14 0M8 12a4 4 0 0 1 8 0M12 12v8m0-8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}),rls:(0,a.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3ZM8.5 10h7M8.5 13h7"}),schedule:(0,a.jsx)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),schema:(0,a.jsx)("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"}),sql:(0,a.jsx)("path",{d:"M4 5h16v14H4V5Zm3 4 3 3-3 3m6 0h4"}),storageRules:(0,a.jsx)("path",{d:"M7 10V7a5 5 0 0 1 10 0v3m-11 0h12a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1Zm6 4v2"}),advisorHealth:(0,a.jsx)("path",{d:"M3 12h4l2-5 3 10 2-5h5"}),security:(0,a.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-2.5 8.5 2 2 4-4"}),traces:(0,a.jsx)("path",{d:"M3 6h9M6 12h12M10 18h7"}),settings:(0,a.jsx)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6H10.5l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"}),users:(0,a.jsx)("path",{d:"M16 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M9.5 10a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm11.5 10v-2a4 4 0 0 0-3-3.85M16 3.13A4 4 0 0 1 16 11"}),vectors:(0,a.jsx)("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"}),workflows:(0,a.jsx)("path",{d:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM7.5 10v2a2 2 0 0 0 2 2H14m2.5-4V8a2 2 0 0 0-2-2H10"})},gs=[{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:["advisorHealth","security","rls","permissions","insights"]},{key:"operations",tabs:["schedule","mail","drains","notifications","payments","flags"]},{key:"settings",tabs:["settings"]}],ql={analytics:"analytics",authAudit:"auth",authConfig:"auth",authSessions:"auth",containers:"containers",files:"storage",flags:"flags",kv:"kv",mail:"mail",notifications:"notifications",organizations:"auth",payments:"payments",queues:"queues",schedule:"scheduler",storageRules:"storage",users:"auth",vectors:"vectors",workflows:"workflows"},hs=i((t,e)=>{let o=ql[t];return o===void 0||e[o]},"Lt"),Vr=i(t=>{let e=(0,I.c)(2),{tab:o}=t,r=$l[o],n;return e[0]!==r?(n=(0,a.jsx)("svg",{"aria-hidden":"true",className:"size-4 shrink-0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:r}),e[0]=r,e[1]=n):n=e[1],n},"xt"),Gl=i(t=>t,"ys"),Es=Gl(["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","advisorHealth","security","rls","permissions","insights","issues","logs","traces","realtime","fanout","mail","notifications","payments","audit","schedule","drains","flags","settings"]),Yl=new Set(["api","data","migrations","sql"]),Jl=i(t=>{let e=t.split("/").findLast(Boolean)??"";return Es.includes(e)?e:"home"},"ks"),Ql=i(t=>{let e=(0,I.c)(19),{chrome:o,connected:r}=t,n=ge(),s;e[0]!==n?(s=n("admin token"),e[0]=n,e[1]=s):s=e[1];let l;e[2]!==s?(l=(0,a.jsx)("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:s}),e[2]=s,e[3]=l):l=e[3];let d;e[4]!==o.onTokenChange||e[5]!==o.token?(d=(0,a.jsx)(mr,{className:"h-8","data-testid":"dash-app-token",id:"dash-app-token",onChange:o.onTokenChange,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:o.token}),e[4]=o.onTokenChange,e[5]=o.token,e[6]=d):d=e[6];let p;e[7]!==r||e[8]!==n?(p=r&&(0,a.jsxs)("p",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground","data-testid":"dash-app-token-warning",role:"note",children:[(0,a.jsx)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"}),n("Token rides the WebSocket URL \u2014 it can surface in browser DevTools and server logs. Use a dev-only token.")]}),e[7]=r,e[8]=n,e[9]=p):p=e[9];let c;e[10]!==o.clearToken||e[11]!==r||e[12]!==n?(c=r&&(0,a.jsx)("button",{className:"self-start rounded-md border border-border px-2.5 py-1 text-xs font-medium outline-none transition-colors hover:bg-accent focus-visible:bg-accent","data-testid":"dash-app-clear-token",onClick:o.clearToken,type:"button",children:n("Clear")}),e[10]=o.clearToken,e[11]=r,e[12]=n,e[13]=c):c=e[13];let u;return e[14]!==l||e[15]!==d||e[16]!==p||e[17]!==c?(u=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[l,d,p,c]}),e[14]=l,e[15]=d,e[16]=p,e[17]=c,e[18]=u):u=e[18],u},"ws"),Xl=i(t=>{let e=(0,I.c)(25),{current:o,group:r,groupLabel:n,selectTab:s,tabDescription:l,tabLabel:d}=t,p=r.tabs.includes(o)?"page":void 0,c=n[r.key],u=r.tabs[0],h;e[0]!==u?(h=(0,a.jsx)(Vr,{tab:u}),e[0]=u,e[1]=h):h=e[1];let v;e[2]!==p||e[3]!==c||e[4]!==h?(v=(0,a.jsx)(Rs,{"aria-current":p,"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:h}),e[2]=p,e[3]=c,e[4]=h,e[5]=v):v=e[5];let f=n[r.key],m;e[6]!==f?(m=(0,a.jsx)("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:f}),e[6]=f,e[7]=m):m=e[7];let g;if(e[8]!==o||e[9]!==r.tabs||e[10]!==s||e[11]!==l||e[12]!==d){let P;e[14]!==o||e[15]!==s||e[16]!==l||e[17]!==d?(P=i(y=>(0,a.jsxs)("button",{"aria-current":o===y?"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":y,"data-testid":`dash-tab-${y}`,onClick:s,title:l[y],type:"button",children:[(0,a.jsx)(Vr,{tab:y}),(0,a.jsx)("span",{children:d[y]})]},y),"y"),e[14]=o,e[15]=s,e[16]=l,e[17]=d,e[18]=P):P=e[18],g=r.tabs.map(P),e[8]=o,e[9]=r.tabs,e[10]=s,e[11]=l,e[12]=d,e[13]=g}else g=e[13];let b;e[19]!==m||e[20]!==g?(b=(0,a.jsxs)(Ss,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[m,g]}),e[19]=m,e[20]=g,e[21]=b):b=e[21];let x;return e[22]!==v||e[23]!==b?(x=(0,a.jsxs)(Cs,{children:[v,b]}),e[22]=v,e[23]=b,e[24]=x):x=e[24],x},"Ns"),ec=i(t=>{let e=(0,I.c)(45),{chrome:o,collapsed:r,connected:n}=t,s=ge();if(o===null){let y;e[0]!==s?(y=s("Admin"),e[0]=s,e[1]=y):y=e[1];let S;e[2]===Symbol.for("react.memo_cache_sentinel")?(S=(0,a.jsx)("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"}),e[2]=S):S=e[2];let C;e[3]!==s?(C=s("Admin"),e[3]=s,e[4]=C):C=e[4];let w;e[5]!==C?(w=(0,a.jsx)("span",{className:"truncate text-[13px] font-medium",children:C}),e[5]=C,e[6]=w):w=e[6];let N;e[7]!==s?(N=s("Studio"),e[7]=s,e[8]=N):N=e[8];let E;e[9]!==N?(E=(0,a.jsx)("span",{className:"truncate text-[11px] text-muted-foreground",children:N}),e[9]=N,e[10]=E):E=e[10];let T;e[11]!==w||e[12]!==E?(T=(0,a.jsxs)("span",{className:"grid flex-1 text-start leading-tight",children:[w,E]}),e[11]=w,e[12]=E,e[13]=T):T=e[13];let k;return e[14]!==y||e[15]!==T?(k=(0,a.jsxs)(Ts,{className:"data-active:bg-transparent",size:"lg",tooltip:y,children:[S,T]}),e[14]=y,e[15]=T,e[16]=k):k=e[16],k}let l=r?"mx-auto size-8 justify-center":"w-full p-2",d;e[17]!==l?(d=$("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",l),e[17]=l,e[18]=d):d=e[18];let p;e[19]!==n||e[20]!==s?(p=s(n?"Connected":"Not connected"),e[19]=n,e[20]=s,e[21]=p):p=e[21];let c=n?"bg-success":"bg-muted-foreground/50",u;e[22]!==c?(u=$("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 h;e[24]!==u?(h=(0,a.jsxs)("span",{className:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:["C",(0,a.jsx)("span",{"aria-hidden":"true",className:u})]}),e[24]=u,e[25]=h):h=e[25];let v;e[26]!==r||e[27]!==n||e[28]!==s?(v=!r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"grid flex-1 text-start leading-tight",children:[(0,a.jsx)("span",{className:"truncate text-[13px] font-medium",children:s("Admin")}),(0,a.jsx)("span",{className:"truncate text-[11px] text-muted-foreground",children:s(n?"Connected":"Not connected")})]}),(0,a.jsx)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"m8 9 4-4 4 4M8 15l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e[26]=r,e[27]=n,e[28]=s,e[29]=v):v=e[29];let f;e[30]!==d||e[31]!==p||e[32]!==h||e[33]!==v?(f=(0,a.jsxs)(Rs,{className:d,"data-testid":"dash-app-connect",title:p,children:[h,v]}),e[30]=d,e[31]=p,e[32]=h,e[33]=v,e[34]=f):f=e[34];let m=r?"end":"start",g=r?"right":"top",b;e[35]!==o||e[36]!==n?(b=(0,a.jsx)(Ql,{chrome:o,connected:n}),e[35]=o,e[36]=n,e[37]=b):b=e[37];let x;e[38]!==g||e[39]!==b||e[40]!==m?(x=(0,a.jsx)(Ss,{align:m,keepMounted:!0,side:g,children:b}),e[38]=g,e[39]=b,e[40]=m,e[41]=x):x=e[41];let P;return e[42]!==x||e[43]!==f?(P=(0,a.jsxs)(Cs,{children:[f,x]}),e[42]=x,e[43]=f,e[44]=P):P=e[44],P},"Ss"),tc=i(t=>{let e=(0,I.c)(28),{chrome:o,connected:r,current:n,groupLabel:s,groups:l,selectTab:d,tabDescription:p,tabLabel:c}=t,u=ge(),{state:h}=ar(),v=h==="collapsed",f=v&&"justify-center px-0",m;e[0]!==f?(m=$("flex items-center gap-2.5 px-1.5 py-1",f),e[0]=f,e[1]=m):m=e[1];let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=(0,a.jsx)(ci,{className:"size-9 shrink-0 text-foreground"}),e[2]=g):g=e[2];let b;e[3]!==v||e[4]!==r||e[5]!==u?(b=!v&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"grid flex-1 leading-tight",children:[(0,a.jsx)("span",{className:"truncate text-sm font-semibold text-foreground",children:"lunora"}),(0,a.jsx)("span",{className:"truncate text-[11px] text-muted-foreground",children:u("Studio")})]}),(0,a.jsx)(Lt,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:u(r?"Live":"Local")})]}),e[3]=v,e[4]=r,e[5]=u,e[6]=b):b=e[6];let x;e[7]!==m||e[8]!==b?(x=(0,a.jsx)(Di,{children:(0,a.jsxs)("div",{className:m,children:[g,b]})}),e[7]=m,e[8]=b,e[9]=x):x=e[9];let P;e[10]!==v||e[11]!==n||e[12]!==s||e[13]!==l||e[14]!==d||e[15]!==p||e[16]!==c?(P=v?l.map(w=>(0,a.jsx)(Xl,{current:n,group:w,groupLabel:s,selectTab:d,tabDescription:p,tabLabel:c},w.key)):l.map(w=>(0,a.jsxs)(Ai,{children:[(0,a.jsx)(Vi,{className:"text-[11px] font-medium tracking-wider uppercase",children:s[w.key]}),(0,a.jsx)(Li,{children:(0,a.jsx)(ms,{children:w.tabs.map(N=>(0,a.jsx)(fs,{children:(0,a.jsxs)(Ts,{className:"data-active:text-foreground dark:data-active:text-royal-amethyst data-active:shadow-[inset_2px_0_0_0_var(--royal-amethyst)]","data-tab":N,"data-testid":`dash-tab-${N}`,isActive:n===N,onClick:d,title:p[N],tooltip:p[N],children:[(0,a.jsx)(Vr,{tab:N}),(0,a.jsx)("span",{children:c[N]})]})},N))})})]},w.key)),e[10]=v,e[11]=n,e[12]=s,e[13]=l,e[14]=d,e[15]=p,e[16]=c,e[17]=P):P=e[17];let y;e[18]!==P?(y=(0,a.jsx)(_i,{children:P}),e[18]=P,e[19]=y):y=e[19];let S;e[20]!==o||e[21]!==v||e[22]!==r?(S=(0,a.jsx)(Ii,{children:(0,a.jsx)(ms,{children:(0,a.jsx)(fs,{children:(0,a.jsx)(ec,{chrome:o,collapsed:v,connected:r})})})}),e[20]=o,e[21]=v,e[22]=r,e[23]=S):S=e[23];let C;return e[24]!==x||e[25]!==y||e[26]!==S?(C=(0,a.jsxs)(ki,{collapsible:"icon",variant:"inset",children:[x,y,S]}),e[24]=x,e[25]=y,e[26]=S,e[27]=C):C=e[27],C},"Ms"),ks=i(()=>{let t=(0,I.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(Fo,{className:"h-8 w-40"}),(0,a.jsx)(Fo,{className:"h-8 w-24"})]}),(0,a.jsx)(Fo,{className:"h-72 w-full"})]}),t[0]=e):e=t[0],e},"Jt"),oc=i(()=>{let t=(0,I.c)(64),e=ge(),o=no(),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={select:lc},t[0]=r):r=t[0];let n=Wr(r),s,l;t[1]!==n?(s=Jl(n),l=Yl.has(s),t[1]=n,t[2]=s,t[3]=l):(s=t[2],l=t[3]);let d=l,p=qr(),c=p?.toggle;Xi(c);let u=In(),{groupLabel:h,tabDescription:v,tabLabel:f}=Wi(),m;t[4]!==u?(m=i(ce=>({...ce,tabs:ce.tabs.filter(Pe=>hs(Pe,u))}),"f"),t[4]=u,t[5]=m):m=t[5];let g=gs.map(m).filter(cc),b,x;t[6]!==s||t[7]!==u||t[8]!==o?(b=i(()=>{hs(s,u)||Jt(o({replace:!0,to:"/home"}))},"b"),x=[s,u,o],t[6]=s,t[7]=u,t[8]=o,t[9]=b,t[10]=x):(b=t[9],x=t[10]),(0,z.useEffect)(b,x);let P;t[11]!==o?(P=i(ce=>{Jt(o({to:`/${ce.currentTarget.dataset.tab??""}`}))},"y"),t[11]=o,t[12]=P):P=t[12];let y=P,S,C;t[13]!==s||t[14]!==f?(S=i(()=>{typeof document<"u"&&(document.title=`${f[s]} \xB7 lunora`)},"S"),C=[s,f],t[13]=s,t[14]=f,t[15]=S,t[16]=C):(S=t[15],C=t[16]),(0,z.useEffect)(S,C);let w=g.find(ce=>ce.tabs.includes(s))??gs[0],N;t[17]!==h||t[18]!==f?(N=i(ce=>ce.tabs.map(Pe=>({group:h[ce.key],label:f[Pe],to:`/${Pe}`})),"N"),t[17]=h,t[18]=f,t[19]=N):N=t[19];let E=g.flatMap(N),T=(0,z.use)(ws),k=T!==null&&T.token!=="",O;t[20]!==E?(O=(0,a.jsx)(ps,{items:E}),t[20]=E,t[21]=O):O=t[21];let B;t[22]!==T||t[23]!==k||t[24]!==s||t[25]!==h||t[26]!==y||t[27]!==v||t[28]!==f||t[29]!==g?(B=(0,a.jsx)(tc,{chrome:T,connected:k,current:s,groupLabel:h,groups:g,selectTab:y,tabDescription:v,tabLabel:f}),t[22]=T,t[23]=k,t[24]=s,t[25]=h,t[26]=y,t[27]=v,t[28]=f,t[29]=g,t[30]=B):B=t[30];let D=h[w.key],j=f[s],H;t[31]!==D||t[32]!==j?(H=(0,a.jsx)(Qi,{domain:D,onOpenCommandPalette:ds,page:j}),t[31]=D,t[32]=j,t[33]=H):H=t[33];let K;t[34]!==T?.rulesInstalled?(K=T?.rulesInstalled===!1&&(0,a.jsx)(ui,{}),t[34]=T?.rulesInstalled,t[35]=K):K=t[35];let W=`dash-tab-${s}`,_=d?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",A=f[s],V;t[36]!==e||t[37]!==A?(V=e("{title} failed",{title:A}),t[36]=e,t[37]=A,t[38]=V):V=t[38];let oe=f[s],te;t[39]!==e?(te=e("Try again"),t[39]=e,t[40]=te):te=t[40];let le;t[41]===Symbol.for("react.memo_cache_sentinel")?(le=(0,a.jsx)(z.Suspense,{fallback:(0,a.jsx)(ks,{}),children:(0,a.jsx)(zr,{})}),t[41]=le):le=t[41];let J;t[42]!==s||t[43]!==V||t[44]!==oe||t[45]!==te?(J=(0,a.jsx)(jo,{fallbackTitle:V,label:oe,retryLabel:te,children:le},s),t[42]=s,t[43]=V,t[44]=oe,t[45]=te,t[46]=J):J=t[46];let Q;t[47]!==_||t[48]!==J?(Q=(0,a.jsx)("div",{className:_,children:J}),t[47]=_,t[48]=J,t[49]=Q):Q=t[49];let ne;t[50]!==p?(ne=p?.open===!0&&(0,a.jsx)(zi,{focusSeq:p.focusSeq,onClose:p.close,onShownChange:p.setShown,shown:p.shown}),t[50]=p,t[51]=ne):ne=t[51];let ue;t[52]!==W||t[53]!==Q||t[54]!==ne?(ue=(0,a.jsxs)("div",{"aria-labelledby":W,className:"flex min-w-0 flex-1 flex-col overflow-hidden","data-testid":"dash-panel",id:"dash-panel",role:"tabpanel",children:[Q,ne]}),t[52]=W,t[53]=Q,t[54]=ne,t[55]=ue):ue=t[55];let me;t[56]!==H||t[57]!==K||t[58]!==ue?(me=(0,a.jsxs)(Mi,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[H,K,ue]}),t[56]=H,t[57]=K,t[58]=ue,t[59]=me):me=t[59];let he;return t[60]!==B||t[61]!==me||t[62]!==O?(he=(0,a.jsxs)(Ei,{className:"min-h-0 flex-1","data-testid":"lunora-studio",children:[O,B,me]}),t[60]=B,t[61]=me,t[62]=O,t[63]=he):he=t[63],he},"Cs"),rc=i(()=>{let t=(0,I.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)($r,{children:(0,a.jsx)(oc,{})}),t[0]=e):e=t[0],e},"_s"),nc=i(t=>{let e=(0,I.c)(5),{initialShardKey:o,schemaEditable:r}=t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];let s=jr(n),{table:l}=s,d=typeof l=="string"?l:void 0,p;return e[1]!==o||e[2]!==d||e[3]!==r?(p=(0,a.jsx)(Bl,{initialShardKey:o,initialTable:d,schemaEditable:r}),e[1]=o,e[2]=d,e[3]=r,e[4]=p):p=e[4],p},"Ls"),ac=i(()=>{let t=(0,I.c)(3),e=no(),o,r;return t[0]!==e?(o=i(()=>{Jt(e({replace:!0,to:"/home"}))},"a"),r=[e],t[0]=e,t[1]=o,t[2]=r):(o=t[1],r=t[2]),(0,z.useEffect)(o,r),null},"Ps"),sc=i(({basePath:t,dataEditable:e=!1,functions:o,initialShardKey:r,openApiSpec:n,openRpcSpec:s,runAsIdentity:l=!1,schemaEditable:d=!1,scheduledCancel:p,scheduledCron:c,scheduledLoad:u})=>{let h=Kr({component:rc}),v={agents:(0,a.jsx)(nl,{initialShardKey:r}),analytics:(0,a.jsx)(al,{}),api:(0,a.jsx)(sl,{functions:o,initialShardKey:r,openApiSpec:n,openRpcSpec:s}),audit:(0,a.jsx)(Rl,{initialShardKey:r}),authAudit:(0,a.jsx)(il,{}),authConfig:(0,a.jsx)(ll,{}),authSessions:(0,a.jsx)(cl,{}),containers:(0,a.jsx)(ul,{}),dashboards:(0,a.jsx)(Al,{initialShardKey:r}),data:(0,a.jsx)(fl,{editable:e,initialShardKey:r}),deploymentHealth:(0,a.jsx)(ml,{}),drains:(0,a.jsx)(Sl,{}),export:(0,a.jsx)(gl,{initialShardKey:r}),fanout:(0,a.jsx)(Vl,{initialShardKey:r}),files:(0,a.jsx)(Kl,{}),kv:(0,a.jsx)(Ol,{}),flags:(0,a.jsx)(xl,{initialShardKey:r}),functions:(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(Pl,{functions:o,initialShardKey:r}),(0,a.jsx)(yl,{functions:o,runAsIdentity:l})]}),health:(0,a.jsx)(Ll,{initialShardKey:r}),home:(0,a.jsx)(_n,{initialShardKey:r}),insights:(0,a.jsx)(el,{initialShardKey:r}),issues:(0,a.jsx)(Cl,{initialShardKey:r}),logs:(0,a.jsx)(Nl,{initialShardKey:r}),traces:(0,a.jsx)(Ul,{initialShardKey:r}),metrics:(0,a.jsx)(Hl,{initialShardKey:r}),migrations:(0,a.jsx)(hl,{initialShardKey:r}),notifications:(0,a.jsx)(Ml,{}),organizations:(0,a.jsx)(dl,{}),permissions:(0,a.jsx)(Il,{functions:o,runAsIdentity:l,schemaEditable:d}),pitr:(0,a.jsx)(bl,{initialShardKey:r}),mail:(0,a.jsx)(Tl,{}),payments:(0,a.jsx)(Dl,{}),queues:(0,a.jsx)(_l,{}),realtime:(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(El,{initialShardKey:r}),(0,a.jsx)(kl,{})]}),rls:(0,a.jsx)(tl,{}),schedule:(0,a.jsx)(wl,{loadCronJobs:c,scheduledCancel:p,scheduledLoad:u}),schema:(0,a.jsx)(nc,{initialShardKey:r,schemaEditable:d}),advisorHealth:(0,a.jsx)(ol,{}),security:(0,a.jsx)(rl,{}),settings:(0,a.jsx)(Fl,{initialShardKey:r}),sql:(0,a.jsx)(jl,{initialShardKey:r}),storageRules:(0,a.jsx)(zl,{}),users:(0,a.jsx)(pl,{}),vectors:(0,a.jsx)(Zl,{}),workflows:(0,a.jsx)(Wl,{})},f=pr({component:i(()=>v.home,"component"),getParentRoute:i(()=>h,"getParentRoute"),path:"/"}),m=Es.map(x=>pr({component:i(()=>v[x],"component"),getParentRoute:i(()=>h,"getParentRoute"),path:`/${x}`,validateSearch:vl[x]})),g=h.addChildren([f,...m]),b="window"in globalThis?Br():Fr({initialEntries:["/home"]});return Ur({...t===void 0||t==="/"?{}:{basepath:t},defaultNotFoundComponent:ac,defaultPendingComponent:ks,defaultPendingMinMs:0,defaultPendingMs:0,history:b,routeTree:g})},"$s"),ic=i(t=>{let e=(0,I.c)(17),{basePath:o,chrome:r,dataEditable:n,functions:s,initialShardKey:l,openApiSpec:d,openRpcSpec:p,runAsIdentity:c,schemaEditable:u,scheduledCancel:h,scheduledCron:v,scheduledLoad:f}=t,m;e[0]!==o||e[1]!==n||e[2]!==s||e[3]!==l||e[4]!==d||e[5]!==p||e[6]!==c||e[7]!==h||e[8]!==v||e[9]!==f||e[10]!==u?(m=sc({basePath:o,dataEditable:n,functions:s,initialShardKey:l,openApiSpec:d,openRpcSpec:p,runAsIdentity:c,schemaEditable:u,scheduledCancel:h,scheduledCron:v,scheduledLoad:f}),e[0]=o,e[1]=n,e[2]=s,e[3]=l,e[4]=d,e[5]=p,e[6]=c,e[7]=h,e[8]=v,e[9]=f,e[10]=u,e[11]=m):m=e[11];let g=m,b=r??null,x;e[12]!==g?(x=(0,a.jsx)(Zr,{router:g}),e[12]=g,e[13]=x):x=e[13];let P;return e[14]!==b||e[15]!==x?(P=(0,a.jsx)(ws,{value:b,children:x}),e[14]=b,e[15]=x,e[16]=P):P=e[16],P},"As"),Lg=i(t=>{let e=(0,I.c)(17),{basePath:o,chrome:r,dataEditable:n,functions:s,i18n:l,initialShardKey:d,locale:p,openApiSpec:c,openRpcSpec:u,runAsIdentity:h,schemaEditable:v,scheduledCancel:f,scheduledCron:m,scheduledLoad:g}=t,b;e[0]!==o||e[1]!==r||e[2]!==n||e[3]!==s||e[4]!==d||e[5]!==c||e[6]!==u||e[7]!==h||e[8]!==f||e[9]!==m||e[10]!==g||e[11]!==v?(b=(0,a.jsx)(ni,{children:(0,a.jsx)(ic,{basePath:o,chrome:r,dataEditable:n,functions:s,initialShardKey:d,openApiSpec:c,openRpcSpec:u,runAsIdentity:h,scheduledCancel:f,scheduledCron:m,scheduledLoad:g,schemaEditable:v})}),e[0]=o,e[1]=r,e[2]=n,e[3]=s,e[4]=d,e[5]=c,e[6]=u,e[7]=h,e[8]=f,e[9]=m,e[10]=g,e[11]=v,e[12]=b):b=e[12];let x=b;if(l===void 0&&p===void 0)return x;let P;return e[13]!==l||e[14]!==p||e[15]!==x?(P=(0,a.jsx)(cs,{i18n:l,locale:p,children:x}),e[13]=l,e[14]=p,e[15]=x,e[16]=P):P=e[16],P},"cn");function lc(t){return t.location.pathname}i(lc,"Ts");function cc(t){return t.tabs.length>0}i(cc,"zs");export{jo as a,cs as b,ri as c,ai as d,Vg as e,ci as f,gi as g,bi as h,xi as i,yi as j,Lg as k};
@@ -0,0 +1 @@
1
+ import{b as T}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as H}from"./chunk-LJIFMW67.js";import"./chunk-XXQUMVWH.js";import"./chunk-QWBRD6PX.js";import"./chunk-QLQADHFE.js";import{a as B}from"./chunk-VDW32UET.js";import{c as z}from"./chunk-SHMNA6UL.js";import"./chunk-V2U5CL3S.js";import"./chunk-XBDKZZ67.js";import{a as G}from"./chunk-XQCVZAGU.js";import{a as M,b as U,c as $,d as P,e as d,f as c}from"./chunk-MIQTKZAR.js";import{a as C,e as E}from"./chunk-UZERI5YC.js";import{d as q}from"./chunk-OG4N2XHD.js";import"./chunk-XNGYYOLS.js";import{a as S,e as _,g as L,h as V}from"./chunk-3XIESWL4.js";var K=_(L(),1);var r=_(V(),1);var J=["read","insert","update","delete"],W=S((e,t)=>({delete:e("Delete"),insert:e("Insert"),read:e("Read"),update:e("Update")})[t],"q"),Q=S(e=>{let t=new Map;for(let a of e){let s=t.get(a.table)??{operations:new Set,procedures:new Set,table:a.table};s.operations.add(a.on),s.procedures.add(a.procedure),t.set(a.table,s)}return[...t.values()].toSorted((a,s)=>a.table.localeCompare(s.table))},"B"),ie=S(()=>{let e=(0,K.c)(49),t=q(),a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={},e[0]=a):a=e[0];let{data:s,error:R,errorSource:k}=z(B.rlsPolicies,a),p=s!==void 0,m,n,h,l,f,u,x,N,o;if(e[1]!==s||e[2]!==R||e[3]!==k||e[4]!==p||e[5]!==t){let F=Q(Array.isArray(s?.policies)?s.policies:[]),D;e[15]!==s?(D=Array.isArray(s?.roles)?s.roles:[],e[15]=s,e[16]=D):D=e[16],n=D,x="flex flex-col gap-6",N="lunora-rls-panel",e[17]!==R||e[18]!==k?(o=R!==null&&(0,r.jsx)(H,{error:k,testId:"rls-error"}),e[17]=R,e[18]=k,e[19]=o):o=e[19],u="flex flex-col gap-2",m=C,h="overflow-hidden py-0";let I;e[20]!==t?(I=t("Policies"),e[20]=t,e[21]=I):I=e[21],e[22]!==I?(l=(0,r.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,r.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:I})}),e[22]=I,e[23]=l):l=e[23],f=p&&F.length===0?(0,r.jsx)(G,{description:t("No `definePolicy` is wired through `.use(rls(...))` in this deployment. Add one to guard a table's rows."),testId:"rls-policies-empty",title:t("No policies defined")}):(0,r.jsx)(E,{className:"px-0",children:(0,r.jsxs)(M,{"data-testid":"rls-policies-table",children:[(0,r.jsx)(U,{children:(0,r.jsxs)(P,{children:[(0,r.jsx)(d,{children:t("Table")}),J.map(i=>(0,r.jsx)(d,{children:W(t,i)},i)),(0,r.jsx)(d,{children:t("Guarded by")})]})}),(0,r.jsx)($,{children:F.map(i=>(0,r.jsxs)(P,{"data-testid":`rls-table-${i.table}`,children:[(0,r.jsx)(c,{className:"font-mono text-xs",children:i.table}),J.map(O=>(0,r.jsx)(c,{children:i.operations.has(O)?(0,r.jsx)(T,{variant:"secondary",children:t("Guarded")}):(0,r.jsx)("span",{"aria-hidden":"true",className:"text-muted-foreground",children:"\u2014"})},O)),(0,r.jsx)(c,{className:"font-mono text-xs text-muted-foreground",children:[...i.procedures].join(", ")})]},i.table))})]})}),e[1]=s,e[2]=R,e[3]=k,e[4]=p,e[5]=t,e[6]=m,e[7]=n,e[8]=h,e[9]=l,e[10]=f,e[11]=u,e[12]=x,e[13]=N,e[14]=o}else m=e[6],n=e[7],h=e[8],l=e[9],f=e[10],u=e[11],x=e[12],N=e[13],o=e[14];let b;e[24]!==m||e[25]!==h||e[26]!==l||e[27]!==f?(b=(0,r.jsxs)(m,{className:h,children:[l,f]}),e[24]=m,e[25]=h,e[26]=l,e[27]=f,e[28]=b):b=e[28];let g;e[29]!==u||e[30]!==b?(g=(0,r.jsx)("section",{className:u,children:b}),e[29]=u,e[30]=b,e[31]=g):g=e[31];let y;e[32]!==t?(y=t("Roles"),e[32]=t,e[33]=y):y=e[33];let w;e[34]!==y?(w=(0,r.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,r.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:y})}),e[34]=y,e[35]=w):w=e[35];let v;e[36]!==p||e[37]!==n||e[38]!==t?(v=p&&n.length===0?(0,r.jsx)(G,{description:t("No `defineRole` is registered via `rls(policies, { roles })`. Roles back `ctx.auth.can(...)` permission checks."),testId:"rls-roles-empty",title:t("No roles defined")}):(0,r.jsx)(E,{className:"px-0",children:(0,r.jsxs)(M,{"data-testid":"rls-roles-table",children:[(0,r.jsx)(U,{children:(0,r.jsxs)(P,{children:[(0,r.jsx)(d,{children:t("Role")}),(0,r.jsx)(d,{children:t("Description")}),(0,r.jsx)(d,{children:t("Permissions")})]})}),(0,r.jsx)($,{children:n.map(Y)})]})}),e[36]=p,e[37]=n,e[38]=t,e[39]=v):v=e[39];let A;e[40]!==w||e[41]!==v?(A=(0,r.jsx)("section",{className:"flex flex-col gap-2",children:(0,r.jsxs)(C,{className:"overflow-hidden py-0",children:[w,v]})}),e[40]=w,e[41]=v,e[42]=A):A=e[42];let j;return e[43]!==A||e[44]!==x||e[45]!==N||e[46]!==o||e[47]!==g?(j=(0,r.jsxs)("div",{className:x,"data-testid":N,children:[o,g,A]}),e[43]=A,e[44]=x,e[45]=N,e[46]=o,e[47]=g,e[48]=j):j=e[48],j},"ae");function X(e){return(0,r.jsx)(T,{variant:"outline",children:e},e)}S(X,"H");function Y(e){return(0,r.jsxs)(P,{"data-testid":`rls-role-${e.name}`,children:[(0,r.jsx)(c,{className:"font-mono text-xs",children:e.name}),(0,r.jsx)(c,{className:"text-muted-foreground",children:e.description??""}),(0,r.jsx)(c,{children:e.permissions.length===0?(0,r.jsx)("span",{"aria-hidden":"true",className:"text-muted-foreground",children:"\u2014"}):(0,r.jsx)("span",{className:"flex flex-wrap gap-1",children:e.permissions.map(X)})})]},e.name)}S(Y,"L");export{ie as default};
@@ -0,0 +1 @@
1
+ import{R as V}from"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import{c as F}from"./chunk-FXCBF4XT.js";import"./chunk-2OUPA2WJ.js";import{b as C}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as q}from"./chunk-LJIFMW67.js";import"./chunk-XXQUMVWH.js";import"./chunk-QWBRD6PX.js";import"./chunk-QLQADHFE.js";import{a as U}from"./chunk-VDW32UET.js";import{c as O}from"./chunk-SHMNA6UL.js";import"./chunk-V2U5CL3S.js";import"./chunk-XBDKZZ67.js";import{a as D}from"./chunk-XQCVZAGU.js";import{a as G,b as J,c as K,d as M,e as a,f as o}from"./chunk-MIQTKZAR.js";import{a as W,e as B}from"./chunk-UZERI5YC.js";import{d as T,q as H}from"./chunk-OG4N2XHD.js";import"./chunk-XNGYYOLS.js";import{a as n,e as j,f as re,g as se,h as ie}from"./chunk-3XIESWL4.js";var X=j(se(),1),P=j(re(),1);var t=j(ie(),1);var ne=n(e=>e==="ok"?"success":e==="failed"?"destructive":e==="expired"?"warning":"secondary","te"),Q=n(e=>e.endpoint??e.id,"P"),xe=n(()=>{let e=(0,X.c)(38),r=T(),[i,Y]=(0,P.useState)("all"),[l,Z]=(0,P.useState)(""),g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={},e[0]=g):g=e[0];let{data:_,error:c,errorSource:v,isLoading:I,refetch:x}=O(U.listPushSubscriptions,g),N;if(e[1]!==_?.subscriptions||e[2]!==c||e[3]!==v||e[4]!==I||e[5]!==i||e[6]!==x||e[7]!==l||e[8]!==r){let L=_?.subscriptions??[],z=l.trim().toLowerCase(),A=L.filter(s=>i!=="all"&&s.kind!==i?!1:z===""?!0:`${Q(s)} ${s.userId??""}`.toLowerCase().includes(z)),b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=n(s=>{Z(s.target.value)},"b"),e[10]=b):b=e[10];let ee=b,w;e[11]!==x?(w=n(()=>{x()},"w"),e[11]=x,e[12]=w):w=e[12];let E=w,k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=["all","web-push","fcm"],e[13]=k):k=e[13];let te=k,d;e[14]!==i||e[15]!==r?(d=(0,t.jsx)("div",{className:"flex items-center gap-1","data-testid":"nt-kind-filter",role:"tablist",children:te.map(s=>(0,t.jsx)(F,{"aria-selected":i===s,"data-testid":`nt-kind-${s}`,onClick:n(()=>{Y(s)},"onClick"),role:"tab",size:"sm",type:"button",variant:i===s?"secondary":"ghost",children:s==="all"?r("All"):s},s))}),e[14]=i,e[15]=r,e[16]=d):d=e[16];let m;e[17]!==r?(m=r("Filter devices"),e[17]=r,e[18]=m):m=e[18];let h;e[19]!==r?(h=r("filter endpoint, user"),e[19]=r,e[20]=h):h=e[20];let u;e[21]!==l||e[22]!==m||e[23]!==h?(u=(0,t.jsx)(V,{"aria-label":m,className:"h-8 w-56","data-testid":"nt-search",onChange:ee,placeholder:h,value:l}),e[21]=l,e[22]=m,e[23]=h,e[24]=u):u=e[24];let f;e[25]!==r?(f=r("Refresh"),e[25]=r,e[26]=f):f=e[26];let p;e[27]!==E||e[28]!==f?(p=(0,t.jsx)(F,{className:"ml-auto","data-testid":"nt-refresh",onClick:E,size:"sm",type:"button",variant:"outline",children:f}),e[27]=E,e[28]=f,e[29]=p):p=e[29];let $=L.length>0&&(0,t.jsx)(C,{"data-testid":"nt-count",variant:"secondary",children:r("{count} devices",{count:L.length})}),y;e[30]!==p||e[31]!==$||e[32]!==d||e[33]!==u?(y=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[d,u,p,$]}),e[30]=p,e[31]=$,e[32]=d,e[33]=u,e[34]=y):y=e[34];let S;e[35]!==c||e[36]!==v?(S=c!==null&&(0,t.jsx)(q,{error:v,testId:"nt-error"}),e[35]=c,e[36]=v,e[37]=S):S=e[37],N=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-notifications",children:[y,S,c===null&&!I&&A.length===0&&(0,t.jsx)(D,{description:r("Registered Web Push / FCM devices appear here. Configure lunora/notify.ts with defineNotify({ store }) and register a device with ctx.push.register(...)."),icon:(0,t.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M15 17h5l-1.4-1.4A2 2 0 0 1 18 14.2V11a6 6 0 0 0-4-5.7V5a2 2 0 1 0-4 0v.3A6 6 0 0 0 6 11v3.2a2 2 0 0 1-.6 1.4L4 17h5m6 0v1a3 3 0 1 1-6 0v-1m6 0H9"})}),testId:"nt-empty",title:r("No registered devices.")}),A.length>0&&(0,t.jsx)(W,{className:"overflow-hidden py-0",children:(0,t.jsx)(B,{className:"max-h-[30rem] overflow-auto px-0",children:(0,t.jsxs)(G,{"data-testid":"nt-table",children:[(0,t.jsx)(J,{children:(0,t.jsxs)(M,{children:[(0,t.jsx)(a,{children:r("kind")}),(0,t.jsx)(a,{children:r("endpoint")}),(0,t.jsx)(a,{children:r("user")}),(0,t.jsx)(a,{children:r("last seen")}),(0,t.jsx)(a,{children:r("status")}),(0,t.jsx)(a,{children:r("error")})]})}),(0,t.jsx)(K,{children:A.map(s=>{let R=Q(s);return(0,t.jsxs)(M,{"data-testid":"nt-row",children:[(0,t.jsx)(o,{children:(0,t.jsx)(C,{variant:"outline",children:s.kind})}),(0,t.jsx)(o,{className:"max-w-[28ch] truncate font-mono text-xs",title:R,children:R}),(0,t.jsx)(o,{className:"max-w-[16ch] truncate font-mono text-xs",children:s.userId??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,t.jsx)(o,{className:"text-muted-foreground tabular-nums",children:H(s.lastSeenAt,"\u2014")}),(0,t.jsx)(o,{children:(0,t.jsx)(C,{"data-testid":`nt-status-${s.id}`,variant:ne(s.lastStatus),children:s.lastStatus??r("n/a")})}),(0,t.jsx)(o,{className:"max-w-[28ch] truncate font-mono text-xs text-muted-foreground",title:s.lastError??void 0,children:s.lastError??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})})]},s.id)})})]})})})]}),e[1]=_?.subscriptions,e[2]=c,e[3]=v,e[4]=I,e[5]=i,e[6]=x,e[7]=l,e[8]=r,e[9]=N}else N=e[9];return N},"ve");export{xe as NotificationsPanel};
@@ -0,0 +1 @@
1
+ import{e as F,f as Z}from"./chunk-3XIESWL4.js";var m=[["path",{d:"M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]];var A=[["path",{d:"M17.9998 15C17.9998 15 13.5809 9.00001 11.9998 9C10.4187 8.99999 5.99985 15 5.99985 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]];var B=[["path",{d:"M18 6L6.00081 17.9992M17.9992 18L6 6.00085",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]];var f=[["path",{d:"M9 15C9 12.1716 9 10.7574 9.87868 9.87868C10.7574 9 12.1716 9 15 9L16 9C18.8284 9 20.2426 9 21.1213 9.87868C22 10.7574 22 12.1716 22 15V16C22 18.8284 22 20.2426 21.1213 21.1213C20.2426 22 18.8284 22 16 22H15C12.1716 22 10.7574 22 9.87868 21.1213C9 20.2426 9 18.8284 9 16L9 15Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.9999 9C16.9975 6.04291 16.9528 4.51121 16.092 3.46243C15.9258 3.25989 15.7401 3.07418 15.5376 2.90796C14.4312 2 12.7875 2 9.5 2C6.21252 2 4.56878 2 3.46243 2.90796C3.25989 3.07417 3.07418 3.25989 2.90796 3.46243C2 4.56878 2 6.21252 2 9.5C2 12.7875 2 14.4312 2.90796 15.5376C3.07417 15.7401 3.25989 15.9258 3.46243 16.092C4.51121 16.9528 6.04291 16.9975 9 16.9999",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]];var w=[["path",{d:"M2.99969 17.0002C2.99969 17.9302 2.99969 18.3952 3.10192 18.7767C3.37932 19.8119 4.18796 20.6206 5.22324 20.898C5.60474 21.0002 6.06972 21.0002 6.99969 21.0002L16.9997 21.0002C17.9297 21.0002 18.3947 21.0002 18.7762 20.898C19.8114 20.6206 20.6201 19.8119 20.8975 18.7767C20.9997 18.3952 20.9997 17.9302 20.9997 17.0002",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.4998 11.5002C16.4998 11.5002 13.1856 16.0002 11.9997 16.0002C10.8139 16.0002 7.49976 11.5002 7.49976 11.5002M11.9997 15.0002V3.00016",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]];var P=[["path",{d:"M17 17L21 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C15.4183 19 19 15.4183 19 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]];var D=[["path",{d:"M21.0477 3.05293C18.8697 0.707363 2.48648 6.4532 2.50001 8.551C2.51535 10.9299 8.89809 11.6617 10.6672 12.1581C11.7311 12.4565 12.016 12.7625 12.2613 13.8781C13.3723 18.9305 13.9301 21.4435 15.2014 21.4996C17.2278 21.5892 23.1733 5.342 21.0477 3.05293Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M11.4999 12.5L14.9999 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]];var T=[["path",{d:"M2 12C2 8.31087 2 6.4663 2.81382 5.15877C3.1149 4.67502 3.48891 4.25427 3.91891 3.91554C5.08116 3 6.72077 3 10 3H14C17.2792 3 18.9188 3 20.0811 3.91554C20.5111 4.25427 20.8851 4.67502 21.1862 5.15877C22 6.4663 22 8.31087 22 12C22 15.6891 22 17.5337 21.1862 18.8412C20.8851 19.325 20.5111 19.7457 20.0811 20.0845C18.9188 21 17.2792 21 14 21H10C6.72077 21 5.08116 21 3.91891 20.0845C3.48891 19.7457 3.1149 19.325 2.81382 18.8412C2 17.5337 2 15.6891 2 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M9.5 3L9.5 21",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M5 7H6M5 10H6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]];var R=[["path",{d:"M5 14L8.5 17.5L19 6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]];var b=[["path",{d:"M18 14C18 14 13.5811 19 12 19C10.4188 19 6 14 6 14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18 9.99996C18 9.99996 13.5811 5.00001 12 5C10.4188 4.99999 6 10 6 10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]];var e=F(Z(),1),g={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none"},L=(0,e.forwardRef)(({color:t="currentColor",size:n=24,strokeWidth:C,absoluteStrokeWidth:h=!1,className:p="",altIcon:d,showAlt:M=!1,icon:l,primaryColor:s,secondaryColor:k,disableSecondaryOpacity:y=!1,...W},j)=>{let c=C!==void 0?h?Number(C)*24/Number(n):C:void 0,u=c!==void 0?{strokeWidth:c,stroke:"currentColor"}:{},I={ref:j,...g,width:n,height:n,color:s||t,className:p,...u,...W},H=[...M&&d?d:l].sort(([,i],[,o])=>{let r=i.opacity!==void 0;return o.opacity!==void 0?1:r?-1:0}).map(([i,o])=>{let r=o.opacity!==void 0,a=r&&!y?o.opacity:void 0,V=k?{...o.stroke!==void 0?{stroke:r?k:s||t}:{fill:r?k:s||t}}:{};return(0,e.createElement)(i,{...o,...u,...V,opacity:a,key:o.key})});return(0,e.createElement)("svg",I,H)});L.displayName="HugeiconsIcon";export{m as a,A as b,B as c,f as d,w as e,P as f,D as g,T as h,R as i,b as j,L as k};
@@ -0,0 +1 @@
1
+ import{a as e,e as m,f as v,g as y,h as _}from"./chunk-3XIESWL4.js";var S=m(y(),1),s=m(v(),1),w=m(_(),1);var q=(0,s.createContext)(void 0),O=e(t=>{let o=(0,S.c)(10),{children:u}=t,r;o[0]===Symbol.for("react.memo_cache_sentinel")?(r={focusSeq:void 0,open:!1,shown:"all"},o[0]=r):r=o[0];let[n,c]=(0,s.useState)(r),l;o[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(()=>({close:e(()=>{c(b)},"close"),openConsole:e(p=>{c({focusSeq:p?.seq,open:!0,shown:p?.errorsOnly===!0?"errors":"all"})},"openConsole"),setShown:e(p=>{c(d=>({...d,shown:p}))},"setShown"),toggle:e(()=>{c(x)},"toggle")}),"r"),o[1]=l):l=o[1];let[h]=(0,s.useState)(l),a;o[2]!==h||o[3]!==n.focusSeq||o[4]!==n.open||o[5]!==n.shown?(a={...h,focusSeq:n.focusSeq,open:n.open,shown:n.shown},o[2]=h,o[3]=n.focusSeq,o[4]=n.open,o[5]=n.shown,o[6]=a):a=o[6];let i=a,f;return o[7]!==u||o[8]!==i?(f=(0,w.jsx)(q,{value:i,children:u}),o[7]=u,o[8]=i,o[9]=f):f=o[9],f},"y"),g=e(()=>(0,s.use)(q),"b");function b(t){return{...t,open:!1}}e(b,"v");function x(t){return{focusSeq:void 0,open:!t.open,shown:"all"}}e(x,"O");export{O as a,g as b};
@@ -0,0 +1 @@
1
+ import{a as q}from"./chunk-XQCVZAGU.js";import{a as O,b as v,c as N,d as b,e as _,f as M}from"./chunk-MIQTKZAR.js";import{a as k}from"./chunk-UZERI5YC.js";import{d as g,h as w,l as I,m as T}from"./chunk-OG4N2XHD.js";import{c as L}from"./chunk-XNGYYOLS.js";import{a as u,e as x,f as P,g as U,h as W}from"./chunk-3XIESWL4.js";var $=x(U(),1);var F="https://api.cloudflare.com/client/v4/accounts",E=class extends L{static{u(this,"c")}constructor(t,m){super("ANALYTICS_SQL_ERROR",`Analytics Engine SQL API returned ${String(t)}: ${m}`,{name:"AnalyticsSqlError",status:t})}},R=u(n=>{let t=n.fetch??globalThis.fetch,m=`${F}/${encodeURIComponent(n.accountId)}/analytics_engine/sql`;return{query:u(async p=>{let l=await t(m,{body:p,headers:{Authorization:`Bearer ${n.apiToken}`,"Content-Type":"text/plain"},method:"POST"});if(!l.ok)throw new E(l.status,await l.text());let r;try{r=await l.json()}catch{throw new E(l.status,"Analytics Engine SQL API returned a non-JSON body.")}let e=r,s=e.data??[];return{columns:e.meta??[],rowCount:e.rows??s.length,rows:s}},"query")}},"d");var y=x(P(),1);var a=x(W(),1);var H="ANALYTICS",D=[{key:"volume",sql:u(n=>`SELECT blob2 AS fn, count() AS calls FROM ${n} WHERE blob1 = 'function_call' GROUP BY fn ORDER BY calls DESC LIMIT 25`,"sql"),title:"Request volume per function"},{key:"latency",sql:u(n=>`SELECT blob2 AS fn, quantileWeighted(0.50)(double1, _sample_interval) AS p50, quantileWeighted(0.95)(double1, _sample_interval) AS p95 FROM ${n} WHERE blob1 = 'function_call' GROUP BY fn ORDER BY p95 DESC LIMIT 25`,"sql"),title:"Latency p50 / p95 per function"},{key:"hotShards",sql:u(n=>`SELECT blob3 AS shard, count() AS calls FROM ${n} WHERE blob1 = 'function_call' GROUP BY shard ORDER BY calls DESC LIMIT 25`,"sql"),title:"Hot shards"}],j={error:null,loading:!0,result:null},Q=u(n=>{let t=(0,$.c)(27),{state:m,title:p}=n,l=g(),{error:r,loading:e,result:s}=m,o=`analytics-panel-${p}`,c;t[0]!==l||t[1]!==p?(c=l(p),t[0]=l,t[1]=p,t[2]=c):c=t[2];let i;t[3]!==c?(i=(0,a.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,a.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:c})}),t[3]=c,t[4]=i):i=t[4];let d;t[5]!==e||t[6]!==l?(d=e&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-loading",children:l("Loading\u2026")}),t[5]=e,t[6]=l,t[7]=d):d=t[7];let f;t[8]!==r||t[9]!==e?(f=!e&&r!==null&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"analytics-error",role:"alert",children:r}),t[8]=r,t[9]=e,t[10]=f):f=t[10];let h;t[11]!==r||t[12]!==e||t[13]!==s||t[14]!==l?(h=!e&&r===null&&s!==null&&s.rows.length===0&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-empty-rows",children:l("No data points yet.")}),t[11]=r,t[12]=e,t[13]=s,t[14]=l,t[15]=h):h=t[15];let A;t[16]!==r||t[17]!==e||t[18]!==s?(A=!e&&r===null&&s!==null&&s.rows.length>0&&(0,a.jsxs)(O,{children:[(0,a.jsx)(v,{children:(0,a.jsx)(b,{children:s.columns.map(G)})}),(0,a.jsx)(N,{children:s.rows.map((B,Y)=>(0,a.jsx)(b,{children:s.columns.map(C=>(0,a.jsx)(M,{className:"font-mono text-xs",children:I(B[C.name])},C.name))},Y))})]}),t[16]=r,t[17]=e,t[18]=s,t[19]=A):A=t[19];let S;return t[20]!==o||t[21]!==i||t[22]!==d||t[23]!==f||t[24]!==h||t[25]!==A?(S=(0,a.jsxs)(k,{className:"gap-0 py-0","data-testid":o,children:[i,d,f,h,A]}),t[20]=o,t[21]=i,t[22]=d,t[23]=f,t[24]=h,t[25]=A,t[26]=S):S=t[26],S},"U"),rt=u(({config:n,dataset:t=H,runQuery:m}={})=>{let p=g(),[l,r]=(0,y.useState)({}),e=(0,y.useMemo)(()=>{if(m!==void 0)return m;if(n===void 0)return null;let o=R({accountId:n.accountId,apiToken:n.apiToken});return c=>o.query(c)},[n,m]),s=(0,y.useCallback)(async o=>{if(e!==null)for(let c of D){if(o.cancelled)return;r(i=>({...i,[c.key]:{error:null,loading:!0,result:null}}));try{let i=await e(c.sql(t));o.cancelled||r(d=>({...d,[c.key]:{error:null,loading:!1,result:i}}))}catch(i){o.cancelled||r(d=>({...d,[c.key]:{error:w(i),loading:!1,result:null}}))}}},[e,t]);return(0,y.useEffect)(()=>{let o={cancelled:!1};return T(s(o)),()=>{o.cancelled=!0}},[s]),e===null?(0,a.jsx)(q,{description:p("Set CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN (Analytics Read) in your .dev.vars to enable usage panels."),icon:(0,a.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"})}),testId:"analytics-not-configured",title:p("Analytics is not configured.")}):(0,a.jsx)("div",{className:"flex flex-col gap-4","data-testid":"lunora-analytics-panel",children:D.map(o=>(0,a.jsx)(Q,{state:l[o.key]??j,title:o.title},o.key))})},"Z");function G(n){return(0,a.jsx)(_,{children:n.name},n.name)}u(G,"H");export{rt as AnalyticsPanel};
@@ -0,0 +1 @@
1
+ import{R as Q}from"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import{c as W}from"./chunk-FXCBF4XT.js";import"./chunk-2OUPA2WJ.js";import"./chunk-6ST5ECQA.js";import{f as F}from"./chunk-V2U5CL3S.js";import"./chunk-XBDKZZ67.js";import{a as Z}from"./chunk-XQCVZAGU.js";import{a as q,b as L,c as B,d as f,e as c,f as d}from"./chunk-MIQTKZAR.js";import{a as I,e as j}from"./chunk-UZERI5YC.js";import{d as K,h as S,l as $,m as V}from"./chunk-OG4N2XHD.js";import"./chunk-XNGYYOLS.js";import{a as h,e as C,f as R,g as P,h as U}from"./chunk-3XIESWL4.js";var A=C(P(),1);var n=C(R(),1);var e=C(U(),1);var X=10,g=h(v=>{let l=(0,A.c)(7),{label:m,value:a}=v,r;l[0]!==m?(r=(0,e.jsx)("span",{className:"font-mono text-[11px] uppercase tracking-wide text-muted-foreground",children:m}),l[0]=m,l[1]=r):r=l[1];let p=a??"\u2014",s;l[2]!==p?(s=(0,e.jsx)("span",{className:"font-mono text-sm",children:p}),l[2]=p,l[3]=s):s=l[3];let u;return l[4]!==r||l[5]!==s?(u=(0,e.jsxs)("div",{className:"flex flex-col gap-0.5",children:[r,s]}),l[4]=r,l[5]=s,l[6]=u):u=l[6],u},"g"),se=h(({loadIndexes:v,runQuery:l}={})=>{let m=F(),a=K(),[r,p]=(0,n.useState)(null),[s,u]=(0,n.useState)(null),[N,E]=(0,n.useState)(null),[b,D]=(0,n.useState)(""),[x,y]=(0,n.useState)(null),[M,w]=(0,n.useState)(null),[T,z]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let t={cancelled:!1};return V((async()=>{try{let i=await(v??(()=>m.listVectorIndexes()))();t.cancelled||(p(i),u(null),E(k=>k??i[0]?.name??null))}catch(i){t.cancelled||(p(null),u(S(i)))}})()),()=>{t.cancelled=!0}},[m,v]);let o=r?.find(t=>t.name===N)??null,G=h(t=>{E(t.currentTarget.dataset.index??null),y(null),w(null)},"K"),H=h(t=>{D(t.target.value)},"T"),J=h(async()=>{let t=b.trim();if(!(N===null||t==="")){z(!0),w(null);try{let i=await(l??(k=>m.queryVectorIndex(k)))({name:N,text:t,topK:X});y(i)}catch(i){y(null),w(S(i))}z(!1)}},"Z"),O=h(()=>{V(J())},"z");return(0,e.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-vector-browser",children:[s!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"vector-error",role:"alert",children:s}),r!==null&&r.length===0&&(0,e.jsx)(Z,{description:a("Indexes declared with .vectorize() or defineVectorIndex() appear here."),icon:(0,e.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,e.jsx)("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"})}),testId:"vector-empty",title:a("No vector indexes.")}),r!==null&&r.length>0&&(0,e.jsx)(I,{className:"overflow-hidden py-0",children:(0,e.jsx)(j,{className:"px-0",children:(0,e.jsxs)(q,{"data-testid":"vector-table",children:[(0,e.jsx)(L,{children:(0,e.jsxs)(f,{children:[(0,e.jsx)(c,{children:a("name")}),(0,e.jsx)(c,{children:a("table")}),(0,e.jsx)(c,{children:a("dimensions")}),(0,e.jsx)(c,{children:a("metric")}),(0,e.jsx)(c,{children:a("vectors")})]})}),(0,e.jsx)(B,{children:r.map(t=>(0,e.jsxs)(f,{className:t.name===N?"border-l-2 border-l-royal-amethyst bg-muted/50":"cursor-pointer","data-index":t.name,"data-testid":`vector-row-${t.name}`,onClick:G,children:[(0,e.jsx)(d,{className:"font-mono text-xs",children:t.name}),(0,e.jsx)(d,{className:"font-mono text-xs",children:t.table}),(0,e.jsx)(d,{className:"tabular-nums",children:t.dimensions??"\u2014"}),(0,e.jsx)(d,{children:t.metric??"\u2014"}),(0,e.jsx)(d,{className:"tabular-nums",children:t.vectorsCount??"\u2014"})]},t.name))})]})})}),o!==null&&(0,e.jsxs)("section",{className:"border border-border bg-card p-3","data-testid":"vector-detail",children:[(0,e.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[(0,e.jsx)(g,{label:a("field"),value:o.field}),(0,e.jsx)(g,{label:a("dimensions"),value:o.dimensions}),(0,e.jsx)(g,{label:a("metric"),value:o.metric}),(0,e.jsx)(g,{label:a("vectors"),value:o.vectorsCount})]}),o.metadata!==void 0&&o.metadata.length>0&&(0,e.jsxs)("p",{className:"mt-3 text-xs text-muted-foreground","data-testid":"vector-metadata",children:[a("metadata"),": ",(0,e.jsx)("span",{className:"font-mono",children:o.metadata.join(", ")})]}),(0,e.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,e.jsx)(Q,{className:"min-w-[18rem] flex-1","data-testid":"vector-query-input",onChange:H,placeholder:a("Search by similarity\u2026"),value:b}),(0,e.jsx)(W,{"data-testid":"vector-search",disabled:T||b.trim()==="",onClick:O,children:a(T?"Searching\u2026":"Search")})]}),M!==null&&(0,e.jsx)("p",{className:"mt-2 text-sm text-destructive","data-testid":"vector-query-error",role:"alert",children:M}),x!==null&&x.length===0&&(0,e.jsx)("p",{className:"mt-2 text-sm text-muted-foreground","data-testid":"vector-no-matches",children:a("No matches.")}),x!==null&&x.length>0&&(0,e.jsx)(I,{className:"mt-3 overflow-hidden py-0",children:(0,e.jsx)(j,{className:"px-0",children:(0,e.jsxs)(q,{"data-testid":"vector-matches",children:[(0,e.jsx)(L,{children:(0,e.jsxs)(f,{children:[(0,e.jsx)(c,{children:a("id")}),(0,e.jsx)(c,{children:a("score")}),(0,e.jsx)(c,{children:a("metadata")})]})}),(0,e.jsx)(B,{children:x.map(t=>(0,e.jsxs)(f,{"data-testid":`vector-match-${t.id}`,children:[(0,e.jsx)(d,{className:"font-mono text-xs",children:t.id}),(0,e.jsx)(d,{className:"tabular-nums",children:t.score.toFixed(4)}),(0,e.jsx)(d,{className:"max-w-md truncate font-mono text-xs",children:t.metadata===void 0?"\u2014":$(t.metadata)})]},t.id))})]})})})]})]})},"ce");export{se as VectorBrowser};
@@ -0,0 +1 @@
1
+ import{a as s}from"./chunk-SHMNA6UL.js";import{a as o}from"./chunk-3XIESWL4.js";var b="__lunora_admin__:",g=new Set(["action","mutation","query"]),u=Symbol("lunora.operationSeq"),h=o(t=>{if(typeof t!="object"||t===null)return;let e=t[u];return typeof e=="number"?e:void 0},"j"),m=o((t,e)=>{if(!(typeof t!="object"||t===null||!Object.isExtensible(t)))try{Object.defineProperty(t,u,{configurable:!0,enumerable:!1,value:e,writable:!0})}catch{}},"g"),d=o(t=>{if(typeof t!="object"||t===null)return;let e=t.__lunoraRef;return typeof e=="string"&&e.startsWith(b)?e:void 0},"d"),j=o(t=>{if(typeof t!="object"||t===null)return"";let{shardKey:e}=t;return typeof e=="string"?e:""},"m"),w=o(t=>new Proxy(t,{get(e,a,y){let i=Reflect.get(e,a,y);if(typeof i!="function"||typeof a!="string"||!g.has(a))return typeof i=="function"?i.bind(e):i;let f=i;return async(...n)=>{let l=d(n[0]);if(l===void 0)return f.apply(e,n);let p=typeof n[1]=="object"&&n[1]!==null?n[1]:{},c=s.start(l,p,j(n[2]));try{let r=await f.apply(e,n);return s.settle(c,{result:r}),r}catch(r){throw s.settle(c,{error:r instanceof Error?r.message:String(r)}),m(r,c),r}}}}),"_");export{h as a,w as b};
@@ -0,0 +1 @@
1
+ import{a as n}from"./chunk-3XIESWL4.js";var r=n(t=>{if(typeof t=="string")return t;try{return JSON.stringify(t)??String(t)}catch{return String(t)}},"i"),o=n(t=>typeof t!="object"||t===null||Array.isArray(t)?"":Object.entries(t).map(([e,i])=>`${e}=${r(i)}`).join(" "),"o");export{o as a};
@@ -0,0 +1 @@
1
+ import{c as a}from"./chunk-FXCBF4XT.js";import{d}from"./chunk-OG4N2XHD.js";import{a as e,e as r,f as h,h as v}from"./chunk-3XIESWL4.js";var m=r(h(),1);var t=r(v(),1);var g=e(({children:c,confirmLabel:l,disabled:s=!1,onConfirm:p,testId:i})=>{let o=d(),[u,n]=(0,m.useState)(!1),f=e(()=>{n(!0)},"m"),b=e(()=>{n(!1)},"c"),C=e(()=>{n(!1),p()},"f");return u?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1","data-testid":`${i}-prompt`,role:"group",children:[(0,t.jsx)(a,{"data-testid":`${i}-confirm`,disabled:s,onClick:C,size:"sm",type:"button",variant:"destructive",children:l??o("Confirm")}),(0,t.jsx)(a,{"data-testid":`${i}-cancel`,onClick:b,size:"sm",type:"button",variant:"ghost",children:o("Cancel")})]}):(0,t.jsx)(a,{"data-testid":i,disabled:s,onClick:f,size:"sm",type:"button",variant:"outline",children:c})},"$");export{g as a};