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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/dist/index.d.mts +4 -1
  2. package/dist/index.d.ts +4 -1
  3. package/dist/index.mjs +1 -1
  4. package/dist/mount.mjs +1 -1
  5. package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -1
  6. package/dist/packem_chunks/ApiTab.mjs +1 -1
  7. package/dist/packem_chunks/AuditPanel.mjs +1 -1
  8. package/dist/packem_chunks/ExportImportPanel.mjs +1 -1
  9. package/dist/packem_chunks/FileBrowser.mjs +1 -1
  10. package/dist/packem_chunks/FunctionRunner.mjs +1 -1
  11. package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -1
  12. package/dist/packem_chunks/HealthPanel.mjs +1 -1
  13. package/dist/packem_chunks/InsightsPanel.mjs +1 -1
  14. package/dist/packem_chunks/LogsPanel.mjs +1 -1
  15. package/dist/packem_chunks/MailPanel.mjs +1 -1
  16. package/dist/packem_chunks/MetricsPanel.mjs +1 -1
  17. package/dist/packem_chunks/NotificationsPanel.mjs +1 -1
  18. package/dist/packem_chunks/PitrPanel.mjs +1 -1
  19. package/dist/packem_chunks/SchemaViewer.mjs +1 -1
  20. package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -1
  21. package/dist/packem_chunks/SettingsPanel.mjs +1 -1
  22. package/dist/packem_chunks/SqlEditorPanel.mjs +24 -9
  23. package/dist/packem_chunks/TableEditor.mjs +1 -1
  24. package/dist/packem_chunks/agents-panel.mjs +1 -1
  25. package/dist/packem_chunks/ai-knowledge.mjs +1 -0
  26. package/dist/packem_chunks/ai-usage-panel.mjs +1 -1
  27. package/dist/packem_chunks/assistant-panel.mjs +3 -0
  28. package/dist/packem_chunks/auth-audit-panel.mjs +1 -1
  29. package/dist/packem_chunks/containers-panel.mjs +1 -1
  30. package/dist/packem_chunks/dashboards-panel.mjs +1 -1
  31. package/dist/packem_chunks/evals-panel.mjs +1 -1
  32. package/dist/packem_chunks/fanout-panel.mjs +1 -1
  33. package/dist/packem_chunks/flags-panel.mjs +1 -1
  34. package/dist/packem_chunks/issues-panel.mjs +1 -1
  35. package/dist/packem_chunks/kv-browser.mjs +1 -1
  36. package/dist/packem_chunks/log-drains-panel.mjs +1 -1
  37. package/dist/packem_chunks/migrations-route.mjs +1 -1
  38. package/dist/packem_chunks/payments-panel.mjs +1 -1
  39. package/dist/packem_chunks/permissions-panel.mjs +1 -1
  40. package/dist/packem_chunks/privacy-requests-panel.mjs +1 -1
  41. package/dist/packem_chunks/queues-panel.mjs +1 -1
  42. package/dist/packem_chunks/reactors-panel.mjs +1 -1
  43. package/dist/packem_chunks/rls-panel.mjs +1 -1
  44. package/dist/packem_chunks/schedule-panel.mjs +1 -1
  45. package/dist/packem_chunks/storage-rules-panel.mjs +1 -1
  46. package/dist/packem_chunks/subscriptions-panel.mjs +1 -1
  47. package/dist/packem_chunks/traces-panel.mjs +1 -1
  48. package/dist/packem_chunks/workflows-panel.mjs +1 -1
  49. package/dist/packem_shared/ADMIN_FUNCTIONS-DUXsXId1.mjs +1 -0
  50. package/dist/packem_shared/{ApiDocsPanel-DD2Uns6b.mjs → ApiDocsPanel-B9S9l1Ce.mjs} +1 -1
  51. package/dist/packem_shared/{DataBrowser-CVRWnNWu.mjs → DataBrowser-Dm-jhIUP.mjs} +2 -2
  52. package/dist/packem_shared/{GlobalDataBrowser-DC47T6Zl.mjs → GlobalDataBrowser-C1Y8GUhe.mjs} +1 -1
  53. package/dist/packem_shared/{HomePanel-D12HxHQo.mjs → HomePanel-B5ytwPIo.mjs} +1 -1
  54. package/dist/packem_shared/{MigrationsPanel-DMkxSXNl.mjs → MigrationsPanel-CwLikxDT.mjs} +1 -1
  55. package/dist/packem_shared/Studio-B89ZNMOD.mjs +1 -0
  56. package/dist/packem_shared/{StudioApp-isdWpF9P.mjs → StudioApp-C9l1a3A8.mjs} +1 -1
  57. package/dist/packem_shared/advisor-view-CzieqKMe.mjs +5 -0
  58. package/dist/packem_shared/assistant-provider-Bp72uWsq.mjs +1 -0
  59. package/dist/packem_shared/assistant-reason-D6EwMCxT.mjs +1 -0
  60. package/dist/packem_shared/{cf-links-CBJ5SywP.mjs → cf-links-C4DVTr8A.mjs} +1 -1
  61. package/dist/packem_shared/error-alert-DKXm5h19.mjs +6 -0
  62. package/dist/packem_shared/{home-panel-CDVTuTF8.mjs → home-panel-5fGktYeD.mjs} +1 -1
  63. package/dist/packem_shared/recording-client-z4CBi0y8.mjs +1 -0
  64. package/dist/packem_shared/studio-gZfpz1wC.mjs +2 -0
  65. package/dist/packem_shared/{table-list-sidebar-CNadcIgG.mjs → table-list-sidebar-kpHaDWjy.mjs} +1 -1
  66. package/dist/packem_shared/use-assistant-rpc-GCUK2zPa.mjs +1 -0
  67. package/dist/standalone/chunk-2DT3QG6Q.js +1 -0
  68. package/dist/standalone/chunk-2EB7FN5S.js +1 -0
  69. package/dist/standalone/chunk-2FTGLXYA.js +1 -0
  70. package/dist/standalone/chunk-2H6VLY2M.js +1 -0
  71. package/dist/standalone/chunk-2NGKUO32.js +1 -0
  72. package/dist/standalone/chunk-2SNHKJXK.js +1 -0
  73. package/dist/standalone/chunk-2W4UO5BC.js +1 -0
  74. package/dist/standalone/{chunk-SLIDAWNX.js → chunk-3D67ZJRW.js} +1 -1
  75. package/dist/standalone/chunk-3RZD6VJ7.js +1 -0
  76. package/dist/standalone/chunk-3X3NXJBR.js +1 -0
  77. package/dist/standalone/chunk-4EPW63HS.js +1 -0
  78. package/dist/standalone/{chunk-WS36BO4R.js → chunk-4NKJV7YX.js} +1 -1
  79. package/dist/standalone/chunk-4PI2OSSP.js +1 -0
  80. package/dist/standalone/chunk-53CGUTRT.js +1 -0
  81. package/dist/standalone/chunk-5EWIOOBI.js +1 -0
  82. package/dist/standalone/chunk-5GYHGDIF.js +8 -0
  83. package/dist/standalone/chunk-5NIQHOPN.js +1 -0
  84. package/dist/standalone/chunk-5O7ICPWV.js +1 -0
  85. package/dist/standalone/chunk-5PEAXTYQ.js +1 -0
  86. package/dist/standalone/{chunk-O2NMPIV2.js → chunk-5WNGRT7N.js} +1 -1
  87. package/dist/standalone/chunk-66BMMNUR.js +1 -0
  88. package/dist/standalone/chunk-66LYVBXB.js +1 -0
  89. package/dist/standalone/chunk-6FPV3EK2.js +1 -0
  90. package/dist/standalone/chunk-6G3E4PJ2.js +1 -0
  91. package/dist/standalone/chunk-6KE7ILEZ.js +1 -0
  92. package/dist/standalone/chunk-7KJCRT4B.js +1 -0
  93. package/dist/standalone/chunk-7O5SGABV.js +1 -0
  94. package/dist/standalone/chunk-7QEZ2SFW.js +1 -0
  95. package/dist/standalone/chunk-7WV3EPE6.js +1 -0
  96. package/dist/standalone/chunk-A2Q3TGIQ.js +1 -0
  97. package/dist/standalone/chunk-ABMHWBYA.js +1 -0
  98. package/dist/standalone/chunk-AEU3EF4T.js +1 -0
  99. package/dist/standalone/chunk-ALQHMFOC.js +1 -0
  100. package/dist/standalone/chunk-AZIKM5BA.js +1 -0
  101. package/dist/standalone/chunk-BCUOQNI2.js +1 -0
  102. package/dist/standalone/chunk-BG2CJOVS.js +1 -0
  103. package/dist/standalone/chunk-BKI3JMXQ.js +1 -0
  104. package/dist/standalone/chunk-BO5NNWMO.js +1 -0
  105. package/dist/standalone/chunk-BX7TFVCC.js +1 -0
  106. package/dist/standalone/chunk-CKEQX655.js +1 -0
  107. package/dist/standalone/{chunk-DX55P3KZ.js → chunk-CL3JOU6F.js} +1 -1
  108. package/dist/standalone/chunk-COLSZPCE.js +1 -0
  109. package/dist/standalone/chunk-CVSIFPI5.js +1 -0
  110. package/dist/standalone/chunk-D65UVZIA.js +1 -0
  111. package/dist/standalone/{chunk-DBVJ5VLI.js → chunk-DA2CAFXI.js} +1 -1
  112. package/dist/standalone/chunk-DB6QX4X6.js +1 -0
  113. package/dist/standalone/{chunk-7ZIYHKLX.js → chunk-E2FFHKGI.js} +3 -3
  114. package/dist/standalone/chunk-EE2COWFF.js +1 -0
  115. package/dist/standalone/chunk-ELSQ4FVH.js +1 -0
  116. package/dist/standalone/chunk-EXFERMUT.js +1 -0
  117. package/dist/standalone/chunk-FACXM2UB.js +7 -0
  118. package/dist/standalone/chunk-FBDIQ67D.js +1 -0
  119. package/dist/standalone/chunk-FHLODLBC.js +1 -0
  120. package/dist/standalone/chunk-FQEZUQ36.js +1 -0
  121. package/dist/standalone/{chunk-VEWQWS3J.js → chunk-FWM5Z6CH.js} +1 -1
  122. package/dist/standalone/chunk-GC3GKGWD.js +1 -0
  123. package/dist/standalone/chunk-GJXCPZDN.js +1 -0
  124. package/dist/standalone/chunk-GNI37YCV.js +33 -0
  125. package/dist/standalone/chunk-GVZ3VFGG.js +1 -0
  126. package/dist/standalone/chunk-GWNGVKLG.js +1 -0
  127. package/dist/standalone/chunk-GXTSE66Z.js +1 -0
  128. package/dist/standalone/chunk-H7BQUL7D.js +1 -0
  129. package/dist/standalone/chunk-HCCQTUHS.js +1 -0
  130. package/dist/standalone/chunk-HCOF7HOM.js +1 -0
  131. package/dist/standalone/chunk-HZDLUAWS.js +1 -0
  132. package/dist/standalone/chunk-IDZLHZIA.js +1 -0
  133. package/dist/standalone/{chunk-SU5DTRGK.js → chunk-IHGRWY3Y.js} +1 -1
  134. package/dist/standalone/chunk-IUGNIG6L.js +6 -0
  135. package/dist/standalone/chunk-J3BZWYJQ.js +1 -0
  136. package/dist/standalone/chunk-J45HAKBU.js +1 -0
  137. package/dist/standalone/chunk-J4PQAVOF.js +1 -0
  138. package/dist/standalone/chunk-J6FR2B77.js +1 -0
  139. package/dist/standalone/chunk-J6XQKD2F.js +1 -0
  140. package/dist/standalone/chunk-JCRFMCNP.js +1 -0
  141. package/dist/standalone/chunk-JD6PRRFO.js +1 -0
  142. package/dist/standalone/chunk-JENPPZFV.js +1 -0
  143. package/dist/standalone/chunk-JHTL3QHW.js +1 -0
  144. package/dist/standalone/chunk-JOPNP4EO.js +1 -0
  145. package/dist/standalone/chunk-JVP3TR3A.js +1 -0
  146. package/dist/standalone/chunk-KGLIQIZU.js +1 -0
  147. package/dist/standalone/{chunk-ONWGX5Y4.js → chunk-KH6OXCG3.js} +1 -1
  148. package/dist/standalone/{chunk-3FS22LNI.js → chunk-L26RMC2W.js} +3 -3
  149. package/dist/standalone/chunk-L2FYX4FN.js +1 -0
  150. package/dist/standalone/{chunk-XIRKBJPD.js → chunk-LPFUEJZ4.js} +5 -5
  151. package/dist/standalone/chunk-LSEUUZN4.js +1 -0
  152. package/dist/standalone/{chunk-BYOGQ2IV.js → chunk-MJTVTUNI.js} +2 -2
  153. package/dist/standalone/chunk-MQTI3STP.js +1 -0
  154. package/dist/standalone/chunk-N7WQJPOM.js +1 -0
  155. package/dist/standalone/chunk-NF2Q75WM.js +1 -0
  156. package/dist/standalone/chunk-NGZNXNRD.js +1 -0
  157. package/dist/standalone/chunk-O3AZ7JKE.js +1 -0
  158. package/dist/standalone/chunk-OK2QU2EV.js +1 -0
  159. package/dist/standalone/{chunk-IH2CJZF2.js → chunk-ONTGYVAN.js} +1 -1
  160. package/dist/standalone/chunk-OP4QEV27.js +1 -0
  161. package/dist/standalone/chunk-OPIMGKWU.js +1 -0
  162. package/dist/standalone/chunk-OWRKSQPE.js +1 -0
  163. package/dist/standalone/chunk-P5EVJEGC.js +1 -0
  164. package/dist/standalone/chunk-PAZKX7I6.js +1 -0
  165. package/dist/standalone/chunk-PDBW6GTJ.js +1 -0
  166. package/dist/standalone/chunk-PJUVJTDR.js +1 -0
  167. package/dist/standalone/chunk-Q2J73V2C.js +2 -0
  168. package/dist/standalone/chunk-Q2KL457J.js +1 -0
  169. package/dist/standalone/chunk-QAOZXPLU.js +1 -0
  170. package/dist/standalone/{chunk-3PAYDWHN.js → chunk-QEFLZBT7.js} +2 -2
  171. package/dist/standalone/chunk-QKUVJIRX.js +1 -0
  172. package/dist/standalone/chunk-QNM2J7MG.js +1 -0
  173. package/dist/standalone/chunk-QRA7AKYO.js +1 -0
  174. package/dist/standalone/chunk-RCXNYW7P.js +1 -0
  175. package/dist/standalone/chunk-RE7GRXBM.js +1 -0
  176. package/dist/standalone/{chunk-TDVDZ7XQ.js → chunk-RIAOZECW.js} +1 -1
  177. package/dist/standalone/{chunk-LUHXNZI4.js → chunk-RTS5G3ET.js} +1 -1
  178. package/dist/standalone/chunk-S36FVTKK.js +1 -0
  179. package/dist/standalone/chunk-SR6CPTRT.js +1 -0
  180. package/dist/standalone/chunk-T3ZCW3RG.js +1 -0
  181. package/dist/standalone/chunk-TKBTZX4K.js +1 -0
  182. package/dist/standalone/chunk-TMWKF4XM.js +5 -0
  183. package/dist/standalone/chunk-TW4O2BA5.js +159 -0
  184. package/dist/standalone/chunk-UD5REVU2.js +1 -0
  185. package/dist/standalone/{chunk-PQH2LSJX.js → chunk-UQA2AJGI.js} +1 -1
  186. package/dist/standalone/chunk-UW6QNC74.js +3 -0
  187. package/dist/standalone/chunk-UXBNXITB.js +1 -0
  188. package/dist/standalone/chunk-UZ2ZXB74.js +1 -0
  189. package/dist/standalone/chunk-V3BE427M.js +1 -0
  190. package/dist/standalone/chunk-VHPTPEZ4.js +1 -0
  191. package/dist/standalone/chunk-W4LJQYCI.js +1 -0
  192. package/dist/standalone/chunk-WADY55J2.js +30 -0
  193. package/dist/standalone/chunk-WCWP4EAW.js +1 -0
  194. package/dist/standalone/chunk-X54WR7FF.js +1 -0
  195. package/dist/standalone/chunk-XWWQIAF6.js +1 -0
  196. package/dist/standalone/{chunk-SYGCASPT.js → chunk-Y2YLTUMD.js} +1 -1
  197. package/dist/standalone/chunk-YEVTA35E.js +1 -0
  198. package/dist/standalone/{chunk-R36QXQZX.js → chunk-YORPLSI5.js} +1 -1
  199. package/dist/standalone/chunk-YX2N5PJW.js +1 -0
  200. package/dist/standalone/chunk-Z57KMMOK.js +1 -0
  201. package/dist/standalone/chunk-ZFQ253FX.js +1 -0
  202. package/dist/standalone/chunk-ZG3IUVQ2.js +1 -0
  203. package/dist/standalone/chunk-ZKEYRU5C.js +1 -0
  204. package/dist/standalone/{chunk-5R2YO7HF.js → chunk-ZOKSVUID.js} +4 -4
  205. package/dist/standalone/{chunk-H7HZ42JY.js → chunk-ZPQBVYNN.js} +1 -1
  206. package/dist/standalone/chunk-ZSLKFLWE.js +1 -0
  207. package/dist/standalone/chunk-ZSWW2UGP.js +1 -0
  208. package/dist/standalone/studio.js +2 -2
  209. package/dist/styles.css +1 -1
  210. package/package.json +7 -6
  211. package/dist/packem_shared/ADMIN_FUNCTIONS-4aGsMs95.mjs +0 -1
  212. package/dist/packem_shared/Studio-MA8kKZLu.mjs +0 -1
  213. package/dist/packem_shared/advisor-view-tBumWci_.mjs +0 -1
  214. package/dist/packem_shared/error-alert-C0R39DO1.mjs +0 -1
  215. package/dist/packem_shared/recording-client-DAipTA_n.mjs +0 -1
  216. package/dist/packem_shared/studio-UhUrPz5J.mjs +0 -2
  217. package/dist/packem_shared/use-sql-assistant-rZPs3LC3.mjs +0 -1
  218. package/dist/standalone/chunk-2AH4ABE5.js +0 -1
  219. package/dist/standalone/chunk-2G57ENH5.js +0 -1
  220. package/dist/standalone/chunk-3GXPALXG.js +0 -1
  221. package/dist/standalone/chunk-3GYLOE4V.js +0 -1
  222. package/dist/standalone/chunk-473JK2PQ.js +0 -1
  223. package/dist/standalone/chunk-4C4THJUD.js +0 -1
  224. package/dist/standalone/chunk-4DAKKAK7.js +0 -1
  225. package/dist/standalone/chunk-4M57OYFX.js +0 -1
  226. package/dist/standalone/chunk-4SQBAPY6.js +0 -1
  227. package/dist/standalone/chunk-5DNGK3NT.js +0 -1
  228. package/dist/standalone/chunk-5GIQ6C5N.js +0 -1
  229. package/dist/standalone/chunk-5WJG7FMH.js +0 -1
  230. package/dist/standalone/chunk-63KDHS3H.js +0 -1
  231. package/dist/standalone/chunk-6B6ARRMI.js +0 -1
  232. package/dist/standalone/chunk-6LMO2D54.js +0 -1
  233. package/dist/standalone/chunk-6M7FLLMT.js +0 -1
  234. package/dist/standalone/chunk-6QEXGYWH.js +0 -1
  235. package/dist/standalone/chunk-6UTZXEW3.js +0 -1
  236. package/dist/standalone/chunk-6VAY6L4J.js +0 -1
  237. package/dist/standalone/chunk-7PADVGQX.js +0 -1
  238. package/dist/standalone/chunk-7RGYCU6F.js +0 -1
  239. package/dist/standalone/chunk-7UM5ROG6.js +0 -1
  240. package/dist/standalone/chunk-A566HCBX.js +0 -1
  241. package/dist/standalone/chunk-A5JISKHE.js +0 -1
  242. package/dist/standalone/chunk-ADNRFCMZ.js +0 -1
  243. package/dist/standalone/chunk-AP4PC2M4.js +0 -1
  244. package/dist/standalone/chunk-BFE2DRP6.js +0 -33
  245. package/dist/standalone/chunk-BPEB4KFE.js +0 -1
  246. package/dist/standalone/chunk-BVX45MU5.js +0 -7
  247. package/dist/standalone/chunk-C6GN7ZXJ.js +0 -1
  248. package/dist/standalone/chunk-CL2VZNDI.js +0 -1
  249. package/dist/standalone/chunk-CNA3TVUK.js +0 -1
  250. package/dist/standalone/chunk-CZ6HBDIL.js +0 -1
  251. package/dist/standalone/chunk-D6S7MXW4.js +0 -1
  252. package/dist/standalone/chunk-E26OT26O.js +0 -1
  253. package/dist/standalone/chunk-FCAXVYAX.js +0 -1
  254. package/dist/standalone/chunk-FXPAJDES.js +0 -1
  255. package/dist/standalone/chunk-HHRYM6UW.js +0 -1
  256. package/dist/standalone/chunk-HPRF5LMA.js +0 -1
  257. package/dist/standalone/chunk-IB22LETR.js +0 -1
  258. package/dist/standalone/chunk-IBJVVHV5.js +0 -1
  259. package/dist/standalone/chunk-IENQRRQT.js +0 -1
  260. package/dist/standalone/chunk-IQ4TTHQT.js +0 -1
  261. package/dist/standalone/chunk-ITH5LRWM.js +0 -1
  262. package/dist/standalone/chunk-J6VFG6M5.js +0 -1
  263. package/dist/standalone/chunk-JSDKOE4U.js +0 -1
  264. package/dist/standalone/chunk-JTGGWF7R.js +0 -1
  265. package/dist/standalone/chunk-JZD7ZN3F.js +0 -1
  266. package/dist/standalone/chunk-K3CWB3AM.js +0 -1
  267. package/dist/standalone/chunk-KNFB3FGW.js +0 -1
  268. package/dist/standalone/chunk-KNXWDE4N.js +0 -1
  269. package/dist/standalone/chunk-KRPXOSBL.js +0 -1
  270. package/dist/standalone/chunk-KRY7BYHT.js +0 -1
  271. package/dist/standalone/chunk-KYAG2YMF.js +0 -1
  272. package/dist/standalone/chunk-KZCEJFZF.js +0 -1
  273. package/dist/standalone/chunk-KZILJQX3.js +0 -8
  274. package/dist/standalone/chunk-LEYUH5TS.js +0 -1
  275. package/dist/standalone/chunk-LFM672WN.js +0 -1
  276. package/dist/standalone/chunk-LIGOLZND.js +0 -1
  277. package/dist/standalone/chunk-LPU6YTSU.js +0 -1
  278. package/dist/standalone/chunk-MWJC3S62.js +0 -1
  279. package/dist/standalone/chunk-NP2AQOLE.js +0 -1
  280. package/dist/standalone/chunk-NVKLYDOH.js +0 -1
  281. package/dist/standalone/chunk-O2X2XYCM.js +0 -1
  282. package/dist/standalone/chunk-O3MDWYXF.js +0 -1
  283. package/dist/standalone/chunk-ONG4JEZD.js +0 -1
  284. package/dist/standalone/chunk-OS26JXYA.js +0 -1
  285. package/dist/standalone/chunk-OXFKZ4BM.js +0 -1
  286. package/dist/standalone/chunk-PGTEGUAB.js +0 -1
  287. package/dist/standalone/chunk-PTBUWRBY.js +0 -1
  288. package/dist/standalone/chunk-Q6HA3L2H.js +0 -1
  289. package/dist/standalone/chunk-QGV5ARD2.js +0 -1
  290. package/dist/standalone/chunk-QWRK4ESB.js +0 -1
  291. package/dist/standalone/chunk-RL2ITK2N.js +0 -1
  292. package/dist/standalone/chunk-RTJO3AR4.js +0 -1
  293. package/dist/standalone/chunk-SFY646MC.js +0 -1
  294. package/dist/standalone/chunk-T5UMHPAB.js +0 -1
  295. package/dist/standalone/chunk-T6HV2FQP.js +0 -2
  296. package/dist/standalone/chunk-T7ZKNNGX.js +0 -1
  297. package/dist/standalone/chunk-TCYPNSTV.js +0 -1
  298. package/dist/standalone/chunk-TQM6XHBA.js +0 -1
  299. package/dist/standalone/chunk-TRMWBRRU.js +0 -1
  300. package/dist/standalone/chunk-TW7KJSMR.js +0 -15
  301. package/dist/standalone/chunk-TYD3V4NB.js +0 -1
  302. package/dist/standalone/chunk-TZKLK52W.js +0 -1
  303. package/dist/standalone/chunk-U4RXQSQ7.js +0 -1
  304. package/dist/standalone/chunk-UNZ2UBVL.js +0 -1
  305. package/dist/standalone/chunk-VJRNOSRY.js +0 -1
  306. package/dist/standalone/chunk-W2BCSK5S.js +0 -1
  307. package/dist/standalone/chunk-W7MRISE3.js +0 -1
  308. package/dist/standalone/chunk-WM72PRE3.js +0 -1
  309. package/dist/standalone/chunk-X4WHMCOZ.js +0 -1
  310. package/dist/standalone/chunk-X74GEPSG.js +0 -1
  311. package/dist/standalone/chunk-XKPD4SFN.js +0 -1
  312. package/dist/standalone/chunk-XMSNLMWU.js +0 -1
  313. package/dist/standalone/chunk-XOPFDWXX.js +0 -1
  314. package/dist/standalone/chunk-XQLOVFPP.js +0 -1
  315. package/dist/standalone/chunk-XSHYZPGF.js +0 -1
  316. package/dist/standalone/chunk-XST3UEHU.js +0 -1
  317. package/dist/standalone/chunk-XYR5NST4.js +0 -1
  318. package/dist/standalone/chunk-Y74LIFSL.js +0 -1
  319. package/dist/standalone/chunk-YHTHRYP5.js +0 -1
  320. package/dist/standalone/chunk-YMEKCV27.js +0 -1
  321. package/dist/standalone/chunk-Z5EV64KS.js +0 -1
  322. package/dist/standalone/chunk-ZBON5T5A.js +0 -1
  323. package/dist/standalone/chunk-ZGSL4DPP.js +0 -1
  324. package/dist/standalone/chunk-ZOQTXWPK.js +0 -1
  325. package/dist/standalone/chunk-ZTOREMGH.js +0 -1
  326. package/dist/standalone/chunk-ZZ5GICTF.js +0 -1
  327. /package/dist/standalone/{chunk-UYEZR3BI.js → chunk-P6VNMPWR.js} +0 -0
