@lunora/studio 1.0.0-alpha.106 → 1.0.0-alpha.108

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-6WB63KTN.js → chunk-2DC6F7NH.js} +1 -1
  126. package/dist/standalone/chunk-3F5I435D.js +1 -0
  127. package/dist/standalone/{chunk-RJS7UD5U.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-2ZG23BA5.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-HX7IXD7I.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-LWE6NWQX.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-7P7NURTD.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-7QOXFLZB.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-ZCNMXKF2.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-XVD7HWY7.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-5MJ3G4DY.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-DRR3KV5L.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-F2I4JLFR.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-6KWKX3RH.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-BDHAGUAY.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-XYV7TMYI.js → chunk-WHRG6S5P.js} +1 -1
  231. package/dist/standalone/{chunk-CKG2DTZ2.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 +9 -9
  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-25IDU7IW.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-3C3CG7ZK.js +0 -1
  312. package/dist/standalone/chunk-3CWGJYBB.js +0 -1
  313. package/dist/standalone/chunk-3DH35OZ5.js +0 -1
  314. package/dist/standalone/chunk-3SCGCJYS.js +0 -1
  315. package/dist/standalone/chunk-3XIESWL4.js +0 -1
  316. package/dist/standalone/chunk-54MMVNPT.js +0 -1
  317. package/dist/standalone/chunk-5RIKPDDA.js +0 -1
  318. package/dist/standalone/chunk-5Y3QLNWX.js +0 -1
  319. package/dist/standalone/chunk-63D4ABMW.js +0 -1
  320. package/dist/standalone/chunk-6QBOXH2I.js +0 -1
  321. package/dist/standalone/chunk-7CZI2HNL.js +0 -1
  322. package/dist/standalone/chunk-7T7UOTYK.js +0 -1
  323. package/dist/standalone/chunk-7UP7OQJG.js +0 -1
  324. package/dist/standalone/chunk-AXQU7ULF.js +0 -1
  325. package/dist/standalone/chunk-BCOT3QRZ.js +0 -1
  326. package/dist/standalone/chunk-BG5ELOW6.js +0 -1
  327. package/dist/standalone/chunk-BXJPPINU.js +0 -1
  328. package/dist/standalone/chunk-BZDIRP7L.js +0 -1
  329. package/dist/standalone/chunk-C3YACIEE.js +0 -1
  330. package/dist/standalone/chunk-CAOA5AM4.js +0 -1
  331. package/dist/standalone/chunk-CFPZYHPY.js +0 -2
  332. package/dist/standalone/chunk-CZZWYUTR.js +0 -1
  333. package/dist/standalone/chunk-DJZYD5I5.js +0 -1
  334. package/dist/standalone/chunk-DNEIBTLL.js +0 -1
  335. package/dist/standalone/chunk-EF5J67J3.js +0 -1
  336. package/dist/standalone/chunk-EJWTF334.js +0 -1
  337. package/dist/standalone/chunk-EP4JQH5X.js +0 -1
  338. package/dist/standalone/chunk-ESVP44Y3.js +0 -1
  339. package/dist/standalone/chunk-EXL35M7T.js +0 -1
  340. package/dist/standalone/chunk-F3J6ER2V.js +0 -13
  341. package/dist/standalone/chunk-FURI47Z2.js +0 -1
  342. package/dist/standalone/chunk-FZ2N52BV.js +0 -1
  343. package/dist/standalone/chunk-GG6PIGQO.js +0 -1
  344. package/dist/standalone/chunk-GRL5MG3Z.js +0 -1
  345. package/dist/standalone/chunk-HBSEWNIR.js +0 -1
  346. package/dist/standalone/chunk-HLENOQDN.js +0 -1
  347. package/dist/standalone/chunk-HPFLBYRI.js +0 -1
  348. package/dist/standalone/chunk-HUF7RMS3.js +0 -1
  349. package/dist/standalone/chunk-I6A5C46N.js +0 -1
  350. package/dist/standalone/chunk-IBPWTHHW.js +0 -1
  351. package/dist/standalone/chunk-IGCNMZSB.js +0 -1
  352. package/dist/standalone/chunk-IVFHIQOT.js +0 -1
  353. package/dist/standalone/chunk-KZRWBSYQ.js +0 -1
  354. package/dist/standalone/chunk-LEDWUPXM.js +0 -1
  355. package/dist/standalone/chunk-MLT5MMMY.js +0 -1
  356. package/dist/standalone/chunk-OENUM3OW.js +0 -1
  357. package/dist/standalone/chunk-QLQADHFE.js +0 -1
  358. package/dist/standalone/chunk-RA5DW5MU.js +0 -1
  359. package/dist/standalone/chunk-RFSPHFKM.js +0 -1
  360. package/dist/standalone/chunk-RMN2JN4S.js +0 -1
  361. package/dist/standalone/chunk-S23KCFVU.js +0 -1
  362. package/dist/standalone/chunk-S4665UG5.js +0 -4
  363. package/dist/standalone/chunk-SD4BERSA.js +0 -1
  364. package/dist/standalone/chunk-SFDOII3B.js +0 -1
  365. package/dist/standalone/chunk-SMIESS7P.js +0 -1
  366. package/dist/standalone/chunk-SY6ANTKE.js +0 -1
  367. package/dist/standalone/chunk-TCV7MMYR.js +0 -1
  368. package/dist/standalone/chunk-UFESYXCE.js +0 -6
  369. package/dist/standalone/chunk-UKI2ZYB2.js +0 -1
  370. package/dist/standalone/chunk-UTK6JUTY.js +0 -1
  371. package/dist/standalone/chunk-V53KNYRN.js +0 -1
  372. package/dist/standalone/chunk-VIJLMIC3.js +0 -1
  373. package/dist/standalone/chunk-VOY5EALQ.js +0 -1
  374. package/dist/standalone/chunk-VR3OBMGZ.js +0 -1
  375. package/dist/standalone/chunk-WJCKVELA.js +0 -1
  376. package/dist/standalone/chunk-WJQLNYGX.js +0 -1
  377. package/dist/standalone/chunk-WPK2Q33V.js +0 -6
  378. package/dist/standalone/chunk-WQH3LT2P.js +0 -1
  379. package/dist/standalone/chunk-WZ65AZKA.js +0 -1
  380. package/dist/standalone/chunk-XEGWCG5S.js +0 -1
  381. package/dist/standalone/chunk-XFGE43TZ.js +0 -1
  382. package/dist/standalone/chunk-XNSCEAHM.js +0 -4
  383. package/dist/standalone/chunk-XXQUMVWH.js +0 -1
  384. package/dist/standalone/chunk-Y32QIKBS.js +0 -1
  385. package/dist/standalone/chunk-YJ25NVR2.js +0 -3
  386. package/dist/standalone/chunk-ZJGP6EKR.js +0 -1
  387. /package/dist/standalone/{chunk-XF2B7P5A.js → chunk-W2JBKQNU.js} +0 -0
@@ -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-CAOA5AM4.js";import"./chunk-XXQUMVWH.js";import"./chunk-VR3OBMGZ.js";import"./chunk-QLQADHFE.js";import{a as R}from"./chunk-VDW32UET.js";import{c as P}from"./chunk-FZ2N52BV.js";import"./chunk-BDHAGUAY.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 +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-CAOA5AM4.js";import"./chunk-XXQUMVWH.js";import"./chunk-VR3OBMGZ.js";import"./chunk-QLQADHFE.js";import{a as S}from"./chunk-VDW32UET.js";import{c as b}from"./chunk-FZ2N52BV.js";import"./chunk-BDHAGUAY.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 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-CAOA5AM4.js";import"./chunk-XXQUMVWH.js";import"./chunk-VR3OBMGZ.js";import"./chunk-QLQADHFE.js";import{a as T}from"./chunk-VDW32UET.js";import{c as S}from"./chunk-FZ2N52BV.js";import"./chunk-BDHAGUAY.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 W}from"./chunk-54MMVNPT.js";import{a as F}from"./chunk-3CWGJYBB.js";import{a as E}from"./chunk-RMN2JN4S.js";import"./chunk-GRL5MG3Z.js";import"./chunk-7T7UOTYK.js";import"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import"./chunk-2OUPA2WJ.js";import{b as y}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as L}from"./chunk-CAOA5AM4.js";import"./chunk-XXQUMVWH.js";import"./chunk-VR3OBMGZ.js";import"./chunk-QLQADHFE.js";import{a as D}from"./chunk-VDW32UET.js";import{c as _}from"./chunk-FZ2N52BV.js";import"./chunk-BDHAGUAY.js";import"./chunk-XBDKZZ67.js";import{a as T}from"./chunk-XQCVZAGU.js";import{a as O,b as P,c as U,d as w,e as h,f as p}from"./chunk-WJQLNYGX.js";import{a as $,e as j}from"./chunk-WQH3LT2P.js";import{d as M}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as S,e as A,g as R,h as Z}from"./chunk-3XIESWL4.js";var B=A(R(),1);var t=A(Z(),1);var q=80,z=S(a=>{if(a===void 0)return"";let e=JSON.stringify(a);return e.length>q?`${e.slice(0,q)}\u2026`:e},"W"),G=S(a=>{let e=[];for(let r of a){let n=r.id.toString();if(r.subscriptions.length===0){e.push({admin:r.admin,connectionId:r.id,key:`c${n}`,subscription:null});continue}r.subscriptions.forEach((l,i)=>{e.push({admin:r.admin,connectionId:r.id,key:`c${n}-s${i.toString()}`,subscription:l})})}return e},"B"),C=(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}),oe=S(a=>{let e=(0,B.c)(22),{initialShardKey:r}=a,n=M(),{queryShardKey:l,setShardKey:i,shardKey:m}=F(r),f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={},e[0]=f):f=e[0];let b;e[1]!==l?(b={keepPreviousData:!0,shardKey:l},e[1]=l,e[2]=b):b=e[2];let{data:s,error:o,errorSource:u,refetch:J}=_(D.listSubscriptions,f,b);W(J,!0);let x;if(e[3]!==o||e[4]!==u||e[5]!==s||e[6]!==i||e[7]!==m||e[8]!==n){let k=s===void 0?[]:G(s.connections),c;e[10]!==i||e[11]!==m?(c=(0,t.jsx)(E,{onChange:i,testId:"subs-shard-input",value:m}),e[10]=i,e[11]=m,e[12]=c):c=e[12];let d;e[13]!==s||e[14]!==n?(d=s!==void 0&&(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2 text-sm text-muted-foreground","data-testid":"subs-count",children:[(0,t.jsx)(y,{variant:"secondary",children:n("{count} connections",{count:s.totalConnections})}),(0,t.jsx)(y,{variant:"secondary",children:n("{count} subscriptions",{count:s.totalSubscriptions})})]}),e[13]=s,e[14]=n,e[15]=d):d=e[15];let g;e[16]!==c||e[17]!==d?(g=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,d]}),e[16]=c,e[17]=d,e[18]=g):g=e[18];let v;e[19]!==o||e[20]!==u?(v=o!==null&&(0,t.jsx)(L,{error:u,testId:"subs-error"}),e[19]=o,e[20]=u,e[21]=v):v=e[21],x=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"subs-panel",children:[g,v,o===null&&s!==void 0&&k.length===0&&(0,t.jsx)(T,{description:n("Active WebSocket subscriptions on this shard."),icon:(0,t.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M5 12a7 7 0 0 1 14 0M8 12a4 4 0 0 1 8 0M12 12v8m0-8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),testId:"subs-empty",title:n("No active subscriptions.")}),o===null&&k.length>0&&(0,t.jsx)($,{className:"overflow-hidden py-0",children:(0,t.jsx)(j,{className:"px-0",children:(0,t.jsxs)(O,{"data-testid":"subs-table",children:[(0,t.jsx)(P,{children:(0,t.jsxs)(w,{children:[(0,t.jsx)(h,{children:n("Connection")}),(0,t.jsx)(h,{children:n("Function path")}),(0,t.jsx)(h,{children:n("Table")}),(0,t.jsx)(h,{children:n("Arguments")})]})}),(0,t.jsx)(U,{children:k.map(N=>{let{subscription:I}=N,K=z(I?.args);return(0,t.jsxs)(w,{"data-testid":"subs-row",children:[(0,t.jsx)(p,{className:"font-medium tabular-nums",children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["#",N.connectionId,N.admin&&(0,t.jsx)(y,{variant:"outline",children:n("admin")})]})}),(0,t.jsx)(p,{className:"font-mono text-xs",children:I?.functionPath??C}),(0,t.jsx)(p,{children:I?.table??C}),(0,t.jsx)(p,{className:"max-w-[32ch] truncate font-mono text-xs text-muted-foreground",title:K||void 0,children:K||C})]},N.key)})})]})})})]}),e[3]=o,e[4]=u,e[5]=s,e[6]=i,e[7]=m,e[8]=n,e[9]=x}else x=e[9];return x},"oe");export{oe as default};
@@ -1 +0,0 @@
1
- import{a as $}from"./chunk-5UY7MLRC.js";import{a as b}from"./chunk-CAOA5AM4.js";import"./chunk-XXQUMVWH.js";import"./chunk-VR3OBMGZ.js";import"./chunk-QLQADHFE.js";import{a as u}from"./chunk-VDW32UET.js";import{c as p}from"./chunk-FZ2N52BV.js";import"./chunk-BDHAGUAY.js";import"./chunk-XBDKZZ67.js";import{a as y,b as w,c as j,d as h,e as i,f as n}from"./chunk-WJQLNYGX.js";import{a as l,e as c}from"./chunk-WQH3LT2P.js";import{d as k}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as o,e as S,h as T,j as x}from"./chunk-3XIESWL4.js";var e=S(T(),1);var m={clean:"text-emerald-600 dark:text-emerald-400",exempt:"text-muted-foreground",failing:"text-red-600 dark:text-red-400",warned:"text-amber-600 dark:text-amber-400"},A={"at-risk":"text-red-600 dark:text-red-400",excellent:"text-emerald-600 dark:text-emerald-400",good:"text-emerald-600 dark:text-emerald-400","needs-work":"text-amber-600 dark:text-amber-400"},O=o((r,a)=>`exempt: ${r.exemptReason===void 0||r.exemptReason===""?a:r.exemptReason}`,"S"),P=o(r=>r.toSorted((a,d)=>a.coverage==="clean"&&d.coverage!=="clean"?1:d.coverage==="clean"&&a.coverage!=="clean"?-1:a.score-d.score),"T"),q=o(({testId:r="advisor-health"})=>{let a=k(),d=p(u.getAdvisories,{},{live:!0}),g=p(u.getAdvisorProcedures,{},{live:!0}),f=d.data?.advisories??null,N=g.data?.procedures??null,t=f===null||N===null?null:$(N,f),v=g.error??d.error;if(v!==null)return(0,e.jsx)(b,{error:v,testId:`${r}-error`});if(t===null)return(0,e.jsx)(l,{children:(0,e.jsx)(c,{className:"py-8 text-center text-muted-foreground","data-testid":`${r}-loading`,children:a("Loading\u2026")})});let I=P(t.procedures);return(0,e.jsxs)("div",{className:"space-y-4","data-testid":r,children:[(0,e.jsx)(l,{children:(0,e.jsxs)(c,{className:"flex flex-wrap items-baseline gap-x-6 gap-y-2 py-6",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("span",{className:x("text-4xl font-semibold tabular-nums",A[t.grade]),"data-testid":`${r}-score`,children:t.score}),(0,e.jsx)("span",{className:"text-muted-foreground text-lg",children:"/100"})]}),(0,e.jsx)("span",{className:x("text-sm font-medium uppercase tracking-wide",A[t.grade]),"data-testid":`${r}-grade`,children:t.grade}),(0,e.jsxs)("div",{className:"text-muted-foreground flex gap-4 text-sm tabular-nums","data-testid":`${r}-summary`,children:[(0,e.jsxs)("span",{className:m.clean,children:[t.summary.clean," ",a("clean")]}),(0,e.jsxs)("span",{className:m.warned,children:[t.summary.warned," ",a("warned")]}),(0,e.jsxs)("span",{className:m.failing,children:[t.summary.failing," ",a("failing")]}),(0,e.jsxs)("span",{className:m.exempt,children:[t.summary.exempt," ",a("exempt")]})]})]})}),t.project.checks.length>0&&(0,e.jsx)(l,{children:(0,e.jsxs)(c,{className:"py-4 text-sm","data-testid":`${r}-project`,children:[(0,e.jsxs)("span",{className:"font-medium",children:[a("Schema & config")," ",t.project.score,"/100"]}),(0,e.jsxs)("span",{className:"text-muted-foreground",children:[" \u2014 ",t.project.checks.map(s=>s.name).join(", ")]})]})}),(0,e.jsx)(l,{children:(0,e.jsx)(c,{className:"p-0",children:(0,e.jsxs)(y,{children:[(0,e.jsx)(w,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(i,{className:"w-20",children:a("Score")}),(0,e.jsx)(i,{children:a("Procedure")}),(0,e.jsx)(i,{className:"w-32",children:a("Kind")}),(0,e.jsx)(i,{children:a("Rules fired")})]})}),(0,e.jsx)(j,{children:I.map(s=>(0,e.jsxs)(h,{"data-testid":`${r}-row`,children:[(0,e.jsx)(n,{className:x("tabular-nums font-medium",m[s.coverage]),children:s.coverage==="exempt"?"\u2014":s.score}),(0,e.jsx)(n,{className:"font-mono text-xs",children:s.id}),(0,e.jsxs)(n,{className:"text-muted-foreground text-xs",children:[s.visibility," ",s.kind,s.sensitivity.level==="high"&&(0,e.jsx)("span",{className:"ml-1 text-amber-600 dark:text-amber-400",children:a("sensitive")})]}),(0,e.jsx)(n,{className:"text-muted-foreground text-xs",children:s.coverage==="exempt"?O(s,a("no reason given")):s.checks.map(R=>R.name).join(", ")})]},s.id))})]})})})]})},"O");export{q as default};
@@ -1 +0,0 @@
1
- import{a as He}from"./chunk-Z2IF3TEX.js";import{a as Me,b as Ve}from"./chunk-GMR677FL.js";import"./chunk-GG6PIGQO.js";import"./chunk-SD4BERSA.js";import"./chunk-IC4L6G56.js";import{a as we}from"./chunk-5Y3QLNWX.js";import"./chunk-I6A5C46N.js";import"./chunk-2QSHLBCO.js";import"./chunk-BGBLQ563.js";import"./chunk-IVFHIQOT.js";import"./chunk-QBWRC5YX.js";import"./chunk-4UOFSGUS.js";import{a as Ze}from"./chunk-3CWGJYBB.js";import{a as Xe}from"./chunk-RMN2JN4S.js";import{b as We}from"./chunk-GRL5MG3Z.js";import{e as Ue}from"./chunk-SMIESS7P.js";import"./chunk-7T7UOTYK.js";import{R as Ae}from"./chunk-CFPZYHPY.js";import"./chunk-T6VMSOBB.js";import"./chunk-7QIFDWQV.js";import{a as me}from"./chunk-MWIKAR7F.js";import"./chunk-DJZYD5I5.js";import"./chunk-2OUPA2WJ.js";import{b as ze}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as je}from"./chunk-VDW32UET.js";import{f as Be}from"./chunk-BDHAGUAY.js";import"./chunk-XBDKZZ67.js";import{a as Je}from"./chunk-XQCVZAGU.js";import{a as qe,b as Ke,c as Pe,d as Ge,e as Le}from"./chunk-WQH3LT2P.js";import{d as Fe,f as Ee,g as $e,h as Oe,o as ue}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as r,e as De,f as at,g as nt,h as st,j as Re}from"./chunk-3XIESWL4.js";var Ce=De(nt(),1);var x=De(at(),1);var t=De(st(),1);var rt=Ee(je.listTables),ot=Ee(je.listTableIndexes),it=Ee(je.readTablePage),dt=Ee(je.describeTables),ct={},Qe=[],mt=r(s=>{let e=(0,Ce.c)(74),{initialShardKey:u,initialTable:n}=s,l=Be(),[a,m]=(0,x.useState)("graph"),{queryShardKey:c,setShardKey:d,shardKey:b}=Ze(u),[o,p]=(0,x.useState)(""),[i,v]=(0,x.useState)(null),[g,K]=(0,x.useState)(null),k;e[0]===Symbol.for("react.memo_cache_sentinel")?(k={},e[0]=k):k=e[0];let[L,y]=(0,x.useState)(k),P;e[1]===Symbol.for("react.memo_cache_sentinel")?(P={},e[1]=P):P=e[1];let[E,M]=(0,x.useState)(P),[T,C]=(0,x.useState)(null),F;e[2]===Symbol.for("react.memo_cache_sentinel")?(F={},e[2]=F):F=e[2];let[$,he]=(0,x.useState)(F),H;e[3]===Symbol.for("react.memo_cache_sentinel")?(H={},e[3]=H):H=e[3];let[I,G]=(0,x.useState)(H),[_,pe]=(0,x.useState)(null),[D,oe]=(0,x.useState)(null),Q;e[4]===Symbol.for("react.memo_cache_sentinel")?(Q={},e[4]=Q):Q=e[4];let[J,xe]=(0,x.useState)(Q),[W,ie]=(0,x.useState)(null),ve;e[5]!==l?(ve=r(async h=>{K(null);try{let w=await l.query(rt,{},$e(h));We(h),v(w),y({}),M({}),C(null),he(N=>Object.fromEntries(Object.entries(N).filter(q=>{let[A]=q;return A!==h}))),G(N=>Object.fromEntries(Object.entries(N).filter(q=>{let[A]=q;return A!==h})))}catch(w){let N=w;v(null),K(Oe(N))}},"ve"),e[5]=l,e[6]=ve):ve=e[6];let O=ve,Y;e[7]!==l?(Y=r(async()=>{oe(null);try{pe(await l.listGlobalTables())}catch(h){let w=h;pe(null),oe(Oe(w))}},"Q"),e[7]=l,e[8]=Y):Y=e[8];let ee=Y,de,R;e[9]!==c||e[10]!==O||e[11]!==ee?(de=r(()=>{ue(O(c)),ue(ee())},"de"),R=[O,ee,c],e[9]=c,e[10]=O,e[11]=ee,e[12]=de,e[13]=R):(de=e[12],R=e[13]),(0,x.useEffect)(de,R);let te;e[14]!==l||e[15]!==L||e[16]!==T||e[17]!==c?(te=r(async h=>{if(T===h){C(null);return}C(h);let w=`${c}:${h}`;if(L[w]!==void 0)return;let[N,q]=await Promise.allSettled([l.query(it,{limit:1,offset:0,table:h},$e(c)),l.query(ot,{table:h},$e(c))]);N.status==="fulfilled"?y(A=>({...A,[w]:N.value.columns})):K(Oe(N.reason)),q.status==="fulfilled"&&M(A=>({...A,[w]:q.value.indexes}))},"te"),e[14]=l,e[15]=L,e[16]=T,e[17]=c,e[18]=te):te=e[18];let j=te,ye;e[19]!==l||e[20]!==J||e[21]!==W?(ye=r(async h=>{if(W===h){ie(null);return}if(ie(h),J[h]===void 0)try{let w=await l.readGlobalTablePage({limit:1,offset:0,table:h});xe(N=>({...N,[h]:w.columns}))}catch(w){oe(Oe(w))}},"ye"),e[19]=l,e[20]=J,e[21]=W,e[22]=ye):ye=e[22];let ce=ye,ge=(0,x.useRef)(void 0),V,X;e[23]!==n||e[24]!==i||e[25]!==j?(V=r(()=>{n===void 0||i===null||ge.current===n||i.some(h=>h.name===n)&&(ge.current=n,ue(j(n)))},"V"),X=[n,i,j],e[23]=n,e[24]=i,e[25]=j,e[26]=V,e[27]=X):(V=e[26],X=e[27]),(0,x.useEffect)(V,X);let B;e[28]!==l?(B=r(async(h,w,N)=>{let[q,A]=await Promise.all([Promise.allSettled([l.query(dt,{tables:[...w,...N]},$e(h))]),Promise.all(N.map(async S=>{let be=await Promise.allSettled([l.readGlobalTablePage({limit:1,offset:0,table:S})]),Ie=be[0].status==="fulfilled"?be[0].value:void 0;return{columns:Ie?.columns??[],refs:Ie?.refs??{},table:S}}))]),Se=q[0].status==="fulfilled"?q[0].value?.columnsByTable??{}:{},Te=q[0].status==="rejected",ke=new Map(A.map(ut)),_e=[...w,...N].map(S=>{let be=Se[S]??[];return[S,be.length>0?be:ke.get(S)??[]]});he(S=>({...S,[h]:Object.fromEntries(_e)})),G(S=>({...S,[h]:Te}))},"B"),e[28]=l,e[29]=B):B=e[29];let le=B,U,ae;e[30]!==D||e[31]!==_||e[32]!==le||e[33]!==c||e[34]!==$||e[35]!==i||e[36]!==a?(U=r(()=>{a!=="graph"||i===null||_===null&&D===null||$[c]!==void 0||ue(le(c,i.map(ht),(_??[]).map(pt)))},"U"),ae=[a,i,_,D,c,$,le],e[30]=D,e[31]=_,e[32]=le,e[33]=c,e[34]=$,e[35]=i,e[36]=a,e[37]=U,e[38]=ae):(U=e[37],ae=e[38]),(0,x.useEffect)(U,ae);let z=$[c]??ct,ne;if(e[39]!==z||e[40]!==_||e[41]!==i){let h;e[43]!==z?(h=r(A=>({columns:z[A.name]??Qe,name:A.name,tier:"shard"}),"u"),e[43]=z,e[44]=h):h=e[44];let w=(i??[]).map(h),N;e[45]!==z?(N=r(A=>({columns:z[A.name]??Qe,name:A.name,tier:"global"}),"y"),e[45]=z,e[46]=N):N=e[46];let q=(_??[]).map(N);ne=[...w,...q],e[39]=z,e[40]=_,e[41]=i,e[42]=ne}else ne=e[42];let se=ne,f;if(e[47]!==o||e[48]!==i){let h=o.trim().toLowerCase();f=(i??[]).filter(w=>w.name.toLowerCase().includes(h)),e[47]=o,e[48]=i,e[49]=f}else f=e[49];let re=f,Z;if(e[50]!==_||e[51]!==o){let h=o.trim().toLowerCase();Z=(_??[]).filter(w=>w.name.toLowerCase().includes(h)),e[50]=_,e[51]=o,e[52]=Z}else Z=e[52];let Ne=Z,fe;return e[53]!==L||e[54]!==se||e[55]!==g||e[56]!==T||e[57]!==Ne||e[58]!==re||e[59]!==J||e[60]!==D||e[61]!==W||e[62]!==_||e[63]!==E||e[64]!==O||e[65]!==d||e[66]!==I||e[67]!==b||e[68]!==o||e[69]!==i||e[70]!==j||e[71]!==ce||e[72]!==a?(fe={columns:L,diagramTables:se,error:g,expanded:T,filteredGlobalTables:Ne,filteredTables:re,globalColumns:J,globalError:D,globalExpanded:W,globalTables:_,indexes:E,refresh:O,setShardKey:d,setTableFilter:p,setView:m,shardColumnsError:I,shardKey:b,tableFilter:o,tables:i,toggle:j,toggleGlobal:ce,view:a},e[53]=L,e[54]=se,e[55]=g,e[56]=T,e[57]=Ne,e[58]=re,e[59]=J,e[60]=D,e[61]=W,e[62]=_,e[63]=E,e[64]=O,e[65]=d,e[66]=I,e[67]=b,e[68]=o,e[69]=i,e[70]=j,e[71]=ce,e[72]=a,e[73]=fe):fe=e[73],fe},"ct");function ut(s){let{columns:e,refs:u,table:n}=s;return[n,e.map(l=>{let a=u[l];return a===void 0?{name:l,optional:!1,type:""}:{name:l,optional:!1,ref:a,type:"id"}})]}r(ut,"mt");function ht(s){return s.name}r(ht,"ut");function pt(s){return s.name}r(pt,"ht");var gt="/__lunora/schema-edit",ft=r(async s=>{let e=await fetch(gt,{body:JSON.stringify(s),headers:{"Content-Type":"application/json","X-Lunora-Studio":"1"},method:"POST"}),u=await e.json();return u.needsMigration===!0?{kind:"needs-migration",message:u.message??"This edit needs a migration."}:e.ok&&u.tables!==void 0?{diagnostics:u.diagnostics??[],kind:"ok",tables:u.tables}:{kind:"error",message:u.error??`schema edit failed (${String(e.status)})`}},"gt"),bt=r(s=>{let e=(0,Ce.c)(32),{hasTables:u,mode:n,onAddColumn:l,onAddIndex:a,onAddTable:m,onDestructive:c}=s,d=Fe(),b=n==="addTable"?"default":"outline",o;e[0]!==d?(o=d("Add table"),e[0]=d,e[1]=o):o=e[1];let p;e[2]!==m||e[3]!==b||e[4]!==o?(p=(0,t.jsx)(me,{"data-testid":"sc-editor-add-table",onClick:m,size:"xs",type:"button",variant:b,children:o}),e[2]=m,e[3]=b,e[4]=o,e[5]=p):p=e[5];let i=!u,v=n==="addColumn"?"default":"outline",g;e[6]!==d?(g=d("Add column"),e[6]=d,e[7]=g):g=e[7];let K;e[8]!==l||e[9]!==i||e[10]!==v||e[11]!==g?(K=(0,t.jsx)(me,{"data-testid":"sc-editor-add-column",disabled:i,onClick:l,size:"xs",type:"button",variant:v,children:g}),e[8]=l,e[9]=i,e[10]=v,e[11]=g,e[12]=K):K=e[12];let k=!u,L=n==="addIndex"?"default":"outline",y;e[13]!==d?(y=d("Add index"),e[13]=d,e[14]=y):y=e[14];let P;e[15]!==a||e[16]!==y||e[17]!==k||e[18]!==L?(P=(0,t.jsx)(me,{"data-testid":"sc-editor-add-index",disabled:k,onClick:a,size:"xs",type:"button",variant:L,children:y}),e[15]=a,e[16]=y,e[17]=k,e[18]=L,e[19]=P):P=e[19];let E=!u,M=n==="destructive"?"default":"ghost",T;e[20]!==d?(T=d("Rename / drop / change type\u2026"),e[20]=d,e[21]=T):T=e[21];let C;e[22]!==c||e[23]!==E||e[24]!==M||e[25]!==T?(C=(0,t.jsx)(me,{"data-testid":"sc-editor-destructive",disabled:E,onClick:c,size:"xs",type:"button",variant:M,children:T}),e[22]=c,e[23]=E,e[24]=M,e[25]=T,e[26]=C):C=e[26];let F;return e[27]!==P||e[28]!==C||e[29]!==p||e[30]!==K?(F=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[p,K,P,C]}),e[27]=P,e[28]=C,e[29]=p,e[30]=K,e[31]=F):F=e[31],F},"bt"),xt=r(s=>{let e=(0,Ce.c)(28),{onOpenMigrations:u,result:n}=s,l=Fe();if(n===null){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(t.Fragment,{}),e[0]=o):o=e[0],o}if(n.kind==="error"){let o;return e[1]!==n.message?(o=(0,t.jsx)("p",{className:"mt-3 text-sm text-destructive","data-testid":"sc-editor-error",role:"alert",children:n.message}),e[1]=n.message,e[2]=o):o=e[2],o}if(n.kind==="needs-migration"){let o;e[3]!==n.message||e[4]!==l?(o=n.message===""?l("This edit changes stored data and must go through a migration. Review the migration before applying."):n.message,e[3]=n.message,e[4]=l,e[5]=o):o=e[5];let p;e[6]!==o?(p=(0,t.jsx)("p",{className:"text-sm text-warning",role:"alert",children:o}),e[6]=o,e[7]=p):p=e[7];let i;e[8]!==l?(i=l("Open Migrations"),e[8]=l,e[9]=i):i=e[9];let v;e[10]!==u||e[11]!==i?(v=(0,t.jsx)(me,{className:"self-start","data-testid":"sc-editor-open-migrations",onClick:u,size:"xs",type:"button",variant:"outline",children:i}),e[10]=u,e[11]=i,e[12]=v):v=e[12];let g;return e[13]!==p||e[14]!==v?(g=(0,t.jsxs)("div",{className:"mt-3 flex flex-col gap-2","data-testid":"sc-editor-needs-migration",children:[p,v]}),e[13]=p,e[14]=v,e[15]=g):g=e[15],g}if(n.diagnostics.length===0){let o;return e[16]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(t.Fragment,{}),e[16]=o):o=e[16],o}let a;e[17]!==l?(a=l("Codegen reported diagnostics:"),e[17]=l,e[18]=a):a=e[18];let m;e[19]!==a?(m=(0,t.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:a}),e[19]=a,e[20]=m):m=e[20];let c;e[21]!==n.diagnostics?(c=n.diagnostics.map(vt),e[21]=n.diagnostics,e[22]=c):c=e[22];let d;e[23]!==c?(d=(0,t.jsx)("ul",{className:"flex flex-col gap-0.5",children:c}),e[23]=c,e[24]=d):d=e[24];let b;return e[25]!==m||e[26]!==d?(b=(0,t.jsxs)("div",{className:"mt-3 flex flex-col gap-1","data-testid":"sc-editor-diagnostics",children:[m,d]}),e[25]=m,e[26]=d,e[27]=b):b=e[27],b},"ft");function vt(s){return(0,t.jsx)("li",{className:"font-mono text-[11px] text-destructive",children:s},s)}r(vt,"xt");var yt=[{label:"string",validator:"v.string()"},{label:"number",validator:"v.number()"},{label:"boolean",validator:"v.boolean()"},{label:"bigint",validator:"v.int64()"},{label:"bytes",validator:"v.bytes()"},{label:"any",validator:"v.any()"}],Nt="v.string()",Ct=r(s=>s.split(",").map(e=>e.trim()).filter(e=>e!==""),"Nt"),wt=r(s=>{let e=(0,Ce.c)(83),{onApplied:u,tableNames:n}=s,l=Fe(),a=Ue(),[m,c]=(0,x.useState)(null),[d,b]=(0,x.useState)(!1),[o,p]=(0,x.useState)(null),[i,v]=(0,x.useState)(""),[g,K]=(0,x.useState)(""),[k,L]=(0,x.useState)(Nt),[y,P]=(0,x.useState)(n[0]??""),[E,M]=(0,x.useState)(""),[T,C]=(0,x.useState)(""),[F,$]=(0,x.useState)(!1),he;e[0]===Symbol.for("react.memo_cache_sentinel")?(he=r(()=>{c(null),v(""),K(""),M(""),C(""),$(!1)},"me"),e[0]=he):he=e[0];let H=he,I;e[1]!==u?(I=r(async S=>{b(!0),p(null);try{let be=await ft(S);p(be),be.kind==="ok"&&(u(be.tables),H())}catch(be){let Ie=be;p({kind:"error",message:Ie instanceof Error?Ie.message:String(Ie)})}b(!1)},"k"),e[1]=u,e[2]=I):I=e[2];let G=I,_;e[3]!==G||e[4]!==i?(_=r(()=>{ue(G({kind:"addTable",table:i.trim()}))},"$"),e[3]=G,e[4]=i,e[5]=_):_=e[5];let pe=_,D;e[6]!==g||e[7]!==G||e[8]!==y||e[9]!==k?(D=r(()=>{ue(G({column:g.trim(),kind:"addOptionalColumn",table:y,validator:k}))},"D"),e[6]=g,e[7]=G,e[8]=y,e[9]=k,e[10]=D):D=e[10];let oe=D,Q;e[11]!==T||e[12]!==E||e[13]!==G||e[14]!==y||e[15]!==F?(Q=r(()=>{ue(G({fields:Ct(T),kind:"addIndex",name:E.trim(),table:y,unique:F}))},"H"),e[11]=T,e[12]=E,e[13]=G,e[14]=y,e[15]=F,e[16]=Q):Q=e[16];let J=Q,xe;e[17]===Symbol.for("react.memo_cache_sentinel")?(xe=r(()=>{p(null),c("addTable")},"xe"),e[17]=xe):xe=e[17];let W=xe,ie;e[18]===Symbol.for("react.memo_cache_sentinel")?(ie=r(()=>{p(null),c("addColumn")},"ie"),e[18]=ie):ie=e[18];let ve=ie,O;e[19]===Symbol.for("react.memo_cache_sentinel")?(O=r(()=>{p(null),c("addIndex")},"q"),e[19]=O):O=e[19];let Y=O,ee;e[20]!==l?(ee=r(()=>{c("destructive"),p({kind:"needs-migration",message:l("This edit changes stored data and must go through a migration. Review the migration before applying.")})},"ee"),e[20]=l,e[21]=ee):ee=e[21];let de=ee,R;e[22]===Symbol.for("react.memo_cache_sentinel")?(R=r(S=>{v(S.target.value)},"R"),e[22]=R):R=e[22];let te=R,j;e[23]===Symbol.for("react.memo_cache_sentinel")?(j=r(S=>{K(S.target.value)},"z"),e[23]=j):j=e[23];let ye=j,ce;e[24]===Symbol.for("react.memo_cache_sentinel")?(ce=r(S=>{L(S.target.value)},"ce"),e[24]=ce):ce=e[24];let ge=ce,V;e[25]===Symbol.for("react.memo_cache_sentinel")?(V=r(S=>{P(S.target.value)},"V"),e[25]=V):V=e[25];let X=V,B;e[26]===Symbol.for("react.memo_cache_sentinel")?(B=r(S=>{M(S.target.value)},"B"),e[26]=B):B=e[26];let le=B,U;e[27]===Symbol.for("react.memo_cache_sentinel")?(U=r(S=>{C(S.target.value)},"U"),e[27]=U):U=e[27];let ae=U,z;e[28]===Symbol.for("react.memo_cache_sentinel")?(z=r(S=>{$(S.target.checked)},"E"),e[28]=z):z=e[28];let ne=z,se;e[29]!==a?(se=r(()=>{ue(a({to:"/migrations"}))},"se"),e[29]=a,e[30]=se):se=e[30];let f=se,re;e[31]!==l?(re=l("Edit schema"),e[31]=l,e[32]=re):re=e[32];let Z;e[33]!==re?(Z=(0,t.jsx)(Pe,{children:re}),e[33]=re,e[34]=Z):Z=e[34];let Ne;e[35]!==l?(Ne=l("Adds a table, column, or index to lunora/schema.ts and reruns codegen."),e[35]=l,e[36]=Ne):Ne=e[36];let fe;e[37]!==Ne?(fe=(0,t.jsx)(Ge,{children:Ne}),e[37]=Ne,e[38]=fe):fe=e[38];let h;e[39]!==Z||e[40]!==fe?(h=(0,t.jsxs)(Ke,{children:[Z,fe]}),e[39]=Z,e[40]=fe,e[41]=h):h=e[41];let w=n.length>0,N;e[42]!==m||e[43]!==de||e[44]!==w?(N=(0,t.jsx)(bt,{hasTables:w,mode:m,onAddColumn:ve,onAddIndex:Y,onAddTable:W,onDestructive:de}),e[42]=m,e[43]=de,e[44]=w,e[45]=N):N=e[45];let q;e[46]!==d||e[47]!==m||e[48]!==pe||e[49]!==l||e[50]!==i?(q=m==="addTable"&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"sc-editor-table-form",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(we,{htmlFor:"sc-editor-table-name",children:l("Table name")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-table-name",id:"sc-editor-table-name",onChange:te,value:i})]}),(0,t.jsx)(me,{"data-testid":"sc-editor-table-apply",disabled:d||i.trim()==="",onClick:pe,size:"xs",type:"button",children:l(d?"Applying\u2026":"Apply")}),(0,t.jsx)(me,{onClick:H,size:"xs",type:"button",variant:"ghost",children:l("Cancel")})]}),e[46]=d,e[47]=m,e[48]=pe,e[49]=l,e[50]=i,e[51]=q):q=e[51];let A;e[52]!==d||e[53]!==g||e[54]!==m||e[55]!==oe||e[56]!==l||e[57]!==n||e[58]!==y||e[59]!==k?(A=m==="addColumn"&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"sc-editor-column-form",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(we,{htmlFor:"sc-editor-column-table",children:l("Table name")}),(0,t.jsx)("select",{className:"h-8 rounded-md border border-input bg-transparent px-2 text-xs","data-testid":"sc-editor-column-table",id:"sc-editor-column-table",onChange:X,value:y,children:n.map(St)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(we,{htmlFor:"sc-editor-column-name",children:l("Column name")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-column-name",id:"sc-editor-column-name",onChange:ye,value:g})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(we,{htmlFor:"sc-editor-column-type",children:l("Column type")}),(0,t.jsx)("select",{className:"h-8 rounded-md border border-input bg-transparent px-2 text-xs","data-testid":"sc-editor-column-type",id:"sc-editor-column-type",onChange:ge,value:k,children:yt.map(Tt)})]}),(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground",children:l("Optional")}),(0,t.jsx)(me,{"data-testid":"sc-editor-column-apply",disabled:d||g.trim()===""||y==="",onClick:oe,size:"xs",type:"button",children:l(d?"Applying\u2026":"Apply")}),(0,t.jsx)(me,{onClick:H,size:"xs",type:"button",variant:"ghost",children:l("Cancel")})]}),e[52]=d,e[53]=g,e[54]=m,e[55]=oe,e[56]=l,e[57]=n,e[58]=y,e[59]=k,e[60]=A):A=e[60];let Se;e[61]!==d||e[62]!==T||e[63]!==E||e[64]!==m||e[65]!==J||e[66]!==l||e[67]!==n||e[68]!==y||e[69]!==F?(Se=m==="addIndex"&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"sc-editor-index-form",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(we,{htmlFor:"sc-editor-index-table",children:l("Table name")}),(0,t.jsx)("select",{className:"h-8 rounded-md border border-input bg-transparent px-2 text-xs","data-testid":"sc-editor-index-table",id:"sc-editor-index-table",onChange:X,value:y,children:n.map(kt)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(we,{htmlFor:"sc-editor-index-name",children:l("Index name")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-index-name",id:"sc-editor-index-name",onChange:le,value:E})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(we,{htmlFor:"sc-editor-index-fields",children:l("Index fields (comma-separated)")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-index-fields",id:"sc-editor-index-fields",onChange:ae,value:T})]}),(0,t.jsxs)(we,{className:"flex items-center gap-1 text-xs",htmlFor:"sc-editor-index-unique",children:[(0,t.jsx)("input",{checked:F,"data-testid":"sc-editor-index-unique",id:"sc-editor-index-unique",onChange:ne,type:"checkbox"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:l("Unique")})]}),(0,t.jsx)(me,{"data-testid":"sc-editor-index-apply",disabled:d||E.trim()===""||T.trim()==="",onClick:J,size:"xs",type:"button",children:l(d?"Applying\u2026":"Apply")}),(0,t.jsx)(me,{onClick:H,size:"xs",type:"button",variant:"ghost",children:l("Cancel")})]}),e[61]=d,e[62]=T,e[63]=E,e[64]=m,e[65]=J,e[66]=l,e[67]=n,e[68]=y,e[69]=F,e[70]=Se):Se=e[70];let Te;e[71]!==f||e[72]!==o?(Te=(0,t.jsx)(xt,{onOpenMigrations:f,result:o}),e[71]=f,e[72]=o,e[73]=Te):Te=e[73];let ke;e[74]!==N||e[75]!==q||e[76]!==A||e[77]!==Se||e[78]!==Te?(ke=(0,t.jsxs)(Le,{children:[N,q,A,Se,Te]}),e[74]=N,e[75]=q,e[76]=A,e[77]=Se,e[78]=Te,e[79]=ke):ke=e[79];let _e;return e[80]!==h||e[81]!==ke?(_e=(0,t.jsxs)(qe,{"data-testid":"sc-editor",size:"sm",children:[h,ke]}),e[80]=h,e[81]=ke,e[82]=_e):_e=e[82],_e},"Ct");function St(s){return(0,t.jsx)("option",{value:s,children:s},s)}r(St,"Tt");function Tt(s){return(0,t.jsx)("option",{value:s.validator,children:s.label},s.validator)}r(Tt,"wt");function kt(s){return(0,t.jsx)("option",{value:s,children:s},s)}r(kt,"St");var Ye=[],_t=r(s=>{let e=(0,Ce.c)(5),{open:u}=s,n=u&&"rotate-90",l;e[0]!==n?(l=Re("size-3.5 shrink-0 text-muted-foreground transition-transform duration-150",n),e[0]=n,e[1]=l):l=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)("path",{d:"m9 6 6 6-6 6"}),e[2]=a):a=e[2];let m;return e[3]!==l?(m=(0,t.jsx)("svg",{"aria-hidden":"true",className:l,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:a}),e[3]=l,e[4]=m):m=e[4],m},"$t"),et=r(s=>{let e=(0,Ce.c)(20),{children:u,expanded:n,name:l,onToggle:a,rowCount:m,rowTestId:c,toggleTestId:d}=s,b;e[0]!==n?(b=(0,t.jsx)(_t,{open:n}),e[0]=n,e[1]=b):b=e[1];let o;e[2]!==l?(o=(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:l,children:l}),e[2]=l,e[3]=o):o=e[3];let p;e[4]!==m?(p=(0,t.jsxs)("span",{className:"ms-auto shrink-0 text-xs text-muted-foreground tabular-nums",children:["(",m,")"]}),e[4]=m,e[5]=p):p=e[5];let i;e[6]!==n||e[7]!==a||e[8]!==b||e[9]!==o||e[10]!==p||e[11]!==d?(i=(0,t.jsxs)("button",{"aria-expanded":n,className:"flex w-full items-center gap-2 px-3 py-2 text-start transition-colors hover:bg-muted/50 aria-expanded:bg-muted/40","data-testid":d,onClick:a,type:"button",children:[b,o," ",p]}),e[6]=n,e[7]=a,e[8]=b,e[9]=o,e[10]=p,e[11]=d,e[12]=i):i=e[12];let v;e[13]!==u||e[14]!==n?(v=n&&(0,t.jsx)("div",{className:"px-3 pb-3 ps-8",children:u}),e[13]=u,e[14]=n,e[15]=v):v=e[15];let g;return e[16]!==c||e[17]!==i||e[18]!==v?(g=(0,t.jsxs)("li",{className:"border-t border-border/60 first:border-t-0","data-testid":c,children:[i,v]}),e[16]=c,e[17]=i,e[18]=v,e[19]=g):g=e[19],g},"Xe"),tt=r(s=>{let e=(0,Ce.c)(5),{columns:u,testId:n}=s,l;e[0]!==u?(l=u.map(At),e[0]=u,e[1]=l):l=e[1];let a;return e[2]!==l||e[3]!==n?(a=(0,t.jsx)("ul",{className:"flex flex-wrap gap-1.5 pt-1","data-testid":n,children:l}),e[2]=l,e[3]=n,e[4]=a):a=e[4],a},"Ye"),It=r(s=>{let e=(0,Ce.c)(10),{heading:u,indexes:n,testId:l}=s,a;e[0]!==u?(a=(0,t.jsx)("p",{className:"mb-1.5 font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:u}),e[0]=u,e[1]=a):a=e[1];let m;e[2]!==n?(m=n.map(Ft),e[2]=n,e[3]=m):m=e[3];let c;e[4]!==m||e[5]!==l?(c=(0,t.jsx)("ul",{className:"flex flex-col gap-1","data-testid":l,children:m}),e[4]=m,e[5]=l,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==c?(d=(0,t.jsxs)("div",{className:"pt-3",children:[a,c]}),e[7]=a,e[8]=c,e[9]=d):d=e[9],d},"_t"),lt=r(s=>Re("border-b-2 px-3 py-2 font-mono text-[11px] tracking-widest uppercase outline-none transition-colors",s?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),"Je"),Xt=r(s=>{let e=(0,Ce.c)(85),{initialShardKey:u,initialTable:n,schemaEditable:l}=s,a=Fe(),m;e[0]!==u||e[1]!==n?(m={initialShardKey:u,initialTable:n},e[0]=u,e[1]=n,e[2]=m):m=e[2];let{columns:c,diagramTables:d,error:b,expanded:o,filteredGlobalTables:p,filteredTables:i,globalColumns:v,globalError:g,globalExpanded:K,globalTables:k,indexes:L,refresh:y,setShardKey:P,setTableFilter:E,setView:M,shardColumnsError:T,shardKey:C,tableFilter:F,tables:$,toggle:he,toggleGlobal:H,view:I}=mt(m),G;e[3]!==M?(G=r(()=>{M("list")},"G"),e[3]=M,e[4]=G):G=e[4];let _=G,pe;e[5]!==M?(pe=r(()=>{M("graph")},"ue"),e[5]=M,e[6]=pe):pe=e[6];let D=pe,oe;e[7]!==E?(oe=r(f=>{E(f.target.value)},"oe"),e[7]=E,e[8]=oe):oe=e[8];let Q=oe,J;e[9]!==y||e[10]!==C?(J=r(f=>{ue(y(C))},"X"),e[9]=y,e[10]=C,e[11]=J):J=e[11];let xe=J,W;e[12]!==$?(W=$??[],e[12]=$,e[13]=W):W=e[13];let ie;e[14]!==W?(ie=W.map(zt),e[14]=W,e[15]=ie):ie=e[15];let ve=ie,O;e[16]!==P||e[17]!==C?(O=(0,t.jsx)(Xe,{onChange:P,testId:"sc-shard-input",value:C}),e[16]=P,e[17]=C,e[18]=O):O=e[18];let Y;e[19]!==a?(Y=a("Schema view"),e[19]=a,e[20]=Y):Y=e[20];let ee=I==="graph",de=I==="graph",R;e[21]!==de?(R=lt(de),e[21]=de,e[22]=R):R=e[22];let te;e[23]!==a?(te=a("Graph"),e[23]=a,e[24]=te):te=e[24];let j;e[25]!==D||e[26]!==ee||e[27]!==R||e[28]!==te?(j=(0,t.jsx)("button",{"aria-selected":ee,className:R,"data-testid":"sc-view-graph",onClick:D,role:"tab",type:"button",children:te}),e[25]=D,e[26]=ee,e[27]=R,e[28]=te,e[29]=j):j=e[29];let ye=I==="list",ce=I==="list",ge;e[30]!==ce?(ge=lt(ce),e[30]=ce,e[31]=ge):ge=e[31];let V;e[32]!==a?(V=a("Table list"),e[32]=a,e[33]=V):V=e[33];let X;e[34]!==_||e[35]!==ye||e[36]!==ge||e[37]!==V?(X=(0,t.jsx)("button",{"aria-selected":ye,className:ge,"data-testid":"sc-view-list",onClick:_,role:"tab",type:"button",children:V}),e[34]=_,e[35]=ye,e[36]=ge,e[37]=V,e[38]=X):X=e[38];let B;e[39]!==j||e[40]!==X||e[41]!==Y?(B=(0,t.jsxs)("div",{"aria-label":Y,className:"flex items-center gap-1","data-testid":"sc-view-toggle",role:"tablist",children:[j,X]}),e[39]=j,e[40]=X,e[41]=Y,e[42]=B):B=e[42];let le;e[43]!==B||e[44]!==O?(le=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[O,B]}),e[43]=B,e[44]=O,e[45]=le):le=e[45];let U;e[46]!==xe||e[47]!==l||e[48]!==ve?(U=l===!0&&(0,t.jsx)(wt,{onApplied:xe,tableNames:ve}),e[46]=xe,e[47]=l,e[48]=ve,e[49]=U):U=e[49];let ae;e[50]!==Q||e[51]!==a||e[52]!==F||e[53]!==I?(ae=I==="list"&&(0,t.jsx)(Ae,{"aria-label":a("Filter tables"),className:"h-8 max-w-xs","data-testid":"sc-filter",onChange:Q,placeholder:a("Filter tables"),value:F}),e[50]=Q,e[51]=a,e[52]=F,e[53]=I,e[54]=ae):ae=e[54];let z;e[55]!==d||e[56]!==b||e[57]!==g||e[58]!==T||e[59]!==C||e[60]!==I?(z=I==="graph"&&(0,t.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"sc-graph-view",children:[b!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-error",role:"alert",children:b}),g!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-global-error",role:"alert",children:g}),(0,t.jsx)(He,{columnsError:T[C]===!0,tables:d,testIdPrefix:"sc-graph"})]}),e[55]=d,e[56]=b,e[57]=g,e[58]=T,e[59]=C,e[60]=I,e[61]=z):z=e[61];let ne;e[62]!==c||e[63]!==b||e[64]!==o||e[65]!==p||e[66]!==i||e[67]!==v||e[68]!==g||e[69]!==K||e[70]!==k||e[71]!==L||e[72]!==C||e[73]!==a||e[74]!==$||e[75]!==he||e[76]!==H||e[77]!==I?(ne=I==="list"&&(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)(qe,{"data-testid":"sc-shard-section",size:"sm",children:[(0,t.jsxs)(Ke,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(Ve,{tier:"shard"}),(0,t.jsx)(Pe,{children:a("Shard tables")}),$!==null&&(0,t.jsx)(ze,{className:"ms-auto tabular-nums",variant:"outline",children:i.length})]}),(0,t.jsx)(Ge,{children:Me.shard.hint})]}),(0,t.jsxs)(Le,{children:[b!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-error",role:"alert",children:b}),$!==null&&$.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"sc-empty",children:a("No tables in this shard.")}),$!==null&&$.length>0&&i.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"sc-no-match",children:a("No tables match your filter.")}),i.length>0&&(0,t.jsx)("ul",{className:"-mx-3 overflow-hidden border-t border-border","data-testid":"sc-table-list",children:i.map(f=>{let re=`${C}:${f.name}`,Z=L[re]??[];return(0,t.jsxs)(et,{expanded:o===f.name,name:f.name,onToggle:r(()=>{ue(he(f.name))},"onToggle"),rowCount:f.rowCount,rowTestId:`sc-table-${f.name}`,toggleTestId:`sc-toggle-${f.name}`,children:[(0,t.jsx)(tt,{columns:c[re]??Ye,testId:`sc-columns-${f.name}`}),Z.length>0&&(0,t.jsx)(It,{heading:a("Indexes"),indexes:Z,testId:`sc-indexes-${f.name}`})]},f.name)})})]})]}),(0,t.jsxs)(qe,{"data-testid":"sc-global-section",size:"sm",children:[(0,t.jsxs)(Ke,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(Ve,{tier:"global"}),(0,t.jsx)(Pe,{children:a("Global tables (D1)")}),k!==null&&(0,t.jsx)(ze,{className:"ms-auto tabular-nums",variant:"outline",children:p.length})]}),(0,t.jsx)(Ge,{children:Me.global.hint})]}),(0,t.jsxs)(Le,{children:[g!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-global-error",role:"alert",children:g}),k!==null&&k.length===0&&(0,t.jsx)(Je,{description:Me.global.hint,testId:"sc-global-empty",title:a("No global tables.")}),k!==null&&k.length>0&&p.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"sc-global-no-match",children:a("No tables match your filter.")}),p.length>0&&(0,t.jsx)("ul",{className:"-mx-3 overflow-hidden border-t border-border","data-testid":"sc-global-table-list",children:p.map(f=>(0,t.jsx)(et,{expanded:K===f.name,name:f.name,onToggle:r(()=>{ue(H(f.name))},"onToggle"),rowCount:f.rowCount,rowTestId:`sc-global-table-${f.name}`,toggleTestId:`sc-global-toggle-${f.name}`,children:(0,t.jsx)(tt,{columns:v[f.name]??Ye,testId:`sc-global-columns-${f.name}`})},f.name))})]})]})]}),e[62]=c,e[63]=b,e[64]=o,e[65]=p,e[66]=i,e[67]=v,e[68]=g,e[69]=K,e[70]=k,e[71]=L,e[72]=C,e[73]=a,e[74]=$,e[75]=he,e[76]=H,e[77]=I,e[78]=ne):ne=e[78];let se;return e[79]!==le||e[80]!==U||e[81]!==ae||e[82]!==z||e[83]!==ne?(se=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-schema",children:[le,U,ae,z,ne]}),e[79]=le,e[80]=U,e[81]=ae,e[82]=z,e[83]=ne,e[84]=se):se=e[84],se},"Zt");function At(s){return(0,t.jsx)("li",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground",children:s},s)}r(At,"kt");function Ft(s){return(0,t.jsxs)("li",{className:"flex flex-wrap items-center gap-1.5 text-xs",children:[(0,t.jsx)("span",{className:"font-mono",children:s.name}),(0,t.jsx)(ze,{variant:"outline",children:s.type}),s.unique===!0&&(0,t.jsx)(ze,{variant:"secondary",children:"unique"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:s.fields.join(", ")})]},`${s.type}:${s.name}`)}r(Ft,"It");function zt(s){return s.name}r(zt,"At");export{Xt as SchemaViewer};
@@ -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-CAOA5AM4.js";import"./chunk-XXQUMVWH.js";import"./chunk-VR3OBMGZ.js";import"./chunk-QLQADHFE.js";import{a as R}from"./chunk-VDW32UET.js";import{c as M}from"./chunk-FZ2N52BV.js";import"./chunk-BDHAGUAY.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 D}from"./chunk-XXQUMVWH.js";import{a as U}from"./chunk-VR3OBMGZ.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,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};