@lunora/studio 1.0.0-alpha.107 → 1.0.0-alpha.109

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 (387) hide show
  1. package/dist/index.d.ts +15 -2
  2. package/dist/index.js +1 -1
  3. package/dist/mount.js +1 -1
  4. package/dist/packem_chunks/AdvisorHealthPanel.js +1 -1
  5. package/dist/packem_chunks/ApiTab.js +1 -1
  6. package/dist/packem_chunks/AuditPanel.js +1 -1
  7. package/dist/packem_chunks/DeploymentHealthPanel.js +1 -1
  8. package/dist/packem_chunks/ExportImportPanel.js +3 -3
  9. package/dist/packem_chunks/FileBrowser.js +4 -4
  10. package/dist/packem_chunks/FunctionRunner.js +1 -1
  11. package/dist/packem_chunks/FunctionStatsPanel.js +1 -1
  12. package/dist/packem_chunks/HealthPanel.js +1 -1
  13. package/dist/packem_chunks/InsightsPanel.js +1 -1
  14. package/dist/packem_chunks/LogsPanel.js +1 -1
  15. package/dist/packem_chunks/MailPanel.js +1 -1
  16. package/dist/packem_chunks/MetricsPanel.js +1 -1
  17. package/dist/packem_chunks/NotificationsPanel.js +1 -1
  18. package/dist/packem_chunks/PitrPanel.js +1 -1
  19. package/dist/packem_chunks/SchemaViewer.js +1 -1
  20. package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -1
  21. package/dist/packem_chunks/SettingsPanel.js +1 -1
  22. package/dist/packem_chunks/SqlEditorPanel.js +6 -6
  23. package/dist/packem_chunks/TableEditor.js +1 -1
  24. package/dist/packem_chunks/agents-panel.js +1 -1
  25. package/dist/packem_chunks/analytics-panel.js +1 -1
  26. package/dist/packem_chunks/auth-audit-panel.js +1 -1
  27. package/dist/packem_chunks/auth-config-panel.js +1 -1
  28. package/dist/packem_chunks/auth-sessions-panel.js +1 -1
  29. package/dist/packem_chunks/containers-panel.js +1 -1
  30. package/dist/packem_chunks/dashboards-panel.js +1 -1
  31. package/dist/packem_chunks/evals-panel.js +1 -1
  32. package/dist/packem_chunks/fanout-panel.js +1 -1
  33. package/dist/packem_chunks/flags-panel.js +1 -1
  34. package/dist/packem_chunks/issues-panel.js +1 -1
  35. package/dist/packem_chunks/kv-browser.js +1 -1
  36. package/dist/packem_chunks/log-drains-panel.js +4 -4
  37. package/dist/packem_chunks/migrations-route.js +1 -1
  38. package/dist/packem_chunks/organizations-panel.js +1 -1
  39. package/dist/packem_chunks/payments-panel.js +1 -1
  40. package/dist/packem_chunks/permissions-panel.js +1 -1
  41. package/dist/packem_chunks/queues-panel.js +1 -1
  42. package/dist/packem_chunks/rls-panel.js +1 -1
  43. package/dist/packem_chunks/schedule-panel.js +1 -1
  44. package/dist/packem_chunks/sparkline.js +1 -1
  45. package/dist/packem_chunks/storage-rules-panel.js +1 -1
  46. package/dist/packem_chunks/subscriptions-panel.js +1 -1
  47. package/dist/packem_chunks/sync-client-panel.js +1 -1
  48. package/dist/packem_chunks/traces-panel.js +1 -1
  49. package/dist/packem_chunks/users-panel.js +1 -1
  50. package/dist/packem_chunks/vector-browser.js +1 -1
  51. package/dist/packem_chunks/workflows-panel.js +1 -1
  52. package/dist/packem_shared/ApiDocsPanel-BQ79UVEg.js +2 -0
  53. package/dist/packem_shared/ApiReferencePanel-CkCFMCBb.js +1 -0
  54. package/dist/packem_shared/CommandPalette-B5yLEABs.js +1 -0
  55. package/dist/packem_shared/ConfirmButton-Cj2SOapE.js +1 -0
  56. package/dist/packem_shared/ConnectionBadge-Bh16X9-u.js +1 -0
  57. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-DuULO4XM.js +1 -0
  58. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-1Lrg55IV.js +1 -0
  59. package/dist/packem_shared/DEFAULT_LOCALE-A1Yg5ORA.js +1 -0
  60. package/dist/packem_shared/DataBrowser-BnDIFN-S.js +1 -0
  61. package/dist/packem_shared/DataFilters-3nbW0uax.js +1 -0
  62. package/dist/packem_shared/ErrorBoundary-BWNF98VF.js +1 -0
  63. package/dist/packem_shared/GlobalDataBrowser-DusjXzRF.js +1 -0
  64. package/dist/packem_shared/HomePanel-BcaHVBJh.js +1 -0
  65. package/dist/packem_shared/MigrationsPanel-CCOENX4X.js +1 -0
  66. package/dist/packem_shared/OpenRpcReferencePanel-21OWMH45.js +1 -0
  67. package/dist/packem_shared/ScheduledJobs-CiO3eXgI.js +1 -0
  68. package/dist/packem_shared/ShardInput-XumEzeT0.js +1 -0
  69. package/dist/packem_shared/Studio-CHmLCjBR.js +1 -0
  70. package/dist/packem_shared/StudioApp-DCdbsciH.js +1 -0
  71. package/dist/packem_shared/StudioI18nProvider-Bl547evf.js +1 -0
  72. package/dist/packem_shared/advisor-view-C1KFTXSH.js +1 -0
  73. package/dist/packem_shared/aggregateMetrics-A-Y7OH6R.js +1 -0
  74. package/dist/packem_shared/alert-C2SEhYS9.js +1 -0
  75. package/dist/packem_shared/{badge-BbuuAio7.js → badge-cAk9Di1Q.js} +1 -1
  76. package/dist/packem_shared/bar-chart-CCyO67Uf.js +6 -0
  77. package/dist/packem_shared/browser-storage-Br_bLeBt.js +1 -0
  78. package/dist/packem_shared/{button-BkCrNcAs.js → button-BOPLD1un.js} +1 -1
  79. package/dist/packem_shared/card-BGlQzQY-.js +1 -0
  80. package/dist/packem_shared/cf-links-CBJ5SywP.js +1 -0
  81. package/dist/packem_shared/{checkbox-StT4Gob6.js → checkbox-C5w53W-E.js} +1 -1
  82. package/dist/packem_shared/data-grid-BFTQnkXq.js +1 -0
  83. package/dist/packem_shared/data-view-params-qoSTqjAj.js +1 -0
  84. package/dist/packem_shared/dropdown-menu-D_ewqsUU.js +2 -0
  85. package/dist/packem_shared/empty-state-B939z6K2.js +1 -0
  86. package/dist/packem_shared/error-alert-TYdKetJd.js +1 -0
  87. package/dist/packem_shared/grid-features-C_yXlMc_.js +6 -0
  88. package/dist/packem_shared/home-panel-BiJHXeDC.js +3 -0
  89. package/dist/packem_shared/input-CY5W3wzv.js +1 -0
  90. package/dist/packem_shared/internal-CwaF9YNk.js +2 -0
  91. package/dist/packem_shared/label-BOUo-DP0.js +1 -0
  92. package/dist/packem_shared/live-status-Bf7rR8o8.js +1 -0
  93. package/dist/packem_shared/{log-fields-CoL3hsIQ.js → log-fields-SBxKyBug.js} +1 -1
  94. package/dist/packem_shared/log-line-UnE93Ovi.js +1 -0
  95. package/dist/packem_shared/modal-shell-wGW4CKEW.js +1 -0
  96. package/dist/packem_shared/operation-console-provider-DoloEvon.js +1 -0
  97. package/dist/packem_shared/recording-client-CKn4-vUx.js +1 -0
  98. package/dist/packem_shared/reference-view-CUIDzLf0.js +12 -0
  99. package/dist/packem_shared/result-chart-Ca3YLzt8.js +1 -0
  100. package/dist/packem_shared/schema-diagram-DHD13TjS.js +2 -0
  101. package/dist/packem_shared/scroll-area-DSJftwu_.js +2 -0
  102. package/dist/packem_shared/select-BPISLTcv.js +2 -0
  103. package/dist/packem_shared/shard-history-QcjcMnCA.js +1 -0
  104. package/dist/packem_shared/skeleton-DFBBaJU6.js +1 -0
  105. package/dist/packem_shared/sparkline-BreIqzDO.js +1 -0
  106. package/dist/packem_shared/stat-card-B9uIvAHg.js +1 -0
  107. package/dist/packem_shared/{storage-tier-DznqOf-q.js → storage-tier-C2mKwYRj.js} +1 -1
  108. package/dist/packem_shared/studio-B3eEcBK0.js +2 -0
  109. package/dist/packem_shared/table-BMsuYFhk.js +2 -0
  110. package/dist/packem_shared/table-list-sidebar-Bluzd1_2.js +1 -0
  111. package/dist/packem_shared/textarea-DpO3i-Qo.js +1 -0
  112. package/dist/packem_shared/{trace-handoff-Dw7mwjxu.js → trace-handoff-C0CFV2ix.js} +1 -1
  113. package/dist/packem_shared/use-admin-query-P0RJrjsD.js +1 -0
  114. package/dist/packem_shared/use-async-submit-DdLd0MdK.js +1 -0
  115. package/dist/packem_shared/use-auth-config-z3KRWAqD.js +1 -0
  116. package/dist/packem_shared/use-open-trace-4tIa0SXZ.js +1 -0
  117. package/dist/packem_shared/use-shard-key-BsP3o5wT.js +1 -0
  118. package/dist/packem_shared/use-sql-assistant-CP90nLLh.js +1 -0
  119. package/dist/packem_shared/useDebounced-DVeQ5-oW.js +1 -0
  120. package/dist/packem_shared/virtual-rect-D_j7aLxX.js +1 -0
  121. package/dist/packem_shared/wire-codec-Dl3VeNrd.js +1 -0
  122. package/dist/standalone/chunk-25OIGX2A.js +1 -0
  123. package/dist/standalone/{chunk-OBMNLQWG.js → chunk-26VREVWU.js} +1 -1
  124. package/dist/standalone/chunk-2BDM6HNL.js +1 -0
  125. package/dist/standalone/{chunk-5BJKIPW4.js → chunk-2DC6F7NH.js} +1 -1
  126. package/dist/standalone/chunk-3F5I435D.js +1 -0
  127. package/dist/standalone/{chunk-QITZPIKR.js → chunk-3QB5JI32.js} +1 -1
  128. package/dist/standalone/chunk-3RYEUXY2.js +1 -0
  129. package/dist/standalone/chunk-44WNSIGQ.js +1 -0
  130. package/dist/standalone/chunk-45YWYMD5.js +1 -0
  131. package/dist/standalone/chunk-4MAJFNON.js +1 -0
  132. package/dist/standalone/chunk-4YTSKL4R.js +1 -0
  133. package/dist/standalone/chunk-57VX76PR.js +1 -0
  134. package/dist/standalone/chunk-5JLIP2HH.js +1 -0
  135. package/dist/standalone/chunk-5NRQIDQA.js +1 -0
  136. package/dist/standalone/{chunk-WC6UDT34.js → chunk-5T7KRUPX.js} +1 -1
  137. package/dist/standalone/chunk-6FWN26RH.js +1 -0
  138. package/dist/standalone/chunk-6JGXSMKV.js +1 -0
  139. package/dist/standalone/{chunk-DNJI44ZU.js → chunk-6NJAHOGO.js} +1 -1
  140. package/dist/standalone/chunk-6SAAMM4S.js +1 -0
  141. package/dist/standalone/{chunk-IUYFXK4X.js → chunk-6ZPTNC34.js} +6 -6
  142. package/dist/standalone/chunk-74ASA4WU.js +1 -0
  143. package/dist/standalone/{chunk-6ST5ECQA.js → chunk-7PIHTTND.js} +1 -1
  144. package/dist/standalone/{chunk-GMR677FL.js → chunk-7SROZWKL.js} +1 -1
  145. package/dist/standalone/chunk-AECDJKXB.js +1 -0
  146. package/dist/standalone/{chunk-2PJNAWB3.js → chunk-AFKLFS74.js} +1 -1
  147. package/dist/standalone/chunk-AOAJGSYZ.js +2 -0
  148. package/dist/standalone/chunk-AOE75NAT.js +1 -0
  149. package/dist/standalone/{chunk-HFRJMPXJ.js → chunk-APRVSWBH.js} +27 -27
  150. package/dist/standalone/{chunk-DII5CUK3.js → chunk-BELLXCN7.js} +1 -1
  151. package/dist/standalone/chunk-BORG7WUC.js +1 -0
  152. package/dist/standalone/{chunk-AVAC26HJ.js → chunk-BQK2C2Z4.js} +1 -1
  153. package/dist/standalone/chunk-BRHTM6FU.js +1 -0
  154. package/dist/standalone/{chunk-MWIKAR7F.js → chunk-BWEXJENB.js} +1 -1
  155. package/dist/standalone/chunk-C5E5PLJT.js +4 -0
  156. package/dist/standalone/chunk-C7E4I7JZ.js +1 -0
  157. package/dist/standalone/{chunk-QWGT25SE.js → chunk-CAOUXOL7.js} +1 -1
  158. package/dist/standalone/chunk-CEPMQS24.js +6 -0
  159. package/dist/standalone/chunk-CKTKI4IY.js +1 -0
  160. package/dist/standalone/{chunk-IC4L6G56.js → chunk-CN2AINNY.js} +1 -1
  161. package/dist/standalone/chunk-CP4ZFBVW.js +1 -0
  162. package/dist/standalone/chunk-CYX3OHJ3.js +1 -0
  163. package/dist/standalone/{chunk-RR3WQUTS.js → chunk-D7DUQS2Y.js} +1 -1
  164. package/dist/standalone/{chunk-QBWRC5YX.js → chunk-DKSLOJDQ.js} +1 -1
  165. package/dist/standalone/chunk-DL3UOEWN.js +1 -0
  166. package/dist/standalone/chunk-DPNEFSEC.js +1 -0
  167. package/dist/standalone/{chunk-BGBLQ563.js → chunk-DUDQV6XJ.js} +1 -1
  168. package/dist/standalone/chunk-EDHW2EEG.js +1 -0
  169. package/dist/standalone/chunk-EYGF6TQS.js +1 -0
  170. package/dist/standalone/chunk-F7JOSNAT.js +1 -0
  171. package/dist/standalone/{chunk-YBAHC3CS.js → chunk-FBAZHG35.js} +1 -1
  172. package/dist/standalone/chunk-FLCK2WWQ.js +1 -0
  173. package/dist/standalone/chunk-FSWPREH3.js +1 -0
  174. package/dist/standalone/{chunk-53K3JA4T.js → chunk-GIRZD3UB.js} +2 -2
  175. package/dist/standalone/chunk-GZMBMNL3.js +6 -0
  176. package/dist/standalone/chunk-HPX3IM45.js +13 -0
  177. package/dist/standalone/{chunk-KUVMORDQ.js → chunk-INBA3473.js} +1 -1
  178. package/dist/standalone/{chunk-T6VMSOBB.js → chunk-INQICZYC.js} +1 -1
  179. package/dist/standalone/chunk-IWNVQHF7.js +1 -0
  180. package/dist/standalone/chunk-IWOZGUI2.js +1 -0
  181. package/dist/standalone/chunk-IYWVSMAY.js +1 -0
  182. package/dist/standalone/chunk-JURAVSE7.js +1 -0
  183. package/dist/standalone/chunk-JUWOEHDD.js +1 -0
  184. package/dist/standalone/{chunk-4UOFSGUS.js → chunk-JV7KTJPY.js} +1 -1
  185. package/dist/standalone/{chunk-DAKX7Y3W.js → chunk-JVAYDDMK.js} +1 -1
  186. package/dist/standalone/chunk-KEKIGANB.js +1 -0
  187. package/dist/standalone/chunk-KFZ37KQP.js +1 -0
  188. package/dist/standalone/chunk-KQIHXYE6.js +1 -0
  189. package/dist/standalone/chunk-L4EZAHCD.js +1 -0
  190. package/dist/standalone/chunk-L7CJ5PGH.js +1 -0
  191. package/dist/standalone/{chunk-WMJYSFAD.js → chunk-LT4XQDD2.js} +1 -1
  192. package/dist/standalone/chunk-M3NNNOD5.js +1 -0
  193. package/dist/standalone/chunk-MBEIKVJH.js +1 -0
  194. package/dist/standalone/chunk-MCLM2QJI.js +1 -0
  195. package/dist/standalone/chunk-METRMDIQ.js +1 -0
  196. package/dist/standalone/{chunk-OKQ3NJOW.js → chunk-MGC6PRMV.js} +1 -1
  197. package/dist/standalone/chunk-MOUI44OT.js +1 -0
  198. package/dist/standalone/{chunk-6SENF2BM.js → chunk-MSFUDXBA.js} +1 -1
  199. package/dist/standalone/chunk-NIX2QSSN.js +1 -0
  200. package/dist/standalone/chunk-NXXGISFB.js +1 -0
  201. package/dist/standalone/{chunk-SBZXUGZ7.js → chunk-OE4KGVJW.js} +4 -4
  202. package/dist/standalone/chunk-OG57FC7W.js +1 -0
  203. package/dist/standalone/chunk-OLQWBGKT.js +1 -0
  204. package/dist/standalone/{chunk-AQSDQ7YW.js → chunk-OOBJFXYB.js} +1 -1
  205. package/dist/standalone/chunk-P52BY657.js +1 -0
  206. package/dist/standalone/chunk-PHHMPYEP.js +1 -0
  207. package/dist/standalone/{chunk-MBCQNLYR.js → chunk-PJDKRUWT.js} +1 -1
  208. package/dist/standalone/chunk-PZ4QDWTI.js +1 -0
  209. package/dist/standalone/chunk-QZ55OWAB.js +4 -0
  210. package/dist/standalone/chunk-R5ZTCHCE.js +1 -0
  211. package/dist/standalone/chunk-RBUVNO22.js +1 -0
  212. package/dist/standalone/{chunk-XBDKZZ67.js → chunk-RCZTUWG3.js} +1 -1
  213. package/dist/standalone/chunk-S77D4SHR.js +1 -0
  214. package/dist/standalone/chunk-SL5R7WBN.js +1 -0
  215. package/dist/standalone/chunk-SMKRXJUC.js +1 -0
  216. package/dist/standalone/{chunk-THIXMMZD.js → chunk-SPDZUX4P.js} +1 -1
  217. package/dist/standalone/chunk-T2LDA6WP.js +1 -0
  218. package/dist/standalone/{chunk-5UY7MLRC.js → chunk-T6HLABZW.js} +1 -1
  219. package/dist/standalone/{chunk-WNX3CW2W.js → chunk-TBXK3FKP.js} +4 -4
  220. package/dist/standalone/{chunk-7QIFDWQV.js → chunk-TFMQSCGC.js} +1 -1
  221. package/dist/standalone/chunk-TLPWZ5NI.js +3 -0
  222. package/dist/standalone/chunk-TNKECJW4.js +1 -0
  223. package/dist/standalone/{chunk-XQCVZAGU.js → chunk-UANVABQG.js} +1 -1
  224. package/dist/standalone/chunk-UIF57LBO.js +1 -0
  225. package/dist/standalone/chunk-V6QPVFDL.js +1 -0
  226. package/dist/standalone/chunk-VNTEQQPP.js +1 -0
  227. package/dist/standalone/chunk-VR3UJA7B.js +1 -0
  228. package/dist/standalone/{chunk-5DVJR52Z.js → chunk-VYW2PAWC.js} +3 -3
  229. package/dist/standalone/chunk-VZCS5GXZ.js +1 -0
  230. package/dist/standalone/{chunk-RY3KNLUE.js → chunk-WHRG6S5P.js} +1 -1
  231. package/dist/standalone/{chunk-GVV3QMRO.js → chunk-WIG3HCUJ.js} +1 -1
  232. package/dist/standalone/chunk-WUW4ZHRL.js +1 -0
  233. package/dist/standalone/chunk-X6Q5DWLZ.js +1 -0
  234. package/dist/standalone/{chunk-Z2IF3TEX.js → chunk-XGIG4EDG.js} +4 -4
  235. package/dist/standalone/chunk-XJSWM47N.js +1 -0
  236. package/dist/standalone/chunk-XQS7KSHL.js +1 -0
  237. package/dist/standalone/chunk-YS7HEZC2.js +1 -0
  238. package/dist/standalone/chunk-YUWMB6EV.js +1 -0
  239. package/dist/standalone/{chunk-TMGHRD6W.js → chunk-ZPGNTTQ3.js} +1 -1
  240. package/dist/standalone/chunk-ZQLIKKIY.js +1 -0
  241. package/dist/standalone/chunk-ZSOLGJFC.js +1 -0
  242. package/dist/standalone/studio.js +6 -6
  243. package/package.json +11 -11
  244. package/dist/packem_shared/ApiDocsPanel-Cu_QmzO0.js +0 -2
  245. package/dist/packem_shared/ApiReferencePanel-DuIU1P8B.js +0 -1
  246. package/dist/packem_shared/CommandPalette-mPR8-vIm.js +0 -1
  247. package/dist/packem_shared/ConfirmButton-CTL3f3kr.js +0 -1
  248. package/dist/packem_shared/ConnectionBadge-DOk0CQWo.js +0 -1
  249. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js +0 -1
  250. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-B-hcFVoi.js +0 -1
  251. package/dist/packem_shared/DEFAULT_LOCALE-BZ4NojpD.js +0 -1
  252. package/dist/packem_shared/DataBrowser-CPNKM0KZ.js +0 -1
  253. package/dist/packem_shared/DataFilters-B26ZeqBZ.js +0 -1
  254. package/dist/packem_shared/ErrorBoundary-DvzYskH7.js +0 -1
  255. package/dist/packem_shared/GlobalDataBrowser-BSmyOO0n.js +0 -1
  256. package/dist/packem_shared/HomePanel-BUO6BcYQ.js +0 -1
  257. package/dist/packem_shared/MigrationsPanel-BAnvY79E.js +0 -1
  258. package/dist/packem_shared/OpenRpcReferencePanel-DXeffPFr.js +0 -1
  259. package/dist/packem_shared/ScheduledJobs-pHVlh2xU.js +0 -1
  260. package/dist/packem_shared/ShardInput-BVn2iCU0.js +0 -1
  261. package/dist/packem_shared/Studio-CD66AkL1.js +0 -1
  262. package/dist/packem_shared/StudioApp-0Vaayv2I.js +0 -1
  263. package/dist/packem_shared/StudioI18nProvider-CZ5h4nrV.js +0 -1
  264. package/dist/packem_shared/advisor-view-CGcwvlMo.js +0 -1
  265. package/dist/packem_shared/aggregateMetrics-BNfajLa2.js +0 -1
  266. package/dist/packem_shared/alert-CVcOFuDR.js +0 -1
  267. package/dist/packem_shared/bar-chart-B8oDHgnw.js +0 -6
  268. package/dist/packem_shared/browser-storage-xjTyMKY0.js +0 -1
  269. package/dist/packem_shared/card-BMKx5UdA.js +0 -1
  270. package/dist/packem_shared/cf-links-Dmg86v1D.js +0 -1
  271. package/dist/packem_shared/data-grid-Ci4-tZkk.js +0 -1
  272. package/dist/packem_shared/data-view-params-ClrV7XgF.js +0 -1
  273. package/dist/packem_shared/dropdown-menu-BgS2zw1i.js +0 -2
  274. package/dist/packem_shared/empty-state-Cg7t_8qu.js +0 -1
  275. package/dist/packem_shared/error-alert-_2q2VtVG.js +0 -1
  276. package/dist/packem_shared/grid-features-Y2YSjhCf.js +0 -6
  277. package/dist/packem_shared/home-panel-Ir3YHReO.js +0 -3
  278. package/dist/packem_shared/input-JHu63lTv.js +0 -1
  279. package/dist/packem_shared/internal-zkEvTqy8.js +0 -2
  280. package/dist/packem_shared/label-6uP1obNF.js +0 -1
  281. package/dist/packem_shared/live-status-CmuRLFKf.js +0 -1
  282. package/dist/packem_shared/log-line-BDI826X-.js +0 -1
  283. package/dist/packem_shared/modal-shell-CUwwWC2o.js +0 -1
  284. package/dist/packem_shared/operation-console-provider-BMJNtiyB.js +0 -1
  285. package/dist/packem_shared/recording-client-DtUxwVNY.js +0 -1
  286. package/dist/packem_shared/reference-view-DncEStdm.js +0 -12
  287. package/dist/packem_shared/result-chart-0VgP_3FP.js +0 -1
  288. package/dist/packem_shared/schema-diagram-GVgnLWTf.js +0 -2
  289. package/dist/packem_shared/scroll-area-DTEq6Jec.js +0 -2
  290. package/dist/packem_shared/select-BssZMiFY.js +0 -2
  291. package/dist/packem_shared/shard-history-DMEW5VBE.js +0 -1
  292. package/dist/packem_shared/skeleton-C1wQ9M5t.js +0 -1
  293. package/dist/packem_shared/sparkline-BNvxiJj_.js +0 -1
  294. package/dist/packem_shared/stat-card-BGJdhfm6.js +0 -1
  295. package/dist/packem_shared/studio-CUXq5VSB.js +0 -2
  296. package/dist/packem_shared/table-DZAB8cs3.js +0 -2
  297. package/dist/packem_shared/table-list-sidebar-fz0m_4I4.js +0 -1
  298. package/dist/packem_shared/textarea-Bu2-jKAs.js +0 -1
  299. package/dist/packem_shared/use-admin-query-CnnyWJXM.js +0 -1
  300. package/dist/packem_shared/use-async-submit-B32whHJO.js +0 -1
  301. package/dist/packem_shared/use-auth-config-0EnNCdLu.js +0 -1
  302. package/dist/packem_shared/use-open-trace-CniEgUdp.js +0 -1
  303. package/dist/packem_shared/use-shard-key-B2JtNa5m.js +0 -1
  304. package/dist/packem_shared/use-sql-assistant-Dtw55kKM.js +0 -1
  305. package/dist/packem_shared/useDebounced-CU-uftxO.js +0 -1
  306. package/dist/packem_shared/virtual-rect-1o1veP7R.js +0 -1
  307. package/dist/packem_shared/wire-codec-DkrdsFXO.js +0 -1
  308. package/dist/standalone/chunk-2MOW5R5F.js +0 -1
  309. package/dist/standalone/chunk-2OUPA2WJ.js +0 -1
  310. package/dist/standalone/chunk-2QSHLBCO.js +0 -1
  311. package/dist/standalone/chunk-36ZRDYSW.js +0 -13
  312. package/dist/standalone/chunk-3C3CG7ZK.js +0 -1
  313. package/dist/standalone/chunk-3CWGJYBB.js +0 -1
  314. package/dist/standalone/chunk-3DH35OZ5.js +0 -1
  315. package/dist/standalone/chunk-3LOVQM5J.js +0 -4
  316. package/dist/standalone/chunk-3SCGCJYS.js +0 -1
  317. package/dist/standalone/chunk-3XIESWL4.js +0 -1
  318. package/dist/standalone/chunk-4V545ZJY.js +0 -1
  319. package/dist/standalone/chunk-53C44DRG.js +0 -1
  320. package/dist/standalone/chunk-54MMVNPT.js +0 -1
  321. package/dist/standalone/chunk-5HCAPI76.js +0 -1
  322. package/dist/standalone/chunk-5PNUXGSN.js +0 -1
  323. package/dist/standalone/chunk-5Y3QLNWX.js +0 -1
  324. package/dist/standalone/chunk-6O7WGEPO.js +0 -1
  325. package/dist/standalone/chunk-7CZI2HNL.js +0 -1
  326. package/dist/standalone/chunk-7T7UOTYK.js +0 -1
  327. package/dist/standalone/chunk-AE2C6FJ5.js +0 -1
  328. package/dist/standalone/chunk-AXQU7ULF.js +0 -1
  329. package/dist/standalone/chunk-B7ZEKCKL.js +0 -1
  330. package/dist/standalone/chunk-BONZWJ4I.js +0 -1
  331. package/dist/standalone/chunk-BQWOD2OQ.js +0 -1
  332. package/dist/standalone/chunk-C7LUGC7P.js +0 -1
  333. package/dist/standalone/chunk-CFPZYHPY.js +0 -2
  334. package/dist/standalone/chunk-CZZWYUTR.js +0 -1
  335. package/dist/standalone/chunk-D5564VH5.js +0 -1
  336. package/dist/standalone/chunk-DIRKDC43.js +0 -1
  337. package/dist/standalone/chunk-DJZYD5I5.js +0 -1
  338. package/dist/standalone/chunk-ED6AUZUE.js +0 -4
  339. package/dist/standalone/chunk-EDQZJWAO.js +0 -1
  340. package/dist/standalone/chunk-ESVP44Y3.js +0 -1
  341. package/dist/standalone/chunk-FEKQ5FEG.js +0 -6
  342. package/dist/standalone/chunk-FURI47Z2.js +0 -1
  343. package/dist/standalone/chunk-G2TIDP45.js +0 -1
  344. package/dist/standalone/chunk-GG6PIGQO.js +0 -1
  345. package/dist/standalone/chunk-GKTUXDZR.js +0 -1
  346. package/dist/standalone/chunk-GLCH6XAO.js +0 -1
  347. package/dist/standalone/chunk-GRL5MG3Z.js +0 -1
  348. package/dist/standalone/chunk-HBSEWNIR.js +0 -1
  349. package/dist/standalone/chunk-HPFLBYRI.js +0 -1
  350. package/dist/standalone/chunk-I6A5C46N.js +0 -1
  351. package/dist/standalone/chunk-IGCNMZSB.js +0 -1
  352. package/dist/standalone/chunk-IOTGZYQS.js +0 -1
  353. package/dist/standalone/chunk-IVFHIQOT.js +0 -1
  354. package/dist/standalone/chunk-J5NKUMHE.js +0 -1
  355. package/dist/standalone/chunk-JKSUHSHA.js +0 -1
  356. package/dist/standalone/chunk-JL4ADWT6.js +0 -1
  357. package/dist/standalone/chunk-JQ4LFPF7.js +0 -1
  358. package/dist/standalone/chunk-LBWEYJMC.js +0 -1
  359. package/dist/standalone/chunk-LEDWUPXM.js +0 -1
  360. package/dist/standalone/chunk-MLT5MMMY.js +0 -1
  361. package/dist/standalone/chunk-NWFRUF4E.js +0 -1
  362. package/dist/standalone/chunk-OENUM3OW.js +0 -1
  363. package/dist/standalone/chunk-P7DBFWVY.js +0 -3
  364. package/dist/standalone/chunk-PMT3YIDB.js +0 -1
  365. package/dist/standalone/chunk-QLQADHFE.js +0 -1
  366. package/dist/standalone/chunk-QU33TT7V.js +0 -1
  367. package/dist/standalone/chunk-RA5DW5MU.js +0 -1
  368. package/dist/standalone/chunk-REBEU3J6.js +0 -1
  369. package/dist/standalone/chunk-RMN2JN4S.js +0 -1
  370. package/dist/standalone/chunk-SD4BERSA.js +0 -1
  371. package/dist/standalone/chunk-SFDOII3B.js +0 -1
  372. package/dist/standalone/chunk-SMIESS7P.js +0 -1
  373. package/dist/standalone/chunk-TRX6MWMH.js +0 -1
  374. package/dist/standalone/chunk-UG3YK5U3.js +0 -1
  375. package/dist/standalone/chunk-V53KNYRN.js +0 -1
  376. package/dist/standalone/chunk-VDZQM6KJ.js +0 -1
  377. package/dist/standalone/chunk-VZXE62W4.js +0 -1
  378. package/dist/standalone/chunk-WJQLNYGX.js +0 -1
  379. package/dist/standalone/chunk-WPK2Q33V.js +0 -6
  380. package/dist/standalone/chunk-WQH3LT2P.js +0 -1
  381. package/dist/standalone/chunk-XDBQX5P4.js +0 -1
  382. package/dist/standalone/chunk-XFGE43TZ.js +0 -1
  383. package/dist/standalone/chunk-XXQUMVWH.js +0 -1
  384. package/dist/standalone/chunk-Y32QIKBS.js +0 -1
  385. package/dist/standalone/chunk-ZJGP6EKR.js +0 -1
  386. package/dist/standalone/chunk-ZUZXES3T.js +0 -1
  387. /package/dist/standalone/{chunk-XF2B7P5A.js → chunk-W2JBKQNU.js} +0 -0