@@ -0,0 +1 @@
1
+ import{a as s}from"./chunk-V3BE427M.js";import{B as d}from"./chunk-GNI37YCV.js";import{a as h,b as k}from"./chunk-6G3E4PJ2.js";import{a as e,d as r}from"./chunk-5PEAXTYQ.js";var l=r(h(),1);var t=r(k(),1);var g=e(({children:m,confirmLabel:c,disabled:a=!1,onConfirm:p,testId:i})=>{let o=d(),[f,n]=(0,l.useState)(!1),u=e(()=>{n(!0)},"f"),C=e(()=>{n(!1)},"l"),b=e(()=>{n(!1),p()},"p");return f?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1","data-testid":`${i}-prompt`,role:"group",children:[(0,t.jsx)(s,{"data-testid":`${i}-confirm`,disabled:a,onClick:b,size:"sm",type:"button",variant:"destructive",children:c??o("Confirm")}),(0,t.jsx)(s,{"data-testid":`${i}-cancel`,onClick:C,size:"sm",type:"button",variant:"ghost",children:o("Cancel")})]}):(0,t.jsx)(s,{"data-testid":i,disabled:a,onClick:u,size:"sm",type:"button",variant:"outline",children:m})},"k");export{g as a};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-OXFKZ4BM.js";var e=n(t=>{if(typeof t=="string")return t;if(t instanceof Error)return String(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(([r,i])=>`${r}=${e(i)}`).join(" "),"o");export{o as a};
1
+ import{a as n}from"./chunk-5PEAXTYQ.js";var e=n(t=>{if(typeof t=="string")return t;if(t instanceof Error)return String(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(([r,i])=>`${r}=${e(i)}`).join(" "),"o");export{o as a};
@@ -0,0 +1 @@
1
+ import{a as C}from"./chunk-V3BE427M.js";import"./chunk-CKEQX655.js";import"./chunk-UD5REVU2.js";import{a as $}from"./chunk-RCXNYW7P.js";import{b as v}from"./chunk-UQA2AJGI.js";import"./chunk-T3ZCW3RG.js";import{a as j}from"./chunk-IUGNIG6L.js";import"./chunk-LSEUUZN4.js";import{a as I,b as _,c as q,d as p,e as o,f as i}from"./chunk-7QEZ2SFW.js";import"./chunk-WCWP4EAW.js";import"./chunk-BX7TFVCC.js";import"./chunk-4PI2OSSP.js";import{a as g}from"./chunk-2W4UO5BC.js";import{c as h}from"./chunk-FBDIQ67D.js";import{a as K,e as S}from"./chunk-OK2QU2EV.js";import"./chunk-FACXM2UB.js";import"./chunk-ZPQBVYNN.js";import{B as T,w as F}from"./chunk-GNI37YCV.js";import"./chunk-PDBW6GTJ.js";import{a as oe}from"./chunk-GWNGVKLG.js";import{a as ne,b as ie}from"./chunk-6G3E4PJ2.js";import{a as d,d as k}from"./chunk-5PEAXTYQ.js";var Q=k(oe(),1),G=k(ne(),1);var e=k(ie(),1);var H="agent_threads",de="agent_messages",L="agent_run_queue",J=100,N=250,le={},ce={filters:[],limit:J,offset:0,orderBy:{column:"updatedAt",direction:"desc"},skipCount:!0,table:H},c=d((s,t)=>{let a=s[t];return typeof a=="string"?a:void 0},"c"),B=d((s,t)=>{let a=s[t];return typeof a=="number"?a:void 0},"E"),O=d(s=>{let{usage:t}=s;if(t===null||typeof t!="object")return;let{totalTokens:a}=t;return typeof a=="number"?a:void 0},"H"),me=d(s=>{let{toolCalls:t}=s;return Array.isArray(t)?t.map(a=>a!==null&&typeof a=="object"?a.name:void 0).filter(a=>typeof a=="string"):[]},"de"),ue=d(s=>{switch(s){case"awaiting_input":return"warning";case"cancelled":return"warning";case"error":return"destructive";case"running":return"info";default:return"outline"}},"le"),he=d(s=>{switch(s){case"approved":return"success";case"rejected":return"destructive";default:return"warning"}},"ie"),ge=d(s=>{let t=(0,Q.c)(3),{fetched:a}=s,m=T(),l;return t[0]!==a||t[1]!==m?(l=a<=N?null:(0,e.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"agents-messages-truncated",children:m("Showing the latest {count} messages; older ones are not shown.",{count:N})}),t[0]=a,t[1]=m,t[2]=l):l=t[2],l},"ce"),Te=d(({initialShardKey:s=""})=>{let t=T(),[a,m]=(0,G.useState)(void 0),{data:l}=h(g.listTables,le,{live:!0,shardKey:s}),V=l!==void 0,f=Array.isArray(l)&&l.some(r=>r.name===H),W=Array.isArray(l)&&l.some(r=>r.name===L),{data:E,error:X,errorSource:Y,liveError:Z}=h(g.readTablePage,ce,{enabled:f,live:!0,shardKey:s}),ee={filters:[{column:"threadKey",operator:"eq",value:a??""}],limit:N+1,offset:0,orderBy:{column:"seq",direction:"desc"},skipCount:!0,table:de},{data:P}=h(g.readTablePage,{limit:J,offset:0,orderBy:{column:"position",direction:"asc"},skipCount:!0,table:L},{enabled:W,live:!0,shardKey:s}),{data:U,error:te,errorSource:ae}=h(g.readTablePage,ee,{enabled:f&&a!==void 0,live:!0,shardKey:s}),b=Array.isArray(E?.rows)?E.rows:[],re=Array.isArray(P?.rows)?P.rows:[],z=d(r=>re.filter(n=>c(n,"threadKey")===r).length,"C"),M=Array.isArray(U?.rows)?U.rows:[],R=M.slice(0,N).toReversed(),D=b.find(r=>c(r,"key")===a),x;return V&&!f?x=(0,e.jsx)($,{description:t("No @lunora/agent tables found in this deployment. Add lunora/agents.ts with defineAgent(...) and merge the agent schema extension to run durable AI agents."),testId:"agents-unconfigured",title:t("No agents configured")}):f&&b.length===0?x=(0,e.jsx)($,{description:t("No agent has run yet. Start a run with ctx.agents.<name>.run(...) and its thread appears here."),testId:"agents-empty",title:t("No agent threads yet")}):x=(0,e.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,e.jsx)(K,{className:"overflow-hidden py-0",children:(0,e.jsx)(S,{className:"px-0",children:(0,e.jsxs)(I,{"data-testid":"agents-threads-table",children:[(0,e.jsx)(_,{children:(0,e.jsxs)(p,{children:[(0,e.jsx)(o,{children:t("Agent")}),(0,e.jsx)(o,{children:t("Key")}),(0,e.jsx)(o,{children:t("Status")}),(0,e.jsx)(o,{children:t("Queued")}),(0,e.jsx)(o,{children:t("Messages")}),(0,e.jsx)(o,{children:t("Tokens")}),(0,e.jsx)(o,{children:t("Updated")}),(0,e.jsx)(o,{"aria-label":t("Actions")})]})}),(0,e.jsx)(q,{children:b.map(r=>{let n=c(r,"key")??"",u=c(r,"status"),y=O(r);return(0,e.jsxs)(p,{"data-active":n===a?"":void 0,"data-testid":`agents-thread-${n}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:c(r,"agent")??"\u2014"}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:n}),(0,e.jsx)(i,{children:(0,e.jsx)(v,{"data-testid":`agents-thread-status-${n}`,variant:ue(u),children:u??"\u2014"})}),(0,e.jsx)(i,{className:"tabular-nums",children:z(n)===0?(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}):(0,e.jsx)(v,{"data-testid":`agents-thread-queued-${n}`,variant:"warning",children:z(n)})}),(0,e.jsx)(i,{className:"tabular-nums",children:B(r,"messageCount")??"\u2014"}),(0,e.jsx)(i,{className:"tabular-nums text-muted-foreground",children:y??"\u2014"}),(0,e.jsx)(i,{className:"text-muted-foreground tabular-nums",children:F(B(r,"updatedAt"),"\u2014")}),(0,e.jsx)(i,{className:"text-right",children:(0,e.jsx)(C,{"data-testid":`agents-thread-open-${n}`,onClick:d(()=>{m(n)},"onClick"),size:"sm",type:"button",variant:"outline",children:t("Timeline")})})]},n)})})]})})}),te!==null&&(0,e.jsx)(j,{error:ae,shardKey:s,testId:"agents-messages-error"}),a!==void 0&&(0,e.jsx)(K,{className:"overflow-hidden py-0","data-testid":"agents-thread-detail",children:(0,e.jsxs)(S,{className:"flex flex-col gap-3 px-4 py-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsxs)("span",{className:"font-mono text-xs",children:[t("Timeline")," \xB7 ",a,D!==void 0&&(0,e.jsxs)("span",{className:"text-muted-foreground",children:[" \xB7 ",t("Usage"),": ",O(D)??0," ",t("Tokens")]})]}),(0,e.jsx)(C,{"data-testid":"agents-thread-detail-close",onClick:d(()=>{m(void 0)},"onClick"),size:"xs",type:"button",variant:"ghost",children:t("Close")})]}),(0,e.jsx)(ge,{fetched:M.length}),R.length===0?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:t("This thread has no messages yet.")}):(0,e.jsxs)(I,{"data-testid":"agents-messages-table",children:[(0,e.jsx)(_,{children:(0,e.jsxs)(p,{children:[(0,e.jsx)(o,{children:t("Role")}),(0,e.jsx)(o,{children:t("Content")}),(0,e.jsx)(o,{children:t("Tool")}),(0,e.jsx)(o,{children:t("Approval")})]})}),(0,e.jsx)(q,{children:R.map((r,n)=>{let u=c(r,"role")??"\u2014",y=me(r),se=c(r,"toolName"),w=c(r,"status"),A=B(r,"seq")??n;return(0,e.jsxs)(p,{"data-testid":`agents-message-${String(A)}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs align-top text-muted-foreground",children:u}),(0,e.jsx)(i,{className:"max-w-md font-mono text-xs whitespace-pre-wrap break-words",children:c(r,"content")??"\u2014"}),(0,e.jsx)(i,{className:"font-mono text-xs align-top text-muted-foreground",children:se??(y.length>0?y.join(", "):"\u2014")}),(0,e.jsx)(i,{className:"align-top",children:w===void 0?(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:"\u2014"}):(0,e.jsx)(v,{"data-testid":`agents-message-approval-${String(A)}`,variant:he(w),children:w})})]},c(r,"messageKey")??`${u}:${String(A)}`)})})]})]})})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-agents-panel",children:[X!==null&&(0,e.jsx)(j,{error:Y,shardKey:s,testId:"agents-error"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t("Agents run as durable workflows. Each run persists a thread of assistant and tool messages; select a thread to inspect its timeline, tool calls, approvals, and token usage.")}),Z!==void 0&&(0,e.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"agents-live-error",role:"alert",children:t("Live updates unavailable; showing the last evaluation.")}),x]})},"Ee");export{Te as default};
@@ -0,0 +1 @@
1
+ import{b as Me}from"./chunk-W4LJQYCI.js";import{a as ve}from"./chunk-YORPLSI5.js";import{b as ye,c as we}from"./chunk-ONTGYVAN.js";import{a as xe}from"./chunk-GJXCPZDN.js";import{a as Ne}from"./chunk-ELSQ4FVH.js";import"./chunk-NGVP66OH.js";import"./chunk-QAOZXPLU.js";import{a as be}from"./chunk-J45HAKBU.js";import{a as fe}from"./chunk-FHLODLBC.js";import{b as pe}from"./chunk-3D67ZJRW.js";import"./chunk-ZSWW2UGP.js";import{i as ue}from"./chunk-IHGRWY3Y.js";import"./chunk-OWRKSQPE.js";import"./chunk-4EPW63HS.js";import"./chunk-CKEQX655.js";import"./chunk-UD5REVU2.js";import{a as he}from"./chunk-RCXNYW7P.js";import{b as ce}from"./chunk-UQA2AJGI.js";import"./chunk-T3ZCW3RG.js";import{a as ge}from"./chunk-IUGNIG6L.js";import"./chunk-LSEUUZN4.js";import"./chunk-WCWP4EAW.js";import"./chunk-BX7TFVCC.js";import"./chunk-4PI2OSSP.js";import{a as ie}from"./chunk-2W4UO5BC.js";import{c as de}from"./chunk-FBDIQ67D.js";import"./chunk-FACXM2UB.js";import"./chunk-ZPQBVYNN.js";import{B as U,p as me,w as oe,x as te}from"./chunk-GNI37YCV.js";import"./chunk-PDBW6GTJ.js";import{a as Le}from"./chunk-GWNGVKLG.js";import{a as Ce,b as Te}from"./chunk-6G3E4PJ2.js";import{a as m,d as le}from"./chunk-5PEAXTYQ.js";var O=le(Le(),1),A=le(Ce(),1);var s=le(Te(),1);var Pe=.5,Ie=4,Se=m(n=>Math.min(100,Math.max(0,n)),"ce"),Ke=m((n,e)=>{if(!Number.isFinite(e)||e<=0)return{leftPercent:0,widthPercent:100};let t=Se(n.offsetMs/e*100),a=n.durationMs/e*100,l=Math.max(Pe,Math.min(Se(a),100-t));return{leftPercent:t,widthPercent:l}},"Ce"),De=m((n,e,t=!1)=>{let a=e.trim().toLowerCase(),l=t?n.filter(r=>!r.ok):n;return a===""?[...l]:l.filter(r=>r.rootName.toLowerCase().includes(a)||r.functionPath.toLowerCase().includes(a)||r.traceId.toLowerCase().includes(a)||r.spans.some(o=>o.name.toLowerCase().includes(a)||o.spanId.toLowerCase().includes(a)))},"Ee"),G=m(n=>Number.isFinite(n)?n>0&&n<1?`${n.toFixed(2)}ms`:`${String(Math.round(n))}ms`:"\u2014","q"),Fe=m(n=>!Number.isFinite(n)||n<=0?[]:Array.from({length:Ie},(e,t)=>{let a=(t+1)/Ie;return{label:G(n*a),percent:a*100}}),"Pe"),ke=m(n=>{if(typeof n=="string")return n;try{return JSON.stringify(n,me)}catch{return String(n)}},"ue"),ee=m(n=>{let e=(0,O.c)(7),{label:t,value:a}=n,l;e[0]!==t?(l=(0,s.jsx)("dt",{className:"w-40 shrink-0 text-muted-foreground",children:t}),e[0]=t,e[1]=l):l=e[1];let r;e[2]!==a?(r=(0,s.jsx)("dd",{className:"min-w-0 break-all",children:a}),e[2]=a,e[3]=r):r=e[3];let o;return e[4]!==l||e[5]!==r?(o=(0,s.jsxs)("div",{className:"flex gap-2",children:[l,r]}),e[4]=l,e[5]=r,e[6]=o):o=e[6],o},"Y"),je=m(n=>{let e=(0,O.c)(68),{span:t}=n,a=U(),l,r,o,d,i,u;if(e[0]!==t.attributes||e[1]!==t.durationMs||e[2]!==t.error||e[3]!==t.events||e[4]!==t.kind||e[5]!==t.offsetMs||e[6]!==t.parentSpanId||e[7]!==t.spanId||e[8]!==a){let $=Object.entries(t.attributes??{}),_;e[15]!==t.events?(_=t.events??[],e[15]=t.events,e[16]=_):_=e[16],l=_,r="border-t border-border bg-background/60 px-3 py-2 font-mono text-xs",o="tr-span-detail";let y;e[17]!==a?(y=a("Span ID"),e[17]=a,e[18]=y):y=e[18];let w;e[19]!==t.spanId||e[20]!==y?(w=(0,s.jsx)(ee,{label:y,value:t.spanId}),e[19]=t.spanId,e[20]=y,e[21]=w):w=e[21];let M;e[22]!==a?(M=a("Parent span ID"),e[22]=a,e[23]=M):M=e[23];let h;e[24]!==t.parentSpanId||e[25]!==a?(h=t.parentSpanId===""?a("\u2014 (trace root)"):t.parentSpanId,e[24]=t.parentSpanId,e[25]=a,e[26]=h):h=e[26];let p;e[27]!==h||e[28]!==M?(p=(0,s.jsx)(ee,{label:M,value:h}),e[27]=h,e[28]=M,e[29]=p):p=e[29];let b;e[30]!==a?(b=a("Kind"),e[30]=a,e[31]=b):b=e[31];let C=t.kind??"internal",S;e[32]!==b||e[33]!==C?(S=(0,s.jsx)(ee,{label:b,value:C}),e[32]=b,e[33]=C,e[34]=S):S=e[34];let I;e[35]!==a?(I=a("Started at"),e[35]=a,e[36]=I):I=e[36];let g;e[37]!==t.offsetMs||e[38]!==a?(g=a("+{offset}",{offset:G(t.offsetMs)}),e[37]=t.offsetMs,e[38]=a,e[39]=g):g=e[39];let x;e[40]!==I||e[41]!==g?(x=(0,s.jsx)(ee,{label:I,value:g}),e[40]=I,e[41]=g,e[42]=x):x=e[42];let k;e[43]!==a?(k=a("Duration"),e[43]=a,e[44]=k):k=e[44];let f;e[45]!==t.durationMs?(f=G(t.durationMs),e[45]=t.durationMs,e[46]=f):f=e[46];let N;e[47]!==k||e[48]!==f?(N=(0,s.jsx)(ee,{label:k,value:f}),e[47]=k,e[48]=f,e[49]=N):N=e[49],e[50]!==p||e[51]!==S||e[52]!==x||e[53]!==N||e[54]!==w?(d=(0,s.jsxs)("dl",{className:"flex flex-col gap-1",children:[w,p,S,x,N]}),e[50]=p,e[51]=S,e[52]=x,e[53]=N,e[54]=w,e[55]=d):d=e[55],e[56]!==t.error?(i=t.error!==void 0&&(0,s.jsxs)("div",{className:"mt-2 rounded-md border border-destructive/40 bg-destructive/10 px-2 py-1.5","data-testid":"tr-detail-error",children:[(0,s.jsx)("span",{className:"font-semibold text-destructive",children:t.error.type}),(0,s.jsx)("p",{className:"whitespace-pre-wrap break-all text-destructive",children:t.error.message})]}),e[56]=t.error,e[57]=i):i=e[57],u=$.length>0&&(0,s.jsxs)("div",{className:"mt-2","data-testid":"tr-detail-attributes",children:[(0,s.jsx)("p",{className:"mb-1 text-muted-foreground",children:a("Attributes")}),(0,s.jsx)("dl",{className:"flex flex-col gap-1",children:$.map(Ee)})]}),e[0]=t.attributes,e[1]=t.durationMs,e[2]=t.error,e[3]=t.events,e[4]=t.kind,e[5]=t.offsetMs,e[6]=t.parentSpanId,e[7]=t.spanId,e[8]=a,e[9]=l,e[10]=r,e[11]=o,e[12]=d,e[13]=i,e[14]=u}else l=e[9],r=e[10],o=e[11],d=e[12],i=e[13],u=e[14];let c;e[58]!==l||e[59]!==a?(c=l.length>0&&(0,s.jsxs)("div",{className:"mt-2","data-testid":"tr-detail-events",children:[(0,s.jsx)("p",{className:"mb-1 text-muted-foreground",children:a("Events")}),(0,s.jsx)("ul",{className:"flex flex-col gap-1",children:l.map(Oe)})]}),e[58]=l,e[59]=a,e[60]=c):c=e[60];let v;return e[61]!==r||e[62]!==o||e[63]!==d||e[64]!==i||e[65]!==u||e[66]!==c?(v=(0,s.jsxs)("div",{className:r,"data-testid":o,children:[d,i,u,c]}),e[61]=r,e[62]=o,e[63]=d,e[64]=i,e[65]=u,e[66]=c,e[67]=v):v=e[67],v},"Ke");function Ee(n){let[e,t]=n;return(0,s.jsx)(ee,{label:e,value:ke(t)},e)}m(Ee,"Fe");function Ae(n){let[e,t]=n;return`${e}=${ke(t)}`}m(Ae,"Re");function Oe(n){return(0,s.jsxs)("li",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:oe(n.ts)}),(0,s.jsx)(ce,{variant:"secondary",children:n.name}),(0,s.jsx)("span",{className:"min-w-0 break-all text-muted-foreground",children:Object.entries(n.attributes??{}).map(Ae).join(" ")})]},`${n.name}:${String(n.ts)}`)}m(Oe,"Ae");var Be=14,_e="grid grid-cols-[14rem_1fr_4rem_16rem_16rem] items-center gap-2 px-3",We=m(n=>{let e=(0,O.c)(17),{traceDurationMs:t}=n,a,l,r,o,d,i;if(e[0]!==t){i=Symbol.for("react.early_return_sentinel");e:{let v=Fe(t);if(v.length===0){i=null;break e}e[7]===Symbol.for("react.memo_cache_sentinel")?(r=te(_e,"border-b border-border py-1 font-mono text-[10px] text-muted-foreground"),e[7]=r):r=e[7],o="tr-ruler",e[8]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsx)("span",{}),e[8]=d):d=e[8],a="relative h-3",l=v.map(Je)}e[0]=t,e[1]=a,e[2]=l,e[3]=r,e[4]=o,e[5]=d,e[6]=i}else a=e[1],l=e[2],r=e[3],o=e[4],d=e[5],i=e[6];if(i!==Symbol.for("react.early_return_sentinel"))return i;let u;e[9]!==a||e[10]!==l?(u=(0,s.jsx)("span",{className:a,children:l}),e[9]=a,e[10]=l,e[11]=u):u=e[11];let c;return e[12]!==r||e[13]!==o||e[14]!==d||e[15]!==u?(c=(0,s.jsxs)("div",{className:r,"data-testid":o,children:[d,u]}),e[12]=r,e[13]=o,e[14]=d,e[15]=u,e[16]=c):c=e[16],c},"je"),qe=m(n=>{let e=(0,O.c)(60),{span:t,traceDurationMs:a}=n,l=U(),[r,o]=(0,A.useState)(!1),d;e[0]!==t||e[1]!==a?(d=Ke(t,a),e[0]=t,e[1]=a,e[2]=d):d=e[2];let{leftPercent:i,widthPercent:u}=d,c;e[3]!==t.attributes?(c=ve(t.attributes),e[3]=t.attributes,e[4]=c):c=e[4];let v=c,$=t.depth*Be,_;e[5]!==$?(_={paddingLeft:$},e[5]=$,e[6]=_):_=e[6];let y=_,w=`${String(i)}%`,M=`${String(u)}%`,h;e[7]!==w||e[8]!==M?(h={left:w,width:M},e[7]=w,e[8]=M,e[9]=h):h=e[9];let p=h,b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=m(()=>{o(Ue)},"h"),e[10]=b):b=e[10];let C=b,S=t.depth,I=`tr-span-detail-${t.spanId}`,g;e[11]!==t.durationMs||e[12]!==t.error||e[13]!==t.name||e[14]!==t.offsetMs||e[15]!==l?(g=l("{name}, {duration}, starts {offset} in{failure}",{duration:G(t.durationMs),failure:t.error===void 0?"":l(", failed: {message}",{message:t.error.message}),name:t.name,offset:G(t.offsetMs)}),e[11]=t.durationMs,e[12]=t.error,e[13]=t.name,e[14]=t.offsetMs,e[15]=l,e[16]=g):g=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=te(_e,"w-full border-b border-border py-1.5 text-left font-mono text-xs hover:bg-muted/50"),e[17]=x):x=e[17];let k=`tr-span-toggle-${t.spanId}`,f;e[18]!==t.ok?(f=t.ok?null:(0,s.jsx)("span",{"aria-hidden":"true",className:"mr-1 text-destructive","data-testid":"tr-span-error",children:"\u25CF"}),e[18]=t.ok,e[19]=f):f=e[19];let N;e[20]!==y||e[21]!==t.name||e[22]!==f?(N=(0,s.jsxs)("span",{className:"truncate",style:y,title:t.name,children:[f,t.name]}),e[20]=y,e[21]=t.name,e[22]=f,e[23]=N):N=e[23];let B=t.ok?"bg-primary/70":"bg-destructive",L;e[24]!==B?(L=te("absolute inset-y-0 rounded-sm",B),e[24]=B,e[25]=L):L=e[25];let E;e[26]!==p||e[27]!==i||e[28]!==L||e[29]!==u?(E=(0,s.jsx)("span",{"aria-hidden":"true",className:"relative h-3 overflow-hidden rounded-sm bg-muted",children:(0,s.jsx)("span",{className:L,"data-left":i,"data-testid":"tr-span-bar","data-width":u,style:p})}),e[26]=p,e[27]=i,e[28]=L,e[29]=u,e[30]=E):E=e[30];let W;e[31]!==t.durationMs?(W=G(t.durationMs),e[31]=t.durationMs,e[32]=W):W=e[32];let D;e[33]!==W?(D=(0,s.jsx)("span",{className:"text-right tabular-nums text-muted-foreground",children:W}),e[33]=W,e[34]=D):D=e[34];let q;e[35]!==t.error?(q=t.error===void 0?null:(0,s.jsx)("span",{className:"text-destructive","data-testid":"tr-span-error-message",title:t.error.message,children:`${t.error.type}: ${t.error.message}`}),e[35]=t.error,e[36]=q):q=e[36];let T;e[37]!==q?(T=(0,s.jsx)("span",{className:"truncate text-muted-foreground",children:q}),e[37]=q,e[38]=T):T=e[38];let z;e[39]!==v?(z=v===""?null:(0,s.jsx)("span",{"data-testid":"tr-span-attributes",title:v,children:v}),e[39]=v,e[40]=z):z=e[40];let P;e[41]!==z?(P=(0,s.jsx)("span",{className:"truncate text-muted-foreground",children:z}),e[41]=z,e[42]=P):P=e[42];let J;e[43]!==r||e[44]!==I||e[45]!==g||e[46]!==k||e[47]!==N||e[48]!==E||e[49]!==D||e[50]!==T||e[51]!==P?(J=(0,s.jsxs)("button",{"aria-controls":I,"aria-expanded":r,"aria-label":g,className:x,"data-testid":k,onClick:C,type:"button",children:[N,E,D,T,P]}),e[43]=r,e[44]=I,e[45]=g,e[46]=k,e[47]=N,e[48]=E,e[49]=D,e[50]=T,e[51]=P,e[52]=J):J=e[52];let F;e[53]!==r||e[54]!==t?(F=r&&(0,s.jsx)("div",{id:`tr-span-detail-${t.spanId}`,children:(0,s.jsx)(je,{span:t})}),e[53]=r,e[54]=t,e[55]=F):F=e[55];let K;return e[56]!==t.depth||e[57]!==J||e[58]!==F?(K=(0,s.jsxs)("li",{"data-depth":S,"data-testid":"tr-span-row",children:[J,F]}),e[56]=t.depth,e[57]=J,e[58]=F,e[59]=K):K=e[59],K},"Be"),ze=m(n=>{let e=(0,O.c)(15),{durationMs:t,spans:a}=n,l=U(),r;e[0]!==t?(r=(0,s.jsx)(We,{traceDurationMs:t}),e[0]=t,e[1]=r):r=e[1];let o;e[2]!==l?(o=l("Trace waterfall"),e[2]=l,e[3]=o):o=e[3];let d;if(e[4]!==t||e[5]!==a){let c;e[7]!==t?(c=m(v=>(0,s.jsx)(qe,{span:v,traceDurationMs:t},v.spanId),"c"),e[7]=t,e[8]=c):c=e[8],d=a.map(c),e[4]=t,e[5]=a,e[6]=d}else d=e[6];let i;e[9]!==o||e[10]!==d?(i=(0,s.jsx)("ul",{"aria-label":o,children:d}),e[9]=o,e[10]=d,e[11]=i):i=e[11];let u;return e[12]!==r||e[13]!==i?(u=(0,s.jsxs)(s.Fragment,{children:[r,i]}),e[12]=r,e[13]=i,e[14]=u):u=e[14],u},"Oe");function Je(n){return(0,s.jsx)("span",{className:te("absolute inset-y-0 border-l border-border/70",n.percent===100?"-translate-x-full pr-1":"pl-1"),style:{left:`${String(n.percent)}%`},children:n.label},n.percent)}m(Je,"We");function Ue(n){return!n}m(Ue,"Ue");var Ge=m(n=>Array.isArray(n?.traces)?n.traces:[],"qe"),He=m(n=>{let e=(0,O.c)(12),{entries:t}=n,a=U(),l;e[0]!==t.length||e[1]!==a?(l=a("Logs ({count})",{count:t.length}),e[0]=t.length,e[1]=a,e[2]=l):l=e[2];let r;e[3]!==l?(r=(0,s.jsx)("p",{className:"mb-1 font-mono text-xs text-muted-foreground",children:l}),e[3]=l,e[4]=r):r=e[4];let o;e[5]!==t?(o=t.map(Ve),e[5]=t,e[6]=o):o=e[6];let d;e[7]!==o?(d=(0,s.jsx)("div",{role:"grid",children:o}),e[7]=o,e[8]=d):d=e[8];let i;return e[9]!==r||e[10]!==d?(i=(0,s.jsxs)("div",{className:"border-t border-border px-3 py-2","data-testid":"tr-logs",children:[r,d]}),e[9]=r,e[10]=d,e[11]=i):i=e[11],i},"ze"),Qe=m(n=>{let e=(0,O.c)(50),{expanded:t,logs:a,onToggle:l,trace:r}=n,o=U(),d;e[0]!==l||e[1]!==r.traceId?(d=m(()=>{l(r.traceId)},"i"),e[0]=l,e[1]=r.traceId,e[2]=d):d=e[2];let i=d,u=`tr-row-${r.traceId}`,c=`tr-waterfall-${r.traceId}`,v=`tr-toggle-${r.traceId}`,$=t?"\u25BE":"\u25B8",_;e[3]!==$?(_=(0,s.jsx)("span",{"aria-hidden":"true",className:"w-3 shrink-0 text-xs text-muted-foreground",children:$}),e[3]=$,e[4]=_):_=e[4];let y;e[5]!==r.rootName?(y=(0,s.jsx)("span",{className:"w-56 shrink-0 truncate text-sm font-medium",title:r.rootName,children:r.rootName}),e[5]=r.rootName,e[6]=y):y=e[6];let w;e[7]!==r.functionPath?(w=(0,s.jsx)("span",{className:"w-48 shrink-0 truncate font-mono text-xs text-muted-foreground",title:r.functionPath,children:r.functionPath}),e[7]=r.functionPath,e[8]=w):w=e[8];let M;e[9]!==r.durationMs?(M=G(r.durationMs),e[9]=r.durationMs,e[10]=M):M=e[10];let h;e[11]!==M?(h=(0,s.jsx)("span",{className:"w-20 shrink-0 text-right font-mono text-xs tabular-nums text-muted-foreground",children:M}),e[11]=M,e[12]=h):h=e[12];let p;e[13]!==o||e[14]!==r.spans.length?(p=o("{count} spans",{count:r.spans.length}),e[13]=o,e[14]=r.spans.length,e[15]=p):p=e[15];let b;e[16]!==p?(b=(0,s.jsx)("span",{className:"w-20 shrink-0 text-right font-mono text-xs tabular-nums text-muted-foreground",children:p}),e[16]=p,e[17]=b):b=e[17];let C=r.ok?"secondary":"destructive",S;e[18]!==o||e[19]!==r.ok?(S=r.ok?o("ok"):o("error"),e[18]=o,e[19]=r.ok,e[20]=S):S=e[20];let I;e[21]!==C||e[22]!==S?(I=(0,s.jsx)("span",{className:"shrink-0",children:(0,s.jsx)(ce,{variant:C,children:S})}),e[21]=C,e[22]=S,e[23]=I):I=e[23];let g;e[24]!==r.startTs?(g=oe(r.startTs),e[24]=r.startTs,e[25]=g):g=e[25];let x;e[26]!==g?(x=(0,s.jsx)("span",{className:"flex-1 truncate text-right font-mono text-xs tabular-nums text-muted-foreground",children:g}),e[26]=g,e[27]=x):x=e[27];let k;e[28]!==t||e[29]!==i||e[30]!==h||e[31]!==b||e[32]!==I||e[33]!==x||e[34]!==c||e[35]!==v||e[36]!==_||e[37]!==y||e[38]!==w?(k=(0,s.jsxs)("button",{"aria-controls":c,"aria-expanded":t,className:"flex w-full items-center gap-3 px-3 py-2 text-left hover:bg-muted/50","data-testid":v,onClick:i,type:"button",children:[_,y,w,h,b,I,x]}),e[28]=t,e[29]=i,e[30]=h,e[31]=b,e[32]=I,e[33]=x,e[34]=c,e[35]=v,e[36]=_,e[37]=y,e[38]=w,e[39]=k):k=e[39];let f;e[40]!==t||e[41]!==a||e[42]!==r.durationMs||e[43]!==r.spans||e[44]!==r.traceId?(f=t&&(0,s.jsxs)("div",{className:"bg-muted/20","data-testid":`tr-waterfall-${r.traceId}`,id:`tr-waterfall-${r.traceId}`,children:[(0,s.jsx)(ze,{durationMs:r.durationMs,spans:r.spans}),a.length>0&&(0,s.jsx)(He,{entries:a})]}),e[40]=t,e[41]=a,e[42]=r.durationMs,e[43]=r.spans,e[44]=r.traceId,e[45]=f):f=e[45];let N;return e[46]!==k||e[47]!==f||e[48]!==u?(N=(0,s.jsxs)("div",{className:"border-b border-border last:border-b-0","data-testid":u,children:[k,f]}),e[46]=k,e[47]=f,e[48]=u,e[49]=N):N=e[49],N},"Ge"),bt=m(n=>{let e=(0,O.c)(60),{initialShardKey:t}=n,a=U(),[l]=(0,A.useState)(ye),{queryShardKey:r,setShardKey:o,shardKey:d}=be(l?.shardKey!==void 0&&l.shardKey!==""?l.shardKey:t??""),[i,u]=(0,A.useState)(l?.traceId??""),[c,v]=(0,A.useState)(!1),[$,_]=(0,A.useState)(Xe),y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[0]=y):y=e[0],(0,A.useEffect)(Ye,y);let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w={},e[1]=w):w=e[1];let M;e[2]!==r?(M={live:!0,shardKey:r},e[2]=r,e[3]=M):M=e[3];let{data:h,error:p,errorSource:b,isLoading:C,liveError:S}=de(ie.getTraces,w,M),I;e[4]===Symbol.for("react.memo_cache_sentinel")?(I={},e[4]=I):I=e[4];let g=$.size>0,x;e[5]!==r||e[6]!==g?(x={enabled:g,live:!0,shardKey:r},e[5]=r,e[6]=g,e[7]=x):x=e[7];let{data:k}=de(ie.getLogs,I,x),f,N;e[8]!==h||e[9]!==r?(f=m(()=>{h!==void 0&&pe(r)},"p"),N=[h,r],e[8]=h,e[9]=r,e[10]=f,e[11]=N):(f=e[10],N=e[11]),(0,A.useEffect)(f,N);let B;if(e[12]!==h||e[13]!==p||e[14]!==b||e[15]!==$||e[16]!==C||e[17]!==S||e[18]!==k?.entries||e[19]!==c||e[20]!==r||e[21]!==i||e[22]!==o||e[23]!==d||e[24]!==a){let L=Ge(h),E=h?.total??L.length,W=E>L.length,D=De(L,i,c),q=Map.groupBy((k?.entries??[]).toReversed(),Ze),T;e[26]===Symbol.for("react.memo_cache_sentinel")?(T=m(j=>{u(j.target.value)},"C"),e[26]=T):T=e[26];let z=T,P;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=m(j=>{_($e=>{let ne=new Set($e);return ne.has(j)?ne.delete(j):ne.add(j),ne})},"E"),e[27]=P):P=e[27];let J=P,F=p===null&&D.length===0&&!C,K;e[28]!==o||e[29]!==d?(K=(0,s.jsx)(fe,{onChange:o,testId:"tr-shard-input",value:d}),e[28]=o,e[29]=d,e[30]=K):K=e[30];let H;e[31]!==a?(H=a("Search traces"),e[31]=a,e[32]=H):H=e[32];let Q;e[33]!==a?(Q=a("search trace, span, or function"),e[33]=a,e[34]=Q):Q=e[34];let V;e[35]!==i||e[36]!==H||e[37]!==Q?(V=(0,s.jsx)(ue,{"aria-label":H,className:"h-8 w-56","data-testid":"tr-search",onChange:z,placeholder:Q,value:i}),e[35]=i,e[36]=H,e[37]=Q,e[38]=V):V=e[38];let X;e[39]!==c?(X=(0,s.jsx)(xe,{checked:c,"data-testid":"tr-only-errors",id:"tr-only-errors",onCheckedChange:v}),e[39]=c,e[40]=X):X=e[40];let Y;e[41]!==a?(Y=a("Errors only"),e[41]=a,e[42]=Y):Y=e[42];let Z;e[43]!==X||e[44]!==Y?(Z=(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",htmlFor:"tr-only-errors",children:[X,Y]}),e[43]=X,e[44]=Y,e[45]=Z):Z=e[45];let R;e[46]!==S?(R=(0,s.jsx)(Ne,{message:S,prefix:"tr"}),e[46]=S,e[47]=R):R=e[47];let re;e[48]!==K||e[49]!==V||e[50]!==Z||e[51]!==R?(re=(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[K,V,Z,R]}),e[48]=K,e[49]=V,e[50]=Z,e[51]=R,e[52]=re):re=e[52];let ae;e[53]!==p||e[54]!==b||e[55]!==r?(ae=p!==null&&(0,s.jsx)(ge,{error:b,shardKey:r,testId:"tr-error"}),e[53]=p,e[54]=b,e[55]=r,e[56]=ae):ae=e[56];let se;e[57]!==F||e[58]!==a?(se=F&&(0,s.jsx)(he,{description:a("Traces recorded with ctx.trace show up here as your app handles traffic. The span buffer resets when the shard hibernates."),icon:(0,s.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,s.jsx)("path",{d:"M4 6h10M7 12h13M10 18h7"})}),testId:"tr-empty",title:a("No traces")}),e[57]=F,e[58]=a,e[59]=se):se=e[59],B=(0,s.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-traces-panel",children:[re,ae,se,p===null&&W&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"tr-truncated",children:a("Showing the {shown} most recent of {total} traces in the buffer.",{shown:L.length,total:E})}),p===null&&D.length>0&&(0,s.jsx)("div",{"aria-label":a("Recent traces"),className:"overflow-hidden rounded-xl border border-border shadow-xs","data-testid":"tr-list",children:D.map(j=>(0,s.jsx)(Qe,{expanded:$.has(j.traceId),logs:q.get(j.traceId)??[],onToggle:J,trace:j},j.traceId))})]}),e[12]=h,e[13]=p,e[14]=b,e[15]=$,e[16]=C,e[17]=S,e[18]=k?.entries,e[19]=c,e[20]=r,e[21]=i,e[22]=o,e[23]=d,e[24]=a,e[25]=B}else B=e[25];return B},"bt");function Ve(n,e){return(0,s.jsx)("div",{className:"flex items-center border-b border-border py-1 font-mono text-xs last:border-b-0","data-testid":"tr-log-row",role:"row",children:(0,s.jsx)(Me,{entry:n})},`${String(e)}:${String(n.timestamp)}`)}m(Ve,"He");function Xe(){return new Set}m(Xe,"Je");function Ye(){we()}m(Ye,"Qe");function Ze(n){return n.traceId}m(Ze,"Ve");export{bt as default};
@@ -0,0 +1 @@
1
+ import{a as He}from"./chunk-6FPV3EK2.js";import{a as Ge}from"./chunk-J3BZWYJQ.js";import{a as Se}from"./chunk-TKBTZX4K.js";import{a as qe}from"./chunk-YEVTA35E.js";import{i as je}from"./chunk-IHGRWY3Y.js";import"./chunk-OWRKSQPE.js";import"./chunk-4EPW63HS.js";import{a as $e}from"./chunk-V3BE427M.js";import"./chunk-CKEQX655.js";import"./chunk-UD5REVU2.js";import{b as Ze}from"./chunk-UQA2AJGI.js";import"./chunk-T3ZCW3RG.js";import{a as Fe}from"./chunk-2W4UO5BC.js";import{m as Ke}from"./chunk-FACXM2UB.js";import"./chunk-ZPQBVYNN.js";import{B as Oe,h as Pe,i as me,j as Ce,k as Ue,s as Re}from"./chunk-GNI37YCV.js";import"./chunk-PDBW6GTJ.js";import{a as at}from"./chunk-GWNGVKLG.js";import{a as ot,b as lt}from"./chunk-6G3E4PJ2.js";import{a as s,d as Me}from"./chunk-5PEAXTYQ.js";var De=Me(at(),1),m=Me(ot(),1);var r=Me(lt(),1);var ze=Pe(Fe.getPitrBookmark),st=Pe(Fe.pitrRestore),nt=/^\d+$/u,Je=s(ie=>{let e=ie.trim(),h=nt.test(e)?Number(e):Date.parse(e),l=new Date(h);return Number.isNaN(l.getTime())?void 0:{epochMs:h,iso:l.toISOString()}},"De"),it=s(ie=>{let e=(0,De.c)(9),{text:h}=ie,l=Oe();if(h.trim()==="")return null;let t,o,p;if(e[0]!==l||e[1]!==h){let y=Je(h);t="font-mono text-xs text-muted-foreground",o="pitr-time-resolved",p=y===void 0?l("Not a time \u2014 use epoch-ms or ISO 8601."):l("Resolves to {instant} (a date-time without an offset is read in this browser's time zone; a bare date is UTC)",{instant:y.iso}),e[0]=l,e[1]=h,e[2]=t,e[3]=o,e[4]=p}else t=e[2],o=e[3],p=e[4];let N;return e[5]!==t||e[6]!==o||e[7]!==p?(N=(0,r.jsx)("p",{className:t,"data-testid":o,children:p}),e[5]=t,e[6]=o,e[7]=p,e[8]=N):N=e[8],N},"lt"),vt=s(ie=>{let e=(0,De.c)(140),{initialShardKey:h}=ie,l=Ke(),t=Oe(),o=h??"",p=He(o),[N,y]=(0,m.useState)(null),[f,Qe]=(0,m.useState)(""),[ce,Ee]=(0,m.useState)(null),[c,We]=(0,m.useState)(""),[b,Xe]=(0,m.useState)(!1),[i,Ye]=(0,m.useState)(null),[ue,w]=(0,m.useState)(null),[de,I]=(0,m.useState)(!1),[C,Ve]=(0,m.useState)(!1),pe;e[0]!==l||e[1]!==o?(pe=s(async a=>{I(!0),w(null);let d;try{d={current:(await l.query(ze,{},me(o))).current,error:null,unavailable:!1}}catch(n){let g=n;d={current:null,error:Ce(g),unavailable:Ue(g)==="PITR_UNAVAILABLE"}}a?.aborted!==!0&&(d.error===null?y(d.current):w(d.error),Ve(d.unavailable),I(!1))},"fe"),e[0]=l,e[1]=o,e[2]=pe):pe=e[2];let x=pe,he,fe;e[3]!==x?(he=s(()=>{let a=new AbortController;return Re(x(a.signal)),()=>{a.abort()}},"ue"),fe=[x],e[3]=x,e[4]=he,e[5]=fe):(he=e[4],fe=e[5]),(0,m.useEffect)(he,fe);let be;e[6]!==l||e[7]!==o?(be=s(async()=>{let a=await l.query(ze,{},me(o));y(a.current)},"he"),e[6]=l,e[7]=o,e[8]=be):be=e[8],Ge(be,!C);let xe;e[9]===Symbol.for("react.memo_cache_sentinel")?(xe=s(a=>{Qe(a.target.value)},"be"),e[9]=xe):xe=e[9];let et=xe,ke;e[10]===Symbol.for("react.memo_cache_sentinel")?(ke=s(a=>{We(a.target.value)},"xe"),e[10]=ke):ke=e[10];let tt=ke,Ne;e[11]===Symbol.for("react.memo_cache_sentinel")?(Ne=s(a=>{Xe(a.target.checked)},"ke"),e[11]=Ne):Ne=e[11];let rt=Ne,ve,R,u,k,v,ge;if(e[12]!==c||e[13]!==l||e[14]!==ce||e[15]!==x||e[16]!==o||e[17]!==p||e[18]!==t||e[19]!==f){u=Je(f),R=s(()=>{if(u===void 0)return;let d=o;Re((async()=>{I(!0),w(null);let n;try{n={result:await l.query(ze,{time:u.epochMs},me(d))}}catch(g){n={error:Ce(g)}}p.current===d&&("result"in n?(Ee(n.result.forTime===void 0?null:{bookmark:n.result.forTime,shard:d}),y(n.result.current)):(Ee(null),w(n.error)),I(!1))})())},"C"),v=ce?.shard===o?ce.bookmark:null;let a;e[26]!==l||e[27]!==x||e[28]!==o?(a=s(d=>{Re((async()=>{I(!0),w(null);try{let n=await l.mutation(st,d,me(o));Ye(n),await x()}catch(n){let g=n;w(Ce(g)),Ue(g)==="PITR_UNAVAILABLE"&&Ve(!0)}I(!1)})())},"o"),e[26]=l,e[27]=x,e[28]=o,e[29]=a):a=e[29],k=a,ve=c.trim()!==""||u!==void 0,ge=t("Restore {shard} to {target}?",{shard:o===""?t("root"):o,target:c.trim()===""?u?.iso??"":t("the given bookmark")}),e[12]=c,e[13]=l,e[14]=ce,e[15]=x,e[16]=o,e[17]=p,e[18]=t,e[19]=f,e[20]=ve,e[21]=R,e[22]=u,e[23]=k,e[24]=v,e[25]=ge}else ve=e[20],R=e[21],u=e[22],k=e[23],v=e[24],ge=e[25];let Te=ge,ye;e[30]!==c||e[31]!==u?.epochMs||e[32]!==b||e[33]!==k?(ye=s(()=>{let a=b?{restart:!0}:{};c.trim()===""?a.time=u?.epochMs:a.bookmark=c.trim(),k(a)},"Ne"),e[30]=c,e[31]=u?.epochMs,e[32]=b,e[33]=k,e[34]=ye):ye=e[34];let Be=ye,we;e[35]!==b||e[36]!==i||e[37]!==k?(we=s(()=>{i!==null&&k(b?{bookmark:i.undoBookmark,restart:!0}:{bookmark:i.undoBookmark})},"ye"),e[35]=b,e[36]=i,e[37]=k,e[38]=we):we=e[38];let Ae=we,S;e[39]!==t?(S=t("Shard"),e[39]=t,e[40]=S):S=e[40];let T;e[41]!==o||e[42]!==t?(T=o===""?t("root"):o,e[41]=o,e[42]=t,e[43]=T):T=e[43];let B;e[44]!==T?(B=(0,r.jsx)("span",{className:"font-mono",children:T}),e[44]=T,e[45]=B):B=e[45];let A;e[46]!==S||e[47]!==B?(A=(0,r.jsx)("div",{className:"flex flex-wrap items-center gap-3",children:(0,r.jsxs)("span",{className:"text-xs text-muted-foreground",children:[S,": ",B]})}),e[46]=S,e[47]=B,e[48]=A):A=e[48];let _;e[49]!==t?(_=t("In-place recovery to any moment in the last 30 days. For older or portable recovery, use the snapshot backup tier."),e[49]=t,e[50]=_):_=e[50];let L;e[51]!==_?(L=(0,r.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"pitr-note",children:_}),e[51]=_,e[52]=L):L=e[52];let M;e[53]!==ue?(M=ue!==null&&(0,r.jsx)("p",{className:"text-sm text-destructive","data-testid":"pitr-error",role:"alert",children:ue}),e[53]=ue,e[54]=M):M=e[54];let P;e[55]!==t?(P=t("Current bookmark"),e[55]=t,e[56]=P):P=e[56];let U;e[57]!==P?(U=(0,r.jsx)("h3",{className:"mb-2 text-sm font-semibold",children:P}),e[57]=P,e[58]=U):U=e[58];let F;e[59]!==N?(F=N??(0,r.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}),e[59]=N,e[60]=F):F=e[60];let O;e[61]!==F?(O=(0,r.jsx)("p",{className:"font-mono text-xs break-all text-muted-foreground","data-testid":"pitr-current",children:F}),e[61]=F,e[62]=O):O=e[62];let j;e[63]!==U||e[64]!==O?(j=(0,r.jsxs)("section",{className:"rounded-xl border border-border bg-card p-3 shadow-xs",children:[U,O]}),e[63]=U,e[64]=O,e[65]=j):j=e[65];let q;e[66]!==t?(q=t("Restore"),e[66]=t,e[67]=q):q=e[67];let z;e[68]!==q?(z=(0,r.jsx)("h3",{className:"text-sm font-semibold",children:q}),e[68]=q,e[69]=z):z=e[69];let D;e[70]!==t?(D=t("Time (ISO or epoch-ms, last 30 days)"),e[70]=t,e[71]=D):D=e[71];let E;e[72]!==D?(E=(0,r.jsx)(Se,{htmlFor:"pitr-time",children:D}),e[72]=D,e[73]=E):E=e[73];let V;e[74]!==f?(V=(0,r.jsx)(je,{"data-testid":"pitr-time",id:"pitr-time",onChange:et,placeholder:"2026-06-01T00:00:00.000Z",value:f}),e[74]=f,e[75]=V):V=e[75];let _e=de||C||u===void 0,K;e[76]!==t?(K=t("Preview"),e[76]=t,e[77]=K):K=e[77];let Z;e[78]!==R||e[79]!==_e||e[80]!==K?(Z=(0,r.jsx)($e,{"data-testid":"pitr-preview",disabled:_e,onClick:R,size:"sm",type:"button",variant:"outline",children:K}),e[78]=R,e[79]=_e,e[80]=K,e[81]=Z):Z=e[81];let $;e[82]!==V||e[83]!==Z?($=(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[V,Z]}),e[82]=V,e[83]=Z,e[84]=$):$=e[84];let G;e[85]!==f?(G=(0,r.jsx)(it,{text:f}),e[85]=f,e[86]=G):G=e[86];let H;e[87]!==v||e[88]!==t?(H=v!==null&&(0,r.jsxs)("p",{className:"font-mono text-xs break-all text-muted-foreground","data-testid":"pitr-preview-bookmark",children:[t("Bookmark for that time"),": ",v]}),e[87]=v,e[88]=t,e[89]=H):H=e[89];let J;e[90]!==E||e[91]!==$||e[92]!==G||e[93]!==H?(J=(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[E,$,G,H]}),e[90]=E,e[91]=$,e[92]=G,e[93]=H,e[94]=J):J=e[94];let Q;e[95]!==t?(Q=t("Or an explicit bookmark (wins over time)"),e[95]=t,e[96]=Q):Q=e[96];let W;e[97]!==Q?(W=(0,r.jsx)(Se,{htmlFor:"pitr-bookmark",children:Q}),e[97]=Q,e[98]=W):W=e[98];let X;e[99]!==t?(X=t("bookmark string"),e[99]=t,e[100]=X):X=e[100];let Y;e[101]!==c||e[102]!==X?(Y=(0,r.jsx)(je,{"data-testid":"pitr-bookmark",id:"pitr-bookmark",onChange:tt,placeholder:X,value:c}),e[101]=c,e[102]=X,e[103]=Y):Y=e[103];let ee;e[104]!==W||e[105]!==Y?(ee=(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[W,Y]}),e[104]=W,e[105]=Y,e[106]=ee):ee=e[106];let te;e[107]!==b?(te=(0,r.jsx)("input",{checked:b,className:"size-4 accent-primary","data-testid":"pitr-restart",id:"pitr-restart",onChange:rt,type:"checkbox"}),e[107]=b,e[108]=te):te=e[108];let re;e[109]!==t?(re=t("Restart the shard now so recovery applies immediately"),e[109]=t,e[110]=re):re=e[110];let oe;e[111]!==te||e[112]!==re?(oe=(0,r.jsxs)(Se,{className:"flex items-center gap-2 text-xs font-normal text-muted-foreground",htmlFor:"pitr-restart",children:[te,re]}),e[111]=te,e[112]=re,e[113]=oe):oe=e[113];let Le=de||C||!ve,ae;e[114]!==t?(ae=t("Restore"),e[114]=t,e[115]=ae):ae=e[115];let le;e[116]!==Te||e[117]!==Be||e[118]!==Le||e[119]!==ae?(le=(0,r.jsx)("div",{children:(0,r.jsx)(qe,{confirmLabel:Te,disabled:Le,onConfirm:Be,testId:"pitr-restore",children:ae})}),e[116]=Te,e[117]=Be,e[118]=Le,e[119]=ae,e[120]=le):le=e[120];let se;e[121]!==z||e[122]!==J||e[123]!==ee||e[124]!==oe||e[125]!==le?(se=(0,r.jsxs)("section",{className:"flex flex-col gap-3 rounded-xl border border-border bg-card p-3 shadow-xs",children:[z,J,ee,oe,le]}),e[121]=z,e[122]=J,e[123]=ee,e[124]=oe,e[125]=le,e[126]=se):se=e[126];let ne;e[127]!==de||e[128]!==Ae||e[129]!==i||e[130]!==t||e[131]!==C?(ne=i!==null&&(0,r.jsxs)("section",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card p-3 shadow-xs","data-testid":"pitr-result",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold",children:t("Restore armed")}),(0,r.jsx)(Ze,{variant:i.restarted?"destructive":"secondary",children:i.restarted?t("restarted now"):t("on next restart")})]}),(0,r.jsxs)("p",{className:"font-mono text-xs break-all text-muted-foreground",children:[t("Restored to"),": ",i.restoredTo]}),(0,r.jsxs)("p",{className:"font-mono text-xs break-all text-muted-foreground","data-testid":"pitr-undo-bookmark",children:[t("Undo bookmark"),": ",i.undoBookmark]}),(0,r.jsx)("div",{children:(0,r.jsx)(qe,{confirmLabel:t("Confirm undo"),disabled:de||C,onConfirm:Ae,testId:"pitr-undo",children:t("Undo restore")})})]}),e[127]=de,e[128]=Ae,e[129]=i,e[130]=t,e[131]=C,e[132]=ne):ne=e[132];let Ie;return e[133]!==A||e[134]!==L||e[135]!==M||e[136]!==j||e[137]!==se||e[138]!==ne?(Ie=(0,r.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-pitr",children:[A,L,M,j,se,ne]}),e[133]=A,e[134]=L,e[135]=M,e[136]=j,e[137]=se,e[138]=ne,e[139]=Ie):Ie=e[139],Ie},"Nt");export{vt as PitrPanel};
@@ -0,0 +1 @@
1
+ import{a as D}from"./chunk-J3BZWYJQ.js";import{a as k}from"./chunk-MJTVTUNI.js";import"./chunk-DA2CAFXI.js";import"./chunk-RTS5G3ET.js";import"./chunk-QRA7AKYO.js";import"./chunk-V3BE427M.js";import"./chunk-CKEQX655.js";import"./chunk-UD5REVU2.js";import{a as I}from"./chunk-RCXNYW7P.js";import{b as w}from"./chunk-UQA2AJGI.js";import"./chunk-T3ZCW3RG.js";import{a as B}from"./chunk-IUGNIG6L.js";import"./chunk-LSEUUZN4.js";import{a as A,b as C,c as P,d as b,e as l,f as n}from"./chunk-7QEZ2SFW.js";import"./chunk-WCWP4EAW.js";import"./chunk-BX7TFVCC.js";import"./chunk-4PI2OSSP.js";import{a as u}from"./chunk-2W4UO5BC.js";import{c as p}from"./chunk-FBDIQ67D.js";import{a as v,e as S}from"./chunk-OK2QU2EV.js";import{j as R}from"./chunk-FACXM2UB.js";import"./chunk-ZPQBVYNN.js";import{B as j,w as N}from"./chunk-GNI37YCV.js";import"./chunk-PDBW6GTJ.js";import"./chunk-GWNGVKLG.js";import{b as Q}from"./chunk-6G3E4PJ2.js";import{a as m,d as H}from"./chunk-5PEAXTYQ.js";var e=H(Q(),1);var _="payment_subscriptions",O="payment_events",V=[_,O],Y={},E=new Set(["active","trialing"]),z=new Set(["past_due","unpaid"]),s=m((a,t)=>{if(a[t]!==void 0)return a[t];let h=a.__doc__;return typeof h=="string"?R(h)?.[t]:void 0},"a"),o=m(a=>typeof a=="string"?a:typeof a=="number"||typeof a=="bigint"||typeof a=="boolean"?String(a):"","s"),J=m(a=>E.has(a)?"default":z.has(a)?"destructive":"outline","q"),ie=m(({limit:a=100})=>{let t=j(),h=k(),{data:x}=p(u.listTables,Y,{live:!0}),F=x!==void 0,L=Array.isArray(x)&&V.every(r=>x.some(d=>d.name===r)),c=h.payments&&L,i=p(u.readTablePage,{filters:[],limit:a,offset:0,orderBy:{column:"updatedAt",direction:"desc"},search:"",table:_},{enabled:c}),f=p(u.readTablePage,{filters:[],limit:25,offset:0,orderBy:{column:"processedAt",direction:"desc"},search:"",table:O},{enabled:c}),g=p(u.facetColumn,{column:"state",table:_},{enabled:c});D(()=>{if(c)return Promise.all([i.poll(),f.poll(),g.poll()])},!0);let y=i.data?.rows??[],M=f.data?.rows??[],U=i.error??f.error,q=i.error===null?f.errorSource:i.errorSource,G=i.data?.total??y.length,T=g.data?.values===void 0?y.filter(r=>E.has(o(s(r,"state")))).length:g.data.values.reduce((r,d)=>r+(E.has(o(d.value))?d.count:0),0);return F&&!c?(0,e.jsx)("div",{className:"flex flex-col gap-4","data-testid":"payments-panel",children:(0,e.jsx)(I,{description:t("No @lunora/payment tables found in this deployment. Add `.extend(paymentExtension)` to lunora/schema.ts and wire `payment` on createShardDO() to sync customers and subscriptions."),testId:"payments-unconfigured",title:t("No payments configured")})}):(0,e.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"payments-panel",children:[(0,e.jsx)("div",{className:"flex items-center gap-2","data-testid":"payments-summary",children:(0,e.jsxs)(v,{className:"justify-between gap-0 py-0",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-2.5 p-4",children:[(0,e.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:t("Subscriptions")}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:T}),(0,e.jsx)(w,{variant:"default",children:t("{count} active",{count:T})})]})]}),(0,e.jsx)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:t("{total} total",{total:G})})]})}),U===null?void 0:(0,e.jsx)(B,{error:q}),y.length===0&&!i.isLoading?(0,e.jsx)(I,{testId:"payments-empty",title:t("No subscriptions yet")}):(0,e.jsx)(v,{className:"overflow-hidden py-0",children:(0,e.jsx)(S,{className:"px-0",children:(0,e.jsxs)(A,{children:[(0,e.jsx)(C,{children:(0,e.jsxs)(b,{children:[(0,e.jsx)(l,{children:t("Provider")}),(0,e.jsx)(l,{children:t("Reference")}),(0,e.jsx)(l,{children:t("Plan")}),(0,e.jsx)(l,{children:t("State")}),(0,e.jsx)(l,{children:t("Renews")})]})}),(0,e.jsx)(P,{children:y.map(r=>{let d=o(s(r,"state"));return(0,e.jsxs)(b,{"data-testid":"payment-subscription-row",children:[(0,e.jsx)(n,{children:o(s(r,"provider"))}),(0,e.jsx)(n,{children:o(s(r,"referenceId"))}),(0,e.jsx)(n,{children:o(s(r,"priceId"))}),(0,e.jsx)(n,{children:(0,e.jsx)(w,{variant:J(d),children:d})}),(0,e.jsx)(n,{children:N(s(r,"currentPeriodEnd"))})]},o(s(r,"providerSubscriptionId")))})})]})})}),(0,e.jsxs)(v,{className:"overflow-hidden py-0",children:[(0,e.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,e.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:t("Recent webhook events")})}),(0,e.jsx)(S,{className:"px-0",children:(0,e.jsx)(A,{children:(0,e.jsx)(P,{children:M.map(r=>(0,e.jsxs)(b,{"data-testid":"payment-event-row",children:[(0,e.jsx)(n,{children:o(s(r,"provider"))}),(0,e.jsx)(n,{className:"font-medium",children:o(s(r,"type"))}),(0,e.jsx)(n,{className:"text-muted-foreground",children:o(s(r,"providerEventId"))}),(0,e.jsx)(n,{children:N(s(r,"processedAt"))})]},o(s(r,"providerEventId"))))})})})]})]})},"oe");export{ie as PaymentsPanel};
@@ -0,0 +1 @@
1
+ import{a as v}from"./chunk-SR6CPTRT.js";import{a as Q}from"./chunk-J3BZWYJQ.js";import{a as L}from"./chunk-J45HAKBU.js";import{a as G}from"./chunk-FHLODLBC.js";import"./chunk-3D67ZJRW.js";import"./chunk-ZSWW2UGP.js";import"./chunk-IHGRWY3Y.js";import"./chunk-OWRKSQPE.js";import"./chunk-4EPW63HS.js";import"./chunk-UD5REVU2.js";import{a as E}from"./chunk-RCXNYW7P.js";import{b as $}from"./chunk-UQA2AJGI.js";import"./chunk-T3ZCW3RG.js";import{a as W}from"./chunk-IUGNIG6L.js";import"./chunk-LSEUUZN4.js";import{a as q,b as H,c as O,d as D,e as T,f as K}from"./chunk-7QEZ2SFW.js";import"./chunk-WCWP4EAW.js";import"./chunk-BX7TFVCC.js";import"./chunk-4PI2OSSP.js";import{a as _}from"./chunk-2W4UO5BC.js";import{c as j}from"./chunk-FBDIQ67D.js";import{a as B}from"./chunk-OK2QU2EV.js";import"./chunk-FACXM2UB.js";import"./chunk-ZPQBVYNN.js";import{B as A}from"./chunk-GNI37YCV.js";import"./chunk-PDBW6GTJ.js";import{a as J}from"./chunk-GWNGVKLG.js";import{b as V}from"./chunk-6G3E4PJ2.js";import{a as S,d as F}from"./chunk-5PEAXTYQ.js";var R=F(J(),1);var t=F(V(),1);var U=S(c=>`${c.toString()} ms`,"D"),X=S(c=>c.totalConnections===0&&c.shapePoke.passes===0&&c.whisper.passes===0&&c.shapeProbe.run===0&&c.shapeProbe.served===0&&c.globalPoll.drains===0&&c.globalPoll.pairsSkipped===0,"J"),z=S(c=>{let e=(0,R.c)(48),{counters:o,includeTiming:a,prefix:r,t:l,title:u}=c,d=`${r}-section`,n;e[0]!==u?(n=(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:u}),e[0]=u,e[1]=n):n=e[1];let s=`${r}-stats`,i;e[2]!==l?(i=l("Passes"),e[2]=l,e[3]=i):i=e[3];let m=`${r}-passes`,I;e[4]!==o.passes||e[5]!==i||e[6]!==m?(I=(0,t.jsx)(v,{label:i,testId:m,value:o.passes}),e[4]=o.passes,e[5]=i,e[6]=m,e[7]=I):I=e[7];let g;e[8]!==l?(g=l("Sockets iterated"),e[8]=l,e[9]=g):g=e[9];let k=`${r}-iterated`,p;e[10]!==o.socketsIterated||e[11]!==g||e[12]!==k?(p=(0,t.jsx)(v,{label:g,testId:k,value:o.socketsIterated}),e[10]=o.socketsIterated,e[11]=g,e[12]=k,e[13]=p):p=e[13];let f;e[14]!==l?(f=l("Delivered"),e[14]=l,e[15]=f):f=e[15];let y=`${r}-delivered`,h;e[16]!==o.socketsDelivered||e[17]!==f||e[18]!==y?(h=(0,t.jsx)(v,{label:f,testId:y,value:o.socketsDelivered}),e[16]=o.socketsDelivered,e[17]=f,e[18]=y,e[19]=h):h=e[19];let x;e[20]!==l?(x=l("Peak width"),e[20]=l,e[21]=x):x=e[21];let N=`${r}-peak`,b;e[22]!==o.peakSocketsIterated||e[23]!==x||e[24]!==N?(b=(0,t.jsx)(v,{label:x,testId:N,value:o.peakSocketsIterated}),e[22]=o.peakSocketsIterated,e[23]=x,e[24]=N,e[25]=b):b=e[25];let C;e[26]!==o.totalMs||e[27]!==a||e[28]!==r||e[29]!==l?(C=a&&(0,t.jsx)(v,{label:l("Total time"),testId:`${r}-total-ms`,value:U(o.totalMs)}),e[26]=o.totalMs,e[27]=a,e[28]=r,e[29]=l,e[30]=C):C=e[30];let P;e[31]!==o.maxMs||e[32]!==a||e[33]!==r||e[34]!==l?(P=a&&(0,t.jsx)(v,{label:l("Max time"),testId:`${r}-max-ms`,value:U(o.maxMs)}),e[31]=o.maxMs,e[32]=a,e[33]=r,e[34]=l,e[35]=P):P=e[35];let M;e[36]!==h||e[37]!==b||e[38]!==C||e[39]!==P||e[40]!==s||e[41]!==I||e[42]!==p?(M=(0,t.jsxs)("dl",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3","data-testid":s,children:[I,p,h,b,C,P]}),e[36]=h,e[37]=b,e[38]=C,e[39]=P,e[40]=s,e[41]=I,e[42]=p,e[43]=M):M=e[43];let w;return e[44]!==d||e[45]!==M||e[46]!==n?(w=(0,t.jsxs)("section",{className:"flex flex-col gap-2","data-testid":d,children:[n,M]}),e[44]=d,e[45]=M,e[46]=n,e[47]=w):w=e[47],w},"F"),Y=S(c=>{let e=(0,R.c)(20),{counters:o,t:a}=c,r;e[0]!==a?(r=a("Membership probes"),e[0]=a,e[1]=r):r=e[1];let l;e[2]!==r?(l=(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:r}),e[2]=r,e[3]=l):l=e[3];let u;e[4]!==a?(u=a("Queries run"),e[4]=a,e[5]=u):u=e[5];let d;e[6]!==o.run||e[7]!==u?(d=(0,t.jsx)(v,{label:u,testId:"fanout-probe-run",value:o.run}),e[6]=o.run,e[7]=u,e[8]=d):d=e[8];let n;e[9]!==a?(n=a("Shared from cache"),e[9]=a,e[10]=n):n=e[10];let s;e[11]!==o.served||e[12]!==n?(s=(0,t.jsx)(v,{label:n,testId:"fanout-probe-served",value:o.served}),e[11]=o.served,e[12]=n,e[13]=s):s=e[13];let i;e[14]!==d||e[15]!==s?(i=(0,t.jsxs)("dl",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3","data-testid":"fanout-probe-stats",children:[d,s]}),e[14]=d,e[15]=s,e[16]=i):i=e[16];let m;return e[17]!==l||e[18]!==i?(m=(0,t.jsxs)("section",{className:"flex flex-col gap-2","data-testid":"fanout-probe-section",children:[l,i]}),e[17]=l,e[18]=i,e[19]=m):m=e[19],m},"V"),Z=S(c=>{let e=(0,R.c)(20),{counters:o,t:a}=c,r;e[0]!==a?(r=a("Global shape polls"),e[0]=a,e[1]=r):r=e[1];let l;e[2]!==r?(l=(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:r}),e[2]=r,e[3]=l):l=e[3];let u;e[4]!==a?(u=a("Global reads"),e[4]=a,e[5]=u):u=e[5];let d;e[6]!==o.drains||e[7]!==u?(d=(0,t.jsx)(v,{label:u,testId:"fanout-global-poll-drains",value:o.drains}),e[6]=o.drains,e[7]=u,e[8]=d):d=e[8];let n;e[9]!==a?(n=a("Pairs skipped"),e[9]=a,e[10]=n):n=e[10];let s;e[11]!==o.pairsSkipped||e[12]!==n?(s=(0,t.jsx)(v,{label:n,testId:"fanout-global-poll-pairs-skipped",value:o.pairsSkipped}),e[11]=o.pairsSkipped,e[12]=n,e[13]=s):s=e[13];let i;e[14]!==d||e[15]!==s?(i=(0,t.jsxs)("dl",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3","data-testid":"fanout-global-poll-stats",children:[d,s]}),e[14]=d,e[15]=s,e[16]=i):i=e[16];let m;return e[17]!==l||e[18]!==i?(m=(0,t.jsxs)("section",{className:"flex flex-col gap-2","data-testid":"fanout-global-poll-section",children:[l,i]}),e[17]=l,e[18]=i,e[19]=m):m=e[19],m},"X"),pe=S(c=>{let e=(0,R.c)(32),{initialShardKey:o}=c,a=A(),{queryShardKey:r,setShardKey:l,shardKey:u}=L(o),d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={},e[0]=d):d=e[0];let n;e[1]!==r?(n={keepPreviousData:!0,shardKey:r},e[1]=r,e[2]=n):n=e[2];let{data:s,error:i,errorSource:m,poll:I}=j(_.getFanoutMetrics,d,n);Q(I,!0);let g;e[3]!==s?(g=s!==void 0&&X(s),e[3]=s,e[4]=g):g=e[4];let k=g,p;e[5]!==l||e[6]!==u?(p=(0,t.jsx)(G,{onChange:l,testId:"fanout-shard-input",value:u}),e[5]=l,e[6]=u,e[7]=p):p=e[7];let f;e[8]!==s||e[9]!==a?(f=s!==void 0&&(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2 text-sm text-muted-foreground","data-testid":"fanout-count",children:[s.promoted&&(0,t.jsx)($,{"data-testid":"fanout-promoted",variant:s.relayCount>=s.maxRelays?"destructive":"default",children:s.relayCount>=s.maxRelays?a("auto-scaled: {relayCount}/{maxRelays} relays (at ceiling)",{maxRelays:s.maxRelays,relayCount:s.relayCount}):a("auto-scaled: {relayCount}/{maxRelays} relays",{maxRelays:s.maxRelays,relayCount:s.relayCount})}),(0,t.jsx)($,{variant:"secondary",children:a("{count} connections",{count:s.totalConnections})}),(0,t.jsx)($,{variant:"secondary",children:a("peak {count} subscribers",{count:s.peakSubscribers})})]}),e[8]=s,e[9]=a,e[10]=f):f=e[10];let y;e[11]!==p||e[12]!==f?(y=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[p,f]}),e[11]=p,e[12]=f,e[13]=y):y=e[13];let h;e[14]!==i||e[15]!==m||e[16]!==r?(h=i!==null&&(0,t.jsx)(W,{error:m,shardKey:r,testId:"fanout-error"}),e[14]=i,e[15]=m,e[16]=r,e[17]=h):h=e[17];let x;e[18]!==i||e[19]!==k||e[20]!==a?(x=i===null&&k&&(0,t.jsx)(E,{description:a("Realtime fan-out cost and per-topic subscriber counts for this shard."),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:"M4 12h4l3 7 4-14 3 7h2"})}),testId:"fanout-empty",title:a("No fan-out activity yet.")}),e[18]=i,e[19]=k,e[20]=a,e[21]=x):x=e[21];let N;e[22]!==i||e[23]!==k||e[24]!==s||e[25]!==a?(N=i===null&&s!==void 0&&!k&&(0,t.jsxs)(t.Fragment,{children:[s.topics.length>0&&(0,t.jsxs)("section",{className:"flex flex-col gap-2","data-testid":"fanout-topics-section",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:a("Hot topics")}),(0,t.jsx)(B,{className:"overflow-hidden py-0",children:(0,t.jsxs)(q,{"data-testid":"fanout-topics-table",children:[(0,t.jsx)(H,{children:(0,t.jsxs)(D,{children:[(0,t.jsx)(T,{children:a("Topic")}),(0,t.jsx)(T,{children:a("Kind")}),(0,t.jsx)(T,{className:"text-right",children:a("Subscribers")})]})}),(0,t.jsx)(O,{children:s.topics.map(ee)})]})})]}),(0,t.jsxs)("section",{className:"flex flex-col gap-3","data-testid":"fanout-cost",children:[(0,t.jsx)("h2",{className:"text-sm font-medium text-muted-foreground",children:a("Fan-out cost since this instance woke")}),(0,t.jsx)(z,{counters:s.shapePoke,includeTiming:!0,prefix:"fanout-poke",t:a,title:a("Shape pokes")}),(0,t.jsx)(z,{counters:s.whisper,includeTiming:!1,prefix:"fanout-whisper",t:a,title:a("Whisper broadcasts")}),(0,t.jsx)(Y,{counters:s.shapeProbe,t:a}),(0,t.jsx)(Z,{counters:s.globalPoll,t:a})]})]}),e[22]=i,e[23]=k,e[24]=s,e[25]=a,e[26]=N):N=e[26];let b;return e[27]!==y||e[28]!==h||e[29]!==x||e[30]!==N?(b=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"fanout-panel",children:[y,h,x,N]}),e[27]=y,e[28]=h,e[29]=x,e[30]=N,e[31]=b):b=e[31],b},"me");function ee(c){return(0,t.jsxs)(D,{"data-testid":"fanout-topic-row",children:[(0,t.jsx)(K,{className:"font-mono text-xs",children:c.topic}),(0,t.jsx)(K,{children:(0,t.jsx)($,{variant:"outline",children:c.kind})}),(0,t.jsx)(K,{className:"text-right font-medium tabular-nums",children:c.subscribers})]},`${c.kind}:${c.topic}`)}S(ee,"Y");export{pe as default};
@@ -1,4 +1,4 @@
1
- import{a as fe}from"./chunk-UYEZR3BI.js";import{i as ce}from"./chunk-SU5DTRGK.js";import"./chunk-W7MRISE3.js";import"./chunk-IBJVVHV5.js";import{a as ae}from"./chunk-6VAY6L4J.js";import"./chunk-JTGGWF7R.js";import"./chunk-ZBON5T5A.js";import"./chunk-4C4THJUD.js";import"./chunk-H7HZ42JY.js";import{a as le,e as oe}from"./chunk-JSDKOE4U.js";import{B as pe,l as re,p as me,y as ue}from"./chunk-BFE2DRP6.js";import{a as h,d as se,e as be,f as ke,g as ve}from"./chunk-OXFKZ4BM.js";var ne=se(ke(),1),X=se(be(),1);var s=se(ve(),1);var we=h(e=>{let t=(0,ne.c)(23),{destination:r}=e,f=re(),x;t[0]!==r.snippet?(x=h(()=>{pe(r.snippet)},"x"),t[0]=r.snippet,t[1]=x):x=t[1];let u=x,a;t[2]!==r.title?(a=(0,s.jsx)("h4",{className:"text-sm font-semibold",children:r.title}),t[2]=r.title,t[3]=a):a=t[3];let l;t[4]!==r.description?(l=(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:r.description}),t[4]=r.description,t[5]=l):l=t[5];let c;t[6]!==a||t[7]!==l?(c=(0,s.jsxs)("div",{children:[a,l]}),t[6]=a,t[7]=l,t[8]=c):c=t[8];let J=`drain-copy-${r.id}`,o;t[9]!==f?(o=f("Copy"),t[9]=f,t[10]=o):o=t[10];let n;t[11]!==u||t[12]!==J||t[13]!==o?(n=(0,s.jsx)(ae,{"data-testid":J,onClick:u,size:"sm",variant:"outline",children:o}),t[11]=u,t[12]=J,t[13]=o,t[14]=n):n=t[14];let i;t[15]!==c||t[16]!==n?(i=(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[c,n]}),t[15]=c,t[16]=n,t[17]=i):i=t[17];let m;t[18]!==r.snippet?(m=(0,s.jsx)("pre",{className:"mt-2 overflow-x-auto rounded bg-muted p-2 font-mono text-xs",children:r.snippet}),t[18]=r.snippet,t[19]=m):m=t[19];let y;return t[20]!==i||t[21]!==m?(y=(0,s.jsx)(le,{className:"py-0","data-testid":"drain-card",children:(0,s.jsxs)(oe,{className:"p-3",children:[i,m]})}),t[20]=i,t[21]=m,t[22]=y):y=t[22],y},"be"),Me=h(()=>{let e=(0,ne.c)(93),t=re(),r;e[0]!==t?(r=t("Stream every request log to R2, a SIEM, or a third-party log service."),e[0]=t,e[1]=r):r=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=["{",' "logpush": true',"}"],e[2]=f):f=e[2];let x=f.join(`
2
- `),u;e[3]!==t?(u=t("Logpush"),e[3]=t,e[4]=u):u=e[4];let a;e[5]!==r||e[6]!==u?(a={description:r,id:"logpush",snippet:x,title:u},e[5]=r,e[6]=u,e[7]=a):a=e[7];let l;e[8]!==t?(l=t("Send logs programmatically to a Worker for custom capture and forwarding."),e[8]=t,e[9]=l):l=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c=["{",' "tail_consumers": [{ "service": "my-log-forwarder" }]',"}"],e[10]=c):c=e[10];let J=c.join(`
3
- `),o;e[11]!==t?(o=t("Tail Workers"),e[11]=t,e[12]=o):o=e[12];let n;e[13]!==l||e[14]!==o?(n={description:l,id:"tail-worker",snippet:J,title:o},e[13]=l,e[14]=o,e[15]=n):n=e[15];let i;e[16]!==t?(i=t("Retain and query recent request logs directly in Cloudflare's dashboard."),e[16]=t,e[17]=i):i=e[17];let m;e[18]===Symbol.for("react.memo_cache_sentinel")?(m=["{",' "observability": { "enabled": true }',"}"],e[18]=m):m=e[18];let y=m.join(`
4
- `),b;e[19]!==t?(b=t("Workers Logs"),e[19]=t,e[20]=b):b=e[20];let k;e[21]!==i||e[22]!==b?(k={description:i,id:"workers-logs",snippet:y,title:b},e[21]=i,e[22]=b,e[23]=k):k=e[23];let $;e[24]!==k||e[25]!==a||e[26]!==n?($=[a,n,k],e[24]=k,e[25]=a,e[26]=n,e[27]=$):$=e[27];let Y=$,[d,he]=(0,X.useState)(""),[v,ie]=(0,X.useState)(!1),[A,G]=(0,X.useState)(null),H;e[28]!==t||e[29]!==d?(H=h(async()=>{let g=d.trim();if(g==="")return;let de="fetch"in globalThis?globalThis.fetch:void 0;if(de===void 0){G({kind:"error",message:t("fetch is unavailable in this environment."),url:g});return}let xe={durationMs:12,function:"messages:list",outcome:"ok",shard:"root",source:"lunora",tablesRead:["messages"],tablesWritten:[],ts:new Date().toISOString(),type:"request"};ie(!0),G(null);let ye=performance.now();try{let te=await de(g,{body:JSON.stringify(xe),headers:{"Content-Type":"application/json"},method:"POST"});G({kind:"success",latencyMs:Math.round(performance.now()-ye),status:te.status,url:g})}catch(te){G({kind:"error",message:me(te),url:g})}ie(!1)},"V"),e[28]=t,e[29]=d,e[30]=H):H=e[30];let Z=H,K;e[31]!==A||e[32]!==d?(K=A?.url===d.trim()?A:null,e[31]=A,e[32]=d,e[33]=K):K=e[33];let p=K,Q;e[34]!==Z?(Q=h(()=>{ue(Z())},"G"),e[34]=Z,e[35]=Q):Q=e[35];let ee=Q,U;e[36]===Symbol.for("react.memo_cache_sentinel")?(U=h(g=>{he(g.target.value)},"H"),e[36]=U):U=e[36];let ge=U,w;e[37]!==t?(w=t("Open in Cloudflare"),e[37]=t,e[38]=w):w=e[38];let N;e[39]!==w?(N=(0,s.jsx)("div",{className:"flex flex-wrap items-center gap-3",children:(0,s.jsx)("a",{className:"text-sm text-primary underline-offset-4 hover:underline","data-testid":"drain-cf-link",href:fe,rel:"noreferrer",target:"_blank",children:w})}),e[39]=w,e[40]=N):N=e[40];let S;e[41]!==t?(S=t("Lunora does not ship logs itself \u2014 forwarding is handled by Cloudflare. Configure a destination below, then test your collector."),e[41]=t,e[42]=S):S=e[42];let C;e[43]!==S?(C=(0,s.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"drain-readonly-note",children:S}),e[43]=S,e[44]=C):C=e[44];let _;e[45]!==t?(_=t("Cloudflare destinations"),e[45]=t,e[46]=_):_=e[46];let j;e[47]!==_?(j=(0,s.jsx)("h3",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:_}),e[47]=_,e[48]=j):j=e[48];let T;e[49]!==Y?(T=Y.map(Ne),e[49]=Y,e[50]=T):T=e[50];let q;e[51]!==j||e[52]!==T?(q=(0,s.jsxs)("section",{className:"flex flex-col gap-3","data-testid":"drain-destinations",children:[j,T]}),e[51]=j,e[52]=T,e[53]=q):q=e[53];let M;e[54]!==t?(M=t("Webhook test"),e[54]=t,e[55]=M):M=e[55];let O;e[56]!==M?(O=(0,s.jsx)("h3",{className:"mb-1 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:M}),e[56]=M,e[57]=O):O=e[57];let W;e[58]!==t?(W=t("POST a sample Lunora request-log envelope to your collector to confirm it is reachable."),e[58]=t,e[59]=W):W=e[59];let L;e[60]!==W?(L=(0,s.jsx)("p",{className:"mb-2 text-sm text-muted-foreground",children:W}),e[60]=W,e[61]=L):L=e[61];let I;e[62]!==t?(I=t("https://example.com/logs"),e[62]=t,e[63]=I):I=e[63];let P;e[64]!==I||e[65]!==d?(P=(0,s.jsx)(ce,{className:"min-w-[20rem] flex-1","data-testid":"drain-webhook-url",onChange:ge,placeholder:I,type:"url",value:d}),e[64]=I,e[65]=d,e[66]=P):P=e[66];let R;e[67]!==v||e[68]!==d?(R=v||d.trim()==="",e[67]=v,e[68]=d,e[69]=R):R=e[69];let D;e[70]!==v||e[71]!==t?(D=t(v?"Sending\u2026":"Send test event"),e[70]=v,e[71]=t,e[72]=D):D=e[72];let z;e[73]!==ee||e[74]!==R||e[75]!==D?(z=(0,s.jsx)(ae,{"data-testid":"drain-webhook-test",disabled:R,onClick:ee,children:D}),e[73]=ee,e[74]=R,e[75]=D,e[76]=z):z=e[76];let B;e[77]!==P||e[78]!==z?(B=(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[P,z]}),e[77]=P,e[78]=z,e[79]=B):B=e[79];let E;e[80]!==p||e[81]!==t?(E=p!==null&&(0,s.jsx)("p",{className:p.kind==="success"?"mt-2 text-sm text-muted-foreground":"mt-2 text-sm text-destructive","data-testid":"drain-webhook-result",role:p.kind==="error"?"alert":void 0,children:p.kind==="success"?t("Delivered \u2014 status {status} in {latency}ms",{latency:p.latencyMs,status:p.status}):t("Failed: {message}",{message:p.message})}),e[80]=p,e[81]=t,e[82]=E):E=e[82];let F;e[83]!==O||e[84]!==L||e[85]!==B||e[86]!==E?(F=(0,s.jsx)(le,{className:"py-0",children:(0,s.jsx)(oe,{className:"p-3",children:(0,s.jsxs)("section",{"data-testid":"drain-webhook",children:[O,L,B,E]})})}),e[83]=O,e[84]=L,e[85]=B,e[86]=E,e[87]=F):F=e[87];let V;return e[88]!==N||e[89]!==C||e[90]!==q||e[91]!==F?(V=(0,s.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"log-drains",children:[N,C,q,F]}),e[88]=N,e[89]=C,e[90]=q,e[91]=F,e[92]=V):V=e[92],V},"je");function Ne(e){return(0,s.jsx)(we,{destination:e},e.id)}h(Ne,"ye");export{Me as default};
1
+ import{a as fe}from"./chunk-P6VNMPWR.js";import{i as pe}from"./chunk-IHGRWY3Y.js";import"./chunk-OWRKSQPE.js";import"./chunk-4EPW63HS.js";import{a as le}from"./chunk-V3BE427M.js";import"./chunk-CKEQX655.js";import"./chunk-UD5REVU2.js";import"./chunk-T3ZCW3RG.js";import{a as ae,e as oe}from"./chunk-OK2QU2EV.js";import"./chunk-ZPQBVYNN.js";import{B as re,j as ce,s as me,v as ue}from"./chunk-GNI37YCV.js";import"./chunk-PDBW6GTJ.js";import{a as ke}from"./chunk-GWNGVKLG.js";import{a as be,b as ve}from"./chunk-6G3E4PJ2.js";import{a as h,d as se}from"./chunk-5PEAXTYQ.js";var ne=se(ke(),1),X=se(be(),1);var s=se(ve(),1);var we=h(e=>{let t=(0,ne.c)(23),{destination:r}=e,f=re(),x;t[0]!==r.snippet?(x=h(()=>{ue(r.snippet)},"x"),t[0]=r.snippet,t[1]=x):x=t[1];let u=x,l;t[2]!==r.title?(l=(0,s.jsx)("h4",{className:"text-sm font-semibold",children:r.title}),t[2]=r.title,t[3]=l):l=t[3];let a;t[4]!==r.description?(a=(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:r.description}),t[4]=r.description,t[5]=a):a=t[5];let c;t[6]!==l||t[7]!==a?(c=(0,s.jsxs)("div",{children:[l,a]}),t[6]=l,t[7]=a,t[8]=c):c=t[8];let J=`drain-copy-${r.id}`,o;t[9]!==f?(o=f("Copy"),t[9]=f,t[10]=o):o=t[10];let n;t[11]!==u||t[12]!==J||t[13]!==o?(n=(0,s.jsx)(le,{"data-testid":J,onClick:u,size:"sm",variant:"outline",children:o}),t[11]=u,t[12]=J,t[13]=o,t[14]=n):n=t[14];let i;t[15]!==c||t[16]!==n?(i=(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[c,n]}),t[15]=c,t[16]=n,t[17]=i):i=t[17];let m;t[18]!==r.snippet?(m=(0,s.jsx)("pre",{className:"mt-2 overflow-x-auto rounded bg-muted p-2 font-mono text-xs",children:r.snippet}),t[18]=r.snippet,t[19]=m):m=t[19];let y;return t[20]!==i||t[21]!==m?(y=(0,s.jsx)(ae,{className:"py-0","data-testid":"drain-card",children:(0,s.jsxs)(oe,{className:"p-3",children:[i,m]})}),t[20]=i,t[21]=m,t[22]=y):y=t[22],y},"be"),Me=h(()=>{let e=(0,ne.c)(93),t=re(),r;e[0]!==t?(r=t("Stream every request log to R2, a SIEM, or a third-party log service."),e[0]=t,e[1]=r):r=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=["{",' "logpush": true',"}"],e[2]=f):f=e[2];let x=f.join(`
2
+ `),u;e[3]!==t?(u=t("Logpush"),e[3]=t,e[4]=u):u=e[4];let l;e[5]!==r||e[6]!==u?(l={description:r,id:"logpush",snippet:x,title:u},e[5]=r,e[6]=u,e[7]=l):l=e[7];let a;e[8]!==t?(a=t("Send logs programmatically to a Worker for custom capture and forwarding."),e[8]=t,e[9]=a):a=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c=["{",' "tail_consumers": [{ "service": "my-log-forwarder" }]',"}"],e[10]=c):c=e[10];let J=c.join(`
3
+ `),o;e[11]!==t?(o=t("Tail Workers"),e[11]=t,e[12]=o):o=e[12];let n;e[13]!==a||e[14]!==o?(n={description:a,id:"tail-worker",snippet:J,title:o},e[13]=a,e[14]=o,e[15]=n):n=e[15];let i;e[16]!==t?(i=t("Retain and query recent request logs directly in Cloudflare's dashboard."),e[16]=t,e[17]=i):i=e[17];let m;e[18]===Symbol.for("react.memo_cache_sentinel")?(m=["{",' "observability": { "enabled": true }',"}"],e[18]=m):m=e[18];let y=m.join(`
4
+ `),b;e[19]!==t?(b=t("Workers Logs"),e[19]=t,e[20]=b):b=e[20];let k;e[21]!==i||e[22]!==b?(k={description:i,id:"workers-logs",snippet:y,title:b},e[21]=i,e[22]=b,e[23]=k):k=e[23];let $;e[24]!==k||e[25]!==l||e[26]!==n?($=[l,n,k],e[24]=k,e[25]=l,e[26]=n,e[27]=$):$=e[27];let Y=$,[d,he]=(0,X.useState)(""),[v,ie]=(0,X.useState)(!1),[A,G]=(0,X.useState)(null),H;e[28]!==t||e[29]!==d?(H=h(async()=>{let g=d.trim();if(g==="")return;let de="fetch"in globalThis?globalThis.fetch:void 0;if(de===void 0){G({kind:"error",message:t("fetch is unavailable in this environment."),url:g});return}let xe={durationMs:12,function:"messages:list",outcome:"ok",shard:"root",source:"lunora",tablesRead:["messages"],tablesWritten:[],ts:new Date().toISOString(),type:"request"};ie(!0),G(null);let ye=performance.now();try{let te=await de(g,{body:JSON.stringify(xe),headers:{"Content-Type":"application/json"},method:"POST"});G({kind:"success",latencyMs:Math.round(performance.now()-ye),status:te.status,url:g})}catch(te){G({kind:"error",message:ce(te),url:g})}ie(!1)},"V"),e[28]=t,e[29]=d,e[30]=H):H=e[30];let Z=H,K;e[31]!==A||e[32]!==d?(K=A?.url===d.trim()?A:null,e[31]=A,e[32]=d,e[33]=K):K=e[33];let p=K,Q;e[34]!==Z?(Q=h(()=>{me(Z())},"G"),e[34]=Z,e[35]=Q):Q=e[35];let ee=Q,U;e[36]===Symbol.for("react.memo_cache_sentinel")?(U=h(g=>{he(g.target.value)},"H"),e[36]=U):U=e[36];let ge=U,w;e[37]!==t?(w=t("Open in Cloudflare"),e[37]=t,e[38]=w):w=e[38];let N;e[39]!==w?(N=(0,s.jsx)("div",{className:"flex flex-wrap items-center gap-3",children:(0,s.jsx)("a",{className:"text-sm text-primary underline-offset-4 hover:underline","data-testid":"drain-cf-link",href:fe,rel:"noreferrer",target:"_blank",children:w})}),e[39]=w,e[40]=N):N=e[40];let S;e[41]!==t?(S=t("Lunora does not ship logs itself \u2014 forwarding is handled by Cloudflare. Configure a destination below, then test your collector."),e[41]=t,e[42]=S):S=e[42];let C;e[43]!==S?(C=(0,s.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"drain-readonly-note",children:S}),e[43]=S,e[44]=C):C=e[44];let _;e[45]!==t?(_=t("Cloudflare destinations"),e[45]=t,e[46]=_):_=e[46];let j;e[47]!==_?(j=(0,s.jsx)("h3",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:_}),e[47]=_,e[48]=j):j=e[48];let T;e[49]!==Y?(T=Y.map(Ne),e[49]=Y,e[50]=T):T=e[50];let q;e[51]!==j||e[52]!==T?(q=(0,s.jsxs)("section",{className:"flex flex-col gap-3","data-testid":"drain-destinations",children:[j,T]}),e[51]=j,e[52]=T,e[53]=q):q=e[53];let M;e[54]!==t?(M=t("Webhook test"),e[54]=t,e[55]=M):M=e[55];let O;e[56]!==M?(O=(0,s.jsx)("h3",{className:"mb-1 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:M}),e[56]=M,e[57]=O):O=e[57];let W;e[58]!==t?(W=t("POST a sample Lunora request-log envelope to your collector to confirm it is reachable."),e[58]=t,e[59]=W):W=e[59];let L;e[60]!==W?(L=(0,s.jsx)("p",{className:"mb-2 text-sm text-muted-foreground",children:W}),e[60]=W,e[61]=L):L=e[61];let I;e[62]!==t?(I=t("https://example.com/logs"),e[62]=t,e[63]=I):I=e[63];let P;e[64]!==I||e[65]!==d?(P=(0,s.jsx)(pe,{className:"min-w-[20rem] flex-1","data-testid":"drain-webhook-url",onChange:ge,placeholder:I,type:"url",value:d}),e[64]=I,e[65]=d,e[66]=P):P=e[66];let R;e[67]!==v||e[68]!==d?(R=v||d.trim()==="",e[67]=v,e[68]=d,e[69]=R):R=e[69];let D;e[70]!==v||e[71]!==t?(D=t(v?"Sending\u2026":"Send test event"),e[70]=v,e[71]=t,e[72]=D):D=e[72];let z;e[73]!==ee||e[74]!==R||e[75]!==D?(z=(0,s.jsx)(le,{"data-testid":"drain-webhook-test",disabled:R,onClick:ee,children:D}),e[73]=ee,e[74]=R,e[75]=D,e[76]=z):z=e[76];let B;e[77]!==P||e[78]!==z?(B=(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[P,z]}),e[77]=P,e[78]=z,e[79]=B):B=e[79];let E;e[80]!==p||e[81]!==t?(E=p!==null&&(0,s.jsx)("p",{className:p.kind==="success"?"mt-2 text-sm text-muted-foreground":"mt-2 text-sm text-destructive","data-testid":"drain-webhook-result",role:p.kind==="error"?"alert":void 0,children:p.kind==="success"?t("Delivered \u2014 status {status} in {latency}ms",{latency:p.latencyMs,status:p.status}):t("Failed: {message}",{message:p.message})}),e[80]=p,e[81]=t,e[82]=E):E=e[82];let F;e[83]!==O||e[84]!==L||e[85]!==B||e[86]!==E?(F=(0,s.jsx)(ae,{className:"py-0",children:(0,s.jsx)(oe,{className:"p-3",children:(0,s.jsxs)("section",{"data-testid":"drain-webhook",children:[O,L,B,E]})})}),e[83]=O,e[84]=L,e[85]=B,e[86]=E,e[87]=F):F=e[87];let V;return e[88]!==N||e[89]!==C||e[90]!==q||e[91]!==F?(V=(0,s.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"log-drains",children:[N,C,q,F]}),e[88]=N,e[89]=C,e[90]=q,e[91]=F,e[92]=V):V=e[92],V},"je");function Ne(e){return(0,s.jsx)(we,{destination:e},e.id)}h(Ne,"ye");export{Me as default};
@@ -1 +1 @@
1
- import{g as y}from"./chunk-BFE2DRP6.js";import{a as r}from"./chunk-OXFKZ4BM.js";var V=r(e=>typeof e=="boolean"?`${e}`:e===0?"0":e,"falsyToString"),N=y,j=r((e,l)=>n=>{var s;if(l?.variants==null)return N(e,n?.class,n?.className);let{variants:v,defaultVariants:d}=l,f=Object.keys(v).map(t=>{let a=n?.[t],u=d?.[t];if(a===null)return null;let i=V(a)||V(u);return v[t][i]}),c=n&&Object.entries(n).reduce((t,a)=>{let[u,i]=a;return i===void 0||(t[u]=i),t},{}),C=l==null||(s=l.compoundVariants)===null||s===void 0?void 0:s.reduce((t,a)=>{let{class:u,className:i,...x}=a;return Object.entries(x).every(O=>{let[m,o]=O;return Array.isArray(o)?o.includes({...d,...c}[m]):{...d,...c}[m]===o})?[...t,u,i]:t},[]);return N(e,f,C,n?.class,n?.className)},"cva");export{j as a};
1
+ import{a as y}from"./chunk-PDBW6GTJ.js";import{a as r}from"./chunk-5PEAXTYQ.js";var V=r(e=>typeof e=="boolean"?`${e}`:e===0?"0":e,"falsyToString"),N=y,j=r((e,l)=>n=>{var s;if(l?.variants==null)return N(e,n?.class,n?.className);let{variants:v,defaultVariants:d}=l,f=Object.keys(v).map(t=>{let a=n?.[t],u=d?.[t];if(a===null)return null;let i=V(a)||V(u);return v[t][i]}),c=n&&Object.entries(n).reduce((t,a)=>{let[u,i]=a;return i===void 0||(t[u]=i),t},{}),C=l==null||(s=l.compoundVariants)===null||s===void 0?void 0:s.reduce((t,a)=>{let{class:u,className:i,...x}=a;return Object.entries(x).every(O=>{let[m,o]=O;return Array.isArray(o)?o.includes({...d,...c}[m]):{...d,...c}[m]===o})?[...t,u,i]:t},[]);return N(e,f,C,n?.class,n?.className)},"cva");export{j as a};
@@ -0,0 +1 @@
1
+ import{a as le,d as ae,e as ke,i as Ne,j as we,l as Se}from"./chunk-5GYHGDIF.js";import"./chunk-Y2YLTUMD.js";import"./chunk-JD6PRRFO.js";import"./chunk-NGZNXNRD.js";import"./chunk-2SNHKJXK.js";import{a as ye}from"./chunk-HZDLUAWS.js";import"./chunk-BCUOQNI2.js";import"./chunk-P5EVJEGC.js";import"./chunk-D65UVZIA.js";import"./chunk-NGVP66OH.js";import{a as ne}from"./chunk-QKUVJIRX.js";import"./chunk-QAOZXPLU.js";import{i as ue}from"./chunk-RTS5G3ET.js";import"./chunk-QRA7AKYO.js";import"./chunk-OWRKSQPE.js";import"./chunk-4EPW63HS.js";import"./chunk-CKEQX655.js";import"./chunk-UD5REVU2.js";import{a as re}from"./chunk-RCXNYW7P.js";import{b as oe}from"./chunk-UQA2AJGI.js";import"./chunk-T3ZCW3RG.js";import{a as be,b as xe,c as ve,d as J,e as T,f as _}from"./chunk-7QEZ2SFW.js";import{a as pe,e as ge}from"./chunk-OK2QU2EV.js";import{m as fe}from"./chunk-FACXM2UB.js";import"./chunk-ZPQBVYNN.js";import{B as Y,s as me,x as he}from"./chunk-GNI37YCV.js";import"./chunk-PDBW6GTJ.js";import{a as qe}from"./chunk-GWNGVKLG.js";import{a as Ae,b as je}from"./chunk-6G3E4PJ2.js";import{a as c,d as te}from"./chunk-5PEAXTYQ.js";var z=te(qe(),1);var E=te(Ae(),1);var o=te(je(),1);var Le=["call","schedule","read","write","enqueue","publish","subscribe","start","trigger","invoke"],Me=new Set(["enqueue","publish","schedule","start","subscribe","trigger"]),$e={cron:1,function:2,http:0,queue:4,service:7,table:6,topic:3,workflow:5},Be={stroke:"var(--muted-foreground)"},De={fill:"var(--muted-foreground)",fontSize:10},Fe={fill:"var(--background)"},Q="",se=260,Oe=120,Ce=44,de=40,_e=12,ie=16,Re=c(r=>{if(typeof r!="object"||r===null)return;let e=r;return["edges","nodes","modules","unresolved"].every(d=>Array.isArray(e[d]))?e:void 0},"Ge"),ze={cron:c(()=>({to:"/schedule"}),"cron"),function:c(()=>({to:"/functions"}),"function"),http:c(()=>({to:"/api"}),"http"),queue:c(()=>({to:"/queues"}),"queue"),service:c(()=>({to:"/functions"}),"service"),table:c(r=>({search:{table:r.name},to:"/data"}),"table"),topic:c(()=>({to:"/queues"}),"topic"),workflow:c(()=>({to:"/workflows"}),"workflow")},Pe=c(r=>ze[r.kind](r),"Me"),H=c(r=>r.module??Q,"R"),Te=c((r,e,d)=>{let t=new Set;for(let a of r.nodes)(e===void 0||H(a)===e)&&t.add(a.id);if(e===void 0)return t;let l=new Set(t);for(let a of r.edges)d.has(a.kind)&&(t.has(a.from)&&l.add(a.to),t.has(a.to)&&l.add(a.from));return l},"Pe"),Ee=c((r,e,d,t)=>{let l=`lane:${r}`;return[{data:{label:e},id:l,position:{x:d*(se+Oe),y:0},selectable:!1,style:{height:Ce+t.length*(de+_e)+ie,width:se},type:"lane"},...t.map((a,i)=>({className:"flex cursor-pointer items-center truncate rounded-md border border-border bg-card px-2 text-xs text-foreground hover:border-ring",data:{label:`${a.detail??a.kind} \xB7 ${a.name}`,link:Pe(a)},extent:"parent",id:a.id,parentId:l,position:{x:ie,y:Ce+i*(de+_e)},style:{height:de,width:se-ie*2},type:"member"}))]},"Re"),He=c((r,e)=>{let d=Te(r,e.lane,e.kinds),t=new Map;for(let n of r.nodes)d.has(n.id)&&t.set(H(n),[...t.get(H(n))??[],n]);let l=[...r.modules.map(n=>({label:n.installed===!0?`${n.name} \xB7 ${e.componentLabel}`:n.name,lane:n.name})),{label:e.appLaneLabel,lane:Q}],a=[],i=0;for(let{label:n,lane:f}of l){let m=(t.get(f)??[]).toSorted((h,s)=>$e[h.kind]-$e[s.kind]||h.name.localeCompare(s.name));m.length>0&&(a.push(...Ee(f,n,i,m)),i+=1)}let u=[];for(let n of r.edges)e.kinds.has(n.kind)&&d.has(n.from)&&d.has(n.to)&&u.push({animated:Me.has(n.kind),id:`${n.from}|${n.kind}|${n.to}`,label:n.kind,labelBgStyle:Fe,labelStyle:De,source:n.from,style:Be,target:n.to,type:"smoothstep"});return{edges:u,nodes:a}},"Fe"),ce="*",Ve=c(r=>{let e=(0,z.c)(2),{data:d}=r,t=String(d.label),l;return e[0]!==t?(l=(0,o.jsx)("div",{className:"size-full rounded-lg border border-dashed border-border bg-background/60 px-3 py-2 text-xs font-medium text-muted-foreground",children:t}),e[0]=t,e[1]=l):l=e[1],l},"qe"),Ie={opacity:0},Ze=c(r=>{let e=(0,z.c)(10),{data:d}=r,t=ue(),{label:l,link:a}=d,i;e[0]!==a||e[1]!==t?(i=c(()=>{me(t(a))},"u"),e[0]=a,e[1]=t,e[2]=i):i=e[2];let u=i,n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,o.jsx)(ae,{isConnectable:!1,position:le.Left,style:Ie,type:"target"}),e[3]=n):n=e[3];let f;e[4]!==l||e[5]!==u?(f=(0,o.jsx)("button",{className:"size-full cursor-pointer truncate rounded-md text-left outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",onClick:u,type:"button",children:l}),e[4]=l,e[5]=u,e[6]=f):f=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=(0,o.jsx)(ae,{isConnectable:!1,position:le.Right,style:Ie,type:"source"}),e[7]=m):m=e[7];let h;return e[8]!==f?(h=(0,o.jsxs)(o.Fragment,{children:[n,f,m]}),e[8]=f,e[9]=h):h=e[9],h},"je"),Ge={lane:Ve,member:Ze},Ke=c(r=>{let e=Re(r);return e===void 0?{kind:"error",message:"the response is not an architecture manifest"}:e.modules.length===0?{kind:"empty"}:{kind:"ready",spec:e}},"ze"),We=c(r=>{let e=(0,z.c)(54),{manifest:d}=r,t=Y(),l,a,i,u,n,f,m,h,s,p;if(e[0]!==d.modules||e[1]!==d.nodes||e[2]!==t){let P=new Map;for(let g of d.nodes)g.kind==="function"&&P.set(H(g),(P.get(H(g))??0)+1);let j=c(g=>P.get(g)??0,"I");n=j(Q),u=pe,p="overflow-hidden py-0",i=ge,s="px-0",a=be,m="architecture-catalog";let I;e[13]!==t?(I=t("Module"),e[13]=t,e[14]=I):I=e[14];let L;e[15]!==I?(L=(0,o.jsx)(T,{children:I}),e[15]=I,e[16]=L):L=e[16];let A;e[17]!==t?(A=t("Description"),e[17]=t,e[18]=A):A=e[18];let q;e[19]!==A?(q=(0,o.jsx)(T,{children:A}),e[19]=A,e[20]=q):q=e[20];let v;e[21]!==t?(v=t("Owned tables"),e[21]=t,e[22]=v):v=e[22];let y;e[23]!==v?(y=(0,o.jsx)(T,{children:v}),e[23]=v,e[24]=y):y=e[24];let k;e[25]!==t?(k=t("Functions"),e[25]=t,e[26]=k):k=e[26];let N;e[27]!==k?(N=(0,o.jsx)(T,{children:k}),e[27]=k,e[28]=N):N=e[28],e[29]!==y||e[30]!==N||e[31]!==L||e[32]!==q?(h=(0,o.jsx)(xe,{children:(0,o.jsxs)(J,{children:[L,q,y,N]})}),e[29]=y,e[30]=N,e[31]=L,e[32]=q,e[33]=h):h=e[33],l=ve,f=d.modules.map(g=>(0,o.jsxs)(J,{"data-testid":`architecture-module-${g.name}`,children:[(0,o.jsxs)(_,{className:"font-mono text-xs",children:[g.name,g.installed===!0&&(0,o.jsx)(oe,{className:"ml-2","data-testid":`architecture-component-${g.name}`,variant:"outline",children:t("Component")})]}),(0,o.jsx)(_,{className:"text-xs text-muted-foreground",children:g.description??(g.installed===!0?t("Installed component"):"\u2014")}),(0,o.jsx)(_,{className:"font-mono text-xs text-muted-foreground",children:g.tables.length===0?"\u2014":g.tables.join(", ")}),(0,o.jsx)(_,{className:"text-xs",children:j(g.name)})]},g.name)),e[0]=d.modules,e[1]=d.nodes,e[2]=t,e[3]=l,e[4]=a,e[5]=i,e[6]=u,e[7]=n,e[8]=f,e[9]=m,e[10]=h,e[11]=s,e[12]=p}else l=e[3],a=e[4],i=e[5],u=e[6],n=e[7],f=e[8],m=e[9],h=e[10],s=e[11],p=e[12];let b;e[34]!==n||e[35]!==t?(b=n>0&&(0,o.jsxs)(J,{"data-testid":"architecture-module-app",children:[(0,o.jsx)(_,{className:"text-xs italic text-muted-foreground",children:t("Outside any module")}),(0,o.jsx)(_,{className:"text-xs text-muted-foreground",children:"\u2014"}),(0,o.jsx)(_,{className:"text-xs text-muted-foreground",children:"\u2014"}),(0,o.jsx)(_,{className:"text-xs",children:n})]}),e[34]=n,e[35]=t,e[36]=b):b=e[36];let x;e[37]!==l||e[38]!==f||e[39]!==b?(x=(0,o.jsxs)(l,{children:[f,b]}),e[37]=l,e[38]=f,e[39]=b,e[40]=x):x=e[40];let S;e[41]!==a||e[42]!==m||e[43]!==h||e[44]!==x?(S=(0,o.jsxs)(a,{"data-testid":m,children:[h,x]}),e[41]=a,e[42]=m,e[43]=h,e[44]=x,e[45]=S):S=e[45];let $;e[46]!==i||e[47]!==s||e[48]!==S?($=(0,o.jsx)(i,{className:s,children:S}),e[46]=i,e[47]=s,e[48]=S,e[49]=$):$=e[49];let C;return e[50]!==u||e[51]!==p||e[52]!==$?(C=(0,o.jsx)(u,{className:p,children:$}),e[50]=u,e[51]=p,e[52]=$,e[53]=C):C=e[53],C},"Ye"),Ye=c(r=>{let e=(0,z.c)(52),{manifest:d}=r,t=Y(),[l,a]=(0,E.useState)(ce),[i,u]=(0,E.useState)(Je),n;e[0]!==d.edges?(n=c(w=>d.edges.some(X=>X.kind===w),"s"),e[0]=d.edges,e[1]=n):n=e[1];let f=Le.filter(n),m;e[2]!==t?(m=t("Outside any module"),e[2]=t,e[3]=m):m=e[3];let h=m,s;e[4]!==t?(s=t("Component"),e[4]=t,e[5]=s):s=e[5];let p=s,b;e[6]!==h||e[7]!==p||e[8]!==i||e[9]!==l||e[10]!==d?(b=He(d,{appLaneLabel:h,componentLabel:p,kinds:i,...l===ce?{}:{lane:l}}),e[6]=h,e[7]=p,e[8]=i,e[9]=l,e[10]=d,e[11]=b):b=e[11];let{edges:x,nodes:S}=b,$=(0,E.useRef)(null),C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=c(w=>{a(w.target.value)},"_"),e[12]=C):C=e[12];let P=C,j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=c(w=>{u(X=>{let ee=new Set(X);return ee.delete(w)||ee.add(w),ee})},"I"),e[13]=j):j=e[13];let I=j,L="flex flex-col gap-2",A="architecture-diagram",q="flex flex-wrap items-center gap-2",v;e[14]!==t?(v=t("Module"),e[14]=t,e[15]=v):v=e[15];let y;e[16]!==t?(y=t("All modules"),e[16]=t,e[17]=y):y=e[17];let k;e[18]!==y?(k=(0,o.jsx)("option",{value:ce,children:y}),e[18]=y,e[19]=k):k=e[19];let N;e[20]!==d.modules?(N=d.modules.map(Qe),e[20]=d.modules,e[21]=N):N=e[21];let g;e[22]!==t?(g=t("Outside any module"),e[22]=t,e[23]=g):g=e[23];let M;e[24]!==g?(M=(0,o.jsx)("option",{value:Q,children:g}),e[24]=g,e[25]=M):M=e[25];let B;e[26]!==l||e[27]!==v||e[28]!==k||e[29]!==N||e[30]!==M?(B=(0,o.jsxs)("select",{"aria-label":v,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":"architecture-module-filter",onChange:P,value:l,children:[k,N,M]}),e[26]=l,e[27]=v,e[28]=k,e[29]=N,e[30]=M,e[31]=B):B=e[31];let D;e[32]!==x.length||e[33]!==t?(D=t("{count} edges shown",{count:x.length}),e[32]=x.length,e[33]=t,e[34]=D):D=e[34];let F;e[35]!==D?(F=(0,o.jsx)("span",{className:"text-xs text-muted-foreground","data-testid":"architecture-edge-count",children:D}),e[35]=D,e[36]=F):F=e[36];let V;e[37]!==i?(V=c(w=>(0,o.jsx)("button",{"aria-pressed":i.has(w),className:he("rounded-full border border-border px-2.5 py-0.5 text-xs",i.has(w)?"bg-muted":"text-muted-foreground line-through"),"data-testid":`architecture-kind-${w}`,onClick:c(()=>{I(w)},"onClick"),type:"button",children:w},w),"q"),e[37]=i,e[38]=V):V=e[38];let U=f.map(V),O;e[39]!==B||e[40]!==F||e[41]!==U?(O=(0,o.jsxs)("div",{className:q,children:[B,F,U]}),e[39]=B,e[40]=F,e[41]=U,e[42]=O):O=e[42];let Z,G,K;e[43]===Symbol.for("react.memo_cache_sentinel")?(Z=(0,o.jsx)(Ne,{}),G=(0,o.jsx)(we,{showInteractive:!1}),K=(0,o.jsx)(Se,{containerRef:$,filenameBase:"architecture",testIdPrefix:"architecture"}),e[43]=Z,e[44]=G,e[45]=K):(Z=e[43],G=e[44],K=e[45]);let R;e[46]!==x||e[47]!==S?(R=(0,o.jsx)("div",{className:"h-[600px] w-full overflow-hidden border border-border bg-muted/20","data-testid":"architecture-canvas",ref:$,children:(0,o.jsxs)(ke,{edges:x,edgesFocusable:!1,fitView:!0,minZoom:.1,nodes:S,nodesConnectable:!1,nodesDraggable:!1,nodeTypes:Ge,children:[Z,G,K]})}),e[46]=x,e[47]=S,e[48]=R):R=e[48];let W;return e[49]!==O||e[50]!==R?(W=(0,o.jsxs)("section",{className:L,"data-testid":A,children:[O,R]}),e[49]=O,e[50]=R,e[51]=W):W=e[51],W},"Ve"),mt=c(r=>{let e=(0,z.c)(28),{manifest:d}=r,t=Y(),l=fe(),a;e[0]!==l?(a=c(()=>l.fetchArchitecture(),"r"),e[0]=l,e[1]=a):a=e[1];let i=ye(d,a,Ke);if(i.kind==="loading"){let s;return e[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,o.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"architecture-loading",children:[(0,o.jsx)(ne,{className:"h-8 w-48"}),(0,o.jsx)(ne,{className:"h-64 w-full"})]}),e[2]=s):s=e[2],s}if(i.kind==="error"){let s;e[3]!==i.message||e[4]!==t?(s=t("Couldn't load the architecture manifest: {message}",{message:i.message}),e[3]=i.message,e[4]=t,e[5]=s):s=e[5];let p;e[6]!==t?(p=t("Architecture unavailable"),e[6]=t,e[7]=p):p=e[7];let b;return e[8]!==s||e[9]!==p?(b=(0,o.jsx)(re,{description:s,testId:"architecture-error",title:p}),e[8]=s,e[9]=p,e[10]=b):b=e[10],b}if(i.kind==="empty"){let s;e[11]!==t?(s=t("Add a lunora/<folder>/module.ts that default-exports defineModule(...) and run lunora codegen to map your modules here. Installed components join the map once you declare one."),e[11]=t,e[12]=s):s=e[12];let p;e[13]!==t?(p=t("No modules declared"),e[13]=t,e[14]=p):p=e[14];let b;return e[15]!==s||e[16]!==p?(b=(0,o.jsx)(re,{description:s,testId:"architecture-empty",title:p}),e[15]=s,e[16]=p,e[17]=b):b=e[17],b}let{spec:u}=i,n,f;e[18]!==u?(n=(0,o.jsx)(We,{manifest:u}),f=(0,o.jsx)(Ye,{manifest:u}),e[18]=u,e[19]=n,e[20]=f):(n=e[19],f=e[20]);let m;e[21]!==u.unresolved||e[22]!==t?(m=u.unresolved.length>0&&(0,o.jsxs)("details",{className:"text-sm","data-testid":"architecture-unresolved",children:[(0,o.jsxs)("summary",{className:"cursor-pointer text-muted-foreground",children:[t("{count} call sites could not be drawn",{count:u.unresolved.length})," ",(0,o.jsx)(oe,{variant:"outline",children:u.unresolved.length})]}),(0,o.jsx)("ul",{className:"mt-2 flex flex-col gap-1 font-mono text-xs",children:u.unresolved.map(Ue)})]}),e[21]=u.unresolved,e[22]=t,e[23]=m):m=e[23];let h;return e[24]!==n||e[25]!==f||e[26]!==m?(h=(0,o.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"architecture-panel",children:[n,f,m]}),e[24]=n,e[25]=f,e[26]=m,e[27]=h):h=e[27],h},"mt");function Je(){return new Set(Le)}c(Je,"We");function Qe(r){return(0,o.jsx)("option",{value:r.name,children:r.name},r.name)}c(Qe,"Ze");function Ue(r){return(0,o.jsxs)("li",{children:[r.file,":",r.line," \xB7 ",r.kind," \xB7 ",r.reason]},`${r.file}:${String(r.line)}:${r.kind}:${r.reason}`)}c(Ue,"Je");export{mt as default};
@@ -0,0 +1 @@
1
+ import{a as v}from"./chunk-GWNGVKLG.js";import{a as b}from"./chunk-6G3E4PJ2.js";import{a as c,d as p}from"./chunk-5PEAXTYQ.js";var h=p(v(),1),g=p(b(),1);var y=c((a="local")=>{try{return a==="local"?globalThis.localStorage:globalThis.sessionStorage}catch{return}},"d"),S=c(function(a,s="local"){try{let r=y(s)?.getItem(a)??void 0,t=r===void 0?[]:JSON.parse(r);return Array.isArray(t)?t:[]}catch{return[]}},"g"),I=c((a,s,r="local")=>{let t=y(r);if(t!==void 0)try{t.setItem(a,JSON.stringify(s))}catch{}},"I"),A=c((a,s="local")=>{try{y(s)?.removeItem(a)}catch{}},"A"),T=c(function(a,s){let r=(0,h.c)(10),t=s===void 0?"local":s,u;r[0]!==a||r[1]!==t?(u=c(()=>S(a,t),"i"),r[0]=a,r[1]=t,r[2]=u):u=r[2];let[n,f]=(0,g.useState)(u),i=(0,g.useRef)(`${t}:${a}`),e,l;r[3]!==a||r[4]!==t||r[5]!==n?(e=c(()=>{let m=`${t}:${a}`;if(i.current!==m){i.current=m,f(S(a,t));return}I(a,n,t)},"c"),l=[a,t,n],r[3]=a,r[4]=t,r[5]=n,r[6]=e,r[7]=l):(e=r[6],l=r[7]),(0,g.useEffect)(e,l);let o;return r[8]!==n?(o=[n,f],r[8]=n,r[9]=o):o=r[9],o},"J"),J=c(function(a,s,r){let t=(0,h.c)(6),u="local",[n,f]=T(a,u),i;t[0]!==s||t[1]!==f?(i=c(m=>{f($=>{let d=$[0]??s;return[typeof m=="function"?m(d):m]})},"a"),t[0]=s,t[1]=f,t[2]=i):i=t[2];let e=i,l=n[0]??s,o;return t[3]!==e||t[4]!==l?(o=[l,e],t[3]=e,t[4]=l,t[5]=o):o=t[5],o},"O"),O=c(a=>globalThis.crypto?.randomUUID?.()??`${a}-${globalThis.performance.now().toString(36)}`,"V");export{y as a,S as b,I as c,A as d,T as e,J as f,O as g};