@@ -1 +0,0 @@
1
- import{a as We,b as De,c as Fe,d as Oe,e as we}from"./chunk-RA5DW5MU.js";import"./chunk-2PJNAWB3.js";import"./chunk-SD4BERSA.js";import"./chunk-IC4L6G56.js";import{a as qe}from"./chunk-3SCGCJYS.js";import{a as Ve}from"./chunk-IGCNMZSB.js";import"./chunk-2QSHLBCO.js";import"./chunk-BGBLQ563.js";import"./chunk-IVFHIQOT.js";import"./chunk-QBWRC5YX.js";import{a as ze}from"./chunk-3CWGJYBB.js";import{a as Te}from"./chunk-RMN2JN4S.js";import"./chunk-GRL5MG3Z.js";import"./chunk-7T7UOTYK.js";import{R as ke}from"./chunk-CFPZYHPY.js";import"./chunk-T6VMSOBB.js";import"./chunk-7QIFDWQV.js";import{a as ie}from"./chunk-MWIKAR7F.js";import"./chunk-DJZYD5I5.js";import"./chunk-2OUPA2WJ.js";import{b as me}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import"./chunk-QLQADHFE.js";import{a as D}from"./chunk-VDW32UET.js";import{c as Ee}from"./chunk-NWFRUF4E.js";import{f as Ne}from"./chunk-WNX3CW2W.js";import"./chunk-XBDKZZ67.js";import{a as Ce}from"./chunk-XQCVZAGU.js";import{a as Le,b as je,c as Re,d as pe,e as W,f as L}from"./chunk-WJQLNYGX.js";import{a as Me,e as Ae}from"./chunk-WQH3LT2P.js";import{d as ue,f as le,g as be,h as Ke,o as re,r as _e}from"./chunk-IUYFXK4X.js";import{a as Ie,b as $e}from"./chunk-5DVJR52Z.js";import{a as d,e as ye,f as Be,g as Ge,h as He}from"./chunk-3XIESWL4.js";var ge=ye(Ge(),1);var ne=ye(Be(),1);var t=ye(He(),1);var Se="none",Je=["all","open","resolved","ignored"],Pe=["critical","high","medium","low"],Qe=le(D.resolveIssue),Xe=le(D.ignoreIssue),Ue=le(D.assignIssue),Ye=le(D.setIssueSeverity),Ze=le(D.explainIssue),es=d(n=>Array.isArray(n?.issues)?n.issues:[],"Ye"),ss=d(n=>n==="resolved"?"success":n==="ignored"?"secondary":"warning","Ze"),ts=d(n=>n==="critical"?"destructive":n==="high"?"warning":n==="medium"?"info":"secondary","Pe"),as=d(n=>{let e=(0,ge.c)(44),{expanded:u,issue:s,shardKey:$}=n,i=Ne(),r=ue(),[a,o]=(0,ne.useState)(void 0),{busy:T,error:C,run:j}=qe(),K;e[0]!==i||e[1]!==s||e[2]!==j||e[3]!==$?(K=d(()=>{o(void 0),j(async()=>{let g={culprit:s.culprit,sampleMessage:s.sampleMessage,title:s.title},I=await i.query(Ze,g,be($));o(I)})},"K"),e[0]=i,e[1]=s,e[2]=j,e[3]=$,e[4]=K):K=e[4];let z=K;if(!u)return null;let k;if(e[5]!==s.sampleMessage){let g=$e(s.sampleMessage);k=g===void 0?void 0:Ie(g.body),e[5]=s.sampleMessage,e[6]=k}else k=e[6];let _=k,E=`issues-detail-${s.hash}`,h;e[7]!==s.sampleMessage?(h=(0,t.jsx)("p",{className:"whitespace-pre-wrap font-mono text-xs text-muted-foreground",children:s.sampleMessage}),e[7]=s.sampleMessage,e[8]=h):h=e[8];let x;e[9]!==r?(x=r("Suggested fix"),e[9]=r,e[10]=x):x=e[10];let M;e[11]!==x?(M=(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:x}),e[11]=x,e[12]=M):M=e[12];let v;e[13]!==_||e[14]!==s.hash||e[15]!==r?(v=_===void 0?(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground","data-testid":`issues-hint-empty-${s.hash}`,children:r("No known fix for this error yet.")}):(0,t.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm","data-testid":`issues-hint-${s.hash}`,children:_}),e[13]=_,e[14]=s.hash,e[15]=r,e[16]=v):v=e[16];let y;e[17]!==M||e[18]!==v?(y=(0,t.jsxs)("div",{children:[M,v]}),e[17]=M,e[18]=v,e[19]=y):y=e[19];let b=`issues-explain-${s.hash}`,w;e[20]!==T||e[21]!==r?(w=r(T?"Explaining\u2026":"Explain in plain language"),e[20]=T,e[21]=r,e[22]=w):w=e[22];let m;e[23]!==T||e[24]!==z||e[25]!==w||e[26]!==b?(m=(0,t.jsx)("div",{children:(0,t.jsx)(ie,{"data-testid":b,disabled:T,onClick:z,size:"sm",type:"button",variant:"outline",children:w})}),e[23]=T,e[24]=z,e[25]=w,e[26]=b,e[27]=m):m=e[27];let f;e[28]!==C||e[29]!==s.hash?(f=C!==null&&(0,t.jsx)("p",{className:"text-xs text-destructive","data-testid":`issues-explain-error-${s.hash}`,role:"alert",children:C}),e[28]=C,e[29]=s.hash,e[30]=f):f=e[30];let p;e[31]!==a||e[32]!==s.hash||e[33]!==r?(p=a!==void 0&&(a.degraded?(0,t.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":`issues-degraded-${s.hash}`,children:a.reason==="no-ai-binding"?r("No AI binding is configured. Wire an AI binding to enable plain-language explanations \u2014 the suggested fix above is always available."):r("The AI model could not explain this error right now. The suggested fix above still applies.")}):(0,t.jsxs)("div",{"data-testid":`issues-explanation-${s.hash}`,children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:r("AI explanation")}),(0,t.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm",children:a.explanation}),a.groundedId===void 0&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground","data-testid":`issues-ungrounded-${s.hash}`,children:r("No catalog fix matched this error, so this explanation is the model's own reading of the message. Verify before acting on it.")}),(0,t.jsx)("p",{className:"mt-1 text-[0.7rem] text-muted-foreground",children:r("Generated by {model}",{model:a.model})})]})),e[31]=a,e[32]=s.hash,e[33]=r,e[34]=p):p=e[34];let c;e[35]!==m||e[36]!==f||e[37]!==p||e[38]!==h||e[39]!==y?(c=(0,t.jsx)(L,{className:"bg-muted/30",colSpan:7,children:(0,t.jsxs)("div",{className:"flex flex-col gap-3 py-1",children:[h,y,m,f,p]})}),e[35]=m,e[36]=f,e[37]=p,e[38]=h,e[39]=y,e[40]=c):c=e[40];let S;return e[41]!==c||e[42]!==E?(S=(0,t.jsx)(pe,{"data-testid":E,children:c}),e[41]=c,e[42]=E,e[43]=S):S=e[43],S},"et"),is=d(n=>{let e=(0,ge.c)(119),{busy:u,issue:s,rowError:$,runTriage:i,shardKey:r}=n,a=ue(),[o,T]=(0,ne.useState)(!1),C;e[0]===Symbol.for("react.memo_cache_sentinel")?(C=d(()=>{T(ls)},"C"),e[0]=C):C=e[0];let j=C,K;e[1]!==s.hash||e[2]!==i?(K=d(ae=>{let ce=ae===null||ae===Se?null:ae;re(i(s.hash,Ye,{severity:ce}))},"K"),e[1]=s.hash,e[2]=i,e[3]=K):K=e[3];let z=K,k;e[4]!==s.hash||e[5]!==i?(k=d(ae=>{if(ae.key!=="Enter")return;let ce=ae.currentTarget.value.trim();re(i(s.hash,Ue,{assignee:ce===""?null:ce}))},"k"),e[4]=s.hash,e[5]=i,e[6]=k):k=e[6];let _=k,E=`issues-row-${s.hash}`,h;e[7]!==a?(h=a("Toggle issue details"),e[7]=a,e[8]=h):h=e[8];let x=`issues-toggle-${s.hash}`,M=`mt-1 size-3 shrink-0 text-muted-foreground transition-transform ${o?"rotate-90":""}`,v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsx)("path",{d:"m9 6 6 6-6 6"}),e[9]=v):v=e[9];let y;e[10]!==M?(y=(0,t.jsx)("svg",{"aria-hidden":"true",className:M,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",children:v}),e[10]=M,e[11]=y):y=e[11];let b;e[12]!==s.title?(b=(0,t.jsx)("span",{className:"block truncate font-medium",title:s.title,children:s.title}),e[12]=s.title,e[13]=b):b=e[13];let w;e[14]!==s.culprit?(w=(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",title:s.culprit,children:s.culprit}),e[14]=s.culprit,e[15]=w):w=e[15];let m;e[16]!==b||e[17]!==w?(m=(0,t.jsxs)("span",{className:"min-w-0",children:[b,w]}),e[16]=b,e[17]=w,e[18]=m):m=e[18];let f;e[19]!==o||e[20]!==m||e[21]!==h||e[22]!==x||e[23]!==y?(f=(0,t.jsxs)("button",{"aria-expanded":o,"aria-label":h,className:"flex w-full items-start gap-2 text-left","data-testid":x,onClick:j,type:"button",children:[y,m]}),e[19]=o,e[20]=m,e[21]=h,e[22]=x,e[23]=y,e[24]=f):f=e[24];let p;e[25]!==s.hash||e[26]!==$?(p=$!==void 0&&(0,t.jsx)("p",{className:"mt-1 text-xs text-destructive","data-testid":`issues-action-error-${s.hash}`,role:"alert",children:$}),e[25]=s.hash,e[26]=$,e[27]=p):p=e[27];let c;e[28]!==f||e[29]!==p?(c=(0,t.jsxs)(L,{className:"max-w-80",children:[f,p]}),e[28]=f,e[29]=p,e[30]=c):c=e[30];let S=`issues-status-${s.hash}`,g;e[31]!==s.status?(g=ss(s.status),e[31]=s.status,e[32]=g):g=e[32];let I;e[33]!==s.status||e[34]!==S||e[35]!==g?(I=(0,t.jsx)(L,{children:(0,t.jsx)(me,{"data-testid":S,variant:g,children:s.status})}),e[33]=s.status,e[34]=S,e[35]=g,e[36]=I):I=e[36];let R=s.severity??Se,l;e[37]!==a?(l=a("Set severity"),e[37]=a,e[38]=l):l=e[38];let oe=`issues-severity-${s.hash}`,q;e[39]!==a?(q=a("\u2014"),e[39]=a,e[40]=q):q=e[40];let N;e[41]!==s.severity||e[42]!==a?(N=s.severity===void 0?(0,t.jsx)("span",{className:"text-muted-foreground",children:a("\u2014")}):(0,t.jsx)(me,{variant:ts(s.severity),children:s.severity}),e[41]=s.severity,e[42]=a,e[43]=N):N=e[43];let A;e[44]!==q||e[45]!==N?(A=(0,t.jsx)(De,{placeholder:q,children:N}),e[44]=q,e[45]=N,e[46]=A):A=e[46];let V;e[47]!==l||e[48]!==oe||e[49]!==A?(V=(0,t.jsx)(Fe,{"aria-label":l,className:"h-7 w-[110px]","data-testid":oe,children:A}),e[47]=l,e[48]=oe,e[49]=A,e[50]=V):V=e[50];let de;e[51]===Symbol.for("react.memo_cache_sentinel")?(de=Pe.map(rs),e[51]=de):de=e[51];let F;e[52]!==a?(F=a("Clear"),e[52]=a,e[53]=F):F=e[53];let O;e[54]!==F?(O=(0,t.jsxs)(Oe,{children:[de,(0,t.jsx)(we,{value:Se,children:F})]}),e[54]=F,e[55]=O):O=e[55];let U;e[56]!==u||e[57]!==z||e[58]!==R||e[59]!==V||e[60]!==O?(U=(0,t.jsx)(L,{children:(0,t.jsxs)(We,{disabled:u,onValueChange:z,value:R,children:[V,O]})}),e[56]=u,e[57]=z,e[58]=R,e[59]=V,e[60]=O,e[61]=U):U=e[61];let B;e[62]!==a?(B=a("Assignee"),e[62]=a,e[63]=B):B=e[63];let fe=`issues-assignee-${s.hash}`,xe=s.assignee??"",ve=s.assignee??"",G;e[64]!==a?(G=a("Unassigned"),e[64]=a,e[65]=G):G=e[65];let H;e[66]!==u||e[67]!==_||e[68]!==B||e[69]!==fe||e[70]!==xe||e[71]!==ve||e[72]!==G?(H=(0,t.jsx)(L,{children:(0,t.jsx)(ke,{"aria-label":B,className:"h-7 w-32","data-testid":fe,defaultValue:xe,disabled:u,onKeyDown:_,placeholder:G},ve)}),e[66]=u,e[67]=_,e[68]=B,e[69]=fe,e[70]=xe,e[71]=ve,e[72]=G,e[73]=H):H=e[73];let J;e[74]!==s.count?(J=(0,t.jsx)(L,{className:"text-right",children:(0,t.jsx)(me,{variant:"secondary",children:s.count})}),e[74]=s.count,e[75]=J):J=e[75];let P;e[76]!==s.lastSeen?(P=_e(s.lastSeen),e[76]=s.lastSeen,e[77]=P):P=e[77];let Q;e[78]!==P?(Q=(0,t.jsx)(L,{className:"text-xs tabular-nums text-muted-foreground",children:P}),e[78]=P,e[79]=Q):Q=e[79];let X;e[80]!==u||e[81]!==s.hash||e[82]!==s.status||e[83]!==i||e[84]!==a?(X=s.status!=="resolved"&&(0,t.jsx)(ie,{"data-testid":`issues-resolve-${s.hash}`,disabled:u,onClick:d(()=>{re(i(s.hash,Qe,{}))},"onClick"),size:"xs",variant:"outline",children:a("Resolve")}),e[80]=u,e[81]=s.hash,e[82]=s.status,e[83]=i,e[84]=a,e[85]=X):X=e[85];let Y;e[86]!==u||e[87]!==s.hash||e[88]!==s.status||e[89]!==i||e[90]!==a?(Y=s.status!=="ignored"&&(0,t.jsx)(ie,{"data-testid":`issues-ignore-${s.hash}`,disabled:u,onClick:d(()=>{re(i(s.hash,Xe,{}))},"onClick"),size:"xs",variant:"ghost",children:a("Ignore")}),e[86]=u,e[87]=s.hash,e[88]=s.status,e[89]=i,e[90]=a,e[91]=Y):Y=e[91];let Z;e[92]!==u||e[93]!==s.assignee||e[94]!==s.hash||e[95]!==s.status||e[96]!==i||e[97]!==a?(Z=s.status!=="open"&&(0,t.jsx)(ie,{"data-testid":`issues-reopen-${s.hash}`,disabled:u,onClick:d(()=>{re(i(s.hash,Ue,{assignee:s.assignee??null}))},"onClick"),size:"xs",variant:"ghost",children:a("Reopen")}),e[92]=u,e[93]=s.assignee,e[94]=s.hash,e[95]=s.status,e[96]=i,e[97]=a,e[98]=Z):Z=e[98];let ee;e[99]!==X||e[100]!==Y||e[101]!==Z?(ee=(0,t.jsx)(L,{className:"text-right",children:(0,t.jsxs)("div",{className:"flex justify-end gap-1",children:[X,Y,Z]})}),e[99]=X,e[100]=Y,e[101]=Z,e[102]=ee):ee=e[102];let se;e[103]!==c||e[104]!==I||e[105]!==U||e[106]!==H||e[107]!==J||e[108]!==Q||e[109]!==E||e[110]!==ee?(se=(0,t.jsxs)(pe,{"data-testid":E,children:[c,I,U,H,J,Q,ee]}),e[103]=c,e[104]=I,e[105]=U,e[106]=H,e[107]=J,e[108]=Q,e[109]=E,e[110]=ee,e[111]=se):se=e[111];let te;e[112]!==o||e[113]!==s||e[114]!==r?(te=(0,t.jsx)(as,{expanded:o,issue:s,shardKey:r},s.sampleMessage),e[112]=o,e[113]=s,e[114]=r,e[115]=te):te=e[115];let he;return e[116]!==se||e[117]!==te?(he=(0,t.jsxs)(t.Fragment,{children:[se,te]}),e[116]=se,e[117]=te,e[118]=he):he=e[118],he},"tt"),ks=d(n=>{let e=(0,ge.c)(38),{initialShardKey:u}=n,s=ue(),$=Ne(),{queryShardKey:i,setShardKey:r,shardKey:a}=ze(u),[o,T]=(0,ne.useState)("all"),[C,j]=(0,ne.useState)(ns),[K,z]=(0,ne.useState)(os),k;e[0]!==o?(k=o==="all"?{}:{status:o},e[0]=o,e[1]=k):k=e[1];let _;e[2]!==i?(_={live:!0,shardKey:i},e[2]=i,e[3]=_):_=e[3];let{data:E,error:h,liveError:x}=Ee(D.getIssues,k,_),M=E!==void 0,v;if(e[4]!==K||e[5]!==C||e[6]!==$||e[7]!==E||e[8]!==h||e[9]!==x||e[10]!==M||e[11]!==i||e[12]!==r||e[13]!==a||e[14]!==o||e[15]!==s){let y=es(E),b;e[17]!==$||e[18]!==i?(b=d(async(l,oe,q)=>{z(N=>{if(!N.has(l))return N;let A=new Map(N);return A.delete(l),A}),j(N=>new Set(N).add(l));try{await $.query(oe,{...q,hash:l},be(i))}catch(N){let A=Ke(N);z(V=>new Map(V).set(l,A))}j(N=>{let A=new Set(N);return A.delete(l),A})},"N"),e[17]=$,e[18]=i,e[19]=b):b=e[19];let w=b,m;e[20]!==s?(m=d(l=>s(l==="all"?"All":l==="open"?"Open":l==="resolved"?"Resolved":"Ignored"),"u"),e[20]=s,e[21]=m):m=e[21];let f=m,p;e[22]!==h?(p=h!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"issues-error",role:"alert",children:h}),e[22]=h,e[23]=p):p=e[23];let c;e[24]!==r||e[25]!==a?(c=(0,t.jsx)(Te,{onChange:r,testId:"issues-shard-input",value:a}),e[24]=r,e[25]=a,e[26]=c):c=e[26];let S;e[27]!==x?(S=(0,t.jsx)(Ve,{message:x,prefix:"issues"}),e[27]=x,e[28]=S):S=e[28];let g;e[29]!==o||e[30]!==f?(g=Je.map(l=>(0,t.jsx)(ie,{"data-active":o===l?"":void 0,"data-testid":`issues-filter-${l}`,onClick:d(()=>{T(l)},"onClick"),size:"xs",variant:o===l?"default":"outline",children:f(l)},l)),e[29]=o,e[30]=f,e[31]=g):g=e[31];let I;e[32]!==g?(I=(0,t.jsx)("div",{className:"ms-auto flex items-center gap-1","data-testid":"issues-status-filter",role:"group",children:g}),e[32]=g,e[33]=I):I=e[33];let R;e[34]!==I||e[35]!==c||e[36]!==S?(R=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,S,I]}),e[34]=I,e[35]=c,e[36]=S,e[37]=R):R=e[37],v=(0,t.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-issues-panel",children:[p,R,M&&y.length===0?(0,t.jsx)(Ce,{description:s("No grouped errors yet. When a function throws or a container crashes, matching errors fold into a single issue here."),testId:"issues-empty",title:s("No issues")}):(0,t.jsx)(Me,{className:"overflow-hidden py-0",children:(0,t.jsx)(Ae,{className:"px-0",children:(0,t.jsxs)(Le,{"data-testid":"issues-table",children:[(0,t.jsx)(je,{children:(0,t.jsxs)(pe,{children:[(0,t.jsx)(W,{children:s("Issue")}),(0,t.jsx)(W,{children:s("Status")}),(0,t.jsx)(W,{children:s("Severity")}),(0,t.jsx)(W,{children:s("Assignee")}),(0,t.jsx)(W,{className:"text-right",children:s("Events")}),(0,t.jsx)(W,{children:s("Last seen")}),(0,t.jsx)(W,{className:"text-right",children:s("Actions")})]})}),(0,t.jsx)(Re,{children:y.map(l=>(0,t.jsx)(is,{busy:C.has(l.hash),issue:l,rowError:K.get(l.hash),runTriage:w,shardKey:i},l.hash))})]})})})]}),e[4]=K,e[5]=C,e[6]=$,e[7]=E,e[8]=h,e[9]=x,e[10]=M,e[11]=i,e[12]=r,e[13]=a,e[14]=o,e[15]=s,e[16]=v}else v=e[16];return v},"kt");function ls(n){return!n}d(ls,"st");function rs(n){return(0,t.jsx)(we,{value:n,children:n},n)}d(rs,"at");function ns(){return new Set}d(ns,"it");function os(){return new Map}d(os,"rt");export{ks as default};
@@ -1 +0,0 @@
1
- import{a as D}from"./chunk-XXQUMVWH.js";import{a as U}from"./chunk-JKSUHSHA.js";import{b as q}from"./chunk-QLQADHFE.js";import{d as A,h as C,j as H,k as O}from"./chunk-IUYFXK4X.js";import{a as V}from"./chunk-5DVJR52Z.js";import{a as y,e as I,g as T,h as _}from"./chunk-3XIESWL4.js";var G=I(T(),1);var i=I(_(),1);var K=y(S=>{let e=(0,G.c)(38),{className:w,error:t,testId:N}=S,g=A(),r=q(),l,s,n,a,c,m,o,d;if(e[0]!==w||e[1]!==t||e[2]!==r||e[3]!==N){let j=H(t),h;e[12]!==t?(h=O(t),e[12]=t,e[13]=h):h=e[13],s=h;let x;e[14]!==t?(x=U(t),e[14]=t,e[15]=x):x=e[15];let k=x,v;e[16]!==r||e[17]!==k?(v=y(()=>{r?.openConsole({errorsOnly:!0,seq:k})},"x"),e[16]=r,e[17]=k,e[18]=v):v=e[18],n=v,l=D,a=w,c=N,m="destructive";let u;e[19]!==t?(u=C(t),e[19]=t,e[20]=u):u=e[20],e[21]!==u?(o=(0,i.jsx)("p",{className:"font-medium",children:u}),e[21]=u,e[22]=o):o=e[22],d=j===void 0?null:(0,i.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-xs opacity-90",children:V(j)}),e[0]=w,e[1]=t,e[2]=r,e[3]=N,e[4]=l,e[5]=s,e[6]=n,e[7]=a,e[8]=c,e[9]=m,e[10]=o,e[11]=d}else l=e[4],s=e[5],n=e[6],a=e[7],c=e[8],m=e[9],o=e[10],d=e[11];let p;e[23]!==s?(p=s===void 0?null:(0,i.jsx)("a",{"aria-label":"View documentation for this error",className:"mt-1 inline-block text-xs underline",href:s,rel:"noreferrer",target:"_blank",children:"View error docs"}),e[23]=s,e[24]=p):p=e[24];let f;e[25]!==r||e[26]!==n||e[27]!==g?(f=r===void 0?null:(0,i.jsx)("button",{className:"mt-1 block text-xs underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":"error-show-in-console",onClick:n,type:"button",children:g("Show in console")}),e[25]=r,e[26]=n,e[27]=g,e[28]=f):f=e[28];let b;return e[29]!==l||e[30]!==a||e[31]!==c||e[32]!==m||e[33]!==o||e[34]!==d||e[35]!==p||e[36]!==f?(b=(0,i.jsxs)(l,{className:a,testId:c,variant:m,children:[o,d,p,f]}),e[29]=l,e[30]=a,e[31]=c,e[32]=m,e[33]=o,e[34]=d,e[35]=p,e[36]=f,e[37]=b):b=e[37],b},"G");export{K as a};
@@ -1 +0,0 @@
1
- import{a as f,e as i,f as h,g as E}from"./chunk-3XIESWL4.js";var m=i(E(),1),e=i(h(),1);var R=5e3,p=f((s,r,l)=>{let t=(0,m.c)(6),o=l===void 0?R:l,u=(0,e.useRef)(s),n;t[0]!==s?(n=f(()=>{u.current=s},"n"),t[0]=s,t[1]=n):n=t[1],(0,e.useEffect)(n);let a,c;t[2]!==r||t[3]!==o?(a=f(()=>{if(!r)return;let d=setInterval(()=>{globalThis.document?.hidden!==!0&&u.current()},o);return()=>{clearInterval(d)}},"c"),c=[r,o],t[2]=r,t[3]=o,t[4]=a,t[5]=c):(a=t[4],c=t[5]),(0,e.useEffect)(a,c)},"h");export{p as a};
@@ -1 +0,0 @@
1
- import{b as y}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as R}from"./chunk-53C44DRG.js";import"./chunk-XXQUMVWH.js";import"./chunk-JKSUHSHA.js";import"./chunk-QLQADHFE.js";import{a as v}from"./chunk-VDW32UET.js";import{c as $}from"./chunk-NWFRUF4E.js";import"./chunk-WNX3CW2W.js";import"./chunk-XBDKZZ67.js";import{a as S}from"./chunk-XQCVZAGU.js";import{a as A,b as I,c as j,d as x,e as n,f as c}from"./chunk-WJQLNYGX.js";import{a as k,e as w}from"./chunk-WQH3LT2P.js";import{d as b}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as f,e as N,g as _,h as D}from"./chunk-3XIESWL4.js";var T=N(_(),1);var r=N(D(),1);var E=f((e,t)=>({delete:e("Delete"),list:e("List"),read:e("Read"),write:e("Write")})[t],"E"),C={delete:2,list:3,read:0,write:1},O=f(e=>[...e].toSorted((t,a)=>t.bucket.localeCompare(a.bucket)||C[t.on]-C[a.on]||(t.prefix??"").localeCompare(a.prefix??"")),"T"),q=f(()=>{let e=(0,T.c)(14),t=b(),a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={},e[0]=a):a=e[0];let{data:l,error:i,errorSource:d}=$(v.storageRules,a),h=l!==void 0,m;if(e[1]!==l||e[2]!==i||e[3]!==d||e[4]!==h||e[5]!==t){let g=O(Array.isArray(l?.rules)?l.rules:[]),u;e[7]!==i||e[8]!==d?(u=i!==null&&(0,r.jsx)(R,{error:d,testId:"storage-rules-error"}),e[7]=i,e[8]=d,e[9]=u):u=e[9];let o;e[10]!==t?(o=t("Storage rules are declared in code with defineStorageRule and gate ctx.storage access per bucket. This view is read-only."),e[10]=t,e[11]=o):o=e[11];let p;e[12]!==o?(p=(0,r.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"storage-rules-note",children:o}),e[12]=o,e[13]=p):p=e[13],m=(0,r.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-storage-rules-panel",children:[u,p,h&&g.length===0?(0,r.jsx)(S,{description:t("No defineStorageRule is wired through .use(storageRules(...)) in this deployment. Add one to gate object access by key prefix."),testId:"storage-rules-empty",title:t("No storage rules defined")}):(0,r.jsx)(k,{className:"overflow-hidden py-0",children:(0,r.jsx)(w,{className:"px-0",children:(0,r.jsxs)(A,{"data-testid":"storage-rules-table",children:[(0,r.jsx)(I,{children:(0,r.jsxs)(x,{children:[(0,r.jsx)(n,{children:t("Bucket")}),(0,r.jsx)(n,{children:t("Operation")}),(0,r.jsx)(n,{children:t("Key prefix")}),(0,r.jsx)(n,{children:t("Guarded by")})]})}),(0,r.jsx)(j,{children:g.map(s=>(0,r.jsxs)(x,{"data-testid":`storage-rule-${s.bucket}-${s.on}-${s.prefix??""}`,children:[(0,r.jsx)(c,{className:"font-mono text-xs",children:s.bucket}),(0,r.jsx)(c,{children:(0,r.jsx)(y,{variant:"secondary",children:E(t,s.on)})}),(0,r.jsx)(c,{className:"font-mono text-xs",children:s.prefix??(0,r.jsx)("span",{className:"text-muted-foreground",children:t("(whole bucket)")})}),(0,r.jsx)(c,{className:"font-mono text-xs text-muted-foreground",children:s.procedure})]},`${s.bucket}:${s.on}:${s.prefix??""}:${s.procedure}`))})]})})})]}),e[1]=l,e[2]=i,e[3]=d,e[4]=h,e[5]=t,e[6]=m}else m=e[6];return m},"W");export{q as default};
@@ -1 +0,0 @@
1
- import{b as we}from"./chunk-OBMNLQWG.js";import{a as Ne}from"./chunk-QWGT25SE.js";import{b as ve,c as ye}from"./chunk-KUVMORDQ.js";import{a as ge}from"./chunk-3DH35OZ5.js";import{a as xe}from"./chunk-IGCNMZSB.js";import"./chunk-IVFHIQOT.js";import"./chunk-QBWRC5YX.js";import{a as fe}from"./chunk-3CWGJYBB.js";import{a as he}from"./chunk-RMN2JN4S.js";import{b as pe}from"./chunk-GRL5MG3Z.js";import"./chunk-7T7UOTYK.js";import{R as me}from"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import"./chunk-DJZYD5I5.js";import"./chunk-2OUPA2WJ.js";import{b as oe}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as be}from"./chunk-53C44DRG.js";import"./chunk-XXQUMVWH.js";import"./chunk-JKSUHSHA.js";import"./chunk-QLQADHFE.js";import{a as ce}from"./chunk-VDW32UET.js";import{c as ie}from"./chunk-NWFRUF4E.js";import"./chunk-WNX3CW2W.js";import"./chunk-XBDKZZ67.js";import{a as ue}from"./chunk-XQCVZAGU.js";import{d as W,r as de}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as m,e as le,f as _e,g as $e,h as Ce,j as te}from"./chunk-3XIESWL4.js";var B=le($e(),1),O=le(_e(),1);var s=le(Ce(),1);var Me=m(n=>Math.min(100,Math.max(0,n)),"ie"),Le=m((n,e)=>{if(!Number.isFinite(e)||e<=0)return{leftPercent:0,widthPercent:100};let t=Me(n.offsetMs/e*100),a=n.durationMs/e*100,l=Math.max(.5,Math.min(Me(a),100-t));return{leftPercent:t,widthPercent:l}},"_e"),Te=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)))},"Te"),j=m(n=>Number.isFinite(n)?n>0&&n<1?`${n.toFixed(2)}ms`:`${String(Math.round(n))}ms`:"\u2014","U"),Pe=m(n=>!Number.isFinite(n)||n<=0?[]:Array.from({length:4},(e,t)=>{let a=(t+1)/4;return{label:j(n*a),percent:a*100}}),"Le"),Ie=m(n=>{if(typeof n=="string")return n;try{return JSON.stringify(n)}catch{return String(n)}},"ue"),ee=m(n=>{let e=(0,B.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},"V"),Ke=m(n=>{let e=(0,B.c)(68),{span:t}=n,a=W(),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 p;e[24]!==t.parentSpanId||e[25]!==a?(p=t.parentSpanId===""?a("\u2014 (trace root)"):t.parentSpanId,e[24]=t.parentSpanId,e[25]=a,e[26]=p):p=e[26];let h;e[27]!==p||e[28]!==M?(h=(0,s.jsx)(ee,{label:M,value:p}),e[27]=p,e[28]=M,e[29]=h):h=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:j(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=j(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]!==h||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,h,S,x,N]}),e[50]=h,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(De)})]}),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(Ee)})]}),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},"Pe");function De(n){let[e,t]=n;return(0,s.jsx)(ee,{label:e,value:Ie(t)},e)}m(De,"Ce");function Fe(n){let[e,t]=n;return`${e}=${Ie(t)}`}m(Fe,"Fe");function Ee(n){return(0,s.jsxs)("li",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:de(n.ts)}),(0,s.jsx)(oe,{variant:"secondary",children:n.name}),(0,s.jsx)("span",{className:"min-w-0 break-all text-muted-foreground",children:Object.entries(n.attributes??{}).map(Fe).join(" ")})]},`${n.name}:${String(n.ts)}`)}m(Ee,"Ke");var Ae=14,Se="grid grid-cols-[14rem_1fr_4rem_16rem_16rem] items-center gap-2 px-3",Oe=m(n=>{let e=(0,B.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=Pe(t);if(v.length===0){i=null;break e}e[7]===Symbol.for("react.memo_cache_sentinel")?(r=te(Se,"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"),Be=m(n=>{let e=(0,B.c)(60),{span:t,traceDurationMs:a}=n,l=W(),[r,o]=(0,O.useState)(!1),d;e[0]!==t||e[1]!==a?(d=Le(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=Ne(t.attributes),e[3]=t.attributes,e[4]=c):c=e[4];let v=c,$=t.depth*Ae,_;e[5]!==$?(_={paddingLeft:$},e[5]=$,e[6]=_):_=e[6];let y=_,w=`${String(i)}%`,M=`${String(u)}%`,p;e[7]!==w||e[8]!==M?(p={left:w,width:M},e[7]=w,e[8]=M,e[9]=p):p=e[9];let h=p,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:j(t.durationMs),failure:t.error===void 0?"":l(", failed: {message}",{message:t.error.message}),name:t.name,offset:j(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(Se,"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 R=t.ok?"bg-primary/70":"bg-destructive",L;e[24]!==R?(L=te("absolute inset-y-0 rounded-sm",R),e[24]=R,e[25]=L):L=e[25];let A;e[26]!==h||e[27]!==i||e[28]!==L||e[29]!==u?(A=(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:h})}),e[26]=h,e[27]=i,e[28]=L,e[29]=u,e[30]=A):A=e[30];let J;e[31]!==t.durationMs?(J=j(t.durationMs),e[31]=t.durationMs,e[32]=J):J=e[32];let D;e[33]!==J?(D=(0,s.jsx)("span",{className:"text-right tabular-nums text-muted-foreground",children:J}),e[33]=J,e[34]=D):D=e[34];let U;e[35]!==t.error?(U=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]=U):U=e[36];let T;e[37]!==U?(T=(0,s.jsx)("span",{className:"truncate text-muted-foreground",children:U}),e[37]=U,e[38]=T):T=e[38];let q;e[39]!==v?(q=v===""?null:(0,s.jsx)("span",{"data-testid":"tr-span-attributes",title:v,children:v}),e[39]=v,e[40]=q):q=e[40];let P;e[41]!==q?(P=(0,s.jsx)("span",{className:"truncate text-muted-foreground",children:q}),e[41]=q,e[42]=P):P=e[42];let z;e[43]!==r||e[44]!==I||e[45]!==g||e[46]!==k||e[47]!==N||e[48]!==A||e[49]!==D||e[50]!==T||e[51]!==P?(z=(0,s.jsxs)("button",{"aria-controls":I,"aria-expanded":r,"aria-label":g,className:x,"data-testid":k,onClick:C,type:"button",children:[N,A,D,T,P]}),e[43]=r,e[44]=I,e[45]=g,e[46]=k,e[47]=N,e[48]=A,e[49]=D,e[50]=T,e[51]=P,e[52]=z):z=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)(Ke,{span:t})}),e[53]=r,e[54]=t,e[55]=F):F=e[55];let K;return e[56]!==t.depth||e[57]!==z||e[58]!==F?(K=(0,s.jsxs)("li",{"data-depth":S,"data-testid":"tr-span-row",children:[z,F]}),e[56]=t.depth,e[57]=z,e[58]=F,e[59]=K):K=e[59],K},"Ee"),Re=m(n=>{let e=(0,B.c)(15),{durationMs:t,spans:a}=n,l=W(),r;e[0]!==t?(r=(0,s.jsx)(Oe,{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)(Be,{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},"Ae");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,"Be");function Ue(n){return!n}m(Ue,"Oe");var qe=m(n=>Array.isArray(n?.traces)?n.traces:[],"Re"),ze=m(n=>{let e=(0,B.c)(12),{entries:t}=n,a=W(),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(je),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},"Je"),We=m(n=>{let e=(0,B.c)(50),{expanded:t,logs:a,onToggle:l,trace:r}=n,o=W(),d;e[0]!==l||e[1]!==r.traceId?(d=m(()=>{l(r.traceId)},"d"),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=j(r.durationMs),e[9]=r.durationMs,e[10]=M):M=e[10];let p;e[11]!==M?(p=(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]=p):p=e[12];let h;e[13]!==o||e[14]!==r.spans.length?(h=o("{count} spans",{count:r.spans.length}),e[13]=o,e[14]=r.spans.length,e[15]=h):h=e[15];let b;e[16]!==h?(b=(0,s.jsx)("span",{className:"w-20 shrink-0 text-right font-mono text-xs tabular-nums text-muted-foreground",children:h}),e[16]=h,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)(oe,{variant:C,children:S})}),e[21]=C,e[22]=S,e[23]=I):I=e[23];let g;e[24]!==r.startTs?(g=de(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]!==p||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,p,b,I,x]}),e[28]=t,e[29]=i,e[30]=p,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)(Re,{durationMs:r.durationMs,spans:r.spans}),a.length>0&&(0,s.jsx)(ze,{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},"ze"),pt=m(n=>{let e=(0,B.c)(58),{initialShardKey:t}=n,a=W(),[l]=(0,O.useState)(ve),{queryShardKey:r,setShardKey:o,shardKey:d}=fe(l?.shardKey!==void 0&&l.shardKey!==""?l.shardKey:t??""),[i,u]=(0,O.useState)(l?.traceId??""),[c,v]=(0,O.useState)(!1),[$,_]=(0,O.useState)(He),y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[0]=y):y=e[0],(0,O.useEffect)(Ge,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:p,error:h,errorSource:b,isLoading:C,liveError:S}=ie(ce.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}=ie(ce.getLogs,I,x),f,N;e[8]!==p||e[9]!==r?(f=m(()=>{p!==void 0&&pe(r)},"p"),N=[p,r],e[8]=p,e[9]=r,e[10]=f,e[11]=N):(f=e[10],N=e[11]),(0,O.useEffect)(f,N);let R;if(e[12]!==p||e[13]!==h||e[14]!==b||e[15]!==$||e[16]!==C||e[17]!==S||e[18]!==k?.entries||e[19]!==c||e[20]!==i||e[21]!==o||e[22]!==d||e[23]!==a){let L=qe(p),A=p?.total??L.length,J=A>L.length,D=Te(L,i,c),U=Map.groupBy((k?.entries??[]).toReversed(),Qe),T;e[25]===Symbol.for("react.memo_cache_sentinel")?(T=m(E=>{u(E.target.value)},"P"),e[25]=T):T=e[25];let q=T,P;e[26]===Symbol.for("react.memo_cache_sentinel")?(P=m(E=>{_(ke=>{let ne=new Set(ke);return ne.has(E)?ne.delete(E):ne.add(E),ne})},"C"),e[26]=P):P=e[26];let z=P,F=h===null&&D.length===0&&!C,K;e[27]!==o||e[28]!==d?(K=(0,s.jsx)(he,{onChange:o,testId:"tr-shard-input",value:d}),e[27]=o,e[28]=d,e[29]=K):K=e[29];let H;e[30]!==a?(H=a("Search traces"),e[30]=a,e[31]=H):H=e[31];let G;e[32]!==a?(G=a("search trace, span, or function"),e[32]=a,e[33]=G):G=e[33];let Q;e[34]!==i||e[35]!==H||e[36]!==G?(Q=(0,s.jsx)(me,{"aria-label":H,className:"h-8 w-56","data-testid":"tr-search",onChange:q,placeholder:G,value:i}),e[34]=i,e[35]=H,e[36]=G,e[37]=Q):Q=e[37];let V;e[38]!==c?(V=(0,s.jsx)(ge,{checked:c,"data-testid":"tr-only-errors",id:"tr-only-errors",onCheckedChange:v}),e[38]=c,e[39]=V):V=e[39];let X;e[40]!==a?(X=a("Errors only"),e[40]=a,e[41]=X):X=e[41];let Y;e[42]!==V||e[43]!==X?(Y=(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",htmlFor:"tr-only-errors",children:[V,X]}),e[42]=V,e[43]=X,e[44]=Y):Y=e[44];let Z;e[45]!==S?(Z=(0,s.jsx)(xe,{message:S,prefix:"tr"}),e[45]=S,e[46]=Z):Z=e[46];let re;e[47]!==K||e[48]!==Q||e[49]!==Y||e[50]!==Z?(re=(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[K,Q,Y,Z]}),e[47]=K,e[48]=Q,e[49]=Y,e[50]=Z,e[51]=re):re=e[51];let ae;e[52]!==h||e[53]!==b?(ae=h!==null&&(0,s.jsx)(be,{error:b,testId:"tr-error"}),e[52]=h,e[53]=b,e[54]=ae):ae=e[54];let se;e[55]!==F||e[56]!==a?(se=F&&(0,s.jsx)(ue,{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[55]=F,e[56]=a,e[57]=se):se=e[57],R=(0,s.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-traces-panel",children:[re,ae,se,h===null&&J&&(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:A})}),h===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(E=>(0,s.jsx)(We,{expanded:$.has(E.traceId),logs:U.get(E.traceId)??[],onToggle:z,trace:E},E.traceId))})]}),e[12]=p,e[13]=h,e[14]=b,e[15]=$,e[16]=C,e[17]=S,e[18]=k?.entries,e[19]=c,e[20]=i,e[21]=o,e[22]=d,e[23]=a,e[24]=R}else R=e[24];return R},"pt");function je(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)(we,{entry:n})},`${String(e)}:${String(n.timestamp)}`)}m(je,"Ue");function He(){return new Set}m(He,"We");function Ge(){ye()}m(Ge,"qe");function Qe(n){return n.traceId}m(Qe,"He");export{pt as default};
@@ -1 +0,0 @@
1
- import{a as n,e as r,f as c,g as m,h as u,j as i}from"./chunk-3XIESWL4.js";var p=r(m(),1),b=r(c(),1);var d=r(u(),1);function x(l){let e=(0,p.c)(8),t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=i("flex items-center gap-2 text-xs leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=(0,d.jsx)("label",{"data-slot":"label",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}n(x,"u");export{x as a};
@@ -1 +0,0 @@
1
- import{a as k}from"./chunk-AXQU7ULF.js";import{a as U}from"./chunk-XFGE43TZ.js";import"./chunk-KUVMORDQ.js";import"./chunk-HFRJMPXJ.js";import"./chunk-4UOFSGUS.js";import"./chunk-CZZWYUTR.js";import{a as E}from"./chunk-3CWGJYBB.js";import{a as A}from"./chunk-RMN2JN4S.js";import"./chunk-GRL5MG3Z.js";import"./chunk-SMIESS7P.js";import"./chunk-7T7UOTYK.js";import"./chunk-CFPZYHPY.js";import"./chunk-T6VMSOBB.js";import"./chunk-7QIFDWQV.js";import"./chunk-2OUPA2WJ.js";import{b as j}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as F}from"./chunk-53C44DRG.js";import"./chunk-XXQUMVWH.js";import"./chunk-JKSUHSHA.js";import"./chunk-QLQADHFE.js";import{a as T}from"./chunk-VDW32UET.js";import{c as S}from"./chunk-NWFRUF4E.js";import"./chunk-WNX3CW2W.js";import"./chunk-XBDKZZ67.js";import{a as O}from"./chunk-XQCVZAGU.js";import{a as w,e as C}from"./chunk-WQH3LT2P.js";import{d as I,r as $}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as p,e as K,g as D,h as H}from"./chunk-3XIESWL4.js";var M=K(D(),1);var m=K(H(),1);var L=p(r=>r.length===0?void 0:{max:Math.max(...r),mean:r.reduce((e,t)=>e+t,0)/r.length,min:Math.min(...r)},"F"),q=/^gen_ai\.evaluation\.(.+)\.score$/u,B=p(r=>{let e=[];for(let t of r)for(let s of t.spans)for(let[a,l]of Object.entries(s.attributes??{})){let o=q.exec(a);if(!o||typeof l!="number")continue;let i=o[1],c=s.attributes?.[`gen_ai.evaluation.${i}.label`];e.push({...typeof c=="string"?{label:c}:{},name:i,score:l,spanName:s.name,startTs:t.startTs+s.offsetMs,traceId:t.traceId})}return e.toSorted((t,s)=>s.startTs-t.startTs)},"U"),R=p(r=>{let e=[];for(let t of r?.series??[]){let s=q.exec(t.name);s&&e.push({name:s[1],points:t.points})}return e},"B"),V=p((r,e)=>{let t=new Set([...r.map(a=>a.name),...e.map(a=>a.name)]),s=[];for(let a of t){let l=r.filter(n=>n.name===a),o=e.find(n=>n.name===a)?.points??[],i=o.at(-1)?.last??l[0]?.score,c=o.length>0?{max:Math.max(...o.map(n=>n.max)),mean:o.reduce((n,d)=>n+d.sum,0)/o.reduce((n,d)=>n+d.count,0),min:Math.min(...o.map(n=>n.min))}:L(l.map(n=>n.score));s.push({...i===void 0?{}:{latest:i},...c,name:a,points:o,runs:l})}return s.toSorted((a,l)=>a.name.localeCompare(l.name))},"H"),z=p(r=>Array.isArray(r?.traces)?r.traces:[],"L"),N=p(r=>r===void 0?"\u2014":r.toFixed(2),"N"),G=p(r=>{let e=(0,M.c)(34),{card:t,onOpenTrace:s}=r,a=I(),l;e[0]!==t.name?(l=(0,m.jsx)("h3",{className:"font-mono text-sm font-semibold text-foreground","data-testid":"ev-name",children:t.name}),e[0]=t.name,e[1]=l):l=e[1];let o;e[2]!==t.latest?(o=N(t.latest),e[2]=t.latest,e[3]=o):o=e[3];let i;e[4]!==o?(i=(0,m.jsx)("span",{className:"font-mono text-lg text-foreground","data-testid":"ev-latest",children:o}),e[4]=o,e[5]=i):i=e[5];let c;e[6]!==l||e[7]!==i?(c=(0,m.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[l,i]}),e[6]=l,e[7]=i,e[8]=c):c=e[8];let n;e[9]!==t.max||e[10]!==t.mean||e[11]!==t.min||e[12]!==a?(n=a("min {min} \xB7 mean {mean} \xB7 max {max}",{max:N(t.max),mean:N(t.mean),min:N(t.min)}),e[9]=t.max,e[10]=t.mean,e[11]=t.min,e[12]=a,e[13]=n):n=e[13];let d;e[14]!==n?(d=(0,m.jsx)("p",{className:"font-mono text-xs text-muted-foreground","data-testid":"ev-summary",children:n}),e[14]=n,e[15]=d):d=e[15];let f;e[16]!==t.name||e[17]!==t.points||e[18]!==a?(f=t.points.length>1?(0,m.jsx)(k,{ariaLabel:a("Score trend for {name}",{name:t.name}),className:"h-10 w-full",series:t.points.map(J),testId:"ev-trend"}):(0,m.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"ev-no-trend",children:a("No durable history yet \u2014 pass ctx.metrics to recordEvaluation to chart a trend.")}),e[16]=t.name,e[17]=t.points,e[18]=a,e[19]=f):f=e[19];let h;if(e[20]!==t.runs||e[21]!==s||e[22]!==a){let v;e[24]!==s||e[25]!==a?(v=p(u=>(0,m.jsxs)("div",{className:"flex items-center justify-between gap-2 font-mono text-xs","data-testid":"ev-run",children:[(0,m.jsxs)("span",{className:"truncate text-muted-foreground",children:[$(u.startTs)," \xB7 ",u.spanName]}),(0,m.jsxs)("span",{className:"flex items-center gap-2",children:[u.label===void 0?null:(0,m.jsx)(j,{variant:"outline",children:u.label}),(0,m.jsx)("span",{className:"text-foreground",children:N(u.score)}),s===void 0?null:(0,m.jsx)("button",{className:"text-muted-foreground underline-offset-2 hover:underline",onClick:p(()=>{s(u.traceId)},"onClick"),title:a("Open the trace {trace}",{trace:u.traceId}),type:"button",children:u.traceId.slice(0,8)})]})]},`${u.traceId}:${u.spanName}`),"x"),e[24]=s,e[25]=a,e[26]=v):v=e[26],h=t.runs.slice(0,5).map(v),e[20]=t.runs,e[21]=s,e[22]=a,e[23]=h}else h=e[23];let x;e[27]!==h?(x=(0,m.jsx)("div",{className:"flex flex-col gap-1",children:h}),e[27]=h,e[28]=x):x=e[28];let g;return e[29]!==c||e[30]!==d||e[31]!==f||e[32]!==x?(g=(0,m.jsx)(w,{"data-testid":"ev-card",children:(0,m.jsxs)(C,{className:"flex flex-col gap-3 p-4",children:[c,d,f,x]})}),e[29]=c,e[30]=d,e[31]=f,e[32]=x,e[33]=g):g=e[33],g},"R"),oe=p(r=>{let e=(0,M.c)(19),{initialShardKey:t}=r,s=I(),{queryShardKey:a,setShardKey:l,shardKey:o}=E(t),i=U(a),c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={},e[0]=c):c=e[0];let n;e[1]!==a?(n={live:!0,shardKey:a},e[1]=a,e[2]=n):n=e[2];let{data:d,error:f}=S(T.getTraces,c,n),h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h={},e[3]=h):h=e[3];let x;e[4]!==a?(x={live:!0,shardKey:a},e[4]=a,e[5]=x):x=e[5];let{data:g}=S(T.getMetricHistory,h,x),v;if(e[6]!==d||e[7]!==f||e[8]!==g||e[9]!==i||e[10]!==l||e[11]!==o||e[12]!==s){let u=V(B(z(d)),R(g)),y;e[14]!==l||e[15]!==o?(y=(0,m.jsx)(A,{onChange:l,testId:"ev-shard-input",value:o}),e[14]=l,e[15]=o,e[16]=y):y=e[16];let b;e[17]!==f?(b=f===null?null:(0,m.jsx)(F,{error:f,testId:"ev-error"}),e[17]=f,e[18]=b):b=e[18],v=(0,m.jsxs)("section",{className:"flex flex-col gap-4","data-testid":"ev-panel",children:[y,b,u.length===0?(0,m.jsx)(O,{description:s("Call recordEvaluation from a graded run and its score shows up here."),testId:"ev-empty",title:s("No evals recorded")}):(0,m.jsx)("div",{className:"grid gap-3 md:grid-cols-2",children:u.map(_=>(0,m.jsx)(G,{card:_,onOpenTrace:i},_.name))})]}),e[6]=d,e[7]=f,e[8]=g,e[9]=i,e[10]=l,e[11]=o,e[12]=s,e[13]=v}else v=e[13];return v},"ne");function J(r){return r.last}p(J,"V");export{oe as default};
@@ -1 +0,0 @@
1
- import{a as o}from"./chunk-3XIESWL4.js";var h=o(e=>{let t=0,n=0,r=0,a=0,l=0,i=0,c=0;for(let{metrics:s}of e){if(s===null){l+=1;continue}a+=1,t+=s.requests,n+=s.errors,r+=s.databaseSize??0,s.cache!==null&&(i+=s.cache.hits,c+=s.cache.hits+s.cache.misses)}return{failed:l,hitRate:c===0?null:i/c,reachable:a,totalDatabaseSize:r,totalErrors:n,totalRequests:t}},"u"),f=o((e,t)=>{let n=new Set,r=[];for(let a of["",e.trim(),...t])n.has(a)||(n.add(a),r.push(a));return r},"h"),u=o((e,t)=>{if(e.length===0)return 0;if(e.sort((r,a)=>r-a),t<=0)return e[0]??0;if(t>=100)return e.at(-1)??0;let n=Math.ceil(t/100*e.length)-1;return e[n]??0},"i"),p=o(e=>{let t=e.functions;if(!t||t.length===0)return{p90:0,p95:0};let n=1e3,r=[];for(let a of t){if(a.calls<=0)continue;let l=a.totalDurationMs/a.calls,i=Math.min(a.calls,n);for(let c=0;c<i;c+=1)r.push(l)}return r.length===0?{p90:0,p95:0}:{p90:u([...r],90),p95:u([...r],95)}},"f");var g=o(e=>e.map(t=>({...t,avgDurationMs:t.execCount>0?t.totalDurationMs/t.execCount:0})),"g");export{h as a,f as b,p as c,g as d};
@@ -1 +0,0 @@
1
- import{a as n,e as m,f as b,g as d}from"./chunk-3XIESWL4.js";var g=m(d(),1),i=m(b(),1);var p=n((s="local")=>{try{return s==="local"?globalThis.localStorage:globalThis.sessionStorage}catch{return}},"g"),h=n(function(s,t="local"){try{let r=p(t)?.getItem(s)??void 0,e=r===void 0?[]:JSON.parse(r);return Array.isArray(e)?e:[]}catch{return[]}},"u"),T=n((s,t,r="local")=>{let e=p(r);if(e!==void 0)try{e.setItem(s,JSON.stringify(t))}catch{}},"S"),v=n(function(s){let t=(0,g.c)(8),r;t[0]!==s?(r=n(()=>h(s),"e"),t[0]=s,t[1]=r):r=t[1];let[e,u]=(0,i.useState)(r),l=(0,i.useRef)(s),c,o;t[2]!==s||t[3]!==e?(c=n(()=>{if(l.current!==s){l.current=s,u(h(s));return}T(s,e)},"r"),o=[s,e],t[2]=s,t[3]=e,t[4]=c,t[5]=o):(c=t[4],o=t[5]),(0,i.useEffect)(c,o);let a;return t[6]!==e?(a=[e,u],t[6]=e,t[7]=a):a=t[7],a},"b"),I=n(function(s,t){let r=(0,g.c)(6),[e,u]=v(s),l;r[0]!==t||r[1]!==u?(l=n(f=>{u(y=>{let S=y[0]??t;return[typeof f=="function"?f(S):f]})},"c"),r[0]=t,r[1]=u,r[2]=l):l=r[2];let c=l,o=e[0]??t,a;return r[3]!==c||r[4]!==o?(a=[o,c],r[3]=c,r[4]=o,r[5]=a):a=r[5],a},"J"),J=n(s=>globalThis.crypto?.randomUUID?.()??`${s}-${globalThis.performance.now().toString(36)}`,"T");export{p as a,h as b,T as c,v as d,I as e,J as f};
@@ -1 +0,0 @@
1
- import{a as C}from"./chunk-V53KNYRN.js";import{a as T}from"./chunk-5Y3QLNWX.js";import{b as v}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as k}from"./chunk-53C44DRG.js";import"./chunk-XXQUMVWH.js";import"./chunk-JKSUHSHA.js";import"./chunk-QLQADHFE.js";import{a as S}from"./chunk-VDW32UET.js";import{c as b}from"./chunk-NWFRUF4E.js";import"./chunk-WNX3CW2W.js";import"./chunk-XBDKZZ67.js";import{a as c}from"./chunk-XQCVZAGU.js";import{a as w,b as A,c as O,d as f,e as l,f as s}from"./chunk-WJQLNYGX.js";import{a as y,e as N}from"./chunk-WQH3LT2P.js";import{d as x}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as n,e as p,f as $,h as L}from"./chunk-3XIESWL4.js";var F=p($(),1);var e=p(L(),1);var q=n(a=>{let t=a.trim();if(t.length===0)return{context:void 0,error:null};try{let o=JSON.parse(t);return o===null||typeof o!="object"||Array.isArray(o)?{context:void 0,error:"Targeting context must be a JSON object."}:{context:o,error:null}}catch{return{context:void 0,error:"Targeting context is not valid JSON."}}},"L"),D='{ "targetingKey": "user-123", "plan": "premium" }',M=n(a=>a.type==="object"?JSON.stringify(a.value):String(a.value),"V"),Y=n(({initialShardKey:a=""})=>{let t=x(),[o,j]=(0,F.useState)(""),{context:g,error:m}=q(o),I=g===void 0?{}:{context:g},{data:i,error:J,errorSource:K,liveError:E}=b(S.listFlags,I,{live:!0,shardKey:a}),u=i!==void 0,U=i?.configured??!1,h=Array.isArray(i?.flags)?[...i.flags].toSorted((r,V)=>r.key.localeCompare(V.key)):[],d;return u&&!U?d=(0,e.jsx)(c,{description:t("No @lunora/flags provider is wired in this deployment. Add lunora/flags.ts with defineFlags({ provider }) to gate code paths on feature flags."),testId:"flags-unconfigured",title:t("No flags provider configured")}):u&&h.length===0?d=(0,e.jsx)(c,{description:t('A flags provider is configured, but no handler reads a flag yet. Call ctx.flags.boolean("key", false) in a query, mutation, or action.'),testId:"flags-empty",title:t("No flags read")}):d=(0,e.jsx)(y,{className:"overflow-hidden py-0",children:(0,e.jsx)(N,{className:"px-0",children:(0,e.jsxs)(w,{"data-testid":"flags-table",children:[(0,e.jsx)(A,{children:(0,e.jsxs)(f,{children:[(0,e.jsx)(l,{children:t("Key")}),(0,e.jsx)(l,{children:t("Type")}),(0,e.jsx)(l,{children:t("Value")}),(0,e.jsx)(l,{children:t("Reason")}),(0,e.jsx)(l,{children:t("Variant")})]})}),(0,e.jsx)(O,{children:h.map(r=>(0,e.jsxs)(f,{"data-testid":`flags-row-${r.key}`,children:[(0,e.jsx)(s,{className:"font-mono text-xs",children:r.key}),(0,e.jsx)(s,{className:"font-mono text-xs text-muted-foreground",children:r.type}),(0,e.jsx)(s,{className:"font-mono text-xs",children:M(r)}),(0,e.jsx)(s,{children:r.errorCode===void 0?(0,e.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:r.reason??"\u2014"}):(0,e.jsx)(v,{"data-testid":`flags-error-${r.key}`,variant:"destructive",children:r.errorCode})}),(0,e.jsx)(s,{className:"font-mono text-xs text-muted-foreground",children:r.variant??"\u2014"})]},r.key))})]})})}),(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-flags-panel",children:[J!==null&&(0,e.jsx)(k,{error:K,testId:"flags-error"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t('Feature flags are read in code with ctx.flags.<type>("key", default). They evaluate through the OpenFeature provider configured in lunora/flags.ts; edit the targeting context below to see how each flag resolves for a given audience.')}),(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)(T,{htmlFor:"flags-targeting-context",children:t("Targeting context (JSON)")}),(0,e.jsx)(C,{className:"font-mono text-xs","data-testid":"flags-context-input",id:"flags-targeting-context",onChange:n(r=>{j(r.target.value)},"onChange"),placeholder:D,rows:3,value:o}),m!==null&&(0,e.jsx)("p",{className:"text-xs text-destructive","data-testid":"flags-context-error",role:"alert",children:t(m)}),E!==void 0&&(0,e.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"flags-live-error",role:"alert",children:t("Live updates unavailable; showing the last evaluation.")})]}),d]})},"X");export{Y as default};
@@ -1 +0,0 @@
1
- import{m as h,n as v}from"./chunk-HFRJMPXJ.js";import{a as u,e as p,g as x,h as y,j as g}from"./chunk-3XIESWL4.js";var b=p(x(),1);var s=p(y(),1);var N={value:{colors:{dark:["var(--foreground)"],light:["var(--foreground)"]},label:""}},j=u(i=>{let e=(0,b.c)(12),{ariaLabel:c,className:m,series:l,testId:d}=i;if(l.length<2)return null;let t;e[0]!==l?(t=l.slice(-40).map(w),e[0]=l,e[1]=t):t=e[1];let f=t,a;e[2]!==m?(a=g("h-6 w-[120px]",m),e[2]=m,e[3]=a):a=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsx)(v,{dataKey:"value"}),e[4]=o):o=e[4];let r;e[5]!==f?(r=(0,s.jsx)(h,{animationType:"none",barCategoryGap:1,className:"h-full w-full",config:N,data:f,children:o}),e[5]=f,e[6]=r):r=e[6];let n;return e[7]!==c||e[8]!==a||e[9]!==r||e[10]!==d?(n=(0,s.jsx)("div",{"aria-label":c,className:a,"data-testid":d,role:"img",children:r}),e[7]=c,e[8]=a,e[9]=r,e[10]=d,e[11]=n):n=e[11],n},"S");function w(i,e){return{index:e,value:i}}u(w,"b");export{j as a};
@@ -1 +0,0 @@
1
- import{a as O,b as U}from"./chunk-AVAC26HJ.js";import{a as F}from"./chunk-IGCNMZSB.js";import{a as j}from"./chunk-3CWGJYBB.js";import{a as V}from"./chunk-RMN2JN4S.js";import"./chunk-GRL5MG3Z.js";import"./chunk-7T7UOTYK.js";import{R as C}from"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import"./chunk-2OUPA2WJ.js";import{b as L}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as z}from"./chunk-53C44DRG.js";import"./chunk-XXQUMVWH.js";import"./chunk-JKSUHSHA.js";import"./chunk-QLQADHFE.js";import{a as R}from"./chunk-VDW32UET.js";import{c as M}from"./chunk-NWFRUF4E.js";import"./chunk-WNX3CW2W.js";import"./chunk-XBDKZZ67.js";import{a as K}from"./chunk-XQCVZAGU.js";import{a as A,b as T,c as q,d as p,e as n,f as d}from"./chunk-WJQLNYGX.js";import{a as I,e as E}from"./chunk-WQH3LT2P.js";import{d as b,r as k}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as i,e as y,f as ee,h as te}from"./chunk-3XIESWL4.js";var o=y(ee(),1);var e=y(te(),1);var B=80,re=i(s=>{if(s===void 0)return"";let t=JSON.stringify(s);return t.length>B?`${t.slice(0,B)}\u2026`:t},"te"),ae=41,H=480,D=5,ie=i((s,t)=>O(s,l=>{t(l.height>0?l:{height:H,width:l.width})}),"ae"),Ne=i(({initialShardKey:s})=>{let t=b(),{queryShardKey:l,setShardKey:J,shardKey:P}=j(s),[c,W]=(0,o.useState)(""),{data:f,error:g,errorSource:Z,isLoading:_,liveError:$}=M(R.getAuditLog,{},{live:!0,shardKey:l}),h=(0,o.useMemo)(()=>f?.entries??[],[f]),m=(0,o.useMemo)(()=>{let a=c.trim().toLowerCase();return a===""?h:h.filter(r=>r.op.toLowerCase().includes(a)||(r.table??"").toLowerCase().includes(a)||(r.id??"").toLowerCase().includes(a))},[h,c]),x=(0,o.useRef)(null),v=U({count:m.length,estimateSize:i(()=>ae,"estimateSize"),getScrollElement:i(()=>x.current,"getScrollElement"),initialRect:{height:H,width:800},observeElementRect:ie,overscan:8}),u=v.getVirtualItems(),G=v.getTotalSize(),N=u[0]?.start??0,w=G-(u.at(-1)?.end??0),Q={height:N},X={height:w},Y=i(a=>{W(a.target.value)},"z");return(0,e.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-audit",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)(V,{onChange:J,testId:"au-shard-input",value:P}),(0,e.jsx)(F,{message:$,prefix:"au"}),(0,e.jsx)(C,{"aria-label":t("Filter audit log"),className:"h-8 w-48","data-testid":"au-search",onChange:Y,placeholder:t("filter op, table, id"),value:c})]}),g!==null&&(0,e.jsx)(z,{error:Z,testId:"au-error"}),g===null&&!_&&m.length===0&&(0,e.jsx)(K,{description:t("State-changing admin operations are recorded here."),icon:(0,e.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,e.jsx)("path",{d:"M8 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-2M9 3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V3Zm-1 9h8m-8 4h5"})}),testId:"au-empty",title:t("No audit entries.")}),m.length>0&&(0,e.jsx)(I,{className:"overflow-hidden py-0",children:(0,e.jsx)(E,{className:"max-h-[30rem] overflow-auto px-0",ref:x,children:(0,e.jsxs)(A,{"data-testid":"au-table",children:[(0,e.jsx)(T,{children:(0,e.jsxs)(p,{children:[(0,e.jsx)(n,{children:t("time")}),(0,e.jsx)(n,{children:t("op")}),(0,e.jsx)(n,{children:t("table")}),(0,e.jsx)(n,{children:t("id")}),(0,e.jsx)(n,{children:t("detail")})]})}),(0,e.jsxs)(q,{children:[N>0&&(0,e.jsx)("tr",{"aria-hidden":"true",children:(0,e.jsx)("td",{colSpan:D,style:Q})}),u.map(a=>{let r=m[a.index],S=re(r.detail);return(0,e.jsxs)(p,{"data-testid":"au-row",children:[(0,e.jsx)(d,{className:"text-muted-foreground tabular-nums",children:k(r.ts,"\u2014")}),(0,e.jsx)(d,{children:(0,e.jsx)(L,{variant:"secondary",children:r.op})}),(0,e.jsx)(d,{className:"font-medium",children:r.table??(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,e.jsx)(d,{className:"max-w-[20ch] truncate font-mono text-xs",children:r.id??(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,e.jsx)(d,{className:"max-w-[32ch] truncate font-mono text-xs text-muted-foreground",title:S||void 0,children:S||(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})})]},r.seq)}),w>0&&(0,e.jsx)("tr",{"aria-hidden":"true",children:(0,e.jsx)("td",{colSpan:D,style:X})})]})]})})})]})},"we");export{Ne as AuditPanel};
@@ -1 +0,0 @@
1
- import{a as Qe}from"./chunk-3DH35OZ5.js";import{a as Me}from"./chunk-EDQZJWAO.js";import{a as Ve}from"./chunk-ESVP44Y3.js";import{a as Je}from"./chunk-3SCGCJYS.js";import{a as D}from"./chunk-5Y3QLNWX.js";import{a as He}from"./chunk-54MMVNPT.js";import{a as Ke}from"./chunk-FURI47Z2.js";import"./chunk-IVFHIQOT.js";import"./chunk-QBWRC5YX.js";import{R as B}from"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import{a as z}from"./chunk-MWIKAR7F.js";import"./chunk-DJZYD5I5.js";import"./chunk-2OUPA2WJ.js";import{b as T}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{b as Ge}from"./chunk-NWFRUF4E.js";import{f as E}from"./chunk-WNX3CW2W.js";import"./chunk-XBDKZZ67.js";import{a as Ze}from"./chunk-XQCVZAGU.js";import{a as Ue,b as _e,c as $e,d as L,e as U,f as _}from"./chunk-WJQLNYGX.js";import{a as we,e as Ce}from"./chunk-WQH3LT2P.js";import{d as W,h as je,m as Ae,o as ze,r as Ie}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as r,e as Le,f as Ye,g as et,h as tt}from"./chunk-3XIESWL4.js";var k=Le(Ye(),1);var Z=Le(et(),1);var t=Le(tt(),1);var at=r(()=>{let u=(0,Z.c)(3),{config:e,ready:l}=Me(),s;return u[0]!==e.capabilities||u[1]!==l?(s={capabilities:e.capabilities,ready:l},u[0]=e.capabilities,u[1]=l,u[2]=s):s=u[2],s},"et"),st={boolean:"checkbox",date:"datetime-local",number:"number",string:"text"},lt=r((u,e)=>u.type==="boolean"?!0:typeof e!="string"||e.trim()===""?!1:u.type!=="number"||!Number.isNaN(Number(e.trim())),"at"),rt=r((u,e)=>{if(u.type==="boolean")return e===!0?{value:!0}:u.required?{value:!1}:void 0;let l=typeof e=="string"?e.trim():"";if(l!==""){if(u.type==="number"){let s=Number(l);return Number.isNaN(s)?void 0:{value:s}}return{value:l}}},"lt"),it=r(u=>{let e=(0,Z.c)(105),{onClose:l,onCreated:s}=u,c=E(),a=W(),{config:o}=Me(),{busy:i,error:n,run:m}=Je(),[w,S]=(0,k.useState)(""),[b,C]=(0,k.useState)(""),[y,I]=(0,k.useState)(""),[h,g]=(0,k.useState)(""),v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={},e[0]=v):v=e[0];let[f,d]=(0,k.useState)(v),A;e[1]===Symbol.for("react.memo_cache_sentinel")?(A=r(p=>{S(p.target.value)},"C"),e[1]=A):A=e[1];let x=A,F;e[2]===Symbol.for("react.memo_cache_sentinel")?(F=r(p=>{C(p.target.value)},"F"),e[2]=F):F=e[2];let O=F,P;e[3]===Symbol.for("react.memo_cache_sentinel")?(P=r(p=>{I(p.target.value)},"P"),e[3]=P):P=e[3];let Be=P,G;e[4]===Symbol.for("react.memo_cache_sentinel")?(G=r(p=>{g(p.target.value)},"O"),e[4]=G):G=e[4];let Te=G,H;e[5]===Symbol.for("react.memo_cache_sentinel")?(H=r((p,$)=>{d(V=>({...V,[p]:$}))},"G"),e[5]=H):H=e[5];let Pe=H,J;e[6]!==f?(J=r(p=>f[p.name]??(p.type==="boolean"?!1:""),"H"),e[6]=f,e[7]=J):J=e[7];let R=J,K;if(e[8]!==o.userFields||e[9]!==R){let p;e[11]!==R?(p=r($=>!$.required||lt($,R($)),"p"),e[11]=R,e[12]=p):p=e[12],K=o.userFields.every(p),e[8]=o.userFields,e[9]=R,e[10]=K}else K=e[10];let Fe=K,Q;e[13]!==i||e[14]!==w||e[15]!==b||e[16]!==Fe?(Q=!i&&w.trim()!==""&&b.trim()!==""&&Fe,e[13]=i,e[14]=w,e[15]=b,e[16]=Fe,e[17]=Q):Q=e[17];let De=Q,X;e[18]!==o.userFields||e[19]!==R?(X=r(()=>{let p={};for(let $ of o.userFields){let V=rt($,R($));V!==void 0&&(p[$.name]=V.value)}return Object.keys(p).length===0?void 0:p},"W"),e[18]=o.userFields,e[19]=R,e[20]=X):X=e[20];let Se=X,Y;e[21]!==Se||e[22]!==c||e[23]!==w||e[24]!==b||e[25]!==l||e[26]!==s||e[27]!==y||e[28]!==h||e[29]!==m?(Y=r(()=>{m(async()=>{await c.createAuthUser({data:Se(),email:w.trim(),name:b.trim(),password:y===""?void 0:y,role:h.trim()===""?void 0:h.trim()}),s(),l()})},"Z"),e[21]=Se,e[22]=c,e[23]=w,e[24]=b,e[25]=l,e[26]=s,e[27]=y,e[28]=h,e[29]=m,e[30]=Y):Y=e[30];let N=Y,j;e[31]!==a?(j=a("Create user"),e[31]=a,e[32]=j):j=e[32];let q;e[33]!==a?(q=a("Create user"),e[33]=a,e[34]=q):q=e[34];let M;e[35]!==q?(M=(0,t.jsx)("h2",{className:"text-sm font-semibold text-foreground",children:q}),e[35]=q,e[36]=M):M=e[36];let ee;e[37]!==a?(ee=a("email"),e[37]=a,e[38]=ee):ee=e[38];let te;e[39]!==ee?(te=(0,t.jsx)(D,{htmlFor:"uc-email",children:ee}),e[39]=ee,e[40]=te):te=e[40];let ae;e[41]!==w?(ae=(0,t.jsx)(B,{"data-testid":"uc-email",id:"uc-email",onChange:x,type:"email",value:w}),e[41]=w,e[42]=ae):ae=e[42];let se;e[43]!==te||e[44]!==ae?(se=(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[te,ae]}),e[43]=te,e[44]=ae,e[45]=se):se=e[45];let le;e[46]!==a?(le=a("name"),e[46]=a,e[47]=le):le=e[47];let re;e[48]!==le?(re=(0,t.jsx)(D,{htmlFor:"uc-name",children:le}),e[48]=le,e[49]=re):re=e[49];let ie;e[50]!==b?(ie=(0,t.jsx)(B,{"data-testid":"uc-name",id:"uc-name",onChange:O,value:b}),e[50]=b,e[51]=ie):ie=e[51];let ne;e[52]!==re||e[53]!==ie?(ne=(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[re,ie]}),e[52]=re,e[53]=ie,e[54]=ne):ne=e[54];let de;e[55]!==a?(de=a("Password (optional)"),e[55]=a,e[56]=de):de=e[56];let oe;e[57]!==de?(oe=(0,t.jsx)(D,{htmlFor:"uc-password",children:de}),e[57]=de,e[58]=oe):oe=e[58];let ce;e[59]!==y?(ce=(0,t.jsx)(B,{"data-testid":"uc-password",id:"uc-password",onChange:Be,type:"password",value:y}),e[59]=y,e[60]=ce):ce=e[60];let ue;e[61]!==oe||e[62]!==ce?(ue=(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[oe,ce]}),e[61]=oe,e[62]=ce,e[63]=ue):ue=e[63];let me;e[64]!==a?(me=a("Role (optional)"),e[64]=a,e[65]=me):me=e[65];let he;e[66]!==me?(he=(0,t.jsx)(D,{htmlFor:"uc-role",children:me}),e[66]=me,e[67]=he):he=e[67];let pe;e[68]!==h?(pe=(0,t.jsx)(B,{"data-testid":"uc-role",id:"uc-role",onChange:Te,value:h}),e[68]=h,e[69]=pe):pe=e[69];let fe;e[70]!==he||e[71]!==pe?(fe=(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[he,pe]}),e[70]=he,e[71]=pe,e[72]=fe):fe=e[72];let ve;e[73]!==o.userFields||e[74]!==R||e[75]!==a?(ve=o.userFields.length>0&&(0,t.jsxs)("div",{className:"flex flex-col gap-3 border-t border-border pt-3","data-testid":"uc-plugin-fields",children:[(0,t.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:a("Plugin fields")}),o.userFields.map(p=>{let $=`uc-field-${p.name}`,V=p.required?"":` (${a("optional")})`;if(p.type==="boolean"){let qe=R(p)===!0;return(0,t.jsxs)("label",{className:"flex items-center gap-2",htmlFor:$,children:[(0,t.jsx)(Qe,{checked:qe,"data-testid":$,id:$,onCheckedChange:r(Xe=>{Pe(p.name,Xe)},"onCheckedChange")}),(0,t.jsxs)("span",{className:"text-sm",children:[p.name,V]})]},p.name)}let We=R(p);return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)(D,{htmlFor:$,children:[p.name,V]}),(0,t.jsx)(B,{"data-testid":$,id:$,onChange:r(qe=>{Pe(p.name,qe.target.value)},"onChange"),type:st[p.type],value:typeof We=="string"?We:""})]},p.name)})]}),e[73]=o.userFields,e[74]=R,e[75]=a,e[76]=ve):ve=e[76];let xe;e[77]!==n?(xe=n!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"uc-error",role:"alert",children:n}),e[77]=n,e[78]=xe):xe=e[78];let be;e[79]!==a?(be=a("Cancel"),e[79]=a,e[80]=be):be=e[80];let ye;e[81]!==l||e[82]!==be?(ye=(0,t.jsx)(z,{"data-testid":"uc-cancel",onClick:l,size:"sm",type:"button",variant:"outline",children:be}),e[81]=l,e[82]=be,e[83]=ye):ye=e[83];let Oe=!De,ge;e[84]!==i||e[85]!==a?(ge=a(i?"Creating\u2026":"Create"),e[84]=i,e[85]=a,e[86]=ge):ge=e[86];let Ne;e[87]!==N||e[88]!==Oe||e[89]!==ge?(Ne=(0,t.jsx)(z,{"data-testid":"uc-submit",disabled:Oe,onClick:N,size:"sm",type:"button",children:ge}),e[87]=N,e[88]=Oe,e[89]=ge,e[90]=Ne):Ne=e[90];let ke;e[91]!==ye||e[92]!==Ne?(ke=(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[ye,Ne]}),e[91]=ye,e[92]=Ne,e[93]=ke):ke=e[93];let Re;return e[94]!==l||e[95]!==j||e[96]!==M||e[97]!==se||e[98]!==ne||e[99]!==ue||e[100]!==fe||e[101]!==ve||e[102]!==xe||e[103]!==ke?(Re=(0,t.jsxs)(Ve,{label:j,onClose:l,panelTestId:"uc-dialog",testId:"uc-overlay",variant:"dialog",children:[M,se,ne,ue,fe,ve,xe,ke]}),e[94]=l,e[95]=j,e[96]=M,e[97]=se,e[98]=ne,e[99]=ue,e[100]=fe,e[101]=ve,e[102]=xe,e[103]=ke,e[104]=Re):Re=e[104],Re},"st"),Ee=r(u=>{let e=(0,Z.c)(2),{children:l}=u,s;return e[0]!==l?(s=(0,t.jsx)("h3",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l}),e[0]=l,e[1]=s):s=e[1],s},"Le"),nt=r(u=>{let e=(0,Z.c)(29),{busy:l,runAction:s,userId:c,version:a}=u,o=E(),i=W(),[n,m]=(0,k.useState)(null),[w,S]=(0,k.useState)(null),b;e[0]!==o||e[1]!==c?(b=r(()=>{ze((async()=>{S(null);try{let x=await o.listAuthSessions({limit:50,userId:c});m(x.rows)}catch(x){let F=x;m(null),S(je(F))}})())},"x"),e[0]=o,e[1]=c,e[2]=b):b=e[2];let C;e[3]!==o||e[4]!==c||e[5]!==a?(C=[o,c,a],e[3]=o,e[4]=c,e[5]=a,e[6]=C):C=e[6],(0,k.useEffect)(b,C);let y;e[7]!==o||e[8]!==s?(y=r(x=>{s(()=>o.revokeAuthSession({sessionId:x}))},"y"),e[7]=o,e[8]=s,e[9]=y):y=e[9];let I=y,h;e[10]!==i?(h=i("Sessions"),e[10]=i,e[11]=h):h=e[11];let g;e[12]!==h?(g=(0,t.jsx)(Ee,{children:h}),e[12]=h,e[13]=g):g=e[13];let v;e[14]!==w?(v=w!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"ud-sessions-error",role:"alert",children:w}),e[14]=w,e[15]=v):v=e[15];let f;e[16]!==n||e[17]!==i?(f=n!==null&&n.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"ud-sessions-empty",children:i("No active sessions.")}),e[16]=n,e[17]=i,e[18]=f):f=e[18];let d;e[19]!==l||e[20]!==I||e[21]!==n||e[22]!==i?(d=n!==null&&n.length>0&&(0,t.jsx)(we,{className:"overflow-hidden py-0",children:(0,t.jsx)(Ce,{className:"px-0",children:(0,t.jsxs)(Ue,{"data-testid":"ud-sessions-table",children:[(0,t.jsx)(_e,{children:(0,t.jsxs)(L,{children:[(0,t.jsx)(U,{children:i("expires")}),(0,t.jsx)(U,{children:i("ip")}),(0,t.jsx)(U,{children:i("user agent")}),(0,t.jsx)(U,{"aria-label":i("Actions")})]})}),(0,t.jsx)($e,{children:n.map(x=>(0,t.jsxs)(L,{"data-testid":`ud-session-${x.id}`,children:[(0,t.jsx)(_,{className:"text-muted-foreground tabular-nums",children:Ie(x.expiresAt)}),(0,t.jsx)(_,{children:x.ipAddress??""}),(0,t.jsx)(_,{className:"max-w-40 truncate",children:x.userAgent??""}),(0,t.jsx)(_,{children:(0,t.jsx)(z,{"data-testid":`ud-revoke-${x.id}`,disabled:l,onClick:r(()=>{I(x.id)},"onClick"),size:"xs",type:"button",variant:"ghost",children:i("Revoke")})})]},x.id))})]})})}),e[19]=l,e[20]=I,e[21]=n,e[22]=i,e[23]=d):d=e[23];let A;return e[24]!==g||e[25]!==v||e[26]!==f||e[27]!==d?(A=(0,t.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"ud-sessions",children:[g,v,f,d]}),e[24]=g,e[25]=v,e[26]=f,e[27]=d,e[28]=A):A=e[28],A},"rt"),dt=r(u=>{let e=(0,Z.c)(30),{busy:l,runAction:s,userId:c,version:a}=u,o=E(),i=W(),[n,m]=(0,k.useState)(null),[w,S]=(0,k.useState)(null),b;e[0]!==o||e[1]!==c?(b=r(()=>{ze((async()=>{S(null);try{m(await o.listAuthAccounts({userId:c}))}catch(x){let F=x;m(null),S(je(F))}})())},"x"),e[0]=o,e[1]=c,e[2]=b):b=e[2];let C;e[3]!==o||e[4]!==c||e[5]!==a?(C=[o,c,a],e[3]=o,e[4]=c,e[5]=a,e[6]=C):C=e[6],(0,k.useEffect)(b,C);let y;e[7]!==o||e[8]!==s||e[9]!==c?(y=r(x=>{s(()=>o.unlinkAuthAccount({accountId:x,userId:c}))},"y"),e[7]=o,e[8]=s,e[9]=c,e[10]=y):y=e[10];let I=y,h;e[11]!==i?(h=i("Linked accounts"),e[11]=i,e[12]=h):h=e[12];let g;e[13]!==h?(g=(0,t.jsx)(Ee,{children:h}),e[13]=h,e[14]=g):g=e[14];let v;e[15]!==w?(v=w!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:w}),e[15]=w,e[16]=v):v=e[16];let f;e[17]!==n||e[18]!==i?(f=n!==null&&n.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("No linked accounts.")}),e[17]=n,e[18]=i,e[19]=f):f=e[19];let d;e[20]!==n||e[21]!==l||e[22]!==I||e[23]!==i?(d=n!==null&&n.length>0&&(0,t.jsx)(we,{className:"overflow-hidden py-0",children:(0,t.jsx)(Ce,{className:"px-0",children:(0,t.jsxs)(Ue,{"data-testid":"ud-accounts-table",children:[(0,t.jsx)(_e,{children:(0,t.jsxs)(L,{children:[(0,t.jsx)(U,{children:i("provider")}),(0,t.jsx)(U,{children:i("created")}),(0,t.jsx)(U,{"aria-label":i("Actions")})]})}),(0,t.jsx)($e,{children:n.map(x=>{let F=Ae(x.id);return(0,t.jsxs)(L,{"data-testid":`ud-account-${F}`,children:[(0,t.jsx)(_,{children:Ae(x.providerId)}),(0,t.jsx)(_,{className:"text-muted-foreground tabular-nums",children:Ie(x.createdAt)}),(0,t.jsx)(_,{children:(0,t.jsx)(z,{"data-testid":`ud-unlink-${F}`,disabled:l,onClick:r(()=>{I(F)},"onClick"),size:"xs",type:"button",variant:"ghost",children:i("Unlink")})})]},F)})})]})})}),e[20]=n,e[21]=l,e[22]=I,e[23]=i,e[24]=d):d=e[24];let A;return e[25]!==g||e[26]!==v||e[27]!==f||e[28]!==d?(A=(0,t.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"ud-accounts",children:[g,v,f,d]}),e[25]=g,e[26]=v,e[27]=f,e[28]=d,e[29]=A):A=e[29],A},"it"),ot=r(u=>{let e=(0,Z.c)(40),{busy:l,capabilities:s,runAction:c,userId:a,version:o}=u,i=E(),n=W(),[m,w]=(0,k.useState)(null),S;e[0]!==s.passkey||e[1]!==i||e[2]!==a?(S=r(()=>{s.passkey&&ze((async()=>{try{w(await i.listAuthPasskeys({userId:a}))}catch{w(null)}})())},"I"),e[0]=s.passkey,e[1]=i,e[2]=a,e[3]=S):S=e[3];let b;e[4]!==s.passkey||e[5]!==i||e[6]!==a||e[7]!==o?(b=[s.passkey,i,a,o],e[4]=s.passkey,e[5]=i,e[6]=a,e[7]=o,e[8]=b):b=e[8],(0,k.useEffect)(S,b);let C;e[9]!==i||e[10]!==c||e[11]!==a?(C=r(()=>{c(()=>i.disableAuthTwoFactor({userId:a}))},"w"),e[9]=i,e[10]=c,e[11]=a,e[12]=C):C=e[12];let y=C,I;e[13]!==i||e[14]!==c?(I=r(F=>{c(()=>i.deleteAuthPasskey({passkeyId:F}))},"A"),e[13]=i,e[14]=c,e[15]=I):I=e[15];let h=I,g;e[16]!==n?(g=n("Security"),e[16]=n,e[17]=g):g=e[17];let v;e[18]!==g?(v=(0,t.jsx)(Ee,{children:g}),e[18]=g,e[19]=v):v=e[19];let f;e[20]!==l||e[21]!==s.twoFactor||e[22]!==y||e[23]!==n?(f=s.twoFactor&&(0,t.jsx)(z,{"data-testid":"ud-disable-2fa",disabled:l,onClick:y,size:"sm",type:"button",variant:"outline",children:n("Disable two-factor")}),e[20]=l,e[21]=s.twoFactor,e[22]=y,e[23]=n,e[24]=f):f=e[24];let d;e[25]!==s.passkey||e[26]!==m||e[27]!==n?(d=s.passkey&&m!==null&&m.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:n("No passkeys.")}),e[25]=s.passkey,e[26]=m,e[27]=n,e[28]=d):d=e[28];let A;e[29]!==l||e[30]!==s.passkey||e[31]!==h||e[32]!==m||e[33]!==n?(A=s.passkey&&m!==null&&m.length>0&&(0,t.jsx)(we,{className:"overflow-hidden py-0",children:(0,t.jsx)(Ce,{className:"px-0",children:(0,t.jsxs)(Ue,{"data-testid":"ud-passkeys-table",children:[(0,t.jsx)(_e,{children:(0,t.jsxs)(L,{children:[(0,t.jsx)(U,{children:n("name")}),(0,t.jsx)(U,{children:n("created")}),(0,t.jsx)(U,{"aria-label":n("Actions")})]})}),(0,t.jsx)($e,{children:m.map(F=>{let O=Ae(F.id);return(0,t.jsxs)(L,{"data-testid":`ud-passkey-${O}`,children:[(0,t.jsx)(_,{children:Ae(F.name)||O}),(0,t.jsx)(_,{className:"text-muted-foreground tabular-nums",children:Ie(F.createdAt)}),(0,t.jsx)(_,{children:(0,t.jsx)(z,{"data-testid":`ud-delete-passkey-${O}`,disabled:l,onClick:r(()=>{h(O)},"onClick"),size:"xs",type:"button",variant:"ghost",children:n("Delete")})})]},O)})})]})})}),e[29]=l,e[30]=s.passkey,e[31]=h,e[32]=m,e[33]=n,e[34]=A):A=e[34];let x;return e[35]!==v||e[36]!==f||e[37]!==d||e[38]!==A?(x=(0,t.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"ud-security",children:[v,f,d,A]}),e[35]=v,e[36]=f,e[37]=d,e[38]=A,e[39]=x):x=e[39],x},"nt"),ct=/(?:at|expires)$/iu,ut=new Set(["banExpires","banned","banReason","email","emailVerified","id","name","role"]),mt=r((u,e)=>typeof e=="number"&&ct.test(u)?Ie(e):Ae(e),"ct"),ht=r(({capabilities:u,onChanged:e,onClose:l,user:s})=>{let c=E(),a=W(),o=s.banned===!0,[i,n]=(0,k.useState)(null),[m,w]=(0,k.useState)(!1),[S,b]=(0,k.useState)(0),[C,y]=(0,k.useState)(typeof s.role=="string"?s.role:""),[I,h]=(0,k.useState)(""),[g,v]=(0,k.useState)(""),[f,d]=(0,k.useState)(""),[A,x]=(0,k.useState)(null),[F,O]=(0,k.useState)(!1),P=r((N,j)=>{ze((async()=>{w(!0),n(null);try{let q=await N();j?.refresh!==!1&&(b(M=>M+1),e()),j?.onResult?.(q)}catch(q){n(je(q))}w(!1)})())},"P"),Be=r(N=>{y(N.target.value)},"De"),G=r(N=>{h(N.target.value)},"O"),Te=r(N=>{v(N.target.value)},"je"),H=r(N=>{d(N.target.value)},"G"),Pe=r(()=>{let N=C.trim();N!==""&&P(async()=>{await c.setAuthUserRole({role:N,userId:s.id})})},"Se"),J=r(()=>{let N=Number.parseInt(g,10),j=Number.isFinite(N)&&N>0?N*86400:void 0;P(async()=>{await c.banAuthUser({expiresInSeconds:j,reason:I.trim()===""?void 0:I.trim(),userId:s.id})})},"H"),R=r(()=>{P(async()=>{await c.unbanAuthUser({userId:s.id})})},"R"),K=r(()=>{P(async()=>{await c.setAuthUserPassword({newPassword:f,userId:s.id}),d("")})},"J"),Fe=r(()=>{P(()=>c.impersonateAuthUser({userId:s.id}),{onResult:r(N=>{x(N.token)},"onResult"),refresh:!1})},"we"),Q=r(()=>{P(async()=>{await c.revokeAuthUserSessions({userId:s.id})})},"K"),De=r(()=>{P(async()=>{await c.removeAuthUser({userId:s.id}),l()})},"Te"),X=r(()=>{O(!0)},"W"),Se=r(()=>{O(!1)},"Ce"),Y=Object.entries(s).filter(([N])=>!ut.has(N));return(0,t.jsxs)(Ve,{label:a("User details"),onClose:l,panelTestId:"ud-panel",testId:"ud-overlay",variant:"drawer",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-foreground",children:s.name??s.email??s.id}),(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:s.id}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 pt-1",children:[typeof s.role=="string"&&s.role!==""&&(0,t.jsx)(T,{variant:"secondary",children:s.role}),o?(0,t.jsx)(T,{variant:"destructive",children:a("Banned")}):(0,t.jsx)(T,{variant:"outline",children:a("Active")}),s.emailVerified===!0?(0,t.jsx)(T,{variant:"secondary",children:a("verified")}):(0,t.jsx)(T,{variant:"outline",children:a("unverified")})]})]}),(0,t.jsx)(z,{"data-testid":"ud-close",onClick:l,size:"sm",type:"button",variant:"ghost",children:a("Close")})]}),i!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"ud-action-error",role:"alert",children:i}),u.admin&&(0,t.jsxs)(we,{className:"gap-0 py-0",children:[(0,t.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,t.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:a("Actions")})}),(0,t.jsxs)(Ce,{className:"flex flex-col gap-3 p-3",children:[(0,t.jsxs)("div",{className:"flex items-end gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-1",children:[(0,t.jsx)(D,{htmlFor:"ud-role",children:a("Role")}),(0,t.jsx)(B,{"data-testid":"ud-role-input",id:"ud-role",onChange:Be,value:C})]}),(0,t.jsx)(z,{"data-testid":"ud-set-role",disabled:m||C.trim()==="",onClick:Pe,size:"sm",type:"button",variant:"outline",children:a("Set role")})]}),o?(0,t.jsx)(z,{"data-testid":"ud-unban",disabled:m,onClick:R,size:"sm",type:"button",variant:"outline",children:a("Unban")}):(0,t.jsxs)("div",{className:"flex items-end gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-1",children:[(0,t.jsx)(D,{htmlFor:"ud-ban-reason",children:a("Ban reason (optional)")}),(0,t.jsx)(B,{"data-testid":"ud-ban-reason",id:"ud-ban-reason",onChange:G,value:I})]}),(0,t.jsxs)("div",{className:"flex w-24 flex-col gap-1",children:[(0,t.jsx)(D,{htmlFor:"ud-ban-days",children:a("Days")}),(0,t.jsx)(B,{"data-testid":"ud-ban-days",id:"ud-ban-days",onChange:Te,type:"number",value:g})]}),(0,t.jsx)(z,{"data-testid":"ud-ban",disabled:m,onClick:J,size:"sm",type:"button",variant:"destructive",children:a("Ban user")})]}),(0,t.jsxs)("div",{className:"flex items-end gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-1",children:[(0,t.jsx)(D,{htmlFor:"ud-password",children:a("New password")}),(0,t.jsx)(B,{"data-testid":"ud-password",id:"ud-password",onChange:H,type:"password",value:f})]}),(0,t.jsx)(z,{"data-testid":"ud-set-password",disabled:m||f==="",onClick:K,size:"sm",type:"button",variant:"outline",children:a("Set password")})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(z,{"data-testid":"ud-impersonate",disabled:m,onClick:Fe,size:"sm",type:"button",variant:"outline",children:a("Impersonate")}),(0,t.jsx)(z,{"data-testid":"ud-revoke-all",disabled:m,onClick:Q,size:"sm",type:"button",variant:"outline",children:a("Revoke all sessions")}),F?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(z,{"data-testid":"ud-delete-confirm",disabled:m,onClick:De,size:"sm",type:"button",variant:"destructive",children:a("Confirm delete")}),(0,t.jsx)(z,{"data-testid":"ud-delete-cancel",onClick:Se,size:"sm",type:"button",variant:"ghost",children:a("Cancel")})]}):(0,t.jsx)(z,{"data-testid":"ud-delete",disabled:m,onClick:X,size:"sm",type:"button",variant:"destructive",children:a("Delete user")})]}),A!==null&&(0,t.jsxs)("div",{className:"flex flex-col gap-1","data-testid":"ud-impersonation",children:[(0,t.jsx)(D,{htmlFor:"ud-token",children:a("Impersonation token")}),(0,t.jsx)(B,{"data-testid":"ud-token",id:"ud-token",readOnly:!0,value:A})]})]})]}),(0,t.jsx)(nt,{busy:m,runAction:P,userId:s.id,version:S}),u.accounts&&(0,t.jsx)(dt,{busy:m,runAction:P,userId:s.id,version:S}),(u.twoFactor||u.passkey)&&(0,t.jsx)(ot,{busy:m,capabilities:u,runAction:P,userId:s.id,version:S}),(0,t.jsxs)("div",{className:"flex flex-col gap-1","data-testid":"ud-fields",children:[(0,t.jsx)("h3",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:a("Fields")}),(0,t.jsx)("dl",{className:"flex flex-col",children:Y.map(([N,j])=>(0,t.jsxs)("div",{className:"flex flex-col border-t border-border py-1.5",children:[(0,t.jsx)("dt",{className:"text-xs font-semibold text-muted-foreground",children:N}),(0,t.jsx)("dd",{className:"m-0 font-mono text-xs break-words",children:mt(N,j)})]},N))})]})]})},"ut"),pt=50,$t=r(({pageSize:u=pt}={})=>{let e=E(),l=W(),[s,c]=(0,k.useState)(""),[a,o]=(0,k.useState)(""),i=Ke(s),[n,m]=(0,k.useState)(null),[w,S]=(0,k.useState)(!1),{capabilities:b}=at(),C=i.trim(),y=a.trim(),I=Ge(["lunora-auth-users",C,y,u],()=>e.listAuthUsers({filterField:y===""?void 0:"role",filterValue:y===""?void 0:y,limit:u,search:C===""?void 0:C}),{keepPreviousData:!0}),h=I.data?.rows??null,g=I.error,v=r(()=>{I.refetch()},"v");He(()=>{I.refetch()},!0);let f=n===null?null:h?.find(d=>d.id===n)??null;return(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-users",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(B,{"aria-label":l("Search users"),className:"w-56","data-testid":"us-search",onChange:r(d=>{c(d.target.value)},"onChange"),placeholder:l("Search by email or name\u2026"),value:s}),(0,t.jsx)(B,{"aria-label":l("Filter by role"),className:"w-40","data-testid":"us-role-filter",onChange:r(d=>{o(d.target.value)},"onChange"),placeholder:l("Filter by role"),value:a}),(0,t.jsx)(z,{"data-testid":"us-new",onClick:r(()=>{S(!0)},"onClick"),size:"sm",type:"button",children:l("New user")})]}),g!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"us-users-error",role:"alert",children:g}),h!==null&&h.length===0&&(0,t.jsx)(Ze,{description:l("Users who sign up to your app will appear here."),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:"M16 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M9.5 10a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm11.5 10v-2a4 4 0 0 0-3-3.85"})}),testId:"us-empty",title:l("No users.")}),h!==null&&h.length>0&&(0,t.jsx)(we,{className:"overflow-hidden py-0",children:(0,t.jsx)(Ce,{className:"px-0",children:(0,t.jsxs)(Ue,{"data-testid":"us-table",children:[(0,t.jsx)(_e,{children:(0,t.jsxs)(L,{children:[(0,t.jsx)(U,{children:l("id")}),(0,t.jsx)(U,{children:l("email")}),(0,t.jsx)(U,{children:l("name")}),(0,t.jsx)(U,{children:l("role")}),(0,t.jsx)(U,{children:l("status")}),(0,t.jsx)(U,{children:l("verified")}),(0,t.jsx)(U,{children:l("created")}),(0,t.jsx)(U,{"aria-label":l("Actions")})]})}),(0,t.jsx)($e,{children:h.map(d=>(0,t.jsxs)(L,{"data-testid":`us-row-${d.id}`,children:[(0,t.jsx)(_,{className:"font-mono text-xs",children:d.id}),(0,t.jsx)(_,{children:d.email??""}),(0,t.jsx)(_,{children:d.name??""}),(0,t.jsx)(_,{children:typeof d.role=="string"&&d.role!==""?(0,t.jsx)(T,{variant:"secondary",children:d.role}):""}),(0,t.jsx)(_,{children:d.banned===!0?(0,t.jsx)(T,{variant:"destructive",children:l("Banned")}):(0,t.jsx)(T,{variant:"success",children:l("Active")})}),(0,t.jsx)(_,{children:d.emailVerified===!0?(0,t.jsx)(T,{variant:"success",children:l("yes")}):(0,t.jsx)(T,{variant:"outline",children:l("no")})}),(0,t.jsx)(_,{className:"text-muted-foreground tabular-nums",children:Ie(d.createdAt)}),(0,t.jsx)(_,{children:(0,t.jsx)(z,{"data-testid":`us-manage-${d.id}`,onClick:r(()=>{m(d.id)},"onClick"),size:"xs",type:"button",variant:"ghost",children:l("Manage")})})]},d.id))})]})})}),f!==null&&(0,t.jsx)(ht,{capabilities:b,onChanged:v,onClose:r(()=>{m(null)},"onClose"),user:f}),w&&(0,t.jsx)(it,{onClose:r(()=>{S(!1)},"onClose"),onCreated:v})]})},"Pt");export{$t as UsersPanel};
@@ -1 +0,0 @@
1
- import{a as Y}from"./chunk-Y32QIKBS.js";import{a as V}from"./chunk-3CWGJYBB.js";import{a as G}from"./chunk-RMN2JN4S.js";import{b as Q}from"./chunk-GRL5MG3Z.js";import{a as z}from"./chunk-SFDOII3B.js";import{e as P}from"./chunk-SMIESS7P.js";import"./chunk-7T7UOTYK.js";import"./chunk-CFPZYHPY.js";import"./chunk-T6VMSOBB.js";import"./chunk-7QIFDWQV.js";import{b as Z,c as ee}from"./chunk-5UY7MLRC.js";import{a as _,b as W}from"./chunk-QU33TT7V.js";import{a as U}from"./chunk-MWIKAR7F.js";import"./chunk-DJZYD5I5.js";import"./chunk-2OUPA2WJ.js";import"./chunk-6ST5ECQA.js";import"./chunk-53C44DRG.js";import"./chunk-XXQUMVWH.js";import"./chunk-JKSUHSHA.js";import"./chunk-QLQADHFE.js";import{a as I}from"./chunk-VDW32UET.js";import{c as M}from"./chunk-NWFRUF4E.js";import{f as B}from"./chunk-WNX3CW2W.js";import"./chunk-XBDKZZ67.js";import"./chunk-WJQLNYGX.js";import"./chunk-WQH3LT2P.js";import{d as A,f as H,g as K,o as k}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as l,e as L,f as fe,g as he,h as me}from"./chunk-3XIESWL4.js";var j=L(he(),1);var u=L(fe(),1);var $=L(me(),1);var pe=l(t=>{let{suggestedIndex:e,table:r}=t;return!(typeof r!="string"||r.length===0||typeof e!="object"||e===null||!Array.isArray(e.fields)||e.fields.length===0)},"pe"),be=l((t,e,r)=>{let a=`"${t}"`,n=`"${e}"`,o=r.map(c=>`"${c}"`).join(", ");return`CREATE INDEX IF NOT EXISTS ${n} ON ${a} (${o});`},"ge"),ge=l(t=>{let e=(0,j.c)(19),{fields:r,indexName:a,table:n,testId:o}=t,c=A(),[T,p]=(0,u.useState)(!1),f;e[0]!==r||e[1]!==a||e[2]!==n?(f=l(()=>{let S="navigator"in globalThis?globalThis.navigator.clipboard:void 0;if(S===void 0)return;let y=be(n,a,r);k(S.writeText(y)),p(!0)},"d"),e[0]=r,e[1]=a,e[2]=n,e[3]=f):f=e[3];let v=f;if(T){let S=`${o}-applied`,y;e[4]!==c?(y=c("CREATE INDEX SQL copied to clipboard."),e[4]=c,e[5]=y):y=e[5];let E;return e[6]!==S||e[7]!==y?(E=(0,$.jsx)("span",{className:"text-xs text-muted-foreground","data-testid":S,children:y}),e[6]=S,e[7]=y,e[8]=E):E=e[8],E}let w;e[9]!==c?(w=c("Apply?"),e[9]=c,e[10]=w):w=e[10];let h;e[11]!==c||e[12]!==n?(h=c("Apply index on {table}",{table:n}),e[11]=c,e[12]=n,e[13]=h):h=e[13];let x;return e[14]!==v||e[15]!==w||e[16]!==h||e[17]!==o?(x=(0,$.jsx)(Y,{confirmLabel:w,onConfirm:v,testId:o,children:h}),e[14]=v,e[15]=w,e[16]=h,e[17]=o,e[18]=x):x=e[18],x},"be"),ve=l((t,e)=>{let r=new Map;for(let a of e){let n=`${a.table} ${a.index}`;r.set(n,(r.get(n)??0)+a.reads)}return t.map(a=>({index:a.index,reads:r.get(`${a.table} ${a.index}`)??0,table:a.table}))},"xe"),xe=l(t=>{let e=new Map;for(let r of t)for(let a of r.scannedTables??[])e.set(a.table,(e.get(a.table)??0)+a.scans);return[...e].map(([r,a])=>({scans:a,table:r}))},"ye"),te=l((t,e)=>e.map(r=>({index:r.name,table:t})),"X"),ye=l(t=>{let e=ve(t.declaredIndexes??[],t.indexHits??[]),r=xe(t.functions??[]),a=t.shardTraffic??[],n=t.analyticsMetrics,o=n&&n.indexHits.length>0?n.indexHits:e,c=n&&n.tableScans.length>0?n.tableScans:r,T=n&&n.shardTraffic.length>0?n.shardTraffic:a,p=ee({indexHits:o,schema:{tables:[]},shardTraffic:T,tableScans:c},{lints:Z,source:"runtime"}),f=t.suppressHotScanTables;return(f===void 0?p:p.filter(v=>!(v.metadata.kind==="hot_scan"&&typeof v.metadata.table=="string"&&f.has(v.metadata.table)))).map(v=>_(v))},"ve"),we=H(I.listTables),Se=H(I.listTableIndexes),Te=H(I.listTablesIndexes),q=l(t=>`${(t*100).toFixed(1)}%`,"K"),ae=l(t=>`${(t/1e3).toFixed(2)}s`,"B"),$e=l(t=>{if(t.length<=1)return t[0]??"";let e=t[t.length-1]??"";return`${t.slice(0,-1).join(", ")} and ${e}`},"Te"),Ie=l((t,e)=>({"high-error-rate":t("High error rate"),"high-evictions":t("High cache eviction rate"),"high-write-contention":t("High write contention"),"low-cache-hit-rate":t("Low cache hit rate"),"missing-index":t("Missing index"),"slow-function":t("Slow function")})[e.kind],"Ie"),ne=l((t,e)=>({"high-error-rate":t("{rate} of calls failed.",{rate:q(e.value)}),"high-evictions":t("{count} entries evicted recently.",{count:e.value}),"high-write-contention":t("{rate} of calls hit a write conflict \u2014 consider sharding to cut contention.",{rate:q(e.value)}),"low-cache-hit-rate":t("{rate} hit rate over recent traffic.",{rate:q(e.value)}),"missing-index":t("Slowest call took {duration} \u2014 it full-scanned {tables} with no index.",{duration:ae(e.value),tables:$e(e.tables??[])}),"slow-function":t("Slowest call took {duration}.",{duration:ae(e.value)})})[e.kind],"J"),Ee=l(t=>{let e=(0,j.c)(10),{onJump:r,table:a}=t,n=A(),o;e[0]!==r||e[1]!==a?(o=l(()=>{r(a)},"o"),e[0]=r,e[1]=a,e[2]=o):o=e[2];let c=o,T=`in-add-index-${a}`,p;e[3]!==n||e[4]!==a?(p=n("Add index on {table}",{table:a}),e[3]=n,e[4]=a,e[5]=p):p=e[5];let f;return e[6]!==c||e[7]!==T||e[8]!==p?(f=(0,$.jsx)(U,{"data-testid":T,onClick:c,size:"sm",type:"button",variant:"outline",children:p}),e[6]=c,e[7]=T,e[8]=p,e[9]=f):f=e[9],f},"Ee"),De=l(({initialShardKey:t,loadShardTraffic:e})=>{let r=B(),a=P(),n=A(),{queryShardKey:o,setShardKey:c,shardKey:T}=V(t),[p,f]=(0,u.useState)(null),[v,w]=(0,u.useState)(null),h=(0,u.useRef)(""),x=M(I.getMetrics,{},{live:!0,shardKey:o}),S=M(I.getFunctionStats,{},{live:!0,shardKey:o}),y=M(I.getAdvisories,{},{live:!0,shardKey:o}),E=x.data??null,F=S.data?.functions??null,O=y.data?.advisories??null,re=x.data?.indexHits??null,R=x.error!==null&&S.error!==null?x.error:null,se=e??(s=>r.shardTraffic(s)),ie=l(async(s,b)=>{let i=s[0];if(i===void 0||i===""){h.current===b&&w(null);return}try{let m=await se(i);if(h.current!==b)return;let d=new Map;for(let g of m.shards)d.has(g.shardKey)||d.set(g.shardKey,{requests:g.requests,shardKey:g.shardKey});w([...d.values()])}catch{h.current===b&&w(null)}},"V"),oe=l(async(s,b)=>{let i=await Promise.allSettled(s.map(async d=>[d,await r.query(Se,{table:d},K(b))])),m=[];for(let d of i)if(d.status==="fulfilled"){let[g,N]=d.value;m.push(...te(g,N.indexes))}return m},"G"),D=(0,u.useEffectEvent)(async s=>{h.current=s;let b=[];try{let i=await r.query(we,{},K(s));if(h.current!==s)return;Q(s),b=i.map(d=>d.name);let m=[];if(b.length>0)try{let d=await r.query(Te,{tables:b},K(s));if(h.current!==s)return;for(let[g,N]of Object.entries(d.indexesByTable))m.push(...te(g,N))}catch{if(m=await oe(b,s),h.current!==s)return}f(m)}catch{h.current===s&&f(null)}await ie(b,s)});(0,u.useEffect)(()=>{k(D(o))},[o]);let le=(0,u.useEffectEvent)(()=>{x.refetch(),S.refetch(),y.refetch(),k(D(o))});(0,u.useEffect)(()=>{let s=l(()=>{document.visibilityState==="visible"&&le()},"i");return document.addEventListener("visibilitychange",s),()=>{document.removeEventListener("visibilitychange",s)}},[]);let J=(0,u.useCallback)(s=>{k(a({search:{table:s},to:"/schema"}))},[a]),C=z(E,F),ce=new Set(C.filter(s=>s.kind==="missing-index").flatMap(s=>s.tables??[])),X=ye({declaredIndexes:p??[],functions:F,indexHits:re,shardTraffic:v,suppressHotScanTables:ce}),de=(0,u.useMemo)(()=>{let s=C.map(i=>{let m=i.kind==="missing-index"?i.tables??[]:[];return{action:m.length>0?m.map(d=>(0,$.jsx)(Ee,{onJump:J,table:d},d)):void 0,description:i.message===void 0?ne(n,i):`${ne(n,i)} \u2014 ${i.message}`,entity:i.fn,issueType:Ie(n,i),key:`${i.kind}:${i.fn??""}`,level:i.severity}}),b=new Set(["unindexed_foreign_key","unindexed_relation_target"]);return[...(O??[]).map(i=>{let m=_(i);if(b.has(i.name)&&pe(i.metadata)){let{table:d,suggestedIndex:g}=i.metadata,N=`in-apply-index-${d}-${g.name}`;return{...m,action:(0,$.jsx)(ge,{fields:g.fields,indexName:g.name,table:d,testId:N})}}return m}),...X,...s]},[O,C,J,X,n]),ue=(0,$.jsx)(G,{onChange:c,testId:"in-shard-input",value:T});return(0,$.jsx)(W,{error:R,errorSource:R===null?void 0:x.errorSource,rows:de,testId:"lunora-insights",toolbar:ue})},"Je");export{De as InsightsPanel};
@@ -1 +0,0 @@
1
- import{R as k}from"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import{a as q}from"./chunk-MWIKAR7F.js";import"./chunk-DJZYD5I5.js";import"./chunk-2OUPA2WJ.js";import{b as F}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as B}from"./chunk-53C44DRG.js";import"./chunk-XXQUMVWH.js";import"./chunk-JKSUHSHA.js";import"./chunk-QLQADHFE.js";import{a as R}from"./chunk-VDW32UET.js";import{c as P}from"./chunk-NWFRUF4E.js";import"./chunk-WNX3CW2W.js";import"./chunk-XBDKZZ67.js";import{a as M}from"./chunk-XQCVZAGU.js";import{a as G,b as H,c as J,d as T,e as x,f as w}from"./chunk-WJQLNYGX.js";import{a as z,e as D}from"./chunk-WQH3LT2P.js";import{d as U,r as O}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as b,e as j,f as V,g as X,h as Y}from"./chunk-3XIESWL4.js";var K=j(X(),1),W=j(V(),1);var t=j(Y(),1);var de=b(()=>{let e=(0,K.c)(39),r=U(),[s,$]=(0,W.useState)(""),y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y={},e[0]=y):y=e[0];let{data:A,error:i,errorSource:S,isLoading:_,refetch:E}=P(R.getAuthAuditLog,y),C;if(e[1]!==A?.entries||e[2]!==s){let a=A?.entries??[],v=s.trim().toLowerCase();C=v===""?a:a.filter(N=>N.event.toLowerCase().includes(v)||(N.actorId??"").toLowerCase().includes(v)||(N.actorEmail??"").toLowerCase().includes(v)||(N.ip??"").toLowerCase().includes(v)||N.outcome.toLowerCase().includes(v)),e[1]=A?.entries,e[2]=s,e[3]=C}else C=e[3];let o=C,I;e[4]===Symbol.for("react.memo_cache_sentinel")?(I=b(a=>{$(a.target.value)},"I"),e[4]=I):I=e[4];let Q=I,l;e[5]!==r?(l=r("Filter security events"),e[5]=r,e[6]=l):l=e[6];let n;e[7]!==r?(n=r("filter event, actor, IP"),e[7]=r,e[8]=n):n=e[8];let c;e[9]!==s||e[10]!==l||e[11]!==n?(c=(0,t.jsx)(k,{"aria-label":l,className:"h-8 w-56","data-testid":"aa-search",onChange:Q,placeholder:n,value:s}),e[9]=s,e[10]=l,e[11]=n,e[12]=c):c=e[12];let d;e[13]!==E?(d=b(()=>{E()},"m"),e[13]=E,e[14]=d):d=e[14];let m;e[15]!==r?(m=r("Refresh"),e[15]=r,e[16]=m):m=e[16];let u;e[17]!==d||e[18]!==m?(u=(0,t.jsx)(q,{"data-testid":"aa-refresh",onClick:d,size:"xs",type:"button",variant:"ghost",children:m}),e[17]=d,e[18]=m,e[19]=u):u=e[19];let h;e[20]!==c||e[21]!==u?(h=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,u]}),e[20]=c,e[21]=u,e[22]=h):h=e[22];let f;e[23]!==i||e[24]!==S?(f=i!==null&&(0,t.jsx)(B,{error:S,testId:"aa-error"}),e[23]=i,e[24]=S,e[25]=f):f=e[25];let p;e[26]!==i||e[27]!==o.length||e[28]!==_||e[29]!==r?(p=i===null&&!_&&o.length===0&&(0,t.jsx)(M,{description:r("Authentication and security events are recorded here."),testId:"aa-empty",title:r("No security events.")}),e[26]=i,e[27]=o.length,e[28]=_,e[29]=r,e[30]=p):p=e[30];let g;e[31]!==o||e[32]!==r?(g=o.length>0&&(0,t.jsx)(z,{className:"overflow-hidden py-0",children:(0,t.jsx)(D,{className:"max-h-[30rem] overflow-auto px-0",children:(0,t.jsxs)(G,{"data-testid":"aa-table",children:[(0,t.jsx)(H,{children:(0,t.jsxs)(T,{children:[(0,t.jsx)(x,{children:r("time")}),(0,t.jsx)(x,{children:r("event")}),(0,t.jsx)(x,{children:r("actor")}),(0,t.jsx)(x,{children:r("ip / user agent")}),(0,t.jsx)(x,{children:r("outcome")})]})}),(0,t.jsx)(J,{children:o.map(a=>(0,t.jsxs)(T,{"data-testid":"aa-row",children:[(0,t.jsx)(w,{className:"text-muted-foreground tabular-nums",children:O(a.ts,"\u2014")}),(0,t.jsx)(w,{children:(0,t.jsx)(F,{variant:"secondary",children:a.event})}),(0,t.jsx)(w,{className:"max-w-[24ch] truncate font-mono text-xs",title:a.actorId??void 0,children:a.actorEmail??a.actorId??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,t.jsxs)(w,{className:"max-w-[28ch] truncate text-xs text-muted-foreground",title:a.userAgent??void 0,children:[a.ip??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}),a.userAgent!==void 0&&(0,t.jsxs)("span",{className:"ml-1 opacity-70",children:["\xB7 ",a.userAgent]})]}),(0,t.jsx)(w,{children:(0,t.jsx)(F,{variant:a.outcome==="failure"?"destructive":"outline",children:r(a.outcome)})})]},a.seq))})]})})}),e[31]=o,e[32]=r,e[33]=g):g=e[33];let L;return e[34]!==f||e[35]!==p||e[36]!==g||e[37]!==h?(L=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-auth-audit",children:[h,f,p,g]}),e[34]=f,e[35]=p,e[36]=g,e[37]=h,e[38]=L):L=e[38],L},"ce");export{de as default};
@@ -1,2 +0,0 @@
1
- import{a as hr}from"./chunk-7QIFDWQV.js";import{a as D,b as It,c as F,h as ve,i as Ce,j as yt}from"./chunk-2OUPA2WJ.js";import{a as Et,c as ue,d as z,g as V,i as de,j as $}from"./chunk-6ST5ECQA.js";import{a as r,d as te,e as g,f as y,g as vr,h as re,j as Ct}from"./chunk-3XIESWL4.js";var mr=g(vr(),1),Ba=g(y(),1);var dr=g(y(),1);var qe={};te(qe,{Control:()=>sr,Description:()=>tr,Error:()=>Zt,Item:()=>ur,Label:()=>Gt,Root:()=>qt,Validity:()=>lr});var A=g(y(),1);var Ee=g(y(),1);var He=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});var oe={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},fe={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Ft={disabled:!1,...fe},W={valid(e){return e===null?null:e?{[He.valid]:""}:{[He.invalid]:""}}};var Cr={invalid:void 0,name:void 0,validityData:{state:oe,errors:[],error:"",value:"",initialValue:null},setValidityData:V,disabled:void 0,touched:fe.touched,setTouched:V,dirty:fe.dirty,setDirty:V,filled:fe.filled,setFilled:V,focused:fe.focused,setFocused:V,validate:r(()=>null,"validate"),validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:r(()=>!1,"shouldValidateOnChange"),state:Ft,markedDirtyRef:{current:!1},registerFieldControl:V,validation:{getValidationProps:r((e,t=de)=>t,"getValidationProps"),inputRef:{current:null},registerInput:V,commit:r(async()=>{},"commit"),change:V}},Je=Ee.createContext(Cr);function B(e=!0){let t=Ee.useContext(Je);if(t.setValidityData===V&&!e)throw new Error(ue(28));return t}r(B,"useFieldRootContext");var Ie=g(y(),1);var Er=Ie.createContext(void 0);function Tt(e=!1){let t=Ie.useContext(Er);if(!t&&!e)throw new Error(ue(86));return t}r(Tt,"useFieldsetRootContext");var ye=g(y(),1);var Ir=ye.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:V,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function H(){return ye.useContext(Ir)}r(H,"useFormContext");var Q=g(y(),1);var Fe=g(y(),1);var Dt=0;function yr(e,t="mui"){let[o,n]=Fe.useState(e),i=e||o;return Fe.useEffect(()=>{o==null&&(Dt+=1,n(`${t}-${Dt}`))},[o,t]),i}r(yr,"useGlobalId");var St=It.useId;function At(e,t){if(St!==void 0){let o=St();return e??(t?`${t}-${o}`:o)}return yr(e,t)}r(At,"useId");function J(e){return At(e,"base-ui")}r(J,"useBaseUiId");var Te=g(y(),1);var Xe=Te.createContext({controlId:void 0,registerControlId:V,labelId:void 0,setLabelId:V,messageIds:[],setMessageIds:V,getDescriptionProps:r(e=>e,"getDescriptionProps")});function P(){return Te.useContext(Xe)}r(P,"useLabelableContext");var Vt=g(re(),1);var De=r(function(t){let o=J(),n=t.controlId===void 0?o:t.controlId,[i,s]=Q.useState(n),[l,a]=Q.useState(t.labelId),[u,d]=Q.useState([]),m=z(()=>new Map),{messageIds:f}=P(),h=F((R,T)=>{let N=m.current;if(T===void 0){N.delete(R);return}N.set(R,T),s(C=>{if(N.size===0)return;let k;for(let c of N.values()){if(C!==void 0&&c===C)return C;k===void 0&&(k=c)}return k})}),p=Q.useCallback(R=>{let T=R["aria-describedby"]?R["aria-describedby"].split(" "):[];return T.push(...f,...u),{...R,"aria-describedby":Array.from(new Set(T)).join(" ")||void 0}},[f,u]),v=Q.useMemo(()=>({controlId:i,registerControlId:h,labelId:l,setLabelId:a,messageIds:u,setMessageIds:d,getDescriptionProps:p}),[i,h,l,a,u,d,p]);return(0,Vt.jsx)(Xe.Provider,{value:v,children:t.children})},"LabelableProvider");var be=g(y(),1);function Nt(e={}){let{id:t,implicit:o=!1,controlRef:n}=e,{controlId:i,registerControlId:s}=P(),l=J(t),a=o?i:void 0,u=z(()=>Symbol("labelable-control")),d=be.useRef(!1),m=be.useRef(t!=null),f=F(()=>{!d.current||s===V||(d.current=!1,s(u.current,void 0))});return D(()=>{if(s===V)return;let h;if(o){let p=n?.current;ve(p)&&p.closest("label")!=null?h=t??null:h=a??l}else if(t!=null)m.current=!0,h=t;else if(m.current)h=l;else{f();return}if(h===void 0){f();return}d.current=!0,s(u.current,h)},[t,n,a,s,o,l,u,f]),be.useEffect(()=>f,[f]),i??l}r(Nt,"useLabelableId");function Se(e){return e?.ownerDocument||document}r(Se,"ownerDocument");var Ae={};te(Ae,{engine:()=>rt,env:()=>nt,os:()=>et,screenReader:()=>ot});var et={};te(et,{android:()=>_t,apple:()=>Ze,ios:()=>Qe,linux:()=>Ar,mac:()=>Ot,windows:()=>Sr});function Fr(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}r(Fr,"readRawData");var{userAgent:Tr,platform:Dr,maxTouchPoints:wt}=Fr(),ne=Tr.toLowerCase(),ie=Dr.toLowerCase();var Qe=/^i(os$|p)/.test(ie)||ie==="macintel"&&wt>1,Lt="android",_t=ie===Lt||ne.includes(Lt),Ot=!Qe&&ie.startsWith("mac"),Sr=ie.startsWith("win"),Ar=!_t&&/^(linux|chrome os)/.test(ie),Ze=Ot||Qe;var rt={};te(rt,{blink:()=>Nr,gecko:()=>Vr,webkit:()=>tt});var tt=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none"),Vr=!tt&&ne.includes("firefox"),Nr=!tt&&ne.includes("chrom");var ot={};te(ot,{voiceOver:()=>wr});var wr=Ze;var nt={};te(nt,{jsdom:()=>Lr});var Lr=/jsdom|happydom/.test(ne);var it="data-base-ui-focusable";var st="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Fn="ArrowLeft",Tn="ArrowRight",Dn="ArrowUp",Sn="ArrowDown";function at(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}r(at,"activeElement");function Mt(e,t){if(!e||!t)return!1;let o=t.getRootNode?.();if(e.contains(t))return!0;if(o&&yt(o)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}r(Mt,"contains");function lt(e){return"composedPath"in e?e.composedPath()[0]:e.target}r(lt,"getTarget");function Pn(e,t){if(!ve(e))return!1;let o=e;if(t.hasElement(o))return!o.hasAttribute("data-trigger-disabled");for(let[,n]of t.entries())if(Mt(n,o))return!n.hasAttribute("data-trigger-disabled");return!1}r(Pn,"isTargetInsideEnabledTrigger");function kn(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let o=e;return o.target!=null&&t.contains(o.target)}r(kn,"isEventTargetWithin");function Un(e){return e.matches("html,body")}r(Un,"isRootElement");function _r(e){return Ce(e)&&e.matches(st)}r(_r,"isTypeableElement");function jn(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${st}`)!=null}r(jn,"isInteractiveElement");function Bn(e){return e?e.getAttribute("role")==="combobox"&&_r(e):!1}r(Bn,"isTypeableCombobox");function $n(e){if(!e||Ae.env.jsdom)return!0;try{return e.matches(":focus-visible")}catch{return!0}}r($n,"matchesFocusVisible");function Wn(e){return e?e.hasAttribute(it)?e:e.querySelector(`[${it}]`)||e:null}r(Wn,"getFloatingFocusElement");function Pt(e,t){let o=J(e);return D(()=>(t(o),()=>{t(void 0)}),[o,t]),o}r(Pt,"useRegisteredLabelId");function kt(e={}){let{id:t,fallbackControlId:o,native:n=!1,setLabelId:i,focusControl:s}=e,{controlId:l,setLabelId:a}=P(),u=F(p=>{a(p),i?.(p)}),d=Pt(t,u),m=l??o;function f(p){if(s){s(p,m);return}if(!m)return;let v=Se(p.currentTarget).getElementById(m);Ce(v)&&Or(v)}r(f,"focusControl");function h(p){lt(p.nativeEvent)?.closest("button,input,select,textarea")||(!p.defaultPrevented&&p.detail>1&&p.preventDefault(),!n&&f(p))}return r(h,"handleInteraction"),n?{id:d,htmlFor:m??void 0,onMouseDown:h}:{id:d,onClick:h,onPointerDown(p){p.preventDefault()}}}r(kt,"useLabel");function Or(e){e.focus({focusVisible:!0})}r(Or,"focusElementWithVisible");var Z=g(y(),1);var Ut=g(y(),1);var Mr=[];function Ve(e){Ut.useEffect(e,Mr)}r(Ve,"useOnMount");var xe=0,ct=class e{static{r(this,"Timeout")}static create(){return new e}currentId=xe;start(t,o){this.clear(),this.currentId=setTimeout(()=>{this.currentId=xe,o()},t)}isStarted(){return this.currentId!==xe}clear=r(()=>{this.currentId!==xe&&(clearTimeout(this.currentId),this.currentId=xe)},"clear");disposeEffect=r(()=>this.clear,"disposeEffect")};function jt(){let e=z(ct.create).current;return Ve(e.disposeEffect),e}r(jt,"useTimeout");function se(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}r(se,"getCombinedFieldValidityData");var Ne=Object.keys(oe);function Pr(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(let o of Ne)o!=="valid"&&(o==="valueMissing"?t=e[o]:e[o]&&(t=!1));return t}r(Pr,"isOnlyValueMissing");function kr(e){let t=null;for(let o of e)if(!o.disabled){if(!o.validity.valid)return o;t??=o}return t}r(kr,"findRepresentativeInput");function Bt(e,t){let o=!1;for(let n of t)n.setCustomValidity(""),o||=n===e;o||e.setCustomValidity("")}r(Bt,"clearCustomValidity");function $t(e){let{formRef:t}=H(),{setValidityData:o,validate:n,validityData:i,validationDebounceTime:s,invalid:l,markedDirtyRef:a,state:u,shouldValidateOnChange:d,getRegisteredFieldId:m}=e,{controlId:f,getDescriptionProps:h}=P(),p=jt(),v=Z.useRef(null),R=z(()=>new Set).current,T=Z.useRef(0),N=Z.useCallback(b=>{if(b)return R.add(b),()=>{R.delete(b)}},[R]),C=F(async(b,w=!1)=>{let E=kr(R)??v.current;if(!E)return;T.current+=1;let ee=T.current;function q(M,S=l){let _=m()??f;if(_==null)return;let x=t.current.fields.get(_);if(!x)return;let K=se(M,S);t.current.fields.set(_,{...x,validityData:K})}if(r(q,"updateRegisteredFieldValidity"),w){if(u.valid!==!1)return;let M=E.validity;if(!M.valueMissing){let _={value:b,state:{...oe,valid:!0},error:"",errors:[],initialValue:i.initialValue};Bt(E,R),q(_,!1),o(_);return}let S=Ne.reduce((_,x)=>(_[x]=M[x],_),{});if(!S.valid&&!Pr(S))return}function G(M){let S=Ne.reduce((x,K)=>(x[K]=M.validity[K],x),{}),_=!1;for(let x of Ne)if(x!=="valid"){if(x==="valueMissing"&&S[x])_=!0;else if(S[x])return S}return _&&!a.current&&(S.valid=!0,S.valueMissing=!1),S}r(G,"getState"),p.clear();let I=null,O=[],U=G(E),j,Y=d();if(E.validationMessage&&!Y)j=E.validationMessage,O=[E.validationMessage];else{let M=Array.from(t.current.fields.values()).reduce((_,x)=>(x.name&&(_[x.name]=x.getValue()),_),{}),S=n(b,M);if(typeof S=="object"&&S!==null&&"then"in S){if(I=await S,ee!==T.current)return}else I=S;I!==null?(U.valid=!1,U.customError=!0,Array.isArray(I)?(O=I,E.setCustomValidity(I.join(`
2
- `))):I&&(O=[I],E.setCustomValidity(I))):Y&&(Bt(E,R),U.customError=!1,E.validationMessage?(j=E.validationMessage,O=[E.validationMessage]):E.validity.valid&&!U.valid&&(U.valid=!0))}let L={value:b,state:U,error:j??(Array.isArray(I)?I[0]:I??""),errors:O,initialValue:i.initialValue};q(L),o(L)}),k=F(b=>{p.clear();let w=d();w&&b!==""&&s?(T.current+=1,p.start(s,()=>{C(b)})):C(b,!w)}),c=Z.useCallback((b,w={})=>Et(h(w),u.valid===!1&&!u.disabled&&!b?{"aria-invalid":!0}:de),[h,u.disabled,u.valid]);return Z.useMemo(()=>({getValidationProps:c,inputRef:v,registerInput:N,commit:C,change:k}),[c,N,C,k])}r($t,"useFieldValidation");var we=g(y(),1);function Wt(e){let{commit:t,invalid:o,markedDirtyRef:n,name:i,setRegisteredFieldName:s,setRegisteredFieldId:l,setValidityData:a,validityData:u}=e,{formRef:d}=H(),m=we.useRef(null),f=we.useRef(null),h=we.useRef(null),p=F(()=>{let c=f.current;if(c)return c.getValue?c.getValue():c.value});function v(c){return c.value===void 0?p():c.value}r(v,"getRegistrationValue");let R=F(()=>{let c=f.current;if(n.current=!0,!c){t(u.value);return}t(v(c))});function T(){let c=f.current;!c||!c.id||d.current.fields.set(c.id,{getValue:p,name:i??c.name,controlRef:c.controlRef??h,validityData:se(u,o),validate:R})}r(T,"refreshRegistration");function N(c=f.current?.id){c&&d.current.fields.delete(c)}r(N,"deleteRegistration");function C(){let c=f.current;if(!c)return;let b=v(c);u.initialValue===null&&b!==null&&a(w=>({...w,initialValue:b}))}r(C,"syncInitialValue"),D(()=>{let c=f.current;!c||!c.id||(s(i?void 0:c.name),d.current.fields.set(c.id,{getValue:p,name:i??c.name,controlRef:c.controlRef??h,validityData:se(u,o),validate:R}))},[d,p,o,i,s,R,u]),D(()=>{let c=d.current.fields;return()=>{let b=f.current?.id;b&&c.delete(b)}},[d]);let k=F((c,b)=>{if(!b){m.current===c&&(m.current=null,N(),f.current=null,s(void 0),l(void 0));return}let w=f.current?.id;m.current=c,f.current=b,i||s(b.name),l(b.id),w&&w!==b.id&&N(w),C(),T()});return[R,k]}r(Wt,"useFieldControlRegistration");var Le=g(re(),1);var Ur=A.forwardRef(r(function(t,o){let{errors:n,validationMode:i,submitAttemptedRef:s}=H(),{render:l,className:a,validate:u,validationDebounceTime:d=0,validationMode:m=i,name:f,disabled:h=!1,invalid:p,dirty:v,touched:R,actionsRef:T,style:N,...C}=t,k=Tt(!0)?.disabled,c=F(u||(()=>null)),b=k||h,[w,E]=A.useState(!1),[ee,q]=A.useState(!1),[G,I]=A.useState(!1),[O,U]=A.useState(!1),j=v??ee,Y=R??w,L=A.useRef(j),M=A.useRef(void 0),[S,_]=A.useState(),x=f??S;D(()=>{v!==void 0&&(L.current=v)},[v]);let K=A.useCallback(()=>M.current,[]),br=A.useCallback(ce=>{M.current=ce},[]),xt=F(ce=>{v===void 0&&(ce&&(L.current=!0),q(ce))}),gt=F(ce=>{R===void 0&&E(ce)}),Ge=F(()=>m==="onChange"||m==="onSubmit"&&s.current),Ye=x&&Object.hasOwn(n,x)?n[x]:null,xr=!!(Array.isArray(Ye)?Ye.length:Ye),me=p===!0||xr,[pe,Ke]=A.useState({state:oe,error:"",errors:[],value:null,initialValue:null}),Rt=b?null:!me&&pe.state.valid,he=A.useMemo(()=>({disabled:b,touched:Y,dirty:j,valid:Rt,filled:G,focused:O}),[b,Y,j,Rt,G,O]),ze=$t({setValidityData:Ke,validate:c,validityData:pe,validationDebounceTime:d,invalid:me,markedDirtyRef:L,state:he,shouldValidateOnChange:Ge,getRegisteredFieldId:K}),[ht,vt]=Wt({commit:ze.commit,invalid:me,markedDirtyRef:L,name:f,setRegisteredFieldName:_,setRegisteredFieldId:br,setValidityData:Ke,validityData:pe});A.useImperativeHandle(T,()=>({validate:ht}),[ht]);let gr=A.useMemo(()=>({invalid:me,name:x,validityData:pe,setValidityData:Ke,disabled:b,touched:Y,setTouched:gt,dirty:j,setDirty:xt,filled:G,setFilled:I,focused:O,setFocused:U,validate:c,validationMode:m,validationDebounceTime:d,shouldValidateOnChange:Ge,state:he,markedDirtyRef:L,registerFieldControl:vt,validation:ze}),[me,x,pe,b,Y,gt,j,xt,G,I,O,U,c,m,d,Ge,he,vt,ze]),Rr=$("div",t,{ref:o,state:he,props:C,stateAttributesMapping:W});return(0,Le.jsx)(Je.Provider,{value:gr,children:Rr})},"FieldRootInner")),qt=A.forwardRef(r(function(t,o){return(0,Le.jsx)(De,{children:(0,Le.jsx)(Ur,{...t,ref:o})})},"FieldRoot"));var ge=g(y(),1);var _e=g(y(),1);var ut=_e.createContext({disabled:!1});function Oe(){return _e.useContext(ut)}r(Oe,"useFieldItemContext");var Gt=ge.forwardRef(r(function(t,o){let{render:n,className:i,style:s,id:l,nativeLabel:a=!0,...u}=t,d=B(!1),m=Oe(),{labelId:f}=P(),h={...d.state,disabled:d.disabled||m.disabled},p=ge.useRef(null),v=kt({id:f??l,native:a});return $("label",t,{ref:[o,p],state:h,props:[v,u],stateAttributesMapping:W})},"FieldLabel"));var ae=g(y(),1);var Xt=g(y(),1);var Ht=g(hr(),1);var Me=null,Zi=globalThis.requestAnimationFrame,dt=class{static{r(this,"Scheduler")}callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=r(t=>{this.isScheduled=!1;let o=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let i=0;i<o.length;i+=1)o[i]?.(t)},"tick");request(t){let o=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),o}cancel(t){let o=t-this.startId;o<0||o>=this.callbacks.length||(this.callbacks[o]=null,this.callbacksCount-=1)}},Pe=new dt,X=class e{static{r(this,"AnimationFrame")}static create(){return new e}static request(t){return Pe.request(t)}static cancel(t){return Pe.cancel(t)}currentId=Me;request(t){this.cancel(),this.currentId=Pe.request(()=>{this.currentId=Me,t()})}cancel=r(()=>{this.currentId!==Me&&(Pe.cancel(this.currentId),this.currentId=Me)},"cancel");disposeEffect=r(()=>this.cancel,"disposeEffect")};function Yt(){let e=z(X.create).current;return Ve(e.disposeEffect),e}r(Yt,"useAnimationFrame");function Kt(e){return e==null?e:"current"in e?e.current:e}r(Kt,"resolveRef");var ke=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),jr={[ke.startingStyle]:""},Br={[ke.endingStyle]:""},zt={transitionStatus(e){return e==="starting"?jr:e==="ending"?Br:null}};function Jt(e,t=!1,o=!0){let n=Yt();return F((i,s=null)=>{n.cancel();let l=Kt(e);if(l==null)return;let a=l,u=r(()=>{Ht.flushSync(i)},"done");if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function d(){Promise.all(a.getAnimations().map(m=>m.finished)).then(()=>{s?.aborted||u()}).catch(()=>{if(o){s?.aborted||u();return}let m=a.getAnimations();!s?.aborted&&m.length>0&&m.some(f=>f.pending||f.playState!=="finished")&&d()})}if(r(d,"exec"),t){let m=ke.startingStyle;if(!a.hasAttribute(m)){n.request(d);return}let f=new MutationObserver(()=>{a.hasAttribute(m)||(f.disconnect(),d())});f.observe(a,{attributes:!0,attributeFilter:[m]}),s?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}n.request(d)})}r(Jt,"useAnimationsFinished");function Qt(e){let{enabled:t=!0,open:o,ref:n,onComplete:i}=e,s=F(i),l=Jt(n,o,!1);Xt.useEffect(()=>{if(!t)return;let a=new AbortController;return l(s,a.signal),()=>{a.abort()}},[t,o,s,l])}r(Qt,"useOpenChangeComplete");var ft=g(y(),1);function Ue(e,t=!1,o=!1){let[n,i]=ft.useState(e&&t?"idle":void 0),[s,l]=ft.useState(e);return e&&!s&&(l(!0),i("starting")),!e&&s&&n!=="ending"&&!o&&i("ending"),!e&&!s&&n==="ending"&&i(void 0),D(()=>{if(!e&&s&&n!=="ending"&&o){let a=X.request(()=>{i("ending")});return()=>{X.cancel(a)}}},[e,s,n,o]),D(()=>{if(!e||t)return;let a=X.request(()=>{i(void 0)});return()=>{X.cancel(a)}},[t,e]),D(()=>{if(!e||!t)return;e&&s&&n!=="idle"&&i("starting");let a=X.request(()=>{i("idle")});return()=>{X.cancel(a)}},[t,e,s,n]),{mounted:s,setMounted:l,transitionStatus:n}}r(Ue,"useTransitionStatus");var mt=g(re(),1);var $r={...W,...zt},Zt=ae.forwardRef(r(function(t,o){let{render:n,id:i,className:s,match:l,style:a,...u}=t,d=J(i),{validityData:m,state:f,name:h}=B(!1),{setMessageIds:p}=P(),{errors:v}=H(),R=h&&Object.hasOwn(v,h)?v[h]:null,T=!!(Array.isArray(R)?R.length:R),N=typeof l=="string",C=!1;l===!0?C=!0:f.disabled?C=!1:N?C=!!m.state[l]:C=T||m.state.valid===!1;let{mounted:k,transitionStatus:c,setMounted:b}=Ue(C);D(()=>{if(!(!C||!d))return p(L=>L.concat(d)),()=>{p(L=>L.filter(M=>M!==d))}},[C,d,p]);let w=ae.useRef(null),[E,ee]=ae.useState(null),[q,G]=ae.useState(null),I=m.error;!N&&T?I=R:m.errors.length>1&&(I=m.errors);let O=I??"";Array.isArray(I)&&(O=I.length>1?(0,mt.jsx)("ul",{children:I.map(L=>(0,mt.jsx)("li",{children:L},L))}):I[0]??"");let U=Array.isArray(I)?JSON.stringify(I):I;C&&U!==q&&(G(U),ee(O)),Qt({open:C,ref:w,onComplete(){C||b(!1)}});let j={...f,transitionStatus:c},Y=$("div",t,{ref:[o,w],state:j,props:[{id:d,children:C?O:E},u],stateAttributesMapping:$r,enabled:k});return k?Y:null},"FieldError"));var er=g(y(),1);var tr=er.forwardRef(r(function(t,o){let{render:n,id:i,className:s,style:l,...a}=t,u=J(i),d=B(!1),m=Oe(),{setMessageIds:f}=P(),h={...d.state,disabled:d.disabled||m.disabled};return D(()=>{if(u)return f(v=>v.concat(u)),()=>{f(v=>v.filter(R=>R!==u))}},[u,f]),$("p",t,{ref:o,state:h,props:[{id:u},a],stateAttributesMapping:W})},"FieldDescription"));var Be=g(y(),1);var le=g(y(),1);function rr({controlled:e,default:t,name:o,state:n="value"}){let{current:i}=le.useRef(e!==void 0),[s,l]=le.useState(t),a=i?e:s,u=le.useCallback(d=>{i||l(d)},[]);return[a,u]}r(rr,"useControlled");var or=g(y(),1);function nr(e,t,o,n,i=!0,s){let{registerFieldControl:l}=B(),a=or.useRef(null);a.current||(a.current=Symbol()),D(()=>{let u=a.current;return!u||!i?void 0:(l(u,{controlRef:e,getValue:n,id:t,name:s,value:o}),()=>{l(u,void 0)})},[e,i,n,t,s,l,o])}r(nr,"useRegisterFieldControl");var je={};te(je,{cancelOpen:()=>go,chipRemovePress:()=>Qr,clearPress:()=>Xr,closePress:()=>Hr,closeWatcher:()=>co,decrementPress:()=>to,disabled:()=>ho,drag:()=>po,escapeKey:()=>lo,focusOut:()=>ao,imperativeAction:()=>Eo,incrementPress:()=>eo,initial:()=>Co,inputBlur:()=>no,inputChange:()=>ro,inputClear:()=>oo,inputPaste:()=>io,inputPress:()=>so,itemPress:()=>zr,keyboard:()=>fo,linkPress:()=>Jr,listNavigation:()=>uo,missing:()=>vo,none:()=>Wr,outsidePress:()=>Kr,pointer:()=>mo,scrub:()=>xo,siblingOpen:()=>Ro,swipe:()=>Io,trackPress:()=>Zr,triggerFocus:()=>Yr,triggerHover:()=>Gr,triggerPress:()=>qr,wheel:()=>bo,windowResize:()=>yo});var Wr="none",qr="trigger-press",Gr="trigger-hover",Yr="trigger-focus",Kr="outside-press",zr="item-press",Hr="close-press",Jr="link-press",Xr="clear-press",Qr="chip-remove-press",Zr="track-press",eo="increment-press",to="decrement-press",ro="input-change",oo="input-clear",no="input-blur",io="input-paste",so="input-press",ao="focus-out",lo="escape-key",co="close-watcher",uo="list-navigation",fo="keyboard",mo="pointer",po="drag",bo="wheel",xo="scrub",go="cancel-open",Ro="sibling-open",ho="disabled",vo="missing",Co="initial",Eo="imperative-action",Io="swipe",yo="window-resize";function ir(e,t,o,n){let i=!1,s=!1,l=n??de;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){s=!0},get isCanceled(){return i},get isPropagationAllowed(){return s},trigger:o,...l}}r(ir,"createChangeEventDetails");var sr=Be.forwardRef(r(function(t,o){let{render:n,className:i,id:s,name:l,value:a,disabled:u=!1,onValueChange:d,defaultValue:m,autoFocus:f=!1,style:h,...p}=t,{state:v,name:R,disabled:T,setTouched:N,setDirty:C,validityData:k,setFocused:c,setFilled:b,validationMode:w,validation:E}=B(),{clearErrors:ee}=H(),q=T||u,G=R??l,I={...v,disabled:q},{labelId:O}=P(),U=Nt({id:s});D(()=>{let x=a!=null;E.inputRef.current?.value||x&&a!==""?b(!0):x&&a===""&&b(!1)},[E.inputRef,b,a]);let j=Be.useRef(null);D(()=>{f&&j.current===at(Se(j.current))&&c(!0)},[f,c]);let[Y]=rr({controlled:a,default:m,name:"FieldControl",state:"value"}),L=a!==void 0,M=L?Y:void 0,S=F(()=>E.inputRef.current?.value);return nr(E.inputRef,U,M,S,!q,l),$("input",t,{ref:[o,j],state:I,props:[{id:U,disabled:q,name:G,ref:E.inputRef,"aria-labelledby":O,autoFocus:f,...L?{value:M}:{defaultValue:m},onChange(x){let K=x.currentTarget.value;d?.(K,ir(je.none,x.nativeEvent)),C(K!==k.initialValue),b(K!==""),x.nativeEvent.defaultPrevented||(ee(G),E.change(K))},onFocus(){c(!0)},onBlur(x){N(!0),c(!1),w==="onBlur"&&E.commit(x.currentTarget.value)},onKeyDown(x){x.currentTarget.tagName==="INPUT"&&x.key==="Enter"&&(N(!0),E.commit(x.currentTarget.value))}},p,x=>E.getValidationProps(q,x)],stateAttributesMapping:W})},"FieldControl"));var Re=g(y(),1);var ar=g(re(),1);var lr=r(function(t){let{children:o}=t,{validityData:n,invalid:i}=B(!1),s=Re.useMemo(()=>se(n,i),[n,i]),l=s.state.valid===!1,{transitionStatus:a}=Ue(l),u=Re.useMemo(()=>({...s,validity:s.state,transitionStatus:a}),[s,a]);return(0,ar.jsx)(Re.Fragment,{children:o(u)})},"FieldValidity");var We=g(y(),1);var $e=g(y(),1);var Fo=$e.createContext(void 0);function cr(e=!0){let t=$e.useContext(Fo);if(t===void 0&&!e)throw new Error(ue(3));return t}r(cr,"useCheckboxGroupContext");var pt=g(re(),1);var ur=We.forwardRef(r(function(t,o){let{render:n,className:i,style:s,disabled:l=!1,...a}=t,{state:u,disabled:d}=B(!1),m=d||l,f={...u,disabled:m},h=cr(),v=h?.allValues!==void 0?h?.parent.id:void 0,R=We.useMemo(()=>({disabled:m}),[m]),T=$("div",t,{ref:o,state:f,props:a,stateAttributesMapping:W});return(0,pt.jsx)(De,{controlId:v,children:(0,pt.jsx)(ut.Provider,{value:R,children:T})})},"FieldItem"));var fr=g(re(),1);var bt=dr.forwardRef(r(function(t,o){return(0,fr.jsx)(qe.Control,{ref:o,...t})},"Input"));var pr=g(re(),1);function qa(e){let t=(0,mr.c)(10),o,n,i;t[0]!==e?({className:o,type:i,...n}=e,t[0]=e,t[1]=o,t[2]=n,t[3]=i):(o=t[1],n=t[2],i=t[3]);let s;t[4]!==o?(s=Ct("h-8 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-xs dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",o),t[4]=o,t[5]=s):s=t[5];let l;return t[6]!==n||t[7]!==s||t[8]!==i?(l=(0,pr.jsx)(bt,{type:i,"data-slot":"input",className:s,...n}),t[6]=n,t[7]=s,t[8]=i,t[9]=l):l=t[9],l}r(qa,"g");export{W as a,B as b,H as c,At as d,J as e,P as f,Nt as g,Se as h,Ae as i,it as j,Fn as k,Tn as l,Dn as m,Sn as n,at as o,Mt as p,lt as q,Pn as r,kn as s,Un as t,_r as u,jn as v,Bn as w,$n as x,Wn as y,kt as z,Ve as A,ct as B,jt as C,Oe as D,X as E,Yt as F,Kt as G,ke as H,zt as I,Jt as J,Qt as K,Ue as L,rr as M,nr as N,je as O,ir as P,cr as Q,qa as R};