@lunora/studio 1.0.0-alpha.11 → 1.0.0-alpha.111
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.
- package/LICENSE.md +6 -0
- package/dist/index.d.ts +835 -782
- package/dist/index.js +1 -41
- package/dist/mount.d.ts +10 -10
- package/dist/mount.js +1 -26
- package/dist/packem_chunks/AdvisorHealthPanel.js +1 -0
- package/dist/packem_chunks/ApiTab.js +1 -0
- package/dist/packem_chunks/AuditPanel.js +1 -0
- package/dist/packem_chunks/DeploymentHealthPanel.js +1 -0
- package/dist/packem_chunks/ExportImportPanel.js +3 -0
- package/dist/packem_chunks/FileBrowser.js +4 -0
- package/dist/packem_chunks/FunctionRunner.js +1 -0
- package/dist/packem_chunks/FunctionStatsPanel.js +1 -0
- package/dist/packem_chunks/HealthPanel.js +1 -0
- package/dist/packem_chunks/InsightsPanel.js +1 -0
- package/dist/packem_chunks/LogsPanel.js +1 -0
- package/dist/packem_chunks/MailPanel.js +2 -0
- package/dist/packem_chunks/MetricsPanel.js +1 -0
- package/dist/packem_chunks/NotificationsPanel.js +1 -0
- package/dist/packem_chunks/PitrPanel.js +1 -0
- package/dist/packem_chunks/SchemaViewer.js +1 -0
- package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -0
- package/dist/packem_chunks/SettingsPanel.js +1 -0
- package/dist/packem_chunks/SqlEditorPanel.js +6 -0
- package/dist/packem_chunks/TableEditor.js +1 -0
- package/dist/packem_chunks/agents-panel.js +1 -0
- package/dist/packem_chunks/analytics-panel.js +1 -0
- package/dist/packem_chunks/auth-audit-panel.js +1 -0
- package/dist/packem_chunks/auth-config-panel.js +1 -0
- package/dist/packem_chunks/auth-sessions-panel.js +1 -0
- package/dist/packem_chunks/containers-panel.js +1 -0
- package/dist/packem_chunks/dashboards-panel.js +1 -0
- package/dist/packem_chunks/evals-panel.js +1 -0
- package/dist/packem_chunks/fanout-panel.js +1 -0
- package/dist/packem_chunks/flags-panel.js +1 -0
- package/dist/packem_chunks/issues-panel.js +1 -0
- package/dist/packem_chunks/kv-browser.js +1 -0
- package/dist/packem_chunks/log-drains-panel.js +4 -0
- package/dist/packem_chunks/migrations-route.js +1 -0
- package/dist/packem_chunks/organizations-panel.js +1 -0
- package/dist/packem_chunks/payments-panel.js +1 -0
- package/dist/packem_chunks/permissions-panel.js +1 -0
- package/dist/packem_chunks/queues-panel.js +1 -0
- package/dist/packem_chunks/rls-panel.js +1 -0
- package/dist/packem_chunks/schedule-panel.js +1 -0
- package/dist/packem_chunks/sparkline.js +1 -0
- package/dist/packem_chunks/storage-rules-panel.js +1 -0
- package/dist/packem_chunks/subscriptions-panel.js +1 -0
- package/dist/packem_chunks/sync-client-panel.js +1 -0
- package/dist/packem_chunks/traces-panel.js +1 -0
- package/dist/packem_chunks/users-panel.js +1 -0
- package/dist/packem_chunks/vector-browser.js +1 -0
- package/dist/packem_chunks/workflows-panel.js +1 -0
- package/dist/packem_shared/ADMIN_FUNCTIONS-4aE59aDq.js +1 -0
- package/dist/packem_shared/ApiDocsPanel-BL5lMig5.js +2 -0
- package/dist/packem_shared/ApiReferencePanel-CkCFMCBb.js +1 -0
- package/dist/packem_shared/CommandPalette-B5yLEABs.js +1 -0
- package/dist/packem_shared/ConfirmButton-Cj2SOapE.js +1 -0
- package/dist/packem_shared/ConnectionBadge-Bh16X9-u.js +1 -0
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-DuULO4XM.js +1 -0
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-1Lrg55IV.js +1 -0
- package/dist/packem_shared/DEFAULT_LOCALE-A1Yg5ORA.js +1 -0
- package/dist/packem_shared/DataBrowser-BnDIFN-S.js +1 -0
- package/dist/packem_shared/DataFilters-3nbW0uax.js +1 -0
- package/dist/packem_shared/ErrorBoundary-BWNF98VF.js +1 -0
- package/dist/packem_shared/GlobalDataBrowser-DusjXzRF.js +1 -0
- package/dist/packem_shared/HomePanel-BcaHVBJh.js +1 -0
- package/dist/packem_shared/MigrationsPanel-CCOENX4X.js +1 -0
- package/dist/packem_shared/OpenRpcReferencePanel-21OWMH45.js +1 -0
- package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.js +1 -0
- package/dist/packem_shared/ScheduledJobs-CiO3eXgI.js +1 -0
- package/dist/packem_shared/ShardInput-XumEzeT0.js +1 -0
- package/dist/packem_shared/Studio-CHmLCjBR.js +1 -0
- package/dist/packem_shared/StudioApp-DCdbsciH.js +1 -0
- package/dist/packem_shared/StudioI18nProvider-Bl547evf.js +1 -0
- package/dist/packem_shared/advisor-view-C1KFTXSH.js +1 -0
- package/dist/packem_shared/aggregateMetrics-A-Y7OH6R.js +1 -0
- package/dist/packem_shared/alert-C2SEhYS9.js +1 -0
- package/dist/packem_shared/app.d-D1bPR8FO.d.ts +252 -0
- package/dist/packem_shared/badge-cAk9Di1Q.js +1 -0
- package/dist/packem_shared/bar-chart-CCyO67Uf.js +6 -0
- package/dist/packem_shared/browser-storage-Br_bLeBt.js +1 -0
- package/dist/packem_shared/button-BOPLD1un.js +1 -0
- package/dist/packem_shared/card-BGlQzQY-.js +1 -0
- package/dist/packem_shared/cf-links-CBJ5SywP.js +1 -0
- package/dist/packem_shared/checkbox-C5w53W-E.js +1 -0
- package/dist/packem_shared/data-grid-BFTQnkXq.js +1 -0
- package/dist/packem_shared/data-view-params-qoSTqjAj.js +1 -0
- package/dist/packem_shared/dropdown-menu-D_ewqsUU.js +2 -0
- package/dist/packem_shared/empty-state-B939z6K2.js +1 -0
- package/dist/packem_shared/error-alert-TYdKetJd.js +1 -0
- package/dist/packem_shared/grid-features-C_yXlMc_.js +6 -0
- package/dist/packem_shared/home-panel-BiJHXeDC.js +3 -0
- package/dist/packem_shared/input-CY5W3wzv.js +1 -0
- package/dist/packem_shared/internal-CwaF9YNk.js +2 -0
- package/dist/packem_shared/label-BOUo-DP0.js +1 -0
- package/dist/packem_shared/live-status-Bf7rR8o8.js +1 -0
- package/dist/packem_shared/log-fields-SBxKyBug.js +1 -0
- package/dist/packem_shared/log-line-UnE93Ovi.js +1 -0
- package/dist/packem_shared/modal-shell-wGW4CKEW.js +1 -0
- package/dist/packem_shared/operation-console-provider-DoloEvon.js +1 -0
- package/dist/packem_shared/recording-client-CKn4-vUx.js +1 -0
- package/dist/packem_shared/reference-view-CUIDzLf0.js +12 -0
- package/dist/packem_shared/result-chart-Ca3YLzt8.js +1 -0
- package/dist/packem_shared/schema-diagram-DHD13TjS.js +2 -0
- package/dist/packem_shared/scroll-area-DSJftwu_.js +2 -0
- package/dist/packem_shared/select-BPISLTcv.js +2 -0
- package/dist/packem_shared/shard-history-QcjcMnCA.js +1 -0
- package/dist/packem_shared/skeleton-DFBBaJU6.js +1 -0
- package/dist/packem_shared/sparkline-BreIqzDO.js +1 -0
- package/dist/packem_shared/stat-card-B9uIvAHg.js +1 -0
- package/dist/packem_shared/storage-tier-C2mKwYRj.js +1 -0
- package/dist/packem_shared/studio-B3eEcBK0.js +2 -0
- package/dist/packem_shared/table-BMsuYFhk.js +2 -0
- package/dist/packem_shared/table-list-sidebar-Bluzd1_2.js +1 -0
- package/dist/packem_shared/textarea-DpO3i-Qo.js +1 -0
- package/dist/packem_shared/trace-handoff-C0CFV2ix.js +1 -0
- package/dist/packem_shared/use-admin-query-P0RJrjsD.js +1 -0
- package/dist/packem_shared/use-async-submit-DdLd0MdK.js +1 -0
- package/dist/packem_shared/use-auth-config-z3KRWAqD.js +1 -0
- package/dist/packem_shared/use-open-trace-4tIa0SXZ.js +1 -0
- package/dist/packem_shared/use-shard-key-BsP3o5wT.js +1 -0
- package/dist/packem_shared/use-sql-assistant-CP90nLLh.js +1 -0
- package/dist/packem_shared/useDebounced-DVeQ5-oW.js +1 -0
- package/dist/packem_shared/utils-bhneXptQ.js +1 -0
- package/dist/packem_shared/virtual-rect-D_j7aLxX.js +1 -0
- package/dist/packem_shared/wire-codec-Dl3VeNrd.js +1 -0
- package/dist/standalone/chunk-25OIGX2A.js +1 -0
- package/dist/standalone/chunk-26VREVWU.js +1 -0
- package/dist/standalone/chunk-2BDM6HNL.js +1 -0
- package/dist/standalone/chunk-2DC6F7NH.js +1 -0
- package/dist/standalone/chunk-3F5I435D.js +1 -0
- package/dist/standalone/chunk-3QB5JI32.js +1 -0
- package/dist/standalone/chunk-3RYEUXY2.js +1 -0
- package/dist/standalone/chunk-44WNSIGQ.js +1 -0
- package/dist/standalone/chunk-45YWYMD5.js +1 -0
- package/dist/standalone/chunk-4MAJFNON.js +1 -0
- package/dist/standalone/chunk-4YTSKL4R.js +1 -0
- package/dist/standalone/chunk-57VX76PR.js +1 -0
- package/dist/standalone/chunk-5JLIP2HH.js +1 -0
- package/dist/standalone/chunk-5NRQIDQA.js +1 -0
- package/dist/standalone/chunk-5T7KRUPX.js +1 -0
- package/dist/standalone/chunk-6FWN26RH.js +1 -0
- package/dist/standalone/chunk-6JGXSMKV.js +1 -0
- package/dist/standalone/chunk-6NJAHOGO.js +1 -0
- package/dist/standalone/chunk-6SAAMM4S.js +1 -0
- package/dist/standalone/chunk-6ZPTNC34.js +19 -0
- package/dist/standalone/chunk-74ASA4WU.js +1 -0
- package/dist/standalone/chunk-7PIHTTND.js +1 -0
- package/dist/standalone/chunk-7SROZWKL.js +1 -0
- package/dist/standalone/chunk-AECDJKXB.js +1 -0
- package/dist/standalone/chunk-AFKLFS74.js +1 -0
- package/dist/standalone/chunk-AOAJGSYZ.js +2 -0
- package/dist/standalone/chunk-AOE75NAT.js +1 -0
- package/dist/standalone/chunk-APRVSWBH.js +59 -0
- package/dist/standalone/chunk-BELLXCN7.js +2 -0
- package/dist/standalone/chunk-BORG7WUC.js +1 -0
- package/dist/standalone/chunk-BQK2C2Z4.js +1 -0
- package/dist/standalone/chunk-BWEXJENB.js +1 -0
- package/dist/standalone/chunk-C5E5PLJT.js +4 -0
- package/dist/standalone/chunk-C7E4I7JZ.js +1 -0
- package/dist/standalone/chunk-CAOUXOL7.js +1 -0
- package/dist/standalone/chunk-CEPMQS24.js +6 -0
- package/dist/standalone/chunk-CKTKI4IY.js +1 -0
- package/dist/standalone/chunk-CN2AINNY.js +1 -0
- package/dist/standalone/chunk-CP4ZFBVW.js +1 -0
- package/dist/standalone/chunk-CYX3OHJ3.js +1 -0
- package/dist/standalone/chunk-D7DUQS2Y.js +1 -0
- package/dist/standalone/chunk-DKSLOJDQ.js +1 -0
- package/dist/standalone/chunk-DL3UOEWN.js +1 -0
- package/dist/standalone/chunk-DPNEFSEC.js +1 -0
- package/dist/standalone/chunk-DUDQV6XJ.js +1 -0
- package/dist/standalone/chunk-EDHW2EEG.js +1 -0
- package/dist/standalone/chunk-EYGF6TQS.js +1 -0
- package/dist/standalone/chunk-F7JOSNAT.js +1 -0
- package/dist/standalone/chunk-FBAZHG35.js +1 -0
- package/dist/standalone/chunk-FLCK2WWQ.js +1 -0
- package/dist/standalone/chunk-FSWPREH3.js +1 -0
- package/dist/standalone/chunk-GIRZD3UB.js +3 -0
- package/dist/standalone/chunk-GPP4VSUO.js +1 -0
- package/dist/standalone/chunk-GZMBMNL3.js +6 -0
- package/dist/standalone/chunk-INBA3473.js +1 -0
- package/dist/standalone/chunk-INQICZYC.js +1 -0
- package/dist/standalone/chunk-IWNVQHF7.js +1 -0
- package/dist/standalone/chunk-IWOZGUI2.js +1 -0
- package/dist/standalone/chunk-IYWVSMAY.js +1 -0
- package/dist/standalone/chunk-J6MNOKO5.js +1 -0
- package/dist/standalone/chunk-JURAVSE7.js +1 -0
- package/dist/standalone/chunk-JUWOEHDD.js +1 -0
- package/dist/standalone/chunk-JV7KTJPY.js +1 -0
- package/dist/standalone/chunk-JVAYDDMK.js +1 -0
- package/dist/standalone/chunk-KEKIGANB.js +1 -0
- package/dist/standalone/chunk-KFZ37KQP.js +1 -0
- package/dist/standalone/chunk-KQIHXYE6.js +1 -0
- package/dist/standalone/chunk-L4EZAHCD.js +1 -0
- package/dist/standalone/chunk-L7CJ5PGH.js +1 -0
- package/dist/standalone/chunk-LT4XQDD2.js +1 -0
- package/dist/standalone/chunk-M3NNNOD5.js +1 -0
- package/dist/standalone/chunk-MCLM2QJI.js +1 -0
- package/dist/standalone/chunk-METRMDIQ.js +1 -0
- package/dist/standalone/chunk-MGC6PRMV.js +1 -0
- package/dist/standalone/chunk-MOUI44OT.js +1 -0
- package/dist/standalone/chunk-MSFUDXBA.js +1 -0
- package/dist/standalone/chunk-NIX2QSSN.js +1 -0
- package/dist/standalone/chunk-NXXGISFB.js +1 -0
- package/dist/standalone/chunk-OE4KGVJW.js +4 -0
- package/dist/standalone/chunk-OG57FC7W.js +1 -0
- package/dist/standalone/chunk-OLQWBGKT.js +1 -0
- package/dist/standalone/chunk-OOBJFXYB.js +1 -0
- package/dist/standalone/chunk-P52BY657.js +1 -0
- package/dist/standalone/chunk-PHHMPYEP.js +1 -0
- package/dist/standalone/chunk-PJDKRUWT.js +1 -0
- package/dist/standalone/chunk-PZ4QDWTI.js +1 -0
- package/dist/standalone/chunk-QZ55OWAB.js +4 -0
- package/dist/standalone/chunk-R5ZTCHCE.js +1 -0
- package/dist/standalone/chunk-RBUVNO22.js +1 -0
- package/dist/standalone/chunk-RCZTUWG3.js +1 -0
- package/dist/standalone/chunk-S77D4SHR.js +1 -0
- package/dist/standalone/chunk-SL5R7WBN.js +1 -0
- package/dist/standalone/chunk-SMKRXJUC.js +1 -0
- package/dist/standalone/chunk-SPDZUX4P.js +1 -0
- package/dist/standalone/chunk-T2LDA6WP.js +1 -0
- package/dist/standalone/chunk-T6HLABZW.js +1 -0
- package/dist/standalone/chunk-TBXK3FKP.js +11 -0
- package/dist/standalone/chunk-TFMQSCGC.js +1 -0
- package/dist/standalone/chunk-TLPWZ5NI.js +3 -0
- package/dist/standalone/chunk-TNKECJW4.js +1 -0
- package/dist/standalone/chunk-UANVABQG.js +1 -0
- package/dist/standalone/chunk-UIF57LBO.js +1 -0
- package/dist/standalone/chunk-V6QPVFDL.js +1 -0
- package/dist/standalone/chunk-VDW32UET.js +1 -0
- package/dist/standalone/chunk-VNTEQQPP.js +1 -0
- package/dist/standalone/chunk-VR3UJA7B.js +1 -0
- package/dist/standalone/chunk-VYW2PAWC.js +15 -0
- package/dist/standalone/chunk-VZCS5GXZ.js +1 -0
- package/dist/standalone/chunk-W2JBKQNU.js +1 -0
- package/dist/standalone/chunk-WHRG6S5P.js +1 -0
- package/dist/standalone/chunk-WIG3HCUJ.js +1 -0
- package/dist/standalone/chunk-WUW4ZHRL.js +1 -0
- package/dist/standalone/chunk-X6Q5DWLZ.js +1 -0
- package/dist/standalone/chunk-XGIG4EDG.js +8 -0
- package/dist/standalone/chunk-XJSWM47N.js +1 -0
- package/dist/standalone/chunk-XQS7KSHL.js +1 -0
- package/dist/standalone/chunk-YS7HEZC2.js +1 -0
- package/dist/standalone/chunk-YUWMB6EV.js +1 -0
- package/dist/standalone/chunk-ZN6KUP3O.js +13 -0
- package/dist/standalone/chunk-ZPGNTTQ3.js +1 -0
- package/dist/standalone/chunk-ZQLIKKIY.js +1 -0
- package/dist/standalone/chunk-ZSOLGJFC.js +1 -0
- package/dist/standalone/studio.js +9 -378
- package/dist/styles.css +2 -2
- package/package.json +16 -15
- package/dist/packem_shared/ADMIN_FUNCTIONS-DjXgvJb6.js +0 -46
- package/dist/packem_shared/ApiDocsPanel-yVSGHK3H.js +0 -842
- package/dist/packem_shared/ApiReferencePanel-1vubqG5s.js +0 -229
- package/dist/packem_shared/ApiTab-rwttyQ1-.js +0 -251
- package/dist/packem_shared/AuditPanel-SRilxyg0.js +0 -200
- package/dist/packem_shared/CommandPalette-BtgkBzZI.js +0 -373
- package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
- package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
- package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
- package/dist/packem_shared/DataBrowser-B4v_9GiU.js +0 -4475
- package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
- package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
- package/dist/packem_shared/ExportImportPanel-NtZVqbOj.js +0 -197
- package/dist/packem_shared/FileBrowser-0pCpdKPE.js +0 -2932
- package/dist/packem_shared/FunctionRunner-7NH3KcTg.js +0 -343
- package/dist/packem_shared/FunctionStatsPanel-n-6FrbOH.js +0 -375
- package/dist/packem_shared/GlobalDataBrowser-3X9uRfdO.js +0 -289
- package/dist/packem_shared/HealthPanel-Dpr6KTmV.js +0 -648
- package/dist/packem_shared/HomePanel-CpFLsa64.js +0 -1334
- package/dist/packem_shared/InsightsPanel-BchgeeRx.js +0 -461
- package/dist/packem_shared/LogsPanel-DsPnKZ95.js +0 -827
- package/dist/packem_shared/MailPanel-Bmg781UW.js +0 -440
- package/dist/packem_shared/MetricsPanel-DaE8ZXrf.js +0 -1611
- package/dist/packem_shared/MigrationsPanel-CaUpce-G.js +0 -239
- package/dist/packem_shared/OpenRpcReferencePanel-vbcYbv3V.js +0 -191
- package/dist/packem_shared/PitrPanel-LJGNP_IX.js +0 -252
- package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
- package/dist/packem_shared/ScheduledJobs-BWNwIN3I.js +0 -262
- package/dist/packem_shared/SchemaViewer-Bam6ylvw.js +0 -2512
- package/dist/packem_shared/SecurityAdvisorPanel-PAx712Bd.js +0 -92
- package/dist/packem_shared/SettingsPanel-C4tufQD5.js +0 -390
- package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
- package/dist/packem_shared/SqlEditorPanel-D5wMIxcg.js +0 -13
- package/dist/packem_shared/Studio-BFg10lBc.js +0 -33
- package/dist/packem_shared/StudioApp-g8j3V6vA.js +0 -657
- package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
- package/dist/packem_shared/TableEditor-0TYRqi6t.js +0 -11
- package/dist/packem_shared/advisor-view-CGcfMiPq.js +0 -159
- package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
- package/dist/packem_shared/app.d-Nbhpihxv.d.ts +0 -300
- package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
- package/dist/packem_shared/bar-chart-CzJAgqkp.js +0 -3245
- package/dist/packem_shared/button-BhsN2uZH.js +0 -49
- package/dist/packem_shared/card-DURq3ElK.js +0 -175
- package/dist/packem_shared/cf-links-2cktDedA.js +0 -8
- package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
- package/dist/packem_shared/data-grid-B5CaV3wS.js +0 -183
- package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
- package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
- package/dist/packem_shared/grid-features-CzUfqgsM.js +0 -840
- package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
- package/dist/packem_shared/internal-rXJEAhXS.js +0 -68
- package/dist/packem_shared/label-D8ykjn5J.js +0 -46
- package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
- package/dist/packem_shared/reference-view-B4E49Lip.js +0 -2180
- package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
- package/dist/packem_shared/sparkline-10dG-_f0.js +0 -93
- package/dist/packem_shared/sql-editor-panel-Smfl_FDF.js +0 -2562
- package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
- package/dist/packem_shared/studio-DRWW__L9.js +0 -10851
- package/dist/packem_shared/table-_RzNvy3R.js +0 -246
- package/dist/packem_shared/table-editor-CiyJi0Nm.js +0 -407
- package/dist/packem_shared/table-list-sidebar-Bg7uzbvC.js +0 -832
- package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
- package/dist/packem_shared/use-admin-query-BkbdNFNz.js +0 -105
- package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
- package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
- package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as N}from"react/compiler-runtime";import{AreaChart as K,CartesianGrid as g,XAxis as w,Area as S,LineChart as X,Line as B}from"recharts";import{useT as R}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{h as $}from"./internal-CwaF9YNk.js";import{E as q,X as E,B as _,T as j,C as G,a as A,b as L}from"./bar-chart-CCyO67Uf.js";import{jsx as l,jsxs as b}from"react/jsx-runtime";const O=50,T={value:{colors:{dark:["var(--chart-1)"],light:["var(--chart-1)"]},label:"value"}},F=n=>{const e=n.columns.find(t=>n.rows.length>0&&n.rows.every(o=>typeof o[t]=="number"))??null;return{label:n.columns.find(t=>t!==e)??null,value:e}},H=n=>{const e=N(3),{data:a,kind:t}=n;let o;return e[0]!==a||e[1]!==t?(o=l(G,{className:"h-full w-full",config:T,children:t==="area"?b(K,{data:a,children:[l(g,{vertical:!1}),l(w,{axisLine:!1,dataKey:"label",tickLine:!1}),l(A,{content:l(L,{})}),l(S,{dataKey:"value",fill:"var(--color-value-0)",fillOpacity:.2,stroke:"var(--color-value-0)",type:"monotone"})]}):b(X,{data:a,children:[l(g,{vertical:!1}),l(w,{axisLine:!1,dataKey:"label",tickLine:!1}),l(A,{content:l(L,{})}),l(B,{dataKey:"value",dot:!1,stroke:"var(--color-value-0)",strokeWidth:2,type:"monotone"})]})}),e[0]=a,e[1]=t,e[2]=o):o=e[2],o},D=n=>{const e=N(21),{axes:a,result:t}=n,o=R();let d;e[0]!==t?(d=F(t),e[0]=t,e[1]=d):d=e[1];const x=d;let f;e[2]!==t.columns?(f=new Set(t.columns),e[2]=t.columns,e[3]=f):f=e[3];const m=f,h=a!==void 0&&m.has(a.x)?a.x:x.label;let v;e[4]!==a?.y||e[5]!==m?(v=a?.y.find(s=>m.has(s)),e[4]=a?.y,e[5]=m,e[6]=v):v=e[6];const k=v,u=k??x.value;let p;e[7]!==h||e[8]!==t.rows||e[9]!==u?(p=u===null?[]:t.rows.slice(0,O).map((s,c)=>({label:h===null?`#${(c+1).toString()}`:$(s[h]),value:Number(s[u])||0})),e[7]=h,e[8]=t.rows,e[9]=u,e[10]=p):p=e[10];const C=p;if(u===null){let s;e[11]!==o?(s=o("No numeric column to chart."),e[11]=o,e[12]=s):s=e[12];let c;return e[13]!==s?(c=l("p",{className:"p-4 text-sm text-muted-foreground","data-testid":"sql-chart-empty",children:s}),e[13]=s,e[14]=c):c=e[14],c}const r=a!==void 0&&k!==void 0?a.kind:"bar";let i;e[15]!==C||e[16]!==r?(i=r==="bar"?b(q,{className:"h-full w-full",config:T,data:C,children:[l(E,{dataKey:"label"}),l(_,{dataKey:"value"}),l(j,{})]}):l(H,{data:C,kind:r}),e[15]=C,e[16]=r,e[17]=i):i=e[17];let y;return e[18]!==r||e[19]!==i?(y=l("div",{className:"h-80 w-full p-3","data-chart-kind":r,"data-testid":"sql-chart",children:i}),e[18]=r,e[19]=i,e[20]=y):y=e[20],y};export{D as S};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import{c as v}from"react/compiler-runtime";import{Download01Icon as ne}from"@hugeicons/core-free-icons";import{HugeiconsIcon as se}from"@hugeicons/react";import{Handle as B,Position as G,getNodesBounds as re,getViewportForBounds as ae,useNodesState as le,useEdgesState as ie,ReactFlow as ce,Background as de,Panel as M,Controls as me,MiniMap as pe,useNodes as ue,useReactFlow as U,useNodesInitialized as fe}from"@xyflow/react";import{useState as k,useMemo as _,useRef as ge,useEffect as D}from"react";import{S as he,T as N}from"./storage-tier-C2mKwYRj.js";import{B as S}from"./badge-cAk9Di1Q.js";import{B as j}from"./button-BOPLD1un.js";import{D as be,a as xe,b as Ne,g as C}from"./dropdown-menu-D_ewqsUU.js";import{I as ye}from"./input-CY5W3wzv.js";import{useT as T}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{f as L}from"./internal-CwaF9YNk.js";import{c as y}from"./utils-bhneXptQ.js";import{jsx as i,jsxs as f}from"react/jsx-runtime";import{LunoraError as ve}from"@lunora/errors";import{toBlob as we,toSvg as Se}from"html-to-image";function Ee(o){const e=v(10);let t,a,s;e[0]!==o?({className:t,selected:s,...a}=o,e[0]=o,e[1]=t,e[2]=a,e[3]=s):(t=e[1],a=e[2],s=e[3]);const r=s===!0?"":void 0;let n;e[4]!==t?(n=y("rounded-md border border-border bg-card text-card-foreground shadow-sm transition-colors","data-[selected]:border-ring data-[selected]:ring-[3px] data-[selected]:ring-ring/30",t),e[4]=t,e[5]=n):n=e[5];let l;return e[6]!==a||e[7]!==r||e[8]!==n?(l=i("div",{"data-slot":"base-node","data-selected":r,className:n,...a}),e[6]=a,e[7]=r,e[8]=n,e[9]=l):l=e[9],l}function Te(o){const e=v(8);let t,a;e[0]!==o?({className:t,...a}=o,e[0]=o,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=y("flex items-center gap-2 rounded-t-md bg-muted/50 px-3 py-1.5",t),e[3]=t,e[4]=s):s=e[4];let r;return e[5]!==a||e[6]!==s?(r=i("div",{"data-slot":"base-node-header",className:s,...a}),e[5]=a,e[6]=s,e[7]=r):r=e[7],r}function $e(o){const e=v(8);let t,a;e[0]!==o?({className:t,...a}=o,e[0]=o,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=y("flex flex-col",t),e[3]=t,e[4]=s):s=e[4];let r;return e[5]!==a||e[6]!==s?(r=i("div",{"data-slot":"base-node-content",className:s,...a}),e[5]=a,e[6]=s,e[7]=r):r=e[7],r}const F=o=>{const e=o.ref===void 0?o.type:`${o.type} → ${o.ref}`;return o.optional===!0?`${e}?`:e},_e=o=>{const e=v(22),{data:t,selected:a}=o,s=T();let r;e[0]!==t.label||e[1]!==t.loadError||e[2]!==s?(r=t.loadError===!0?i("span",{className:"px-3 py-1.5 text-xs text-destructive","data-testid":`sd-node-${t.label}-error`,children:s("Columns unavailable")}):i("span",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:"—"}),e[0]=t.label,e[1]=t.loadError,e[2]=s,e[3]=r):r=e[3];const n=r,l=`sd-node-${t.label}`;let d;e[4]!==t.label?(d=i("span",{className:"truncate font-mono text-xs font-semibold",title:t.label,children:t.label}),e[4]=t.label,e[5]=d):d=e[5];let m;e[6]!==t.tier?(m=i("span",{className:"ms-auto",children:i(he,{tier:t.tier})}),e[6]=t.tier,e[7]=m):m=e[7];let c;e[8]!==d||e[9]!==m?(c=f(Te,{children:[d,m]}),e[8]=d,e[9]=m,e[10]=c):c=e[10];let p;e[11]!==t.columns||e[12]!==t.label||e[13]!==n?(p=t.columns.length===0?n:t.columns.map(g=>f("div",{className:y("relative flex items-center gap-2 border-t border-border px-3 py-1.5 text-xs first:border-t-0",g.pk===!0&&"bg-muted/30"),"data-testid":`sd-col-${t.label}-${g.name}`,children:[i(B,{className:"!h-2 !w-2 !-left-1 !border-border !bg-muted-foreground/70",id:g.name,isConnectable:!1,position:G.Left,type:"target"}),i("span",{className:"truncate font-mono",title:g.name,children:g.name}),g.pk===!0&&i(S,{className:"px-1 py-0 text-[10px] leading-tight",variant:"secondary",children:"PK"}),g.ref!==void 0&&i(S,{className:"px-1 py-0 text-[10px] leading-tight",variant:"outline",children:"FK"}),i("span",{className:"ms-auto truncate text-muted-foreground",title:F(g),children:F(g)}),i(B,{className:"!h-2 !w-2 !-right-1 !border-border !bg-muted-foreground/70",id:g.name,isConnectable:!1,position:G.Right,type:"source"})]},g.name)),e[11]=t.columns,e[12]=t.label,e[13]=n,e[14]=p):p=e[14];let u;e[15]!==p?(u=i($e,{children:p}),e[15]=p,e[16]=u):u=e[16];let b;return e[17]!==a||e[18]!==l||e[19]!==c||e[20]!==u?(b=f(Ee,{className:"w-64 overflow-hidden","data-testid":l,selected:a,children:[c,u]}),e[17]=a,e[18]=l,e[19]=c,e[20]=u,e[21]=b):b=e[21],b},x=1920,E=1080,K=32,R=(o,e)=>{const t=globalThis.document.createElement("a");t.href=o,t.download=e,globalThis.document.body.append(t),t.click(),t.remove()},Ce=(o,e,t="schema-diagram.json")=>{const a={edges:e,exportedAt:new Date().toISOString(),nodes:o},s=JSON.stringify(a,void 0,2),r=globalThis.URL.createObjectURL(new globalThis.Blob([s],{type:"application/json"}));R(r,t),globalThis.setTimeout(()=>{globalThis.URL.revokeObjectURL(r)},0)},P=(o,e,t,a)=>{const s=re(o),{x:r,y:n,zoom:l}=ae(s,e,t,.1,2,a);return{transform:[r,n,l],zoom:l}},Me=async(o,e,t="schema-diagram.png")=>{const{transform:a}=P(e,x,E,K),[s,r,n]=a,l=await we(o,{backgroundColor:"#ffffff",height:E,style:{transform:`translate(${s.toString()}px, ${r.toString()}px) scale(${n.toString()})`,transformOrigin:"top left",width:`${x.toString()}px`},width:x});if(l===null)throw new ve("INTERNAL","html-to-image produced no blob");const d=globalThis.URL.createObjectURL(l);R(d,t),globalThis.setTimeout(()=>{globalThis.URL.revokeObjectURL(d)},0)},ke=async(o,e,t="schema-diagram.svg")=>{const{transform:a}=P(e,x,E,K),[s,r,n]=a,l=await Se(o,{backgroundColor:"#ffffff",height:E,style:{transform:`translate(${s.toString()}px, ${r.toString()}px) scale(${n.toString()})`,transformOrigin:"top left",width:`${x.toString()}px`},width:x});R(l,t)},W=256,q=112,I=36,w=24,De=480,Le=1.4,Re=o=>{const e=Math.max(1,Math.round(Math.sqrt(Le*o/(W+q))));return Math.max(De,o/e)},Ae=38,Oe=28,z=o=>Ae+Math.max(1,o)*Oe,He=(o,e)=>{const t=new Map;for(const n of o)t.set(n,[]);for(const n of e)n.to!==n.from&&t.has(n.from)&&t.has(n.to)&&t.get(n.from)?.push(n.to);const a=new Map,s=new Set,r=n=>{const l=a.get(n);if(l!==void 0)return l;if(s.has(n))return 0;s.add(n);let d=0;for(const m of t.get(n)??[])d=Math.max(d,r(m)+1);return s.delete(n),a.set(n,d),d};for(const n of o)r(n);return a},Be=(o,e,t)=>{const a=He(o,e),s=new Map;for(const m of o){const c=a.get(m)??0,p=s.get(c);p===void 0?s.set(c,[m]):p.push(m)}const r=o.reduce((m,c)=>m+z(t.get(c)??0)+I,0),n=Re(r),l=[];let d=0;for(const m of[...s.keys()].toSorted((c,p)=>c-p)){let c=0,p=w;for(const u of s.get(m)??[]){const b=z(t.get(u)??0);p>w&&p+b>n&&(c+=1,p=w),l.push({name:u,x:w+(d+c)*(W+q),y:p}),p+=b+I}d+=c+1}return l},Ge={databaseSchema:_e},J={backgroundColor:N.shard.color},V={backgroundColor:N.global.color},je={global:!0,shard:!0},Fe={},Ie=o=>{const e=o.find(t=>t.pk===!0)?.name;return e!==void 0?e:o.some(t=>t.name==="_id")?"_id":o.some(t=>t.name==="id")?"id":o[0]?.name??"_id"},Y=o=>o.flatMap(e=>e.columns.filter(t=>t.ref!==void 0).map(t=>({column:t.name,from:e.name,to:t.ref}))),ze=(o,e,t)=>{const a=o.map(l=>l.name),s=new Map(o.map(l=>[l.name,l.columns.length])),r=Be(a,Y(o),s),n=new Map(o.map(l=>[l.name,l]));return r.flatMap(({name:l,x:d,y:m})=>{const c=n.get(l);return c===void 0?[]:[{className:t[l],data:{columns:c.columns,label:l,loadError:e,tier:c.tier},id:l,position:{x:d,y:m},type:"databaseSchema"}]})},Ue=o=>{const e=new Map(o.map(t=>[t.name,t.columns]));return Y(o).flatMap(t=>{const a=e.get(t.to)??[],s=e.get(t.from)??[],r=Ie(a);return!a.some(n=>n.name===r)||!s.some(n=>n.name===t.column)?[]:[{id:`${t.from}.${t.column}->${t.to}`,source:t.to,sourceHandle:r,target:t.from,targetHandle:t.column}]})},Ke=()=>{const o=v(15),e=T();let t;o[0]===Symbol.for("react.memo_cache_sentinel")?(t=f("span",{className:"flex items-center gap-1",children:[i("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:J}),N.shard.label]}),o[0]=t):t=o[0];let a;o[1]===Symbol.for("react.memo_cache_sentinel")?(a=f("span",{className:"flex items-center gap-1",children:[i("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:V}),N.global.label]}),o[1]=a):a=o[1];let s;o[2]===Symbol.for("react.memo_cache_sentinel")?(s=i(S,{className:"px-1 py-0 text-[10px] leading-tight",variant:"secondary",children:"PK"}),o[2]=s):s=o[2];let r;o[3]!==e?(r=e("Primary key"),o[3]=e,o[4]=r):r=o[4];let n;o[5]!==r?(n=f("span",{className:"flex items-center gap-1",children:[s,r]}),o[5]=r,o[6]=n):n=o[6];let l;o[7]===Symbol.for("react.memo_cache_sentinel")?(l=i(S,{className:"px-1 py-0 text-[10px] leading-tight",variant:"outline",children:"FK"}),o[7]=l):l=o[7];let d;o[8]!==e?(d=e("Foreign key"),o[8]=e,o[9]=d):d=o[9];let m;o[10]!==d?(m=f("span",{className:"flex items-center gap-1",children:[l,d]}),o[10]=d,o[11]=m):m=o[11];let c;return o[12]!==n||o[13]!==m?(c=f("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 rounded-xl border border-border bg-card/95 px-2.5 py-1.5 text-[11px] text-muted-foreground shadow-xs",children:[t,a,n,m]}),o[12]=n,o[13]=m,o[14]=c):c=o[14],c},Pe=12,We=o=>{const e=v(9),{containerRef:t,seedKey:a}=o,s=fe(),{fitView:r}=U();let n;e[0]!==t||e[1]!==r||e[2]!==s?(n=()=>{if(!s)return;const d=()=>{L(r({duration:0,maxZoom:1.6,padding:.14}))};d();const m=t.current;if(m===null)return;const c=new ResizeObserver(()=>{d()});return c.observe(m),()=>{c.disconnect()}},e[0]=t,e[1]=r,e[2]=s,e[3]=n):n=e[3];let l;return e[4]!==t||e[5]!==r||e[6]!==s||e[7]!==a?(l=[t,r,s,a],e[4]=t,e[5]=r,e[6]=s,e[7]=a,e[8]=l):l=e[8],D(n,l),null},qe=({containerRef:o,testIdPrefix:e})=>{const t=T(),a=ue(),{getEdges:s}=U(),[r,n]=k(null),l=async()=>{const u=o.current?.querySelector(".react-flow__viewport");if(u){n("png");try{await Me(u,a,`${e}-schema-diagram.png`)}finally{n(null)}}},d=async()=>{const u=o.current?.querySelector(".react-flow__viewport");if(u){n("svg");try{await ke(u,a,`${e}-schema-diagram.svg`)}finally{n(null)}}},m=()=>{n("json");try{Ce(a,s(),`${e}-schema-diagram.json`)}finally{n(null)}},c=()=>{L(l())},p=()=>{L(d())};return i(M,{position:"top-right",children:f(be,{children:[f(xe,{className:"group/button inline-flex shrink-0 cursor-pointer items-center justify-center gap-1 rounded-md border border-border bg-background px-2 text-xs font-medium whitespace-nowrap hover:bg-muted disabled:pointer-events-none disabled:opacity-50","data-testid":`${e}-export-trigger`,disabled:r!==null,children:[i(se,{className:"size-3.5",icon:ne,strokeWidth:2}),t("Export")]}),f(Ne,{align:"end",children:[i(C,{"data-testid":`${e}-export-png`,disabled:r!==null,onClick:c,children:t("PNG")}),i(C,{"data-testid":`${e}-export-svg`,disabled:r!==null,onClick:p,children:t("SVG")}),i(C,{"data-testid":`${e}-export-json`,disabled:r!==null,onClick:m,children:t("JSON")})]})]})})},dt=({columnsError:o,fill:e=!1,nodeClasses:t,tables:a,testIdPrefix:s})=>{const r=T(),[n,l]=k(je),[d,m]=k(""),c=_(()=>{const h=d.trim().toLowerCase();return a.filter(H=>n[H.tier]&&H.name.toLowerCase().includes(h))},[a,n,d]),p=_(()=>ze(c,o??!1,t??Fe),[c,o,t]),u=_(()=>Ue(c),[c]),b=c.map(h=>h.name).join(","),[g,A,Q]=le(p),[Z,O,X]=ie(u),$=ge(null);D(()=>{A(p)},[p,A]),D(()=>{O(u)},[u,O]);const ee=h=>{m(h.target.value)},te=()=>{l(h=>({...h,shard:!h.shard}))},oe=()=>{l(h=>({...h,global:!h.global}))};return a.length===0?i("section",{className:"flex flex-col gap-2","data-testid":`${s}-section`,children:i("p",{className:"text-sm text-muted-foreground","data-testid":`${s}-empty`,children:r("No tables to graph.")})}):i("section",{className:y("flex flex-col",e&&"min-h-0 flex-1"),"data-testid":`${s}-section`,children:i("div",{className:y("w-full overflow-hidden border border-border bg-muted/20",e?"min-h-0 flex-1":"h-[560px]"),"data-testid":`${s}-canvas`,ref:$,children:f(ce,{edges:Z,elementsSelectable:!0,fitView:!0,minZoom:.2,nodes:g,nodesConnectable:!1,nodeTypes:Ge,onEdgesChange:X,onNodesChange:Q,children:[i(de,{}),i(M,{position:"top-left",children:f("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card/95 p-2 shadow-xs",children:[i(ye,{"aria-label":r("Find table…"),className:"h-7 w-44 text-xs","data-testid":`${s}-find`,onChange:ee,placeholder:r("Find table…"),value:d}),f("div",{"aria-label":r("Storage tiers"),className:"flex items-center gap-1.5",role:"group",children:[f(j,{"aria-pressed":n.shard,className:"gap-1.5","data-testid":`${s}-tier-shard`,onClick:te,size:"xs",type:"button",variant:n.shard?"default":"outline",children:[i("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:J}),N.shard.label]}),f(j,{"aria-pressed":n.global,className:"gap-1.5","data-testid":`${s}-tier-global`,onClick:oe,size:"xs",type:"button",variant:n.global?"default":"outline",children:[i("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:V}),N.global.label]})]})]})}),i(M,{position:"bottom-center",children:i(Ke,{})}),i(me,{showInteractive:!1}),c.length>Pe&&i(pe,{className:"!border !border-border !bg-card",maskColor:"var(--color-muted)",nodeColor:"var(--color-muted-foreground)",nodeStrokeWidth:0,pannable:!0,zoomable:!0}),i(qe,{containerRef:$,testIdPrefix:s}),i(We,{containerRef:$,seedKey:b})]})})})};export{dt as S};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import{c as u}from"react/compiler-runtime";import{ScrollArea as i}from"@base-ui/react/scroll-area";import{c as m}from"./utils-bhneXptQ.js";import{jsx as c,jsxs as b}from"react/jsx-runtime";function z(s){const r=u(14);let e,l,a;r[0]!==s?({className:l,children:e,...a}=s,r[0]=s,r[1]=e,r[2]=l,r[3]=a):(e=r[1],l=r[2],a=r[3]);let t;r[4]!==l?(t=m("relative",l),r[4]=l,r[5]=t):t=r[5];let o;r[6]!==e?(o=c(i.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:e}),r[6]=e,r[7]=o):o=r[7];let n,d;r[8]===Symbol.for("react.memo_cache_sentinel")?(n=c(h,{}),d=c(i.Corner,{}),r[8]=n,r[9]=d):(n=r[8],d=r[9]);let f;return r[10]!==a||r[11]!==t||r[12]!==o?(f=b(i.Root,{"data-slot":"scroll-area",className:t,...a,children:[o,n,d]}),r[10]=a,r[11]=t,r[12]=o,r[13]=f):f=r[13],f}function h({className:s,orientation:r="vertical",...e}){return c(i.Scrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":r,orientation:r,className:m("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-s data-vertical:border-s-transparent",s),...e,children:c(i.Thumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-md bg-border"})})}export{z as S};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import{c as u}from"react/compiler-runtime";import{Select as l}from"@base-ui/react/select";import{c}from"./utils-bhneXptQ.js";import{HugeiconsIcon as m}from"@hugeicons/react";import{UnfoldMoreIcon as g,Tick02Icon as v,ArrowUp01Icon as b,ArrowDown01Icon as h}from"@hugeicons/core-free-icons";import{jsx as i,jsxs as p}from"react/jsx-runtime";const I=l.Root;function $(s){const e=u(8);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=c("flex flex-1 text-start",t),e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==o||e[6]!==a?(r=i(l.Value,{"data-slot":"select-value",className:a,...o}),e[5]=o,e[6]=a,e[7]=r):r=e[7],r}function j({className:s,size:e="default",children:t,...o}){return p(l.Trigger,{"data-slot":"select-trigger","data-size":e,className:c("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pe-2 ps-2.5 text-xs whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-md *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),...o,children:[t,i(l.Icon,{render:i(m,{icon:g,strokeWidth:2,className:"pointer-events-none size-4 text-muted-foreground"})})]})}function A({className:s,children:e,side:t="bottom",sideOffset:o=4,align:a="center",alignOffset:r=0,alignItemWithTrigger:n=!0,...d}){return i(l.Portal,{children:i(l.Positioner,{side:t,sideOffset:o,align:a,alignOffset:r,alignItemWithTrigger:n,className:"isolate z-50",children:p(l.Popup,{"data-slot":"select-content","data-align-trigger":n,className:c("isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! relative bg-popover before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!",s),...d,children:[i(x,{}),i(l.List,{children:e}),i(w,{})]})})})}function U(s){const e=u(13);let t,o,a;e[0]!==s?({className:o,children:t,...a}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=a):(t=e[1],o=e[2],a=e[3]);let r;e[4]!==o?(r=c("relative flex w-full cursor-default items-center gap-2 rounded-md py-2 pe-8 ps-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[4]=o,e[5]=r):r=e[5];let n;e[6]!==t?(n=i(l.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),e[6]=t,e[7]=n):n=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=i(l.ItemIndicator,{render:i("span",{className:"pointer-events-none absolute end-2 flex size-4 items-center justify-center"}),children:i(m,{icon:v,strokeWidth:2,className:"pointer-events-none"})}),e[8]=d):d=e[8];let f;return e[9]!==a||e[10]!==r||e[11]!==n?(f=p(l.Item,{"data-slot":"select-item",className:r,...a,children:[n,d]}),e[9]=a,e[10]=r,e[11]=n,e[12]=f):f=e[12],f}function x(s){const e=u(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=c("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=a):a=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i(m,{icon:b,strokeWidth:2}),e[5]=r):r=e[5];let n;return e[6]!==o||e[7]!==a?(n=i(l.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:a,...o,children:r}),e[6]=o,e[7]=a,e[8]=n):n=e[8],n}function w(s){const e=u(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=c("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=a):a=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i(m,{icon:h,strokeWidth:2}),e[5]=r):r=e[5];let n;return e[6]!==o||e[7]!==a?(n=i(l.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:a,...o,children:r}),e[6]=o,e[7]=a,e[8]=n):n=e[8],n}export{$ as S,j as a,A as b,U as c,I as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as a,l as i}from"./browser-storage-Br_bLeBt.js";const e="lunora-studio-recent-shards",c=10,o=()=>i(e,"session").filter(s=>typeof s=="string"),l=s=>{const r=s.trim();if(r==="")return o();const t=[r,...o().filter(n=>n!==r)].slice(0,c);return a(e,t,"session"),t};export{o as l,l as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as r}from"react/compiler-runtime";import{c as a}from"./utils-bhneXptQ.js";import{jsx as i}from"react/jsx-runtime";function p(m){const e=r(8);let t,s;e[0]!==m?({className:t,...s}=m,e[0]=m,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=a("animate-pulse rounded-md bg-muted",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=i("div",{"data-slot":"skeleton",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{p as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as p}from"react/compiler-runtime";import{B as u,E as h}from"./bar-chart-CCyO67Uf.js";import{c as g}from"./utils-bhneXptQ.js";import{jsx as d}from"react/jsx-runtime";const v={value:{colors:{dark:["var(--foreground)"],light:["var(--foreground)"]},label:""}},w=i=>{const e=p(12),{ariaLabel:n,className:c,series:r,testId:m}=i;if(r.length<2)return null;let l;e[0]!==r?(l=r.slice(-40).map(b),e[0]=r,e[1]=l):l=e[1];const f=l;let a;e[2]!==c?(a=g("h-6 w-[120px]",c),e[2]=c,e[3]=a):a=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=d(u,{dataKey:"value"}),e[4]=o):o=e[4];let t;e[5]!==f?(t=d(h,{animationType:"none",barCategoryGap:1,className:"h-full w-full",config:v,data:f,children:o}),e[5]=f,e[6]=t):t=e[6];let s;return e[7]!==n||e[8]!==a||e[9]!==t||e[10]!==m?(s=d("div",{"aria-label":n,className:a,"data-testid":m,role:"img",children:t}),e[7]=n,e[8]=a,e[9]=t,e[10]=m,e[11]=s):s=e[11],s};function b(i,e){return{index:e,value:i}}export{w as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as u}from"react/compiler-runtime";import{C as b}from"./card-BGlQzQY-.js";import{jsx as m,jsxs as p}from"react/jsx-runtime";const j=x=>{const e=u(16),{chart:i,footer:o,label:n,testId:c,value:f}=x;let t;e[0]!==n?(t=m("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:n}),e[0]=n,e[1]=t):t=e[1];let l;e[2]!==c||e[3]!==f?(l=m("span",{className:"truncate text-2xl font-semibold tabular-nums text-foreground","data-testid":c,children:f}),e[2]=c,e[3]=f,e[4]=l):l=e[4];let r;e[5]!==i||e[6]!==l?(r=p("div",{className:"flex items-center justify-between gap-3",children:[l,i]}),e[5]=i,e[6]=l,e[7]=r):r=e[7];let s;e[8]!==t||e[9]!==r?(s=p("div",{className:"flex flex-col gap-2.5 p-4",children:[t,r]}),e[8]=t,e[9]=r,e[10]=s):s=e[10];let a;e[11]!==o?(a=o!=null&&m("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:o}),e[11]=o,e[12]=a):a=e[12];let d;return e[13]!==s||e[14]!==a?(d=p(b,{className:"justify-between gap-0 py-0",children:[s,a]}),e[13]=s,e[14]=a,e[15]=d):d=e[15],d};export{j as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as n}from"react/compiler-runtime";import{jsx as d,jsxs as h}from"react/jsx-runtime";const b={alignItems:"center",border:"1px solid",borderRadius:4,display:"inline-flex",fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:11,fontWeight:400,gap:6,letterSpacing:"0.06em",lineHeight:1.4,padding:"1px 8px",textTransform:"uppercase"},c={borderRadius:"50%",display:"inline-block",height:7,width:7},i=(r,e,a,t)=>({badgeStyle:{...b,borderColor:r,color:r},color:r,dotStyle:{...c,backgroundColor:r},hint:t,label:e,title:a}),p={global:i("var(--royal-amethyst)","Global · D1","Global table — a single D1 table shared across all shards","Declared .global() and stored once in Cloudflare D1, shared across every shard and tenant. Auth tables (user, session, …) live here too."),shard:i("var(--sky-sapphire)","Shard-local","Shard-local table — per-shard SQLite inside a Durable Object","Stored per shard key in a Durable Object's SQLite (.shardBy(...)). You are viewing one shard at a time — change the shard key to inspect another.")},y=r=>{const e=n(9),{tier:a}=r,t=p[a],o=`storage-tier-${a}`;let l;e[0]!==t.dotStyle?(l=d("span",{"aria-hidden":"true",style:t.dotStyle}),e[0]=t.dotStyle,e[1]=l):l=e[1];let s;return e[2]!==t.badgeStyle||e[3]!==t.label||e[4]!==t.title||e[5]!==o||e[6]!==l||e[7]!==a?(s=h("span",{"data-testid":o,"data-tier":a,style:t.badgeStyle,title:t.title,children:[l,t.label]}),e[2]=t.badgeStyle,e[3]=t.label,e[4]=t.title,e[5]=o,e[6]=l,e[7]=a,e[8]=s):s=e[8],s};export{y as S,p as T};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import{c as k}from"react/compiler-runtime";import{createRootRoute as Xt,createRoute as St,createBrowserHistory as es,createMemoryHistory as ts,createRouter as ss,useNavigate as At,useSearch as as,RouterProvider as os,useRouterState as ns,Outlet as rs}from"@tanstack/react-router";import*as ot from"react";import{use as Nt,createContext as Et,useState as lt,useEffect as nt,useSyncExternalStore as ls,lazy as A,Suspense as is}from"react";import{c as L}from"./utils-bhneXptQ.js";import{jsx as o,jsxs as w,Fragment as Rt}from"react/jsx-runtime";import{ErrorBoundary as ds}from"./ErrorBoundary-BWNF98VF.js";import{O as cs,u as us}from"./operation-console-provider-DoloEvon.js";import{useT as ee}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{LunoraError as It}from"@lunora/errors";import{B as it}from"./badge-cAk9Di1Q.js";import{I as $t}from"./input-CY5W3wzv.js";import{Popover as rt}from"@base-ui/react/popover";import{Cancel01Icon as ms,SidebarLeftIcon as fs}from"@hugeicons/core-free-icons";import{HugeiconsIcon as Ht}from"@hugeicons/react";import{mergeProps as Bt}from"@base-ui/react/merge-props";import{useRender as zt}from"@base-ui/react/use-render";import{cva as hs}from"class-variance-authority";import{B as Vt}from"./button-BOPLD1un.js";import{Dialog as se}from"@base-ui/react/dialog";import{Tooltip as te}from"@base-ui/react/tooltip";import{S as vt}from"./skeleton-DFBBaJU6.js";import{H as ps,u as gs}from"./home-panel-BiJHXeDC.js";import{g as bs,f as wt}from"./internal-CwaF9YNk.js";import{o as ft}from"./use-admin-query-P0RJrjsD.js";import{StudioI18nProvider as vs}from"./StudioI18nProvider-Bl547evf.js";import{v as xs,a as ys}from"./data-view-params-qoSTqjAj.js";import{CommandPalette as ws,openCommandPalette as ks}from"./CommandPalette-B5yLEABs.js";import{motion as Ns}from"motion/react";const Dt="(prefers-color-scheme: dark)",Ot=()=>{try{return globalThis.localStorage}catch{return}},Ms=t=>t==="system"||t==="light"||t==="dark",Zt=()=>globalThis.matchMedia,Ft="lunora-studio-theme",xt=["system","light","dark"],Ss=(t="system")=>{try{const e=Ot()?.getItem(Ft);return Ms(e)?e:t}catch{return t}},Ct=t=>{const e=Ot();if(e!==void 0)try{e.setItem(Ft,t)}catch{}},Cs=()=>{try{return Zt()?.(Dt).matches?"dark":"light"}catch{return"light"}},Ps=(t,e)=>t==="system"?e:t,_s=t=>{let e;try{e=Zt()?.(Dt)}catch{e=void 0}if(e===void 0)return()=>{};const s=a=>{t(a.matches?"dark":"light")};return e.addEventListener("change",s),()=>{e.removeEventListener("change",s)}},Mt=Et(null),Ts=({children:t,defaultTheme:e="system"})=>{const[s,a]=lt(()=>Ss(e)),[n,r]=lt(()=>Cs());nt(()=>_s(r),[]);const l=u=>{Ct(u),a(u)},d={cycleTheme:()=>{a(u=>{const c=xt[(xt.indexOf(u)+1)%xt.length]??u;return Ct(c),c})},resolvedTheme:Ps(s,n),setTheme:l,systemTheme:n,theme:s};return o(Mt,{value:d,children:t})},Ls=t=>{const e=k(3),{children:s}=t,a=Nt(Mt);let n;return e[0]!==s||e[1]!==a?(n=a===null?o(Ts,{children:s}):s,e[0]=s,e[1]=a,e[2]=n):n=e[2],n},As=()=>{const t=Nt(Mt);if(t===null)throw new It("INTERNAL","useTheme must be used within a <ThemeProvider>");return t};function fn({delay:t=0,...e}){return o(te.Provider,{"data-slot":"tooltip-provider",delay:t,...e})}function Es(t){const e=k(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(te.Root,{"data-slot":"tooltip",...s}),e[2]=s,e[3]=a):a=e[3],a}function Rs(t){const e=k(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(te.Trigger,{"data-slot":"tooltip-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Is({className:t,side:e="top",sideOffset:s=4,align:a="center",alignOffset:n=0,children:r,...l}){return o(te.Portal,{children:o(te.Positioner,{align:a,alignOffset:n,side:e,sideOffset:s,className:"isolate z-50",children:w(te.Popup,{"data-slot":"tooltip-content",className:L("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-md data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...l,children:[r,o(te.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-md bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-start-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-end-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}const $s=t=>{const e=k(5),{className:s}=t;let a;e[0]!==s?(a=L("h-full w-full text-foreground",s),e[0]=s,e[1]=a):a=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=o("path",{d:"M 259.500 10.552 C 220.080 15.859, 182.424 32.566, 152.500 58.025 C 110.179 94.031, 85.380 137.183, 77.518 188.500 C 75.410 202.255, 74.569 225.677, 75.796 236.466 C 76.757 244.917, 76.683 245.692, 74.518 249.966 C 63.118 272.466, 53.141 303.876, 51.382 322.799 L 50.718 329.943 71.960 320.471 C 83.643 315.262, 93.326 311, 93.478 311 C 93.630 311, 96.547 316.063, 99.959 322.250 C 103.371 328.438, 107.249 334.850, 108.577 336.500 L 110.990 339.500 110.981 336 C 110.977 334.075, 111.499 324.991, 112.143 315.813 L 113.312 299.127 121.406 293.336 C 132.495 285.403, 149.593 271.554, 161 261.268 C 171.556 251.748, 189.116 235, 188.540 235 C 188.337 235, 183.069 238.648, 176.835 243.106 C 142.318 267.789, 68.537 314, 63.646 314 C 61.843 314, 72.791 281.179, 80.905 262.259 C 92.233 235.845, 107.473 212.389, 132.106 183.453 L 138.451 176 148.268 176 C 176.192 176, 197.512 187.154, 212.868 209.797 C 216.470 215.108, 217.035 216.595, 216.477 219.297 C 211.386 243.968, 202.359 274.496, 193.797 296 C 183.898 320.861, 167.147 352.101, 152.395 373.215 L 147.004 380.930 152.891 385.830 C 161.400 392.911, 165.563 396, 166.594 395.998 C 167.092 395.998, 168.772 391.641, 170.327 386.317 C 176.279 365.934, 188.422 338.749, 200.942 317.778 C 223.060 280.731, 256.432 244.369, 294.500 215.836 C 309.956 204.252, 313.937 201.603, 314.719 202.385 C 315.116 202.783, 315.449 213.096, 315.460 225.304 C 315.474 241.855, 315.021 250.405, 313.680 258.924 C 307.009 301.272, 291.175 336.677, 263.112 372 C 255.259 381.883, 227.182 410.673, 218.516 417.727 L 213.532 421.783 223.439 424.880 C 281.705 443.093, 349.165 436.018, 398.616 406.508 C 446.728 377.797, 483.322 331.466, 497.366 281.481 C 503.381 260.075, 504.480 250.741, 504.491 221 C 504.501 191.997, 503.598 184.047, 497.987 163.732 C 484.768 115.871, 452.505 72.708, 407.718 42.964 C 381.051 25.254, 352.818 14.828, 319.695 10.460 C 305.932 8.645, 273.298 8.695, 259.500 10.552",fillRule:"evenodd"}),e[2]=n):n=e[2];let r;return e[3]!==a?(r=o("svg",{"aria-hidden":"true",className:a,fill:"currentColor",viewBox:"0 0 543 446",children:n}),e[3]=a,e[4]=r):r=e[4],r},qt="lunora.studio.rulesBannerDismissed",Hs=()=>{try{return globalThis.localStorage.getItem(qt)==="1"}catch{return!1}},Bs=()=>{try{globalThis.localStorage.setItem(qt,"1")}catch{}},zs=()=>{const t=k(18),e=ee(),[s,a]=lt(Vs);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{a(!0),Bs()},t[0]=n):n=t[0];const r=n;if(s)return null;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=o("span",{"aria-hidden":"true",className:"text-warning",children:"⚠"}),t[1]=l):l=t[1];let i;t[2]!==e?(i=e("Lunora AI rules aren't installed."),t[2]=e,t[3]=i):i=t[3];let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=o("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[11px]",children:"lunora rules install"}),t[4]=d):d=t[4];let u;t[5]!==e?(u=e("lets your coding agent use Lunora correctly."),t[5]=e,t[6]=u):u=t[6];let c;t[7]!==i||t[8]!==u?(c=w("span",{children:[i," ",d," ",u]}),t[7]=i,t[8]=u,t[9]=c):c=t[9];let f;t[10]!==e?(f=e("Dismiss"),t[10]=e,t[11]=f):f=t[11];let p;t[12]===Symbol.for("react.memo_cache_sentinel")?(p=o("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:o("path",{d:"M18 6 6 18M6 6l12 12"})}),t[12]=p):p=t[12];let m;t[13]!==f?(m=o("button",{"aria-label":f,className:"ms-auto flex size-5 items-center justify-center rounded text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent","data-testid":"dash-app-rules-banner-dismiss",onClick:r,type:"button",children:p}),t[13]=f,t[14]=m):m=t[14];let h;return t[15]!==c||t[16]!==m?(h=w("div",{className:"flex shrink-0 items-center gap-2 border-b border-warning/30 bg-warning/10 px-6 py-2 text-[12px] text-foreground","data-testid":"dash-app-rules-banner",role:"note",children:[l,c,m]}),t[15]=c,t[16]=m,t[17]=h):h=t[17],h};function Vs(){return Hs()}function Wt(t){const e=k(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(rt.Root,{"data-slot":"popover",...s}),e[2]=s,e[3]=a):a=e[3],a}function jt(t){const e=k(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(rt.Trigger,{"data-slot":"popover-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ut({align:t="end",alignOffset:e=0,className:s,keepMounted:a=!1,side:n="bottom",sideOffset:r=6,...l}){return o(rt.Portal,{keepMounted:a,children:o(rt.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:n,sideOffset:r,children:o(rt.Popup,{className:L("z-50 w-72 origin-(--transform-origin) rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-md outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",s),"data-slot":"popover-content",...l})})})}const yt=768;function Ds(){const t=k(2),[e,s]=lt(void 0);let a,n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{const r=globalThis.matchMedia(`(max-width: ${yt-1}px)`),l=()=>{s(globalThis.innerWidth<yt)};return r.addEventListener("change",l),s(globalThis.innerWidth<yt),()=>{r.removeEventListener("change",l)}},n=[],t[0]=a,t[1]=n):(a=t[0],n=t[1]),nt(a,n),!!e}function Os(t){const e=k(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(se.Root,{"data-slot":"sheet",...s}),e[2]=s,e[3]=a):a=e[3],a}function Zs(t){const e=k(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(se.Portal,{"data-slot":"sheet-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function Fs(t){const e=k(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=L("fixed inset-0 z-50 bg-black/10 text-xs/relaxed transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o(se.Backdrop,{"data-slot":"sheet-overlay",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function qs({className:t,children:e,side:s="right",showCloseButton:a=!0,...n}){return w(Zs,{children:[o(Fs,{}),w(se.Popup,{"data-slot":"sheet-content","data-side":s,className:L("fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=left]:data-ending-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-ending-style:-translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-starting-style:-translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=right]:data-ending-style:translate-x-[2.5rem] rtl:data-[side=right]:data-ending-style:-translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] rtl:data-[side=right]:data-starting-style:-translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",t),...n,children:[e,a&&w(se.Close,{"data-slot":"sheet-close",render:o(Vt,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"}),children:[o(Ht,{icon:ms,strokeWidth:2}),o("span",{className:"sr-only",children:"Close"})]})]})]})}function Ws(t){const e=k(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=L("flex flex-col gap-0.5 p-4",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sheet-header",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function js(t){const e=k(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=L("text-sm font-medium text-foreground",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o(se.Title,{"data-slot":"sheet-title",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function Us(t){const e=k(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=L("text-xs/relaxed text-muted-foreground",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o(se.Description,{"data-slot":"sheet-description",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}const Gs="sidebar_state",Ks=3600*24*7,Qs="16rem",Ys="18rem",Js="3rem",Xs="b",Gt=ot.createContext(null);function ht(){const t=ot.useContext(Gt);if(!t)throw new It("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}function ea({defaultOpen:t=!0,open:e,onOpenChange:s,className:a,style:n,children:r,...l}){const i=Ds(),[d,u]=ot.useState(!1),[c,f]=ot.useState(t),p=e??c,m=x=>{const y=typeof x=="function"?x(p):x;s?s(y):f(y),document.cookie=`${Gs}=${y}; path=/; max-age=${Ks}`},h=()=>i?u(x=>!x):m(x=>!x),b=ot.useEffectEvent(()=>{h()});ot.useEffect(()=>{const x=y=>{y.key===Xs&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),b())};return globalThis.addEventListener("keydown",x),()=>globalThis.removeEventListener("keydown",x)},[]);const g={state:p?"expanded":"collapsed",open:p,setOpen:m,isMobile:i,openMobile:d,setOpenMobile:u,toggleSidebar:h};return o(Gt.Provider,{value:g,children:o("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Qs,"--sidebar-width-icon":Js,...n},className:L("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",a),...l,children:r})})}function ta({side:t="left",variant:e="sidebar",collapsible:s="offcanvas",className:a,children:n,dir:r,...l}){const{isMobile:i,state:d,openMobile:u,setOpenMobile:c}=ht();return s==="none"?o("div",{"data-slot":"sidebar",className:L("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",a),...l,children:n}):i?o(Os,{open:u,onOpenChange:c,...l,children:w(qs,{dir:r,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Ys},side:t,children:[w(Ws,{className:"sr-only",children:[o(js,{children:"Sidebar"}),o(Us,{children:"Displays the mobile sidebar."})]}),o("div",{className:"flex h-full w-full flex-col",children:n})]})}):w("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?s:"","data-variant":e,"data-side":t,"data-slot":"sidebar",children:[o("div",{"data-slot":"sidebar-gap",className:L("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),o("div",{"data-slot":"sidebar-container","data-side":t,className:L("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e group-data-[side=right]:border-s",a),...l,children:o("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-none group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:n})})]})}function sa(t){const e=k(15);let s,a,n;e[0]!==t?({className:s,onClick:a,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);const{toggleSidebar:r}=ht();let l;e[4]!==s?(l=L(s),e[4]=s,e[5]=l):l=e[5];let i;e[6]!==a||e[7]!==r?(i=f=>{a?.(f),r()},e[6]=a,e[7]=r,e[8]=i):i=e[8];let d,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=o(Ht,{icon:fs,strokeWidth:2,className:"rtl:rotate-180"}),u=o("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=d,e[10]=u):(d=e[9],u=e[10]);let c;return e[11]!==n||e[12]!==l||e[13]!==i?(c=w(Vt,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:l,onClick:i,...n,children:[d,u]}),e[11]=n,e[12]=l,e[13]=i,e[14]=c):c=e[14],c}function aa(t){const e=k(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=L("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-none md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("main",{"data-slot":"sidebar-inset",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function oa(t){const e=k(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=L("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function na(t){const e=k(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=L("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function ra(t){const e=k(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=L("flex min-h-0 flex-1 flex-col gap-0 overflow-x-hidden overflow-y-auto [scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_25%,transparent)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/25 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5 hover:[scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_50%,transparent)_transparent] hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/50",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function la(t){const e=k(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=L("relative flex w-full min-w-0 flex-col p-2",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function ia(t){const e=k(10);let s,a,n,r;if(e[0]!==t){const{className:d,render:u,...c}=t;s=u,r=zt,a="div",n=Bt({className:L("flex h-8 shrink-0 items-center rounded-none px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",d)},c),e[0]=t,e[1]=s,e[2]=a,e[3]=n,e[4]=r}else s=e[1],a=e[2],n=e[3],r=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=l):l=e[5];let i;return e[6]!==s||e[7]!==a||e[8]!==n?(i={defaultTagName:a,props:n,render:s,state:l},e[6]=s,e[7]=a,e[8]=n,e[9]=i):i=e[9],r(i)}function da(t){const e=k(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=L("w-full text-xs",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function Pt(t){const e=k(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=L("flex w-full min-w-0 flex-col gap-0",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function _t(t){const e=k(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=L("group/menu-item relative",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}const ca=hs("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-none p-2 text-start text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Kt({render:t,isActive:e=!1,variant:s="default",size:a="default",tooltip:n,className:r,...l}){const{isMobile:i,state:d}=ht(),u=zt({defaultTagName:"button",props:Bt({className:L(ca({variant:s,size:a}),r)},l),render:n?o(Rs,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:a,active:e}});return n?(typeof n=="string"&&(n={children:n}),w(Es,{children:[u,o(Is,{side:"right",align:"center",hidden:d!=="collapsed"||i,...n})]})):u}const ua=t=>t.replace("__lunora_admin__:",""),ma=()=>ls(ft.subscribe,ft.getSnapshot,ft.getSnapshot),fa=t=>t==="error"?"destructive":t==="pending"?"secondary":"default",ha=t=>{const e=k(56),{entry:s,focused:a}=t,n=ee();let r;e[0]!==a?(r=$=>{$!==null&&a&&$.scrollIntoView({block:"nearest"})},e[0]=a,e[1]=r):r=e[1];const l=r;let i;e[2]!==s.functionPath||e[3]!==s.shardKey||e[4]!==s.summary?(i=()=>{bs(`${s.functionPath} ${s.summary}${s.shardKey===""?"":` (shard ${s.shardKey})`}`)},e[2]=s.functionPath,e[3]=s.shardKey,e[4]=s.summary,e[5]=i):i=e[5];const d=i,u=a&&"bg-accent ring-1 ring-inset ring-primary/40";let c;e[6]!==u?(c=L("border-b border-border/60 last:border-b-0",u),e[6]=u,e[7]=c):c=e[7];let f;e[8]!==s.status?(f=fa(s.status),e[8]=s.status,e[9]=f):f=e[9];const p=s.status==="pending"?"…":s.status;let m;e[10]!==f||e[11]!==p?(m=o(it,{className:"mt-px shrink-0",variant:f,children:p}),e[10]=f,e[11]=p,e[12]=m):m=e[12];let h;e[13]!==s.functionPath?(h=ua(s.functionPath),e[13]=s.functionPath,e[14]=h):h=e[14];let b;e[15]!==h?(b=o("span",{className:"shrink-0 font-mono text-[11px] text-foreground",children:h}),e[15]=h,e[16]=b):b=e[16];let v;e[17]!==s.kind||e[18]!==n?(v=s.kind==="subscription"&&o(it,{className:"shrink-0",variant:"outline",children:n("live")}),e[17]=s.kind,e[18]=n,e[19]=v):v=e[19];let g;e[20]!==s.summary?(g=s.summary!==""&&o("span",{className:"min-w-0 truncate text-muted-foreground",children:s.summary}),e[20]=s.summary,e[21]=g):g=e[21];let x;e[22]!==s.shardKey?(x=s.shardKey!==""&&o("span",{className:"font-mono",children:s.shardKey}),e[22]=s.shardKey,e[23]=x):x=e[23];let y;e[24]!==s.resultCount||e[25]!==n?(y=s.resultCount!==void 0&&o("span",{children:n("{count} rows",{count:s.resultCount})}),e[24]=s.resultCount,e[25]=n,e[26]=y):y=e[26];let M;e[27]!==s.pushes||e[28]!==n?(M=s.pushes!==void 0&&s.pushes>0&&o("span",{children:n("{count} pushes",{count:s.pushes})}),e[27]=s.pushes,e[28]=n,e[29]=M):M=e[29];let C;e[30]!==s.durationMs?(C=s.durationMs!==void 0&&w("span",{children:[s.durationMs,"ms"]}),e[30]=s.durationMs,e[31]=C):C=e[31];let P;e[32]!==n?(P=n("Copy"),e[32]=n,e[33]=P):P=e[33];let N;e[34]!==d||e[35]!==P?(N=o("button",{"aria-label":P,className:"rounded px-1 outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-copy",onClick:d,type:"button",children:"⧉"}),e[34]=d,e[35]=P,e[36]=N):N=e[36];let _;e[37]!==x||e[38]!==y||e[39]!==M||e[40]!==C||e[41]!==N?(_=w("span",{className:"ms-auto flex shrink-0 items-center gap-2 text-[11px] text-muted-foreground",children:[x,y,M,C,N]}),e[37]=x,e[38]=y,e[39]=M,e[40]=C,e[41]=N,e[42]=_):_=e[42];let S;e[43]!==v||e[44]!==g||e[45]!==_||e[46]!==m||e[47]!==b?(S=w("div",{className:"flex items-start gap-2 px-3 py-1.5 text-xs",children:[m,b,v,g,_]}),e[43]=v,e[44]=g,e[45]=_,e[46]=m,e[47]=b,e[48]=S):S=e[48];let T;e[49]!==s.error?(T=s.error!==void 0&&o("p",{className:"px-3 pb-1.5 font-mono text-[11px] text-destructive","data-testid":"oc-error",children:s.error}),e[49]=s.error,e[50]=T):T=e[50];let E;return e[51]!==l||e[52]!==S||e[53]!==T||e[54]!==c?(E=w("li",{className:c,"data-testid":"oc-row",ref:l,children:[S,T]}),e[51]=l,e[52]=S,e[53]=T,e[54]=c,e[55]=E):E=e[55],E},pa=t=>{const e=k(62),{focusSeq:s,onClose:a,onShownChange:n,shown:r}=t,l=ee(),i=ma(),[d,u]=lt("");let c;if(e[0]!==i||e[1]!==s||e[2]!==d||e[3]!==a||e[4]!==n||e[5]!==r||e[6]!==l){const f=d.trim().toLowerCase(),p=i.filter(R=>(r==="errors"?R.status==="error":!0)&&(f===""||`${R.functionPath} ${R.summary} ${R.shardKey}`.toLowerCase().includes(f))).toReversed();let m;e[8]!==i?(m=i.filter(ga),e[8]=i,e[9]=m):m=e[9];const h=m.length;let b;e[10]!==l?(b=l("Operation console"),e[10]=l,e[11]=b):b=e[11];let v;e[12]!==l?(v=l("Operation console"),e[12]=l,e[13]=v):v=e[13];let g;e[14]!==v?(g=o("span",{className:"text-xs font-medium",children:v}),e[14]=v,e[15]=g):g=e[15];let x;e[16]!==i.length||e[17]!==l?(x=l("{count} calls",{count:i.length}),e[16]=i.length,e[17]=l,e[18]=x):x=e[18];let y;e[19]!==x?(y=o(it,{variant:"secondary",children:x}),e[19]=x,e[20]=y):y=e[20];let M;e[21]!==h||e[22]!==l?(M=h>0&&o(it,{variant:"destructive",children:l("{count} failed",{count:h})}),e[21]=h,e[22]=l,e[23]=M):M=e[23];const C=r==="errors",P=r==="errors"&&"bg-accent";let N;e[24]!==P?(N=L("rounded px-2 py-0.5 text-xs outline-none hover:bg-accent focus-visible:bg-accent",P),e[24]=P,e[25]=N):N=e[25];let _;e[26]!==n||e[27]!==r?(_=()=>{n(r==="errors"?"all":"errors")},e[26]=n,e[27]=r,e[28]=_):_=e[28];let S;e[29]!==l?(S=l("Errors"),e[29]=l,e[30]=S):S=e[30];let T;e[31]!==N||e[32]!==_||e[33]!==S||e[34]!==C?(T=o("button",{"aria-pressed":C,className:N,"data-testid":"oc-filter-errors",onClick:_,type:"button",children:S}),e[31]=N,e[32]=_,e[33]=S,e[34]=C,e[35]=T):T=e[35];let E;e[36]!==l?(E=l("Filter"),e[36]=l,e[37]=E):E=e[37];let $;e[38]===Symbol.for("react.memo_cache_sentinel")?($=R=>{u(R.target.value)},e[38]=$):$=e[38];let z;e[39]!==l?(z=l("Filter"),e[39]=l,e[40]=z):z=e[40];let V;e[41]!==d||e[42]!==E||e[43]!==z?(V=o($t,{"aria-label":E,className:"h-7 w-40 text-xs","data-testid":"oc-search",onChange:$,placeholder:z,value:d}),e[41]=d,e[42]=E,e[43]=z,e[44]=V):V=e[44];let H;e[45]!==l?(H=l("Clear"),e[45]=l,e[46]=H):H=e[46];let B;e[47]!==H?(B=o("button",{className:"ms-auto rounded px-2 py-0.5 text-xs text-muted-foreground outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-clear",onClick:ba,type:"button",children:H}),e[47]=H,e[48]=B):B=e[48];let D;e[49]!==l?(D=l("Hide"),e[49]=l,e[50]=D):D=e[50];let O;e[51]!==a||e[52]!==D?(O=o("button",{"aria-label":D,className:"rounded px-2 py-0.5 text-xs text-muted-foreground outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-close",onClick:a,type:"button",children:"✕"}),e[51]=a,e[52]=D,e[53]=O):O=e[53];let F;e[54]!==T||e[55]!==V||e[56]!==B||e[57]!==O||e[58]!==g||e[59]!==y||e[60]!==M?(F=w("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-1.5",children:[g,y,M,T,V,B,O]}),e[54]=T,e[55]=V,e[56]=B,e[57]=O,e[58]=g,e[59]=y,e[60]=M,e[61]=F):F=e[61],c=w("section",{"aria-label":b,className:"flex max-h-80 flex-col border-t border-border bg-card","data-testid":"lunora-operation-console",children:[F,p.length===0?o("p",{className:"p-3 text-xs text-muted-foreground","data-testid":"oc-empty",children:l("Every admin call this studio makes is recorded here.")}):o("ul",{className:"min-h-0 flex-1 overflow-y-auto","data-testid":"oc-rows",children:p.map(R=>o(ha,{entry:R,focused:R.seq===s},R.seq))})]}),e[0]=i,e[1]=s,e[2]=d,e[3]=a,e[4]=n,e[5]=r,e[6]=l,e[7]=c}else c=e[7];return c};function ga(t){return t.status==="error"}function ba(){ft.clear()}const va=()=>{const t=k(310),e=ee();let s;t[0]!==e?(s=e("Health score"),t[0]=e,t[1]=s):s=t[1];let a;t[2]!==e?(a=e("Agents"),t[2]=e,t[3]=a):a=t[3];let n;t[4]!==e?(n=e("Evals"),t[4]=e,t[5]=n):n=t[5];let r;t[6]!==e?(r=e("Analytics"),t[6]=e,t[7]=r):r=t[7];let l;t[8]!==e?(l=e("API"),t[8]=e,t[9]=l):l=t[9];let i;t[10]!==e?(i=e("Audit"),t[10]=e,t[11]=i):i=t[11];let d;t[12]!==e?(d=e("Auth audit"),t[12]=e,t[13]=d):d=t[13];let u;t[14]!==e?(u=e("Configuration"),t[14]=e,t[15]=u):u=t[15];let c;t[16]!==e?(c=e("Sessions"),t[16]=e,t[17]=c):c=t[17];let f;t[18]!==e?(f=e("Containers"),t[18]=e,t[19]=f):f=t[19];let p;t[20]!==e?(p=e("Dashboards"),t[20]=e,t[21]=p):p=t[21];let m;t[22]!==e?(m=e("Data"),t[22]=e,t[23]=m):m=t[23];let h;t[24]!==e?(h=e("Deployment health"),t[24]=e,t[25]=h):h=t[25];let b;t[26]!==e?(b=e("Log drains"),t[26]=e,t[27]=b):b=t[27];let v;t[28]!==e?(v=e("Export / Import"),t[28]=e,t[29]=v):v=t[29];let g;t[30]!==e?(g=e("Fan-out"),t[30]=e,t[31]=g):g=t[31];let x;t[32]!==e?(x=e("Files"),t[32]=e,t[33]=x):x=t[33];let y;t[34]!==e?(y=e("Flags"),t[34]=e,t[35]=y):y=t[35];let M;t[36]!==e?(M=e("Functions"),t[36]=e,t[37]=M):M=t[37];let C;t[38]!==e?(C=e("Health"),t[38]=e,t[39]=C):C=t[39];let P;t[40]!==e?(P=e("Home"),t[40]=e,t[41]=P):P=t[41];let N;t[42]!==e?(N=e("Performance"),t[42]=e,t[43]=N):N=t[43];let _;t[44]!==e?(_=e("Issues"),t[44]=e,t[45]=_):_=t[45];let S;t[46]!==e?(S=e("KV"),t[46]=e,t[47]=S):S=t[47];let T;t[48]!==e?(T=e("Logs"),t[48]=e,t[49]=T):T=t[49];let E;t[50]!==e?(E=e("Metrics"),t[50]=e,t[51]=E):E=t[51];let $;t[52]!==e?($=e("Migrations"),t[52]=e,t[53]=$):$=t[53];let z;t[54]!==e?(z=e("Notifications"),t[54]=e,t[55]=z):z=t[55];let V;t[56]!==e?(V=e("Organizations"),t[56]=e,t[57]=V):V=t[57];let H;t[58]!==e?(H=e("Time Travel"),t[58]=e,t[59]=H):H=t[59];let B;t[60]!==e?(B=e("Mail"),t[60]=e,t[61]=B):B=t[61];let D;t[62]!==e?(D=e("Payments"),t[62]=e,t[63]=D):D=t[63];let O;t[64]!==e?(O=e("Permissions"),t[64]=e,t[65]=O):O=t[65];let F;t[66]!==e?(F=e("Queues"),t[66]=e,t[67]=F):F=t[67];let R;t[68]!==e?(R=e("Realtime"),t[68]=e,t[69]=R):R=t[69];let X;t[70]!==e?(X=e("RLS Policies"),t[70]=e,t[71]=X):X=t[71];let q;t[72]!==e?(q=e("Scheduled"),t[72]=e,t[73]=q):q=t[73];let Q;t[74]!==e?(Q=e("Schema"),t[74]=e,t[75]=Q):Q=t[75];let W;t[76]!==e?(W=e("Security"),t[76]=e,t[77]=W):W=t[77];let j;t[78]!==e?(j=e("Settings"),t[78]=e,t[79]=j):j=t[79];let U;t[80]!==e?(U=e("SQL editor"),t[80]=e,t[81]=U):U=t[81];let G;t[82]!==e?(G=e("Traces"),t[82]=e,t[83]=G):G=t[83];let K;t[84]!==e?(K=e("Access Rules"),t[84]=e,t[85]=K):K=t[85];let Y;t[86]!==e?(Y=e("Users"),t[86]=e,t[87]=Y):Y=t[87];let Z;t[88]!==e?(Z=e("Vectors"),t[88]=e,t[89]=Z):Z=t[89];let J;t[90]!==e?(J=e("Workflows"),t[90]=e,t[91]=J):J=t[91];let dt;t[92]!==s||t[93]!==a||t[94]!==p||t[95]!==m||t[96]!==h||t[97]!==b||t[98]!==v||t[99]!==g||t[100]!==x||t[101]!==y||t[102]!==M||t[103]!==C||t[104]!==n||t[105]!==P||t[106]!==N||t[107]!==_||t[108]!==S||t[109]!==T||t[110]!==E||t[111]!==$||t[112]!==z||t[113]!==V||t[114]!==H||t[115]!==r||t[116]!==B||t[117]!==D||t[118]!==O||t[119]!==F||t[120]!==R||t[121]!==X||t[122]!==q||t[123]!==Q||t[124]!==W||t[125]!==j||t[126]!==l||t[127]!==U||t[128]!==G||t[129]!==K||t[130]!==Y||t[131]!==Z||t[132]!==J||t[133]!==i||t[134]!==d||t[135]!==u||t[136]!==c||t[137]!==f?(dt={advisorHealth:s,agents:a,evals:n,analytics:r,api:l,audit:i,authAudit:d,authConfig:u,authSessions:c,containers:f,dashboards:p,data:m,deploymentHealth:h,drains:b,export:v,fanout:g,files:x,flags:y,functions:M,health:C,home:P,insights:N,issues:_,kv:S,logs:T,metrics:E,migrations:$,notifications:z,organizations:V,pitr:H,mail:B,payments:D,permissions:O,queues:F,realtime:R,rls:X,schedule:q,schema:Q,security:W,settings:j,sql:U,traces:G,storageRules:K,users:Y,vectors:Z,workflows:J},t[92]=s,t[93]=a,t[94]=p,t[95]=m,t[96]=h,t[97]=b,t[98]=v,t[99]=g,t[100]=x,t[101]=y,t[102]=M,t[103]=C,t[104]=n,t[105]=P,t[106]=N,t[107]=_,t[108]=S,t[109]=T,t[110]=E,t[111]=$,t[112]=z,t[113]=V,t[114]=H,t[115]=r,t[116]=B,t[117]=D,t[118]=O,t[119]=F,t[120]=R,t[121]=X,t[122]=q,t[123]=Q,t[124]=W,t[125]=j,t[126]=l,t[127]=U,t[128]=G,t[129]=K,t[130]=Y,t[131]=Z,t[132]=J,t[133]=i,t[134]=d,t[135]=u,t[136]=c,t[137]=f,t[138]=dt):dt=t[138];const pt=dt;let ae;t[139]!==e?(ae=e("Advisors"),t[139]=e,t[140]=ae):ae=t[140];let oe;t[141]!==e?(oe=e("Auth"),t[141]=e,t[142]=oe):oe=t[142];let ne;t[143]!==e?(ne=e("Database"),t[143]=e,t[144]=ne):ne=t[144];let re;t[145]!==e?(re=e("Functions"),t[145]=e,t[146]=re):re=t[146];let le;t[147]!==e?(le=e("Observability"),t[147]=e,t[148]=le):le=t[148];let ie;t[149]!==e?(ie=e("Operations"),t[149]=e,t[150]=ie):ie=t[150];let de;t[151]!==e?(de=e("Overview"),t[151]=e,t[152]=de):de=t[152];let ce;t[153]!==e?(ce=e("Settings"),t[153]=e,t[154]=ce):ce=t[154];let ue;t[155]!==e?(ue=e("Storage"),t[155]=e,t[156]=ue):ue=t[156];let ct;t[157]!==ae||t[158]!==oe||t[159]!==ne||t[160]!==re||t[161]!==le||t[162]!==ie||t[163]!==de||t[164]!==ce||t[165]!==ue?(ct={advisors:ae,auth:oe,database:ne,functions:re,observability:le,operations:ie,overview:de,settings:ce,storage:ue},t[157]=ae,t[158]=oe,t[159]=ne,t[160]=re,t[161]=le,t[162]=ie,t[163]=de,t[164]=ce,t[165]=ue,t[166]=ct):ct=t[166];const gt=ct;let me;t[167]!==e?(me=e("Score your app's advisor findings: a grade, the coverage split, and every procedure ranked worst-first."),t[167]=e,t[168]=me):me=t[168];let fe;t[169]!==e?(fe=e("Inspect agent threads, message timelines, tool calls, and token usage."),t[169]=e,t[170]=fe):fe=t[170];let he;t[171]!==e?(he=e("Scores recorded by recordEvaluation — the latest verdict per eval, its trend, and the graded runs behind it."),t[171]=e,t[172]=he):he=t[172];let pe;t[173]!==e?(pe=e("Usage and latency from Analytics Engine — request volume, p50/p95, and hot shards."),t[173]=e,t[174]=pe):pe=t[174];let ge;t[175]!==e?(ge=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[175]=e,t[176]=ge):ge=t[176];let be;t[177]!==e?(be=e("A durable log of admin state-changing operations."),t[177]=e,t[178]=be):be=t[178];let ve;t[179]!==e?(ve=e("Authentication and security events — sign-ins, MFA, and session changes."),t[179]=e,t[180]=ve):ve=t[180];let xe;t[181]!==e?(xe=e("Enabled plugins and session config (read-only)."),t[181]=e,t[182]=xe):xe=t[182];let ye;t[183]!==e?(ye=e("Browse and revoke active sessions across all users."),t[183]=e,t[184]=ye):ye=t[184];let we;t[185]!==e?(we=e("Live Cloudflare Containers — current lifecycle state per instance from the log stream."),t[185]=e,t[186]=we):we=t[186];let ke;t[187]!==e?(ke=e("Chart widgets backed by saved read-only SQL queries."),t[187]=e,t[188]=ke):ke=t[188];let Ne;t[189]!==e?(Ne=e("Browse and edit rows across your shard and global tables."),t[189]=e,t[190]=Ne):Ne=t[190];let Me;t[191]!==e?(Me=e("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint."),t[191]=e,t[192]=Me):Me=t[192];let Se;t[193]!==e?(Se=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[193]=e,t[194]=Se):Se=t[194];let Ce;t[195]!==e?(Ce=e("Export a shard to NDJSON, or import rows from it."),t[195]=e,t[196]=Ce):Ce=t[196];let Pe;t[197]!==e?(Pe=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[197]=e,t[198]=Pe):Pe=t[198];let _e;t[199]!==e?(_e=e("Browse objects in your R2 storage buckets."),t[199]=e,t[200]=_e):_e=t[200];let Te;t[201]!==e?(Te=e("Inspect feature flags and their live evaluation under a targeting context."),t[201]=e,t[202]=Te):Te=t[202];let Le;t[203]!==e?(Le=e("Run registered queries, mutations, and actions."),t[203]=e,t[204]=Le):Le=t[204];let Ae;t[205]!==e?(Ae=e("At-a-glance connection, error, and shard signals."),t[205]=e,t[206]=Ae):Ae=t[206];let Ee;t[207]!==e?(Ee=e("Connection, health, and advisor summary for your deployment."),t[207]=e,t[208]=Ee):Ee=t[208];let Re;t[209]!==e?(Re=e("Surface slow functions, error spikes, and cache problems."),t[209]=e,t[210]=Re):Re=t[210];let Ie;t[211]!==e?(Ie=e("Grouped error triage — Worker throws and container crashes folded by fingerprint."),t[211]=e,t[212]=Ie):Ie=t[212];let $e;t[213]!==e?($e=e("A live stream of recent function logs."),t[213]=e,t[214]=$e):$e=t[214];let He;t[215]!==e?(He=e("Per-shard health and aggregate metrics."),t[215]=e,t[216]=He):He=t[216];let Be;t[217]!==e?(Be=e("Review migration status and run them."),t[217]=e,t[218]=Be):Be=t[218];let ze;t[219]!==e?(ze=e("Registered push devices — endpoint, kind, last-send status, and delivery errors."),t[219]=e,t[220]=ze):ze=t[220];let Ve;t[221]!==e?(Ve=e("Browse and manage organizations, members, and invitations."),t[221]=e,t[222]=Ve):Ve=t[222];let De;t[223]!==e?(De=e("Restore a shard to a point in the last 30 days."),t[223]=e,t[224]=De):De=t[224];let Oe;t[225]!==e?(Oe=e("Email your app sent, captured in dev."),t[225]=e,t[226]=Oe):Oe=t[226];let Ze;t[227]!==e?(Ze=e("Synced customers, subscriptions, and webhook events."),t[227]=e,t[228]=Ze):Ze=t[228];let Fe;t[229]!==e?(Fe=e("Inspect access policies per table, and probe a function as any identity."),t[229]=e,t[230]=Fe):Fe=t[230];let qe;t[231]!==e?(qe=e("Inspect declared Cloudflare Queues — their producer bindings, consumer mode, and dead-letter queue."),t[231]=e,t[232]=qe):qe=t[232];let We;t[233]!==e?(We=e("Active WebSocket subscriptions on this shard."),t[233]=e,t[234]=We):We=t[234];let je;t[235]!==e?(je=e("Inspect row-level-security policies and roles, per table."),t[235]=e,t[236]=je):je=t[236];let Ue;t[237]!==e?(Ue=e("Inspect and cancel scheduled jobs."),t[237]=e,t[238]=Ue):Ue=t[238];let Ge;t[239]!==e?(Ge=e("Inspect each table and its columns."),t[239]=e,t[240]=Ge):Ge=t[240];let Ke;t[241]!==e?(Ke=e("Review admin gates, credentials, and log redaction."),t[241]=e,t[242]=Ke):Ke=t[242];let Qe;t[243]!==e?(Qe=e("Read-only deployment config — vars, secrets, and bindings."),t[243]=e,t[244]=Qe):Qe=t[244];let Ye;t[245]!==e?(Ye=e("Run read-only SQL against a shard."),t[245]=e,t[246]=Ye):Ye=t[246];let Je;t[247]!==e?(Je=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[247]=e,t[248]=Je):Je=t[248];let Xe;t[249]!==e?(Xe=e("Inspect storage access rules — per bucket, operation, and key prefix."),t[249]=e,t[250]=Xe):Xe=t[250];let et;t[251]!==e?(et=e("Recent ctx.trace waterfalls for this shard — the drill-down from a log line."),t[251]=e,t[252]=et):et=t[252];let tt;t[253]!==e?(tt=e("Manage auth users — roles, bans, sessions, and identity."),t[253]=e,t[254]=tt):tt=t[254];let st;t[255]!==e?(st=e("Browse Vectorize indexes and run similarity searches."),t[255]=e,t[256]=st):st=t[256];let at;t[257]!==e?(at=e("Inspect declared Cloudflare Workflows and their bindings."),t[257]=e,t[258]=at):at=t[258];let ut;t[259]!==tt||t[260]!==st||t[261]!==at||t[262]!==me||t[263]!==fe||t[264]!==he||t[265]!==pe||t[266]!==ge||t[267]!==be||t[268]!==ve||t[269]!==xe||t[270]!==ye||t[271]!==we||t[272]!==ke||t[273]!==Ne||t[274]!==Me||t[275]!==Se||t[276]!==Ce||t[277]!==Pe||t[278]!==_e||t[279]!==Te||t[280]!==Le||t[281]!==Ae||t[282]!==Ee||t[283]!==Re||t[284]!==Ie||t[285]!==$e||t[286]!==He||t[287]!==Be||t[288]!==ze||t[289]!==Ve||t[290]!==De||t[291]!==Oe||t[292]!==Ze||t[293]!==Fe||t[294]!==qe||t[295]!==We||t[296]!==je||t[297]!==Ue||t[298]!==Ge||t[299]!==Ke||t[300]!==Qe||t[301]!==Ye||t[302]!==Je||t[303]!==Xe||t[304]!==et?(ut={advisorHealth:me,agents:fe,evals:he,analytics:pe,api:ge,audit:be,authAudit:ve,authConfig:xe,authSessions:ye,containers:we,dashboards:ke,data:Ne,deploymentHealth:Me,drains:Se,export:Ce,fanout:Pe,files:_e,flags:Te,functions:Le,health:Ae,home:Ee,insights:Re,issues:Ie,logs:$e,metrics:He,migrations:Be,notifications:ze,organizations:Ve,pitr:De,mail:Oe,payments:Ze,permissions:Fe,queues:qe,realtime:We,rls:je,schedule:Ue,schema:Ge,security:Ke,settings:Qe,sql:Ye,kv:Je,storageRules:Xe,traces:et,users:tt,vectors:st,workflows:at},t[259]=tt,t[260]=st,t[261]=at,t[262]=me,t[263]=fe,t[264]=he,t[265]=pe,t[266]=ge,t[267]=be,t[268]=ve,t[269]=xe,t[270]=ye,t[271]=we,t[272]=ke,t[273]=Ne,t[274]=Me,t[275]=Se,t[276]=Ce,t[277]=Pe,t[278]=_e,t[279]=Te,t[280]=Le,t[281]=Ae,t[282]=Ee,t[283]=Re,t[284]=Ie,t[285]=$e,t[286]=He,t[287]=Be,t[288]=ze,t[289]=Ve,t[290]=De,t[291]=Oe,t[292]=Ze,t[293]=Fe,t[294]=qe,t[295]=We,t[296]=je,t[297]=Ue,t[298]=Ge,t[299]=Ke,t[300]=Qe,t[301]=Ye,t[302]=Je,t[303]=Xe,t[304]=et,t[305]=ut):ut=t[305];const bt=ut;let mt;return t[306]!==gt||t[307]!==bt||t[308]!==pt?(mt={groupLabel:gt,tabDescription:bt,tabLabel:pt},t[306]=gt,t[307]=bt,t[308]=pt,t[309]=mt):mt=t[309],mt},xa=()=>{const t=k(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=w("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[o("rect",{height:"14",rx:"2",width:"20",x:"2",y:"3"}),o("path",{d:"M8 21h8M12 17v4"})]}),t[0]=e):e=t[0],e},ya=()=>{const t=k(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=w("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[o("circle",{cx:"12",cy:"12",r:"4"}),o("path",{d:"M12 2v2m0 16v2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M2 12h2m16 0h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"})]}),t[0]=e):e=t[0],e},wa=()=>{const t=k(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:o("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"})}),t[0]=e):e=t[0],e},ka=[{Icon:xa,value:"system"},{Icon:ya,value:"light"},{Icon:wa,value:"dark"}],Na=()=>{const t=k(19),{theme:e,setTheme:s}=As(),a=ee();let n;t[0]!==a?(n=a("Dark theme"),t[0]=a,t[1]=n):n=t[1];let r;t[2]!==a?(r=a("Light theme"),t[2]=a,t[3]=r):r=t[3];let l;t[4]!==a?(l=a("System theme"),t[4]=a,t[5]=l):l=t[5];let i;t[6]!==n||t[7]!==r||t[8]!==l?(i={dark:n,light:r,system:l},t[6]=n,t[7]=r,t[8]=l,t[9]=i):i=t[9];const d=i;let u;t[10]!==a?(u=a("Theme"),t[10]=a,t[11]=u):u=t[11];let c;t[12]!==d||t[13]!==s||t[14]!==e?(c=ka.map(p=>{const{Icon:m,value:h}=p,b=e===h;return w("button",{"aria-checked":b,"aria-label":d[h],className:L("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",b?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${h}`,onClick:()=>{s(h)},role:"radio",title:d[h],type:"button",children:[b&&o(Ns.span,{className:"absolute inset-0 rounded-md border border-muted-foreground/40 bg-background/40",layoutId:"studio-theme-active",transition:{bounce:.1,duration:.45,type:"spring"}}),o("span",{className:"relative",children:o(m,{})})]},h)}),t[12]=d,t[13]=s,t[14]=e,t[15]=c):c=t[15];let f;return t[16]!==u||t[17]!==c?(f=o("div",{"aria-label":u,className:"inline-flex items-center gap-0.5 overflow-hidden rounded-md border border-border bg-muted/60 p-0.5","data-testid":"dash-app-theme",role:"radiogroup",children:c}),t[16]=u,t[17]=c,t[18]=f):f=t[18],f},Ma=t=>{const e=k(23),{domain:s,onOpenCommandPalette:a,page:n}=t,r=ee();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=o(sa,{className:"-ms-1"}),e[0]=l):l=e[0];let i;e[1]!==r?(i=r("Breadcrumb"),e[1]=r,e[2]=i):i=e[2];let d;e[3]!==s?(d=o("span",{className:"text-muted-foreground",children:s}),e[3]=s,e[4]=d):d=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=o("svg",{"aria-hidden":"true",className:"size-3.5 text-muted-foreground/60",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:o("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})}),e[5]=u):u=e[5];let c;e[6]!==n?(c=o("span",{className:"font-medium text-foreground",children:n}),e[6]=n,e[7]=c):c=e[7];let f;e[8]!==i||e[9]!==d||e[10]!==c?(f=w("nav",{"aria-label":i,className:"flex items-center gap-1.5 text-[13px]",children:[d,u,c]}),e[8]=i,e[9]=d,e[10]=c,e[11]=f):f=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=w("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[o("circle",{cx:"11",cy:"11",r:"7"}),o("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"})]}),e[12]=p):p=e[12];let m;e[13]!==r?(m=r("Search…"),e[13]=r,e[14]=m):m=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"⌘K"}),e[15]=h):h=e[15];let b;e[16]!==a||e[17]!==m?(b=w("button",{className:"mx-auto hidden h-8 w-72 items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 text-xs text-muted-foreground transition-colors hover:bg-muted md:flex","data-testid":"dash-app-search",onClick:a,type:"button",children:[p,m,h]}),e[16]=a,e[17]=m,e[18]=b):b=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=o("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:o(Na,{})}),e[19]=v):v=e[19];let g;return e[20]!==b||e[21]!==f?(g=w("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[l,f,b,v]}),e[20]=b,e[21]=f,e[22]=g):g=e[22],g},Sa=t=>{const e=k(3);let s,a;e[0]!==t?(s=()=>{if(t===void 0)return;const n=r=>{if(!r.ctrlKey||r.metaKey||r.altKey||r.shiftKey||r.repeat||r.key!=="`")return;const{target:l}=r;l instanceof HTMLElement&&(l.isContentEditable||["INPUT","SELECT","TEXTAREA"].includes(l.tagName))||(r.preventDefault(),t())};return globalThis.addEventListener("keydown",n),()=>{globalThis.removeEventListener("keydown",n)}},a=[t],e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]),nt(s,a)},I=(t,e)=>A(()=>t().then(s=>({default:s[e]}))),Ca=I(()=>import("../packem_chunks/InsightsPanel.js"),"InsightsPanel"),Pa=A(()=>import("../packem_chunks/rls-panel.js")),_a=A(()=>import("../packem_chunks/AdvisorHealthPanel.js")),Ta=A(()=>import("../packem_chunks/SecurityAdvisorPanel.js")),La=A(()=>import("../packem_chunks/agents-panel.js")),Aa=I(()=>import("../packem_chunks/analytics-panel.js"),"AnalyticsPanel"),Ea=A(()=>import("../packem_chunks/ApiTab.js")),Ra=A(()=>import("../packem_chunks/auth-audit-panel.js")),Ia=A(()=>import("../packem_chunks/auth-config-panel.js")),$a=A(()=>import("../packem_chunks/auth-sessions-panel.js")),Ha=A(()=>import("../packem_chunks/organizations-panel.js")),Ba=I(()=>import("../packem_chunks/users-panel.js"),"UsersPanel"),za=A(()=>import("../packem_chunks/containers-panel.js")),Va=I(()=>import("../packem_chunks/DeploymentHealthPanel.js"),"DeploymentHealthPanel"),Da=I(()=>import("../packem_chunks/TableEditor.js"),"TableEditor"),Oa=I(()=>import("../packem_chunks/ExportImportPanel.js"),"ExportImportPanel"),Za=A(()=>import("../packem_chunks/migrations-route.js")),Fa={data:ys,migrations:xs},qa=I(()=>import("../packem_chunks/PitrPanel.js"),"PitrPanel"),Wa=A(()=>import("../packem_chunks/flags-panel.js")),ja=I(()=>import("../packem_chunks/FunctionRunner.js"),"FunctionRunner"),Ua=I(()=>import("../packem_chunks/FunctionStatsPanel.js"),"FunctionStatsPanel"),Ga=A(()=>import("../packem_chunks/issues-panel.js")),Ka=I(()=>import("../packem_chunks/AuditPanel.js"),"AuditPanel"),Qa=A(()=>import("../packem_chunks/log-drains-panel.js")),Ya=A(()=>import("../packem_chunks/LogsPanel.js").then(t=>({default:t.LogsPanel}))),Ja=I(()=>import("../packem_chunks/MailPanel.js"),"MailPanel"),Xa=I(()=>import("../packem_chunks/schedule-panel.js"),"SchedulePanel"),eo=A(()=>import("../packem_chunks/subscriptions-panel.js")),to=A(()=>import("../packem_chunks/sync-client-panel.js")),so=I(()=>import("../packem_chunks/kv-browser.js"),"KvBrowser"),ao=A(()=>import("../packem_chunks/NotificationsPanel.js")),oo=I(()=>import("../packem_chunks/payments-panel.js"),"PaymentsPanel"),no=I(()=>import("../packem_chunks/permissions-panel.js"),"PermissionsPanel"),ro=A(()=>import("../packem_chunks/queues-panel.js")),lo=A(()=>import("../packem_chunks/dashboards-panel.js")),io=A(()=>import("../packem_chunks/fanout-panel.js")),co=I(()=>import("../packem_chunks/HealthPanel.js"),"HealthPanel"),uo=I(()=>import("../packem_chunks/MetricsPanel.js"),"MetricsPanel"),mo=I(()=>import("../packem_chunks/SchemaViewer.js"),"SchemaViewer"),fo=I(()=>import("../packem_chunks/SettingsPanel.js"),"SettingsPanel"),ho=I(()=>import("../packem_chunks/SqlEditorPanel.js"),"SqlEditorPanel"),po=I(()=>import("../packem_chunks/FileBrowser.js"),"FileBrowser"),go=A(()=>import("../packem_chunks/storage-rules-panel.js")),bo=A(()=>import("../packem_chunks/traces-panel.js")),vo=A(()=>import("../packem_chunks/evals-panel.js")),xo=I(()=>import("../packem_chunks/vector-browser.js"),"VectorBrowser"),yo=A(()=>import("../packem_chunks/workflows-panel.js")),Qt=Et(null),wo={analytics:o("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),api:o("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4M13 5l-2 14"}),audit:o("path",{d:"M7 4h7l4 4v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm6 0v5h5M9 13h6M9 16h6M9 10h2"}),authAudit:o("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8h6m-6 3h6"}),authConfig:o("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6h-3.6l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"}),agents:o("path",{d:"M12 8V5m0 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM6 8h12a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2Zm3 5h.01M15 13h.01M9 21h6"}),authSessions:o("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),containers:o("path",{d:"M3 7.5 12 3l9 4.5v9L12 21l-9-4.5v-9Zm0 0 9 4.5m0 0 9-4.5m-9 4.5V21"}),dashboards:o("path",{d:"M4 5h7v6H4V5Zm9 0h7v4h-7V5ZM4 14h7v5H4v-5Zm9-1h7v6h-7v-6Z"}),deploymentHealth:o("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2 3 4-5"}),drains:o("path",{d:"M5 5h14M7 5v6a5 5 0 0 0 10 0V5M10 16h4v3h-4zM12 19v2"}),data:o("path",{d:"M5 6c0-1.4 3.1-2.5 7-2.5s7 1.1 7 2.5-3.1 2.5-7 2.5S5 7.4 5 6Zm0 0v12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5V6M5 12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5"}),export:o("path",{d:"M12 3v11m0 0 4-4m-4 4-4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"}),fanout:o("path",{d:"M12 5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm-7 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm14 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 7v3.5M12 10.5 6 17m6-6.5 6 6.5"}),files:o("path",{d:"M4 7a2 2 0 0 1 2-2h3l2 2.5h7a2 2 0 0 1 2 2V18a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7Z"}),flags:o("path",{d:"M6 21V4m0 0h11l-2 3 2 3H6"}),functions:o("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4"}),evals:o("path",{d:"M4 19V5m0 14h16M8 15l3-4 3 3 4-6M8 15v.01"}),health:o("path",{d:"M3 12h4l2 6 4-14 2 8h6"}),home:o("path",{d:"M3 11.5 12 4l9 7.5M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9"}),insights:o("path",{d:"M12 3a6 6 0 0 0-3.6 10.8c.5.4.8.9.9 1.5l.2 1.2h5l.2-1.2c.1-.6.4-1.1.9-1.5A6 6 0 0 0 12 3ZM9.5 20.5h5M10 18h4"}),issues:o("path",{d:"M10.3 4.3 2.5 18a2 2 0 0 0 1.7 3h15.6a2 2 0 0 0 1.7-3L13.7 4.3a2 2 0 0 0-3.4 0ZM12 9v4m0 3v.01"}),kv:o("path",{d:"M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"}),logs:o("path",{d:"M5 6h14M5 10h14M5 14h9M5 18h11"}),mail:o("path",{d:"M4 5h16v14H4V5Zm0 1.5 8 6 8-6"}),payments:o("path",{d:"M3 7h18v10H3V7Zm0 3h18M7 14h4"}),metrics:o("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),migrations:o("path",{d:"M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"}),notifications:o("path",{d:"M15 17h5l-1.4-1.4A2 2 0 0 1 18 14.2V11a6 6 0 0 0-4-5.7V5a2 2 0 1 0-4 0v.3A6 6 0 0 0 6 11v3.2a2 2 0 0 1-.6 1.4L4 17h5m6 0v1a3 3 0 1 1-6 0v-1m6 0H9"}),organizations:o("path",{d:"M3 21V8l6-4 6 4v13M9 21v-5h2v5M15 11h6v10M18 14v.01M18 17v.01M6 9v.01M6 12v.01M6 15v.01"}),permissions:o("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2.2 2.2L15 9.5M8.5 16h7"}),pitr:o("path",{d:"M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"}),queues:o("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"}),realtime:o("path",{d:"M5 12a7 7 0 0 1 14 0M8 12a4 4 0 0 1 8 0M12 12v8m0-8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}),rls:o("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3ZM8.5 10h7M8.5 13h7"}),schedule:o("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),schema:o("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"}),sql:o("path",{d:"M4 5h16v14H4V5Zm3 4 3 3-3 3m6 0h4"}),storageRules:o("path",{d:"M7 10V7a5 5 0 0 1 10 0v3m-11 0h12a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1Zm6 4v2"}),advisorHealth:o("path",{d:"M3 12h4l2-5 3 10 2-5h5"}),security:o("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-2.5 8.5 2 2 4-4"}),traces:o("path",{d:"M3 6h9M6 12h12M10 18h7"}),settings:o("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6H10.5l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"}),users:o("path",{d:"M16 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M9.5 10a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm11.5 10v-2a4 4 0 0 0-3-3.85M16 3.13A4 4 0 0 1 16 11"}),vectors:o("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"}),workflows:o("path",{d:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM7.5 10v2a2 2 0 0 0 2 2H14m2.5-4V8a2 2 0 0 0-2-2H10"})},Tt=[{key:"overview",tabs:["home","dashboards"]},{key:"database",tabs:["data","sql","schema","migrations","vectors","pitr","export"]},{key:"functions",tabs:["functions","api","workflows","agents","queues"]},{key:"auth",tabs:["users","organizations","authSessions","authAudit","authConfig"]},{key:"storage",tabs:["files","storageRules","kv"]},{key:"observability",tabs:["issues","logs","traces","evals","audit","realtime","fanout","containers","metrics","analytics","health","deploymentHealth"]},{key:"advisors",tabs:["advisorHealth","security","rls","permissions","insights"]},{key:"operations",tabs:["schedule","mail","drains","notifications","payments","flags"]},{key:"settings",tabs:["settings"]}],ko={analytics:"analytics",authAudit:"auth",authConfig:"auth",authSessions:"auth",containers:"containers",files:"storage",flags:"flags",kv:"kv",mail:"mail",notifications:"notifications",organizations:"auth",payments:"payments",queues:"queues",schedule:"scheduler",storageRules:"storage",users:"auth",vectors:"vectors",workflows:"workflows"},Lt=(t,e)=>{const s=ko[t];return s===void 0||e[s]},kt=t=>{const e=k(2),{tab:s}=t,a=wo[s];let n;return e[0]!==a?(n=o("svg",{"aria-hidden":"true",className:"size-4 shrink-0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:a}),e[0]=a,e[1]=n):n=e[1],n},No=t=>t,Yt=No(["home","data","sql","functions","api","workflows","agents","queues","containers","schema","migrations","vectors","export","pitr","users","organizations","authSessions","authAudit","authConfig","files","storageRules","kv","dashboards","metrics","analytics","health","deploymentHealth","advisorHealth","security","rls","permissions","insights","issues","logs","traces","evals","realtime","fanout","mail","notifications","payments","audit","schedule","drains","flags","settings"]),Mo=new Set(["api","data","migrations","sql"]),So=t=>{const e=t.split("/").findLast(Boolean)??"";return Yt.includes(e)?e:"home"},Co=t=>{const e=k(19),{chrome:s,connected:a}=t,n=ee();let r;e[0]!==n?(r=n("admin token"),e[0]=n,e[1]=r):r=e[1];let l;e[2]!==r?(l=o("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:r}),e[2]=r,e[3]=l):l=e[3];let i;e[4]!==s.onTokenChange||e[5]!==s.token?(i=o($t,{className:"h-8","data-testid":"dash-app-token",id:"dash-app-token",onChange:s.onTokenChange,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:s.token}),e[4]=s.onTokenChange,e[5]=s.token,e[6]=i):i=e[6];let d;e[7]!==a||e[8]!==n?(d=a&&w("p",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground","data-testid":"dash-app-token-warning",role:"note",children:[o("span",{"aria-hidden":"true",className:"text-warning",children:"⚠"}),n("Token rides the WebSocket URL — it can surface in browser DevTools and server logs. Use a dev-only token.")]}),e[7]=a,e[8]=n,e[9]=d):d=e[9];let u;e[10]!==s.clearToken||e[11]!==a||e[12]!==n?(u=a&&o("button",{className:"self-start rounded-md border border-border px-2.5 py-1 text-xs font-medium outline-none transition-colors hover:bg-accent focus-visible:bg-accent","data-testid":"dash-app-clear-token",onClick:s.clearToken,type:"button",children:n("Clear")}),e[10]=s.clearToken,e[11]=a,e[12]=n,e[13]=u):u=e[13];let c;return e[14]!==l||e[15]!==i||e[16]!==d||e[17]!==u?(c=w("div",{className:"flex flex-col gap-2",children:[l,i,d,u]}),e[14]=l,e[15]=i,e[16]=d,e[17]=u,e[18]=c):c=e[18],c},Po=t=>{const e=k(25),{current:s,group:a,groupLabel:n,selectTab:r,tabDescription:l,tabLabel:i}=t,d=a.tabs.includes(s)?"page":void 0,u=n[a.key],c=a.tabs[0];let f;e[0]!==c?(f=o(kt,{tab:c}),e[0]=c,e[1]=f):f=e[1];let p;e[2]!==d||e[3]!==u||e[4]!==f?(p=o(jt,{"aria-current":d,"aria-label":u,className:"mx-auto flex size-8 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent data-[popup-open]:bg-sidebar-accent data-[popup-open]:text-sidebar-accent-foreground data-[popup-open]:shadow-xs aria-[current=page]:bg-sidebar-accent aria-[current=page]:text-sidebar-accent-foreground aria-[current=page]:shadow-xs",delay:120,openOnHover:!0,children:f}),e[2]=d,e[3]=u,e[4]=f,e[5]=p):p=e[5];const m=n[a.key];let h;e[6]!==m?(h=o("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:m}),e[6]=m,e[7]=h):h=e[7];let b;if(e[8]!==s||e[9]!==a.tabs||e[10]!==r||e[11]!==l||e[12]!==i){let x;e[14]!==s||e[15]!==r||e[16]!==l||e[17]!==i?(x=y=>w("button",{"aria-current":s===y?"page":void 0,className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-[13px] text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent aria-[current=page]:bg-accent aria-[current=page]:font-medium [&_svg]:opacity-70 aria-[current=page]:[&_svg]:opacity-100","data-tab":y,"data-testid":`dash-tab-${y}`,onClick:r,title:l[y],type:"button",children:[o(kt,{tab:y}),o("span",{children:i[y]})]},y),e[14]=s,e[15]=r,e[16]=l,e[17]=i,e[18]=x):x=e[18],b=a.tabs.map(x),e[8]=s,e[9]=a.tabs,e[10]=r,e[11]=l,e[12]=i,e[13]=b}else b=e[13];let v;e[19]!==h||e[20]!==b?(v=w(Ut,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[h,b]}),e[19]=h,e[20]=b,e[21]=v):v=e[21];let g;return e[22]!==p||e[23]!==v?(g=w(Wt,{children:[p,v]}),e[22]=p,e[23]=v,e[24]=g):g=e[24],g},_o=t=>{const e=k(45),{chrome:s,collapsed:a,connected:n}=t,r=ee();if(s===null){let y;e[0]!==r?(y=r("Admin"),e[0]=r,e[1]=y):y=e[1];let M;e[2]===Symbol.for("react.memo_cache_sentinel")?(M=o("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"}),e[2]=M):M=e[2];let C;e[3]!==r?(C=r("Admin"),e[3]=r,e[4]=C):C=e[4];let P;e[5]!==C?(P=o("span",{className:"truncate text-[13px] font-medium",children:C}),e[5]=C,e[6]=P):P=e[6];let N;e[7]!==r?(N=r("Studio"),e[7]=r,e[8]=N):N=e[8];let _;e[9]!==N?(_=o("span",{className:"truncate text-[11px] text-muted-foreground",children:N}),e[9]=N,e[10]=_):_=e[10];let S;e[11]!==P||e[12]!==_?(S=w("span",{className:"grid flex-1 text-start leading-tight",children:[P,_]}),e[11]=P,e[12]=_,e[13]=S):S=e[13];let T;return e[14]!==y||e[15]!==S?(T=w(Kt,{className:"data-active:bg-transparent",size:"lg",tooltip:y,children:[M,S]}),e[14]=y,e[15]=S,e[16]=T):T=e[16],T}const l=a?"mx-auto size-8 justify-center":"w-full p-2";let i;e[17]!==l?(i=L("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",l),e[17]=l,e[18]=i):i=e[18];let d;e[19]!==n||e[20]!==r?(d=r(n?"Connected":"Not connected"),e[19]=n,e[20]=r,e[21]=d):d=e[21];const u=n?"bg-success":"bg-muted-foreground/50";let c;e[22]!==u?(c=L("absolute -end-0.5 -bottom-0.5 size-2.5 rounded-full border-2 border-sidebar",u),e[22]=u,e[23]=c):c=e[23];let f;e[24]!==c?(f=w("span",{className:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:["C",o("span",{"aria-hidden":"true",className:c})]}),e[24]=c,e[25]=f):f=e[25];let p;e[26]!==a||e[27]!==n||e[28]!==r?(p=!a&&w(Rt,{children:[w("span",{className:"grid flex-1 text-start leading-tight",children:[o("span",{className:"truncate text-[13px] font-medium",children:r("Admin")}),o("span",{className:"truncate text-[11px] text-muted-foreground",children:r(n?"Connected":"Not connected")})]}),o("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:o("path",{d:"m8 9 4-4 4 4M8 15l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e[26]=a,e[27]=n,e[28]=r,e[29]=p):p=e[29];let m;e[30]!==i||e[31]!==d||e[32]!==f||e[33]!==p?(m=w(jt,{className:i,"data-testid":"dash-app-connect",title:d,children:[f,p]}),e[30]=i,e[31]=d,e[32]=f,e[33]=p,e[34]=m):m=e[34];const h=a?"end":"start",b=a?"right":"top";let v;e[35]!==s||e[36]!==n?(v=o(Co,{chrome:s,connected:n}),e[35]=s,e[36]=n,e[37]=v):v=e[37];let g;e[38]!==b||e[39]!==v||e[40]!==h?(g=o(Ut,{align:h,keepMounted:!0,side:b,children:v}),e[38]=b,e[39]=v,e[40]=h,e[41]=g):g=e[41];let x;return e[42]!==g||e[43]!==m?(x=w(Wt,{children:[m,g]}),e[42]=g,e[43]=m,e[44]=x):x=e[44],x},To=t=>{const e=k(28),{chrome:s,connected:a,current:n,groupLabel:r,groups:l,selectTab:i,tabDescription:d,tabLabel:u}=t,c=ee(),{state:f}=ht(),p=f==="collapsed",m=p&&"justify-center px-0";let h;e[0]!==m?(h=L("flex items-center gap-2.5 px-1.5 py-1",m),e[0]=m,e[1]=h):h=e[1];let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=o($s,{className:"size-9 shrink-0 text-foreground"}),e[2]=b):b=e[2];let v;e[3]!==p||e[4]!==a||e[5]!==c?(v=!p&&w(Rt,{children:[w("span",{className:"grid flex-1 leading-tight",children:[o("span",{className:"truncate text-sm font-semibold text-foreground",children:"lunora"}),o("span",{className:"truncate text-[11px] text-muted-foreground",children:c("Studio")})]}),o(it,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:c(a?"Live":"Local")})]}),e[3]=p,e[4]=a,e[5]=c,e[6]=v):v=e[6];let g;e[7]!==h||e[8]!==v?(g=o(oa,{children:w("div",{className:h,children:[b,v]})}),e[7]=h,e[8]=v,e[9]=g):g=e[9];let x;e[10]!==p||e[11]!==n||e[12]!==r||e[13]!==l||e[14]!==i||e[15]!==d||e[16]!==u?(x=p?l.map(P=>o(Po,{current:n,group:P,groupLabel:r,selectTab:i,tabDescription:d,tabLabel:u},P.key)):l.map(P=>w(la,{children:[o(ia,{className:"text-[11px] font-medium tracking-wider uppercase",children:r[P.key]}),o(da,{children:o(Pt,{children:P.tabs.map(N=>o(_t,{children:w(Kt,{className:"data-active:text-foreground dark:data-active:text-royal-amethyst data-active:shadow-[inset_2px_0_0_0_var(--royal-amethyst)]","data-tab":N,"data-testid":`dash-tab-${N}`,isActive:n===N,onClick:i,title:d[N],tooltip:d[N],children:[o(kt,{tab:N}),o("span",{children:u[N]})]})},N))})})]},P.key)),e[10]=p,e[11]=n,e[12]=r,e[13]=l,e[14]=i,e[15]=d,e[16]=u,e[17]=x):x=e[17];let y;e[18]!==x?(y=o(ra,{children:x}),e[18]=x,e[19]=y):y=e[19];let M;e[20]!==s||e[21]!==p||e[22]!==a?(M=o(na,{children:o(Pt,{children:o(_t,{children:o(_o,{chrome:s,collapsed:p,connected:a})})})}),e[20]=s,e[21]=p,e[22]=a,e[23]=M):M=e[23];let C;return e[24]!==g||e[25]!==y||e[26]!==M?(C=w(ta,{collapsible:"icon",variant:"inset",children:[g,y,M]}),e[24]=g,e[25]=y,e[26]=M,e[27]=C):C=e[27],C},Jt=()=>{const t=k(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=w("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[w("div",{className:"flex items-center gap-2",children:[o(vt,{className:"h-8 w-40"}),o(vt,{className:"h-8 w-24"})]}),o(vt,{className:"h-72 w-full"})]}),t[0]=e):e=t[0],e},Lo=()=>{const t=k(64),e=ee(),s=At();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:Ho},t[0]=a):a=t[0];const n=ns(a);let r,l;t[1]!==n?(r=So(n),l=Mo.has(r),t[1]=n,t[2]=r,t[3]=l):(r=t[2],l=t[3]);const i=l,d=us(),u=d?.toggle;Sa(u);const c=gs(),{groupLabel:f,tabDescription:p,tabLabel:m}=va();let h;t[4]!==c?(h=Z=>({...Z,tabs:Z.tabs.filter(J=>Lt(J,c))}),t[4]=c,t[5]=h):h=t[5];const b=Tt.map(h).filter(Bo);let v,g;t[6]!==r||t[7]!==c||t[8]!==s?(v=()=>{Lt(r,c)||wt(s({replace:!0,to:"/home"}))},g=[r,c,s],t[6]=r,t[7]=c,t[8]=s,t[9]=v,t[10]=g):(v=t[9],g=t[10]),nt(v,g);let x;t[11]!==s?(x=Z=>{wt(s({to:`/${Z.currentTarget.dataset.tab??""}`}))},t[11]=s,t[12]=x):x=t[12];const y=x;let M,C;t[13]!==r||t[14]!==m?(M=()=>{typeof document<"u"&&(document.title=`${m[r]} · lunora`)},C=[r,m],t[13]=r,t[14]=m,t[15]=M,t[16]=C):(M=t[15],C=t[16]),nt(M,C);const P=b.find(Z=>Z.tabs.includes(r))??Tt[0];let N;t[17]!==f||t[18]!==m?(N=Z=>Z.tabs.map(J=>({group:f[Z.key],label:m[J],to:`/${J}`})),t[17]=f,t[18]=m,t[19]=N):N=t[19];const _=b.flatMap(N),S=Nt(Qt),T=S!==null&&S.token!=="";let E;t[20]!==_?(E=o(ws,{items:_}),t[20]=_,t[21]=E):E=t[21];let $;t[22]!==S||t[23]!==T||t[24]!==r||t[25]!==f||t[26]!==y||t[27]!==p||t[28]!==m||t[29]!==b?($=o(To,{chrome:S,connected:T,current:r,groupLabel:f,groups:b,selectTab:y,tabDescription:p,tabLabel:m}),t[22]=S,t[23]=T,t[24]=r,t[25]=f,t[26]=y,t[27]=p,t[28]=m,t[29]=b,t[30]=$):$=t[30];const z=f[P.key],V=m[r];let H;t[31]!==z||t[32]!==V?(H=o(Ma,{domain:z,onOpenCommandPalette:ks,page:V}),t[31]=z,t[32]=V,t[33]=H):H=t[33];let B;t[34]!==S?.rulesInstalled?(B=S?.rulesInstalled===!1&&o(zs,{}),t[34]=S?.rulesInstalled,t[35]=B):B=t[35];const D=`dash-tab-${r}`,O=i?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",F=m[r];let R;t[36]!==e||t[37]!==F?(R=e("{title} failed",{title:F}),t[36]=e,t[37]=F,t[38]=R):R=t[38];const X=m[r];let q;t[39]!==e?(q=e("Try again"),t[39]=e,t[40]=q):q=t[40];let Q;t[41]===Symbol.for("react.memo_cache_sentinel")?(Q=o(is,{fallback:o(Jt,{}),children:o(rs,{})}),t[41]=Q):Q=t[41];let W;t[42]!==r||t[43]!==R||t[44]!==X||t[45]!==q?(W=o(ds,{fallbackTitle:R,label:X,retryLabel:q,children:Q},r),t[42]=r,t[43]=R,t[44]=X,t[45]=q,t[46]=W):W=t[46];let j;t[47]!==O||t[48]!==W?(j=o("div",{className:O,children:W}),t[47]=O,t[48]=W,t[49]=j):j=t[49];let U;t[50]!==d?(U=d?.open===!0&&o(pa,{focusSeq:d.focusSeq,onClose:d.close,onShownChange:d.setShown,shown:d.shown}),t[50]=d,t[51]=U):U=t[51];let G;t[52]!==D||t[53]!==j||t[54]!==U?(G=w("div",{"aria-labelledby":D,className:"flex min-w-0 flex-1 flex-col overflow-hidden","data-testid":"dash-panel",id:"dash-panel",role:"tabpanel",children:[j,U]}),t[52]=D,t[53]=j,t[54]=U,t[55]=G):G=t[55];let K;t[56]!==H||t[57]!==B||t[58]!==G?(K=w(aa,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[H,B,G]}),t[56]=H,t[57]=B,t[58]=G,t[59]=K):K=t[59];let Y;return t[60]!==$||t[61]!==K||t[62]!==E?(Y=w(ea,{className:"min-h-0 flex-1","data-testid":"lunora-studio",children:[E,$,K]}),t[60]=$,t[61]=K,t[62]=E,t[63]=Y):Y=t[63],Y},Ao=()=>{const t=k(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o(cs,{children:o(Lo,{})}),t[0]=e):e=t[0],e},Eo=t=>{const e=k(5),{initialShardKey:s,schemaEditable:a}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const r=as(n),{table:l}=r,i=typeof l=="string"?l:void 0;let d;return e[1]!==s||e[2]!==i||e[3]!==a?(d=o(mo,{initialShardKey:s,initialTable:i,schemaEditable:a}),e[1]=s,e[2]=i,e[3]=a,e[4]=d):d=e[4],d},Ro=()=>{const t=k(3),e=At();let s,a;return t[0]!==e?(s=()=>{wt(e({replace:!0,to:"/home"}))},a=[e],t[0]=e,t[1]=s,t[2]=a):(s=t[1],a=t[2]),nt(s,a),null},Io=({basePath:t,dataEditable:e=!1,functions:s,initialShardKey:a,openApiSpec:n,openRpcSpec:r,runAsIdentity:l=!1,schemaEditable:i=!1,scheduledCancel:d,scheduledCron:u,scheduledLoad:c})=>{const f=Xt({component:Ao}),p={agents:o(La,{initialShardKey:a}),analytics:o(Aa,{}),api:o(Ea,{functions:s,initialShardKey:a,openApiSpec:n,openRpcSpec:r}),audit:o(Ka,{initialShardKey:a}),authAudit:o(Ra,{}),authConfig:o(Ia,{}),authSessions:o($a,{}),containers:o(za,{}),dashboards:o(lo,{initialShardKey:a}),data:o(Da,{editable:e,initialShardKey:a}),deploymentHealth:o(Va,{}),drains:o(Qa,{}),export:o(Oa,{initialShardKey:a}),fanout:o(io,{initialShardKey:a}),files:o(po,{}),kv:o(so,{}),flags:o(Wa,{initialShardKey:a}),functions:w("div",{className:"flex flex-col gap-8",children:[o(Ua,{functions:s,initialShardKey:a}),o(ja,{functions:s,runAsIdentity:l})]}),health:o(co,{initialShardKey:a}),home:o(ps,{initialShardKey:a}),insights:o(Ca,{initialShardKey:a}),issues:o(Ga,{initialShardKey:a}),logs:o(Ya,{initialShardKey:a}),traces:o(bo,{initialShardKey:a}),evals:o(vo,{initialShardKey:a}),metrics:o(uo,{initialShardKey:a}),migrations:o(Za,{initialShardKey:a}),notifications:o(ao,{}),organizations:o(Ha,{}),permissions:o(no,{functions:s,runAsIdentity:l,schemaEditable:i}),pitr:o(qa,{initialShardKey:a}),mail:o(Ja,{}),payments:o(oo,{}),queues:o(ro,{}),realtime:w("div",{className:"flex flex-col gap-8",children:[o(eo,{initialShardKey:a}),o(to,{})]}),rls:o(Pa,{}),schedule:o(Xa,{loadCronJobs:u,scheduledCancel:d,scheduledLoad:c}),schema:o(Eo,{initialShardKey:a,schemaEditable:i}),advisorHealth:o(_a,{}),security:o(Ta,{}),settings:o(fo,{initialShardKey:a}),sql:o(ho,{initialShardKey:a}),storageRules:o(go,{}),users:o(Ba,{}),vectors:o(xo,{}),workflows:o(yo,{})},m=St({component:()=>p.home,getParentRoute:()=>f,path:"/"}),h=Yt.map(g=>St({component:()=>p[g],getParentRoute:()=>f,path:`/${g}`,validateSearch:Fa[g]})),b=f.addChildren([m,...h]),v="window"in globalThis?es():ts({initialEntries:["/home"]});return ss({...t===void 0||t==="/"?{}:{basepath:t},defaultNotFoundComponent:Ro,defaultPendingComponent:Jt,defaultPendingMinMs:0,defaultPendingMs:0,history:v,routeTree:b})},$o=t=>{const e=k(17),{basePath:s,chrome:a,dataEditable:n,functions:r,initialShardKey:l,openApiSpec:i,openRpcSpec:d,runAsIdentity:u,schemaEditable:c,scheduledCancel:f,scheduledCron:p,scheduledLoad:m}=t;let h;e[0]!==s||e[1]!==n||e[2]!==r||e[3]!==l||e[4]!==i||e[5]!==d||e[6]!==u||e[7]!==f||e[8]!==p||e[9]!==m||e[10]!==c?(h=Io({basePath:s,dataEditable:n,functions:r,initialShardKey:l,openApiSpec:i,openRpcSpec:d,runAsIdentity:u,schemaEditable:c,scheduledCancel:f,scheduledCron:p,scheduledLoad:m}),e[0]=s,e[1]=n,e[2]=r,e[3]=l,e[4]=i,e[5]=d,e[6]=u,e[7]=f,e[8]=p,e[9]=m,e[10]=c,e[11]=h):h=e[11];const b=h,v=a??null;let g;e[12]!==b?(g=o(os,{router:b}),e[12]=b,e[13]=g):g=e[13];let x;return e[14]!==v||e[15]!==g?(x=o(Qt,{value:v,children:g}),e[14]=v,e[15]=g,e[16]=x):x=e[16],x},hn=t=>{const e=k(17),{basePath:s,chrome:a,dataEditable:n,functions:r,i18n:l,initialShardKey:i,locale:d,openApiSpec:u,openRpcSpec:c,runAsIdentity:f,schemaEditable:p,scheduledCancel:m,scheduledCron:h,scheduledLoad:b}=t;let v;e[0]!==s||e[1]!==a||e[2]!==n||e[3]!==r||e[4]!==i||e[5]!==u||e[6]!==c||e[7]!==f||e[8]!==m||e[9]!==h||e[10]!==b||e[11]!==p?(v=o(Ls,{children:o($o,{basePath:s,chrome:a,dataEditable:n,functions:r,initialShardKey:i,openApiSpec:u,openRpcSpec:c,runAsIdentity:f,scheduledCancel:m,scheduledCron:h,scheduledLoad:b,schemaEditable:p})}),e[0]=s,e[1]=a,e[2]=n,e[3]=r,e[4]=i,e[5]=u,e[6]=c,e[7]=f,e[8]=m,e[9]=h,e[10]=b,e[11]=p,e[12]=v):v=e[12];const g=v;if(l===void 0&&d===void 0)return g;let x;return e[13]!==l||e[14]!==d||e[15]!==g?(x=o(vs,{i18n:l,locale:d,children:g}),e[13]=l,e[14]=d,e[15]=g,e[16]=x):x=e[16],x};function Ho(t){return t.location.pathname}function Bo(t){return t.tabs.length>0}export{$s as B,hn as S,Ts as T,fn as a,Os as b,qs as c,Ws as d,js as e,As as u};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import{c as d}from"react/compiler-runtime";import{c as i}from"./utils-bhneXptQ.js";import{jsx as r}from"react/jsx-runtime";function f(o){const e=d(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=i("w-full caption-bottom text-xs",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=r("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto overflow-y-clip",children:r("table",{"data-slot":"table",className:a,...l})}),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}function p(o){const e=d(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=i("bg-muted/50 [&_tr]:border-b",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=r("thead",{"data-slot":"table-header",className:a,...l}),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}function m(o){const e=d(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=r("tbody",{"data-slot":"table-body",className:a,...l}),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}function u(o){const e=d(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=i("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=r("tr",{"data-slot":"table-row",className:a,...l}),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}function h(o){const e=d(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=i("h-9 border-e border-border px-3 text-start align-middle font-mono text-[11px] font-medium tracking-wide whitespace-nowrap text-muted-foreground uppercase last:border-e-0 [&:has([role=checkbox])]:pe-0",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=r("th",{"data-slot":"table-head",className:a,...l}),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}function x(o){const e=d(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=i("border-e border-border px-3 py-1.5 align-middle whitespace-nowrap last:border-e-0 [&:has([role=checkbox])]:pe-0",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=r("td",{"data-slot":"table-cell",className:a,...l}),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}export{f as T,p as a,u as b,h as c,m as d,x as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as k}from"react/compiler-runtime";import{useT as $}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{jsxs as N,jsx as p}from"react/jsx-runtime";import{useRef as F,useEffect as L,useState as R,useMemo as O}from"react";import{f as T,b as I}from"./internal-CwaF9YNk.js";import{useVirtualizer as S}from"@tanstack/react-virtual";import{c as P}from"./utils-bhneXptQ.js";import{f as V}from"./virtual-rect-D_j7aLxX.js";const B=[25,50,100,250],A=h=>{const e=k(18),{onChange:r,options:a,prefix:s,value:v}=h,i=$();let b;e[0]!==r?(b=c=>{r(Number.parseInt(c.target.value,10))},e[0]=r,e[1]=b):b=e[1];const t=b,d=`${s}-page-size`;let o;e[2]!==i?(o=i("Rows per page"),e[2]=i,e[3]=o):o=e[3];let n;e[4]!==o?(n=p("span",{children:o}),e[4]=o,e[5]=n):n=e[5];const l=`${s}-page-size`,f=`${s}-page-size`;let m;e[6]!==a?(m=a.map(q),e[6]=a,e[7]=m):m=e[7];let g;e[8]!==t||e[9]!==l||e[10]!==f||e[11]!==m||e[12]!==v?(g=p("select",{className:"h-6 rounded-md border border-border bg-background px-1 tabular-nums outline-none focus-visible:border-ring","data-testid":l,id:f,onChange:t,value:v,children:m}),e[8]=t,e[9]=l,e[10]=f,e[11]=m,e[12]=v,e[13]=g):g=e[13];let u;return e[14]!==d||e[15]!==n||e[16]!==g?(u=N("label",{className:"flex items-center gap-1.5",htmlFor:d,children:[n,g]}),e[14]=d,e[15]=n,e[16]=g,e[17]=u):u=e[17],u},G=h=>{const e=k(25),{onJump:r,page:a,pages:s,prefix:v}=h,i=$();let b;e[0]!==r||e[1]!==s?(b=w=>{const C=Number.parseInt(w,10);Number.isNaN(C)||r(Math.min(Math.max(1,C),Math.max(1,s)))},e[0]=r,e[1]=s,e[2]=b):b=e[2];const t=b;let d;e[3]!==t?(d=w=>{w.key==="Enter"&&t(w.currentTarget.value)},e[3]=t,e[4]=d):d=e[4];const o=d;let n;e[5]!==t?(n=w=>{t(w.currentTarget.value)},e[5]=t,e[6]=n):n=e[6];const l=n;let f;e[7]!==i?(f=i("Page"),e[7]=i,e[8]=f):f=e[8];let m;e[9]!==i?(m=i("Page"),e[9]=i,e[10]=m):m=e[10];const g=`${v}-page-jump`,u=Math.max(1,s);let c;e[11]!==l||e[12]!==o||e[13]!==a||e[14]!==m||e[15]!==g||e[16]!==u?(c=p("input",{"aria-label":m,className:"h-6 w-12 rounded-md border border-border bg-background px-1 text-center tabular-nums outline-none focus-visible:border-ring","data-testid":g,defaultValue:a,max:u,min:1,onBlur:l,onKeyDown:o,type:"number"},a),e[11]=l,e[12]=o,e[13]=a,e[14]=m,e[15]=g,e[16]=u,e[17]=c):c=e[17];let x;e[18]!==s||e[19]!==i?(x=i("of {pages}",{pages:s}),e[18]=s,e[19]=i,e[20]=x):x=e[20];let y;return e[21]!==f||e[22]!==c||e[23]!==x?(y=N("span",{className:"flex items-center gap-1.5 tabular-nums",children:[f,c,x]}),e[21]=f,e[22]=c,e[23]=x,e[24]=y):y=e[24],y},_=({hasNext:h,hasPrevious:e,onJumpToPage:r,onNext:a,onPageSizeChange:s,onPrevious:v,pageSize:i,pageSizeOptions:b=B,prefix:t,rangeEnd:d,rangeStart:o,total:n})=>{const l=$(),f="rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",m=i!==void 0&&i>0?Math.max(1,Math.ceil(n/i)):1,g=i!==void 0&&i>0?Math.floor(Math.max(0,o-1)/i)+1:1;return N("div",{className:"flex w-full items-center justify-between gap-3 text-xs text-muted-foreground",children:[N("div",{className:"flex items-center gap-3",children:[i!==void 0&&s!==void 0&&p(A,{onChange:s,options:b,prefix:t,value:i}),p("span",{className:"tabular-nums","data-testid":`${t}-page-info`,children:l("{rangeStart}-{rangeEnd} of {total}",{rangeEnd:d,rangeStart:o,total:n})})]}),N("div",{className:"flex items-center gap-3",children:[p("button",{className:f,"data-testid":`${t}-prev`,disabled:!e,onClick:v,type:"button",children:l("Previous")}),i!==void 0&&r!==void 0&&p(G,{onJump:r,page:g,pages:m,prefix:t}),p("button",{className:f,"data-testid":`${t}-next`,disabled:!h,onClick:a,type:"button",children:l("Next")})]})]})};function q(h){return p("option",{value:h,children:h},h)}const j=h=>h==null?"∅":h===""?"(empty)":typeof h=="object"?JSON.stringify(h):String(h),D=h=>{const e=k(32),{column:r,onFacetFilter:a,state:s}=h,v=$();let i;e[0]!==r||e[1]!==a||e[2]!==s.result?.values?(i=u=>{const c=Number(u.currentTarget.dataset.index),x=s.result?.values[c];x!==void 0&&a(r,x.value)},e[0]=r,e[1]=a,e[2]=s.result?.values,e[3]=i):i=e[3];const b=i,t=`db-facet-${r}`;let d;e[4]!==r?(d=p("span",{className:"font-medium text-foreground",children:r}),e[4]=r,e[5]=d):d=e[5];let o;e[6]!==s.loading||e[7]!==s.result||e[8]!==v?(o=s.loading&&s.result===null&&p("span",{className:"text-muted-foreground",children:v("Loading…")}),e[6]=s.loading,e[7]=s.result,e[8]=v,e[9]=o):o=e[9];let n;e[10]!==s.error?(n=s.error!==null&&p("span",{className:"text-destructive",role:"alert",children:s.error}),e[10]=s.error,e[11]=n):n=e[11];let l;e[12]!==s.result?.values?(l=s.result?.values??[],e[12]=s.result?.values,e[13]=l):l=e[13];let f;if(e[14]!==r||e[15]!==b||e[16]!==l){let u;e[18]!==r||e[19]!==b?(u=(c,x)=>N("button",{className:"flex items-center justify-between gap-2 rounded px-1 py-0.5 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground","data-index":x,"data-testid":`db-facet-value-${r}`,onClick:b,type:"button",children:[p("span",{className:"truncate",children:j(c.value)}),p("span",{className:"shrink-0 tabular-nums text-foreground/70",children:c.count})]},j(c.value)),e[18]=r,e[19]=b,e[20]=u):u=e[20],f=l.map(u),e[14]=r,e[15]=b,e[16]=l,e[17]=f}else f=e[17];let m;e[21]!==r||e[22]!==s.result||e[23]!==v?(m=s.result?.truncated===!0&&p("span",{className:"text-muted-foreground","data-testid":`db-facet-truncated-${r}`,children:v("Showing the {n} most common values.",{n:s.result.values.length})}),e[21]=r,e[22]=s.result,e[23]=v,e[24]=m):m=e[24];let g;return e[25]!==t||e[26]!==d||e[27]!==o||e[28]!==n||e[29]!==f||e[30]!==m?(g=N("section",{className:"flex flex-col gap-1","data-testid":t,children:[d,o,n,f,m]}),e[25]=t,e[26]=d,e[27]=o,e[28]=n,e[29]=f,e[30]=m,e[31]=g):g=e[31],g},ee=h=>{const e=k(26),{columns:r,facets:a,onFacetFilter:s,onToggleFacet:v}=h,i=$();let b;e[0]!==v?(b=c=>{const{column:x}=c.currentTarget.dataset;x!==void 0&&v(x)},e[0]=v,e[1]=b):b=e[1];const t=b;if(r.length===0)return null;let d;e[2]!==i?(d=i("Facets"),e[2]=i,e[3]=d):d=e[3];let o;e[4]!==d?(o=p("span",{className:"font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:d}),e[4]=d,e[5]=o):o=e[5];let n;if(e[6]!==r||e[7]!==a||e[8]!==t){let c;e[10]!==a||e[11]!==t?(c=x=>p("button",{"aria-pressed":x in a,className:"rounded border border-border px-1.5 py-0.5 text-muted-foreground transition-colors hover:bg-accent aria-pressed:bg-accent aria-pressed:text-accent-foreground","data-column":x,"data-testid":`db-facet-toggle-${x}`,onClick:t,type:"button",children:x},x),e[10]=a,e[11]=t,e[12]=c):c=e[12],n=r.map(c),e[6]=r,e[7]=a,e[8]=t,e[9]=n}else n=e[9];let l;e[13]!==n?(l=p("div",{className:"flex flex-wrap gap-1",children:n}),e[13]=n,e[14]=l):l=e[14];let f;e[15]!==o||e[16]!==l?(f=N("div",{className:"flex flex-col gap-1.5",children:[o,l]}),e[15]=o,e[16]=l,e[17]=f):f=e[17];let m;e[18]!==a?(m=Object.entries(a),e[18]=a,e[19]=m):m=e[19];let g;e[20]!==s||e[21]!==m?(g=m.map(c=>{const[x,y]=c;return p(D,{column:x,onFacetFilter:s,state:y},x)}),e[20]=s,e[21]=m,e[22]=g):g=e[22];let u;return e[23]!==f||e[24]!==g?(u=N("aside",{className:"flex w-56 shrink-0 flex-col gap-3 overflow-auto border-l border-border p-3 text-xs","data-testid":"db-facets",children:[f,g]}),e[23]=f,e[24]=g,e[25]=u):u=e[25],u};function J(h){const e=k(2),r=F(h);let a;return e[0]!==h?(a=()=>{r.current=h},e[0]=h,e[1]=a):a=e[1],L(a),r}const te=()=>{const[h,e]=R({}),r=J(h),a=F({}),s=async(t,d)=>{const o=(a.current[t]??0)+1;a.current[t]=o,e(n=>t in n?{...n,[t]:{error:null,loading:!0,result:n[t]?.result??null}}:n);try{const n=await d(t);if(a.current[t]!==o)return;e(l=>t in l?{...l,[t]:{error:null,loading:!1,result:n}}:l)}catch(n){if(a.current[t]!==o)return;e(l=>t in l?{...l,[t]:{error:I(n),loading:!1,result:null}}:l)}};return{clearFacets:()=>{e({})},facets:h,facetsRef:r,refetchFacets:t=>{for(const d of Object.keys(r.current))T(s(d,t))},toggleFacet:(t,d)=>{if(t in r.current){e(o=>Object.fromEntries(Object.entries(o).filter(([n])=>n!==t)));return}e(o=>({...o,[t]:{error:null,loading:!0,result:null}})),d!==null&&T(s(t,d))}}},M=34,E=600,W=h=>{const e=k(21),{item:r,onSelect:a,prefix:s,selected:v,start:i}=h;let b;e[0]!==r.name||e[1]!==a?(b=()=>{a(r.name)},e[0]=r.name,e[1]=a,e[2]=b):b=e[2];const t=b,d=`translateY(${String(i)}px)`;let o;e[3]!==d?(o={insetInline:0,position:"absolute",top:0,transform:d},e[3]=d,e[4]=o):o=e[4];const n=o,l=v?"bg-accent font-medium text-accent-foreground":"text-foreground";let f;e[5]!==l?(f=P("flex w-full items-center justify-between gap-2 rounded-md px-2 py-1.5 text-start text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent",l),e[5]=l,e[6]=f):f=e[6];const m=`${s}-table-${r.name}`;let g;e[7]!==r.name?(g=p("span",{className:"truncate",children:r.name}),e[7]=r.name,e[8]=g):g=e[8];let u;e[9]!==r.rowCount?(u=p("span",{className:"shrink-0 rounded bg-muted px-1.5 text-xs tabular-nums text-muted-foreground",children:r.rowCount}),e[9]=r.rowCount,e[10]=u):u=e[10];let c;e[11]!==t||e[12]!==v||e[13]!==f||e[14]!==m||e[15]!==g||e[16]!==u?(c=N("button",{"aria-pressed":v,className:f,"data-testid":m,onClick:t,type:"button",children:[g,u]}),e[11]=t,e[12]=v,e[13]=f,e[14]=m,e[15]=g,e[16]=u,e[17]=c):c=e[17];let x;return e[18]!==n||e[19]!==c?(x=p("li",{style:n,children:c}),e[18]=n,e[19]=c,e[20]=x):x=e[20],x},re=({header:h,onReload:e,onSelect:r,prefix:a,reloadLabel:s,selected:v,tables:i})=>{const b=$(),[t,d]=R(""),o=F(null),n=u=>{d(u.target.value)},l=O(()=>{const u=t.trim().toLowerCase();return u===""?i:i.filter(c=>c.name.toLowerCase().includes(u))},[t,i]),m=S({count:l.length,estimateSize:()=>M,getScrollElement:()=>o.current,initialRect:{height:E,width:240},observeElementRect:(u,c)=>V(u,c,E),overscan:12}).getVirtualItems(),g={height:l.length*M};return N("aside",{className:"flex h-full w-60 shrink-0 flex-col border-e border-border bg-sidebar","data-testid":`${a}-table-list`,children:[h,N("div",{className:"flex h-9 shrink-0 items-center justify-between gap-2 border-b border-border px-3",children:[p("span",{className:"font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:b("Tables")}),e!==void 0&&p("button",{"aria-label":s??b("Refresh"),className:"flex size-6 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent","data-testid":`${a}-load-tables`,onClick:e,title:s??b("Refresh"),type:"button",children:p("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:p("path",{d:"M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"})})})]}),p("div",{className:"shrink-0 border-b border-border p-2",children:p("input",{className:"h-7 w-full rounded-md border border-border bg-background px-2 text-xs outline-none placeholder:text-muted-foreground focus-visible:border-ring","data-testid":`${a}-table-search`,onChange:n,placeholder:b("search table…"),type:"search",value:t})}),N("ul",{className:"relative flex-1 overflow-y-auto p-1.5","data-testid":`${a}-table-list-rows`,ref:o,children:[p("li",{"aria-hidden":"true",style:g}),m.map(u=>{const c=l[u.index];return c===void 0?null:p(W,{item:c,onSelect:r,prefix:a,selected:v===c.name,start:u.start},c.name)})]})]})};export{ee as D,_ as G,re as T,te as a,J as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as n}from"react/compiler-runtime";import{c as s}from"./utils-bhneXptQ.js";import{jsx as o}from"react/jsx-runtime";function b(d){const e=n(8);let i,r;e[0]!==d?({className:i,...r}=d,e[0]=d,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=s("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-xs transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-xs dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=o("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{b as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n,s as a}from"./browser-storage-Br_bLeBt.js";const t="lunora:traces:pending-filter",i=e=>{a(t,e,"session")},c=()=>{const e=n("session");if(e!==void 0)try{const s=e.getItem(t);if(s===null)return;const r=JSON.parse(s);return typeof r.traceId!="string"?void 0:{traceId:r.traceId,...typeof r.shardKey=="string"?{shardKey:r.shardKey}:{}}}catch{return}},d=()=>{try{n("session")?.removeItem(t)}catch{}};export{d as c,c as p,i as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as Q}from"react/compiler-runtime";import{useLunora as A}from"@lunora/react";import{useQueryClient as g,useQuery as R,keepPreviousData as _}from"@tanstack/react-query";import{useState as M,useEffect as P}from"react";import{c as b,d as v,f as I,b as T}from"./internal-CwaF9YNk.js";const S=300,l=e=>typeof e=="string"?e===""?void 0:e:typeof e=="number"||typeof e=="boolean"?String(e):void 0,d=e=>e.filter(t=>t!==void 0).join(" "),K={deleteRows:e=>d([l(e.table),Array.isArray(e.ids)?`${String(e.ids.length)} rows`:void 0]),facetColumn:e=>d([l(e.table),l(e.column)]),lintSql:()=>"sql",readTablePage:e=>d([l(e.table),Array.isArray(e.filters)&&e.filters.length>0?`${String(e.filters.length)} filters`:void 0,typeof e.search=="string"&&e.search!==""?"search":void 0,typeof e.limit=="number"?`limit ${String(e.limit)}`:void 0]),runMigration:e=>d([l(e.id),l(e.direction),e.dryRun===!0?"dry-run":void 0]),runSql:e=>typeof e.sql=="string"?`${String(e.sql.length)} chars`:"",schemaVersion:e=>typeof e.hash=="string"?e.hash.slice(0,8):"",writeRow:e=>d([l(e.table),"1 row"])},q="__lunora_admin__:",j=(e,t)=>{const r=e.startsWith(q)?e.slice(q.length):e,s=K[r];if(s!==void 0)return s(t);const i=Object.keys(t);return i.length===0?"":i.join(", ")},x=e=>{if(Array.isArray(e))return e.length;if(!(typeof e!="object"||e===null)){for(const t of Object.values(e))if(Array.isArray(t))return t.length}};class C{entries=[];listeners=new Set;nextSeq=1;getSnapshot=()=>this.entries;subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});start(t,r,s){return this.append(t,r,s,"call","pending")}startSubscription(t,r,s){return this.append(t,r,s,"subscription","live")}recordPush(t){if(this.listeners.size===0){const r=this.entries.find(s=>s.seq===t);r!==void 0&&(r.pushes=(r.pushes??0)+1);return}this.patch(t,r=>({...r,pushes:(r.pushes??0)+1}))}failSubscription(t,r){this.patch(t,s=>({...s,error:r,status:"error"}))}endSubscription(t){this.patch(t,r=>r.status==="error"?r:{...r,durationMs:Date.now()-r.startedAt,status:"closed"})}lastErrorSeq(){return this.entries.findLast(t=>t.status==="error")?.seq}settle(t,r){this.patch(t,s=>({...s,durationMs:Date.now()-s.startedAt,...r.error===void 0?{resultCount:x(r.result),status:"ok"}:{error:r.error,status:"error"}}))}clear(){this.entries=[],this.emit()}append(t,r,s,i,n){const u=this.nextSeq;this.nextSeq+=1;const c={functionPath:t,kind:i,seq:u,shardKey:s,startedAt:Date.now(),status:n,summary:j(t,r),...i==="subscription"?{pushes:0}:{}},o=[...this.entries,c];return this.entries=o.length>S?o.slice(o.length-S):o,this.emit(),u}patch(t,r){const s=this.entries.findIndex(i=>i.seq===t);s!==-1&&(this.entries=this.entries.with(s,r(this.entries[s])),this.emit())}emit(){for(const t of this.listeners)t()}}const f=new C,w=(e,t,r)=>["lunora-admin",e,t,r.trim()],E=(e,t)=>[...e,t];function F(e,t,r={}){const s=A(),{enabled:i=!0,keepPreviousData:n=!1,staleTime:u=0}=r,c=E(e,s.clientIdentifier()),a=R({enabled:i,queryFn:t,placeholderData:n?_:void 0,queryKey:c,staleTime:u});return{data:a.data,error:a.error?T(a.error):a.error,errorSource:a.error??void 0,isLoading:a.isLoading,liveError:void 0,refetch:()=>{I(a.refetch())}}}function J(e,t,r={}){const s=A(),i=g(),{enabled:n=!0,keepPreviousData:u=!1,live:c=!1,shardKey:o="",staleTime:a}=r,p=w(e,t,o),D=F(p,()=>s.query(b(e),t,v(o)),{enabled:n,keepPreviousData:u,staleTime:a??(c?Number.POSITIVE_INFINITY:0)}),[k,y]=M(void 0),L=JSON.stringify(p);return P(()=>{if(!n||!c)return;y(void 0);const m=f.startSubscription(e,t,o),O=s.subscribe(b(e),t,h=>{f.recordPush(m),y(void 0),i.setQueryData(E(p,s.clientIdentifier()),h)},{...v(o),onError:h=>{f.failSubscription(m,h.message),y(h.message)}});return()=>{f.endSubscription(m),O()}},[L,n,c]),{...D,liveError:n&&c?k:void 0}}const U=()=>{const e=Q(2),t=g();let r;return e[0]!==t?(r=(s,i,n)=>{const u=i===void 0?["lunora-admin",s]:w(s,i,n??"");I(t.invalidateQueries({queryKey:u}))},e[0]=t,e[1]=r):r=e[1],r};export{U as a,F as b,f as o,J as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as m}from"react/compiler-runtime";import{useState as a}from"react";import{f as i,b as y}from"./internal-CwaF9YNk.js";const g=()=>{const r=m(4),[s,n]=a(!1),[o,c]=a(null);let e;r[0]===Symbol.for("react.memo_cache_sentinel")?(e=u=>{i((async()=>{n(!0),c(null);try{await u()}catch(f){c(y(f))}n(!1)})())},r[0]=e):e=r[0];const l=e;let t;return r[1]!==s||r[2]!==o?(t={busy:s,error:o,run:l},r[1]=s,r[2]=o,r[3]=t):t=r[3],t};export{g as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c}from"react/compiler-runtime";import{useLunora as f}from"@lunora/react";import{b as u}from"./use-admin-query-P0RJrjsD.js";const m={capabilities:{accounts:!0,admin:!0,organization:!1,passkey:!1,twoFactor:!1},emailAndPassword:!1,organization:{enabled:!1,roles:!1,teams:!1},plugins:[],rateLimit:{enabled:!1},session:{},socialProviders:[],userFields:[]},b=()=>{const e=c(6),o=f();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=["lunora-auth-config"],e[0]=s):s=e[0];let t;e[1]!==o?(t=()=>o.getAuthConfig(),e[1]=o,e[2]=t):t=e[2];const{data:l,isLoading:r}=u(s,t),i=l??m,n=!r;let a;return e[3]!==i||e[4]!==n?(a={config:i,ready:n},e[3]=i,e[4]=n,e[5]=a):a=e[5],a};export{m as D,b as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as n}from"react/compiler-runtime";import{useNavigate as a}from"@tanstack/react-router";import{f as m}from"./internal-CwaF9YNk.js";import{w as s}from"./trace-handoff-C0CFV2ix.js";const u=r=>{const t=n(3),o=a();let e;return t[0]!==o||t[1]!==r?(e=i=>{s({shardKey:r,traceId:i}),m(o({to:"/traces"}))},t[0]=o,t[1]=r,t[2]=e):e=t[2],e};export{u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as n,useRef as S,useEffect as a}from"react";const f=(e,s=400)=>{const t=(e??"").trim(),[o,u]=n(t),[y,c]=n(t),d=S(e);d.current!==e&&(d.current=e,u(t),c(t));const m=o.trim();return a(()=>{const r=setTimeout(()=>{c(m)},s);return()=>{clearTimeout(r)}},[m,s]),{queryShardKey:y,setShardKey:r=>{u(r)},shardKey:o}};export{f as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useLunora as A}from"@lunora/react";import{useState as c}from"react";import{u as h}from"./use-admin-query-P0RJrjsD.js";import{ADMIN_FUNCTIONS as s}from"./ADMIN_FUNCTIONS-4aE59aDq.js";import{d,c as l}from"./internal-CwaF9YNk.js";const T={},_=l(s.aiGenerateSql),b=l(s.aiTableFilter),C=l(s.aiChartConfig),w=n=>{const o=A(),[f,u]=c({}),[v,g]=c({}),m=h(s.aiAvailable,T,{shardKey:n}),[p,y]=c(!1),q=p||m.data?.available===!1,i=e=>{u(r=>({...r,[e]:!0})),g(r=>({...r,[e]:void 0}))},a=(e,r)=>{u(t=>({...t,[e]:!1})),r!==void 0&&g(t=>({...t,[e]:r})),r==="no-ai-binding"&&y(!0)};return{generate:async(e,r)=>{i("sql");try{const{result:t}=await o.query(_,{failedError:r?.error,failedSql:r?.sql,prompt:e},d(n));return a("sql",t.degraded?t.reason:void 0),t.degraded?void 0:t.sql}catch{a("sql","ai-error");return}},inferChart:async e=>{i("chart");try{const{result:r}=await o.query(C,e,d(n));return a("chart",r.degraded?r.reason:void 0),r.degraded?void 0:r.chart}catch{a("chart","ai-error");return}},pending:e=>f[e]===!0,reason:e=>v[e],suggestFilter:async(e,r)=>{i("filter");try{const{result:t}=await o.query(b,{prompt:e,table:r},d(n));return a("filter",t.degraded?t.reason:void 0),t.degraded?void 0:t.clauses}catch{a("filter","ai-error");return}},unavailable:q}};export{w as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as p}from"react/compiler-runtime";import{useState as f,useEffect as D}from"react";const T=function(t,n,o){const e=p(4),s=n===void 0?300:n,[r,i]=f(t),[u,m]=f(o);o!==void 0&&o!==u&&(m(o),i(t));let c,d;return e[0]!==s||e[1]!==t?(c=()=>{const b=setTimeout(()=>{i(t)},s);return()=>{clearTimeout(b)}},d=[t,s],e[0]=s,e[1]=t,e[2]=c,e[3]=d):(c=e[2],d=e[3]),D(c,d),r};export{T as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{clsx as o}from"clsx";import{twMerge as t}from"tailwind-merge";function m(...r){return t(o(r))}export{m as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{observeElementRect as i}from"@tanstack/react-virtual";const s=(t,o,h)=>i(t,e=>{o(e.height>0?e:{height:h,width:e.width})});export{s as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const g=e=>{let t="";for(let o=0;o<e.length;o+=32768)t+=String.fromCharCode(...e.subarray(o,o+32768));return btoa(t)},p=e=>{const t=atob(e),a=new Uint8Array(t.length);for(let o=0;o<t.length;o+=1)a[o]=t.codePointAt(o)??0;return a},i="$lunora.wire$";const A="__proto__",m={BigInt64Array,BigUint64Array,Float32Array,Float64Array,Int8Array,Int16Array,Int32Array,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array},w={Error,EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError},E=e=>{if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype},u=(e,t=0)=>{if(t>64)throw new RangeError("wire-codec: value nesting exceeds the 64-level limit");if(e===void 0)return[i,"undefined"];if(e===null)return null;const a=typeof e;if(a==="bigint")return[i,"bigint",e.toString()];if(a==="number"){const r=e;return Number.isNaN(r)?[i,"nan"]:r===1/0?[i,"inf"]:r===-1/0?[i,"-inf"]:r}if(a!=="object")return e;if(e instanceof Date)return[i,"date",u(e.getTime(),t+1)];if(e instanceof Error){const r=e,n={};for(const y of Object.keys(r))r[y]!==void 0&&(n[y]=u(r[y],t+1));const c=[i,"error",r.name,r.message,n];return r.cause!==void 0&&c.push(u(r.cause,t+1)),c}if(e instanceof URL)return[i,"url",e.href];if(e instanceof Map)return[i,"map",[...e.entries()].map(([r,n])=>[u(r,t+1),u(n,t+1)])];if(e instanceof Set)return[i,"set",[...e].map(r=>u(r,t+1))];if(e instanceof ArrayBuffer)return[i,"bytes",g(new Uint8Array(e)),"ArrayBuffer"];if(ArrayBuffer.isView(e)){const r=e,n=r.constructor.name,c=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);return n==="Uint8Array"?[i,"bytes",g(c)]:[i,"bytes",g(c),n]}if(Array.isArray(e)){const r=e.map(n=>u(n,t+1));return r.length>0&&r[0]===i?[i,"arr",r]:r}if(!E(e)){const r=e.constructor?.name??"value";throw new TypeError(`wire-codec: cannot encode a ${r} over the Lunora wire — only plain objects, arrays, and the supported built-ins (Date, Error, URL, Map, Set, ArrayBuffer/typed arrays, bigint) round-trip`)}const o=e,s={};for(const r of Object.keys(o)){const n=o[r];if(n===void 0)continue;const c=u(n,t+1);r===A?Object.defineProperty(s,r,{configurable:!0,enumerable:!0,value:c,writable:!0}):s[r]=c}return s},f=(e,t=0)=>{if(t>64)throw new RangeError("wire-codec: value nesting exceeds the 64-level limit");if(e===null||typeof e!="object")return e;if(Array.isArray(e)){if(e[0]===i)switch(e[1]){case"-inf":return-1/0;case"arr":return e[2].map(r=>f(r,t+1));case"bigint":{const r=e[2];if(typeof r!="string"||r.length>1024||!/^-?\d+$/.test(r))throw new RangeError("wire-codec: invalid or over-long bigint (max 1024 digits)");return BigInt(r)}case"date":return new Date(f(e[2],t+1));case"map":return new Map(e[2].map(([r,n])=>[f(r,t+1),f(n,t+1)]));case"set":return new Set(e[2].map(r=>f(r,t+1)));case"url":return new URL(e[2]);case"error":{const r=e[2],n=e[3],c=(Object.hasOwn(w,r)?w[r]:void 0)??Error,y=new c(n);y.name!==r&&Object.defineProperty(y,"name",{configurable:!0,value:r,writable:!0});const d=f(e[4],t+1);for(const b of Object.keys(d))b===A?Object.defineProperty(y,b,{configurable:!0,enumerable:!0,value:d[b],writable:!0}):y[b]=d[b];return e.length>5&&Object.defineProperty(y,"cause",{configurable:!0,value:f(e[5],t+1),writable:!0}),y}case"bytes":{const r=p(e[2]),n=e[3]??"Uint8Array";if(n==="ArrayBuffer")return r.buffer.byteLength===r.byteLength?r.buffer:r.slice().buffer;const c=Object.hasOwn(m,n)?m[n]:void 0;return c?new c(r.slice().buffer):r}case"inf":return 1/0;case"nan":return Number.NaN;case"undefined":return;default:return e.map(r=>f(r,t+1))}return e.map(s=>f(s,t+1))}const a=e,o={};for(const s of Object.keys(a)){const r=f(a[s],t+1);s===A?Object.defineProperty(o,s,{configurable:!0,enumerable:!0,value:r,writable:!0}):o[s]=r}return o},l=e=>{try{const t=f(JSON.parse(e));return E(t)?t:void 0}catch{return}};export{f as a,l as d,u as e,E as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as O}from"./chunk-WUW4ZHRL.js";import{a as H}from"./chunk-OG57FC7W.js";import{a as ee}from"./chunk-BWEXJENB.js";import"./chunk-74ASA4WU.js";import"./chunk-XQS7KSHL.js";import{b as Z}from"./chunk-SPDZUX4P.js";import"./chunk-7PIHTTND.js";import{b as E}from"./chunk-YUWMB6EV.js";import{f as R}from"./chunk-TBXK3FKP.js";import"./chunk-RCZTUWG3.js";import{a as _}from"./chunk-UANVABQG.js";import{a as K,b as V,c as z,d as F,e as u,f as p}from"./chunk-L4EZAHCD.js";import{a as A,e as T}from"./chunk-IYWVSMAY.js";import{d as M,h as G,o as W,r as X}from"./chunk-6ZPTNC34.js";import"./chunk-VYW2PAWC.js";import{a as c,d as P,e as oe,f as re,g as ae}from"./chunk-R5ZTCHCE.js";var U=P(re(),1),Y=P(oe(),1);var t=P(ae(),1);var se=P(re(),1);var Q=P(oe(),1);var h=P(ae(),1);var ie=c(a=>Number.isFinite(a)?X(a,"\u2014"):"\u2014","X"),le=c(a=>a.toSorted((e,i)=>e.scheduledFor-i.scheduledFor),"j"),ce=c((a,e,i)=>e!==void 0?e:i===void 0?d=>a.cancelScheduledJob(d):void 0,"Y"),de=c(a=>{let e=(0,se.c)(16),{cancelJob:i,loadJobs:d}=a===void 0?{}:a,f=R(),r=M(),l=d===void 0,o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=["lunora-scheduled-jobs"],e[0]=o):o=e[0];let N=E(o,async()=>{let g=await(d??(()=>f.listScheduledJobs()))();return le(g)}),[v,n]=(0,Q.useState)(void 0),[s,m]=(0,Q.useState)(void 0),y,k;e[1]!==f||e[2]!==l?(y=c(()=>{if(l)return f.subscribeScheduledJobs(g=>{m(void 0),n(le(g))})},"v"),k=[l,f],e[1]=f,e[2]=l,e[3]=y,e[4]=k):(y=e[3],k=e[4]),(0,Q.useEffect)(y,k);let x;e[5]!==N?(x=c(()=>{N.refetch()},"y"),e[5]=N,e[6]=x):x=e[6],O(x,!l);let C=ce(f,i,d),b=v??N.data,j=s??N.error,I=c(async g=>{if(C!==void 0){m(void 0);try{await C(g),l||N.refetch()}catch(D){m(G(D))}}},"E"),q="flex flex-col gap-3",B="lunora-scheduled-jobs",J;e[7]!==j?(J=j!==null&&(0,h.jsx)("p",{className:"text-sm text-destructive","data-testid":"sj-error",role:"alert",children:j}),e[7]=j,e[8]=J):J=e[8];let S;e[9]!==b?.length||e[10]!==r?(S=b?.length===0&&(0,h.jsx)(_,{description:r("Jobs queued with runAfter / runAt will appear here."),icon:(0,h.jsxs)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,h.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,h.jsx)("path",{d:"M12 7.5V12l4 2"})]}),testId:"sj-empty",title:r("No scheduled jobs.")}),e[9]=b?.length,e[10]=r,e[11]=S):S=e[11];let $=b!==void 0&&b.length>0&&(0,h.jsx)(A,{className:"overflow-hidden py-0",children:(0,h.jsx)(T,{className:"px-0",children:(0,h.jsxs)(K,{"data-testid":"sj-table",children:[(0,h.jsx)(V,{children:(0,h.jsxs)(F,{children:[(0,h.jsx)(u,{children:r("function")}),(0,h.jsx)(u,{children:r("scheduled for")}),(0,h.jsx)(u,{children:r("pool")}),(0,h.jsx)(u,{children:r("attempts")}),(0,h.jsx)(u,{children:r("shard")}),(0,h.jsx)(u,{children:r("id")}),C!==void 0&&(0,h.jsx)(u,{"aria-label":r("Actions")})]})}),(0,h.jsx)(z,{children:b.map(g=>(0,h.jsxs)(F,{"data-testid":`sj-row-${g.id}`,children:[(0,h.jsx)(p,{className:"font-mono text-xs",children:g.functionPath}),(0,h.jsx)(p,{className:"text-muted-foreground tabular-nums",children:ie(g.scheduledFor)}),(0,h.jsx)(p,{className:"font-mono text-xs",children:g.pool??""}),(0,h.jsx)(p,{className:"tabular-nums",children:g.attempts??0}),(0,h.jsx)(p,{children:g.shardKey??""}),(0,h.jsx)(p,{className:"font-mono text-xs",children:g.id}),C!==void 0&&(0,h.jsx)(p,{className:"text-right",children:(0,h.jsx)(H,{confirmLabel:r("Cancel job?"),onConfirm:c(()=>{W(I(g.id))},"onConfirm"),testId:`sj-cancel-${g.id}`,children:r("Cancel")})})]},g.id))})]})})}),w;return e[12]!==$||e[13]!==J||e[14]!==S?(w=(0,h.jsxs)("div",{className:q,"data-testid":B,children:[J,S,$]}),e[12]=$,e[13]=J,e[14]=S,e[15]=w):w=e[15],w},"he");var he={kind:"idle"},me=c((a,e,i)=>i!==void 0?i:e===void 0?d=>a.runCronJob(d):void 0,"re"),ue=c(({loadCronJobs:a,runCronJob:e}={})=>{let i=R(),d=M(),[f,r]=(0,Y.useState)({}),l=E(["lunora-cron-jobs",a?"custom":"default"],()=>(a??(()=>i.getCronJobs()))()),{data:o,error:N}=l,v=me(i,a,e),n=c(async s=>{if(v!==void 0){r(m=>({...m,[s]:{kind:"running"}}));try{await v(s),r(m=>({...m,[s]:{kind:"ok"}})),l.refetch()}catch(m){r(y=>({...y,[s]:{kind:"error",message:G(m)}}))}}},"i");return(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-cron-triggers",children:[N!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"cron-error",role:"alert",children:N}),o?.length===0&&(0,t.jsx)(_,{description:d("Triggers declared with the cronJobs() builder appear here."),icon:(0,t.jsxs)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,t.jsx)("path",{d:"M12 7.5V12l4 2"})]}),testId:"cron-empty",title:d("No cron triggers.")}),o!==void 0&&o.length>0&&(0,t.jsx)(A,{className:"overflow-hidden py-0",children:(0,t.jsx)(T,{className:"px-0",children:(0,t.jsxs)(K,{"data-testid":"cron-table",children:[(0,t.jsx)(V,{children:(0,t.jsxs)(F,{children:[(0,t.jsx)(u,{children:d("name")}),(0,t.jsx)(u,{children:d("schedule")}),(0,t.jsx)(u,{children:d("target")}),(0,t.jsx)(u,{children:d("shard")}),v!==void 0&&(0,t.jsx)(u,{"aria-label":d("Actions")})]})}),(0,t.jsx)(z,{children:o.map(s=>{let m=f[s.name]??he;return(0,t.jsxs)(F,{"data-testid":`cron-row-${s.name}`,children:[(0,t.jsx)(p,{children:s.name}),(0,t.jsx)(p,{className:"font-mono text-xs tabular-nums",children:s.cron}),(0,t.jsx)(p,{children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[s.workflow===void 0?(0,t.jsx)(Z,{variant:"outline",children:d("function")}):(0,t.jsx)(Z,{variant:"secondary",children:d("workflow")}),(0,t.jsx)("span",{className:"font-mono text-xs",children:s.workflow??s.functionPath})]})}),(0,t.jsx)(p,{children:s.shardKey??""}),v!==void 0&&(0,t.jsx)(p,{className:"text-right",children:(0,t.jsxs)("span",{className:"flex items-center justify-end gap-2",children:[m.kind==="ok"&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground","data-testid":`cron-ran-${s.name}`,children:d("ran")}),m.kind==="error"&&(0,t.jsx)("span",{className:"text-xs text-destructive","data-testid":`cron-run-error-${s.name}`,role:"alert",children:m.message}),(0,t.jsx)(H,{confirmLabel:d("Run now?"),disabled:m.kind==="running",onConfirm:c(()=>{W(n(s.name))},"onConfirm"),testId:`cron-run-${s.name}`,children:m.kind==="running"?d("Running\u2026"):d("Run now")})]})})]},`${s.cron}:${s.name}`)})})]})})})]})},"le"),pe=c(a=>Number.isFinite(a)?X(a,"\u2014"):"\u2014","se"),fe=c(a=>{let e=(0,U.c)(34),i;e[0]!==a?(i=a===void 0?{}:a,e[0]=a,e[1]=i):i=e[1];let{loadJobs:d,removeJob:f,retryJob:r}=i,l=R(),o=M(),N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=["lunora-dead-jobs"],e[2]=N):N=e[2];let v;e[3]!==l||e[4]!==d?(v=c(async()=>(await(d??(()=>l.listDeadJobs()))()).toSorted(be),"h"),e[3]=l,e[4]=d,e[5]=v):v=e[5];let n=E(N,v),s=n.data,[m,y]=(0,Y.useState)(void 0),k=n.error??m,x=d===void 0,C;e[6]!==l||e[7]!==x||e[8]!==r?(C=r??(x?L=>l.retryDeadJob(L):void 0),e[6]=l,e[7]=x,e[8]=r,e[9]=C):C=e[9];let b=C,j;e[10]!==l||e[11]!==x||e[12]!==f?(j=f??(x?L=>l.removeDeadJob(L):void 0),e[10]=l,e[11]=x,e[12]=f,e[13]=j):j=e[13];let I=j,q;e[14]!==n?(q=c(()=>{n.refetch()},"$"),e[14]=n,e[15]=q):q=e[15],O(q,!0);let B;e[16]!==n?(B=c(async L=>{y(void 0);try{await L,n.refetch()}catch(ne){y(G(ne))}},"I"),e[16]=n,e[17]=B):B=e[17];let J=B,S=b!==void 0||I!==void 0,$;e[18]!==k?($=k!==void 0&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"dlq-error",role:"alert",children:k}),e[18]=k,e[19]=$):$=e[19];let w;e[20]!==s?.length||e[21]!==o?(w=s?.length===0&&(0,t.jsx)(_,{description:o("Jobs that exhaust their retry budget are parked here instead of being dropped."),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:"M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14"})}),testId:"dlq-empty",title:o("No dead-letter jobs.")}),e[20]=s?.length,e[21]=o,e[22]=w):w=e[22];let g;e[23]!==J||e[24]!==S||e[25]!==s||e[26]!==I||e[27]!==b||e[28]!==o?(g=s!==void 0&&s.length>0&&(0,t.jsx)(A,{className:"overflow-hidden py-0",children:(0,t.jsx)(T,{className:"px-0",children:(0,t.jsxs)(K,{"data-testid":"dlq-table",children:[(0,t.jsx)(V,{children:(0,t.jsxs)(F,{children:[(0,t.jsx)(u,{children:o("function")}),(0,t.jsx)(u,{children:o("attempts")}),(0,t.jsx)(u,{children:o("last tried")}),(0,t.jsx)(u,{children:o("pool")}),(0,t.jsx)(u,{children:o("shard")}),(0,t.jsx)(u,{children:o("id")}),S&&(0,t.jsx)(u,{"aria-label":o("Actions")})]})}),(0,t.jsx)(z,{children:s.map(L=>(0,t.jsxs)(F,{"data-testid":`dlq-row-${L.id}`,children:[(0,t.jsx)(p,{className:"font-mono text-xs",children:L.functionPath}),(0,t.jsx)(p,{className:"tabular-nums",children:L.attempts??0}),(0,t.jsx)(p,{className:"text-muted-foreground tabular-nums",children:pe(L.scheduledFor)}),(0,t.jsx)(p,{className:"font-mono text-xs",children:L.pool??""}),(0,t.jsx)(p,{children:L.shardKey??""}),(0,t.jsx)(p,{className:"font-mono text-xs",children:L.id}),S&&(0,t.jsx)(p,{className:"text-right",children:(0,t.jsxs)("div",{className:"flex justify-end gap-1.5",children:[b!==void 0&&(0,t.jsx)(ee,{"data-testid":`dlq-retry-${L.id}`,onClick:c(()=>{W(J(b(L.id)))},"onClick"),size:"sm",type:"button",variant:"outline",children:o("Retry")}),I!==void 0&&(0,t.jsx)(H,{confirmLabel:o("Drop job?"),onConfirm:c(()=>{W(J(I(L.id)))},"onConfirm"),testId:`dlq-remove-${L.id}`,children:o("Drop")})]})})]},L.id))})]})})}),e[23]=J,e[24]=S,e[25]=s,e[26]=I,e[27]=b,e[28]=o,e[29]=g):g=e[29];let D;return e[30]!==g||e[31]!==$||e[32]!==w?(D=(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-dead-letter",children:[$,w,g]}),e[30]=g,e[31]=$,e[32]=w,e[33]=D):D=e[33],D},"ne");function be(a,e){return(e.attempts??0)-(a.attempts??0)}c(be,"oe");var te=c(a=>{let e=(0,U.c)(8),{label:i,testId:d,value:f}=a,r;e[0]!==i?(r=(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:i}),e[0]=i,e[1]=r):r=e[1];let l;e[2]!==d||e[3]!==f?(l=(0,t.jsx)("span",{className:"text-2xl font-semibold tabular-nums","data-testid":d,children:f}),e[2]=d,e[3]=f,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=(0,t.jsx)(A,{className:"flex-1 py-0",children:(0,t.jsxs)(T,{className:"flex flex-col gap-1 p-4",children:[r,l]})}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o},"E"),ve=c(a=>{let e=(0,U.c)(25),i;e[0]!==a?(i=a===void 0?{}:a,e[0]=a,e[1]=i):i=e[1];let{loadStatus:d}=i,f=R(),r=M(),l=d===void 0,o;e[2]!==l?(o=["lunora-scheduler-status",l],e[2]=l,e[3]=o):o=e[3];let N;e[4]!==f||e[5]!==d?(N=c(async()=>{let j=await(d??(()=>f.schedulerStatus()))();return{...j,pools:j.pools.toSorted(xe)}},"y"),e[4]=f,e[5]=d,e[6]=N):N=e[6];let v=E(o,N),{data:n,error:s}=v,m;e[7]!==v?(m=c(()=>{v.refetch()},"d"),e[7]=v,e[8]=m):m=e[8],O(m,!0);let y;e[9]!==s?(y=s!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"pools-error",role:"alert",children:s}),e[9]=s,e[10]=y):y=e[10];let k;e[11]!==n||e[12]!==r?(k=n!==void 0&&(0,t.jsxs)("div",{className:"flex gap-3","data-testid":"pools-totals",children:[(0,t.jsx)(te,{label:r("backlog"),testId:"pools-backlog",value:n.backlog}),(0,t.jsx)(te,{label:r("in flight"),testId:"pools-inflight",value:n.inFlight}),(0,t.jsx)(te,{label:r("pools"),testId:"pools-count",value:n.pools.length})]}),e[11]=n,e[12]=r,e[13]=k):k=e[13];let x;e[14]!==n?.pools.length||e[15]!==r?(x=n?.pools.length===0&&(0,t.jsx)(_,{description:r("Pools created with createWorkpool appear here once they have activity."),icon:(0,t.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M4 7h16M4 12h16M4 17h16"})}),testId:"pools-empty",title:r("No workpools.")}),e[14]=n?.pools.length,e[15]=r,e[16]=x):x=e[16];let C;e[17]!==n||e[18]!==r?(C=n!==void 0&&n.pools.length>0&&(0,t.jsx)(A,{className:"overflow-hidden py-0",children:(0,t.jsx)(T,{className:"px-0",children:(0,t.jsxs)(K,{"data-testid":"pools-table",children:[(0,t.jsx)(V,{children:(0,t.jsxs)(F,{children:[(0,t.jsx)(u,{children:r("pool")}),(0,t.jsx)(u,{children:r("queued")}),(0,t.jsx)(u,{children:r("in flight")}),(0,t.jsx)(u,{children:r("max concurrency")})]})}),(0,t.jsx)(z,{children:n.pools.map(ge)})]})})}),e[17]=n,e[18]=r,e[19]=C):C=e[19];let b;return e[20]!==y||e[21]!==k||e[22]!==x||e[23]!==C?(b=(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-scheduler-pools",children:[y,k,x,C]}),e[20]=y,e[21]=k,e[22]=x,e[23]=C,e[24]=b):b=e[24],b},"ae");function xe(a,e){return e.queued-a.queued}c(xe,"ie");function ge(a){return(0,t.jsxs)(F,{"data-testid":`pools-row-${a.name}`,children:[(0,t.jsx)(p,{className:"font-mono text-xs",children:a.name}),(0,t.jsx)(p,{className:"tabular-nums",children:a.queued}),(0,t.jsxs)(p,{className:"tabular-nums",children:[a.inFlight," / ",a.maxConcurrency]}),(0,t.jsx)(p,{className:"tabular-nums",children:a.maxConcurrency})]},a.name)}c(ge,"de");var Ne=["jobs","dead","pools","cron"],Ve=c(a=>{let e=(0,U.c)(41),i;e[0]!==a?(i=a===void 0?{}:a,e[0]=a,e[1]=i):i=e[1];let{loadCronJobs:d,scheduledCancel:f,scheduledLoad:r}=i,l=M(),[o,N]=(0,Y.useState)("jobs"),v;e[2]!==l?(v=l("Cron triggers"),e[2]=l,e[3]=v):v=e[3];let n;e[4]!==l?(n=l("Dead letter"),e[4]=l,e[5]=n):n=e[5];let s;e[6]!==l?(s=l("Scheduled jobs"),e[6]=l,e[7]=s):s=e[7];let m;e[8]!==l?(m=l("Pools"),e[8]=l,e[9]=m):m=e[9];let y;e[10]!==v||e[11]!==n||e[12]!==s||e[13]!==m?(y={cron:v,dead:n,jobs:s,pools:m},e[10]=v,e[11]=n,e[12]=s,e[13]=m,e[14]=y):y=e[14];let k=y,x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=c(w=>{N(w.currentTarget.dataset.view)},"f"),e[15]=x):x=e[15];let C=x,b;e[16]!==l?(b=l("Schedule view"),e[16]=l,e[17]=b):b=e[17];let j;e[18]!==o||e[19]!==k?(j=Ne.map(w=>(0,t.jsx)(ee,{"aria-selected":o===w,"data-testid":`schedule-view-${w}`,"data-view":w,onClick:C,role:"tab",size:"sm",type:"button",variant:o===w?"default":"outline",children:k[w]},w)),e[18]=o,e[19]=k,e[20]=j):j=e[20];let I;e[21]!==b||e[22]!==j?(I=(0,t.jsx)("div",{"aria-label":b,className:"flex gap-1.5","data-testid":"schedule-view-toggle",role:"tablist",children:j}),e[21]=b,e[22]=j,e[23]=I):I=e[23];let q;e[24]!==f||e[25]!==r||e[26]!==o?(q=o==="jobs"&&(0,t.jsx)(de,{cancelJob:f,loadJobs:r}),e[24]=f,e[25]=r,e[26]=o,e[27]=q):q=e[27];let B;e[28]!==o?(B=o==="dead"&&(0,t.jsx)(fe,{}),e[28]=o,e[29]=B):B=e[29];let J;e[30]!==o?(J=o==="pools"&&(0,t.jsx)(ve,{}),e[30]=o,e[31]=J):J=e[31];let S;e[32]!==d||e[33]!==o?(S=o==="cron"&&(0,t.jsx)(ue,{loadCronJobs:d}),e[32]=d,e[33]=o,e[34]=S):S=e[34];let $;return e[35]!==I||e[36]!==q||e[37]!==B||e[38]!==J||e[39]!==S?($=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-schedule",children:[I,q,B,J,S]}),e[35]=I,e[36]=q,e[37]=B,e[38]=J,e[39]=S,e[40]=$):$=e[40],$},"Ie");export{Ve as SchedulePanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as x}from"./chunk-CAOUXOL7.js";import{b as h}from"./chunk-SPDZUX4P.js";import{r as v}from"./chunk-6ZPTNC34.js";import{a as g,d as p,f as k,g as y}from"./chunk-R5ZTCHCE.js";var N=p(k(),1);var l=p(y(),1);var b={debug:"secondary",error:"destructive",fatal:"destructive",info:"outline",log:"outline",trace:"outline",warn:"secondary"},F=g(w=>{let e=(0,N.c)(21),{entry:t}=w,c;e[0]!==t.fields?(c=x(t.fields),e[0]=t.fields,e[1]=c):c=e[1];let m=c,s;e[2]!==t.timestamp?(s=v(t.timestamp),e[2]=t.timestamp,e[3]=s):s=e[3];let r;e[4]!==s?(r=(0,l.jsx)("span",{className:"w-44 shrink-0 tabular-nums text-muted-foreground",role:"gridcell",children:s}),e[4]=s,e[5]=r):r=e[5];let u=b[t.level],a;e[6]!==t.level||e[7]!==u?(a=(0,l.jsx)("span",{className:"w-20 shrink-0",role:"gridcell",children:(0,l.jsx)(h,{variant:u,children:t.level})}),e[6]=t.level,e[7]=u,e[8]=a):a=e[8];let f=t.functionPath??"\u2014",n;e[9]!==f?(n=(0,l.jsx)("span",{className:"w-48 shrink-0 truncate text-muted-foreground",role:"gridcell",children:f}),e[9]=f,e[10]=n):n=e[10];let i;e[11]!==m?(i=m===""?null:(0,l.jsx)("span",{className:"ml-2 text-muted-foreground","data-testid":"lg-fields",children:m}),e[11]=m,e[12]=i):i=e[12];let o;e[13]!==t.message||e[14]!==i?(o=(0,l.jsxs)("span",{className:"flex-1 truncate",role:"gridcell",children:[t.message,i]}),e[13]=t.message,e[14]=i,e[15]=o):o=e[15];let d;return e[16]!==r||e[17]!==a||e[18]!==n||e[19]!==o?(d=(0,l.jsxs)(l.Fragment,{children:[r,a,n,o]}),e[16]=r,e[17]=a,e[18]=n,e[19]=o,e[20]=d):d=e[20],d},"B");export{b as a,F as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as O}from"./chunk-METRMDIQ.js";import{a as C}from"./chunk-NXXGISFB.js";import{b as v}from"./chunk-SPDZUX4P.js";import"./chunk-7PIHTTND.js";import{a as k}from"./chunk-UIF57LBO.js";import"./chunk-PZ4QDWTI.js";import"./chunk-FLCK2WWQ.js";import"./chunk-F7JOSNAT.js";import{a as S}from"./chunk-VDW32UET.js";import{c as b}from"./chunk-YUWMB6EV.js";import"./chunk-TBXK3FKP.js";import"./chunk-RCZTUWG3.js";import{a as c}from"./chunk-UANVABQG.js";import{a as w,b as T,c as A,d as f,e as s,f as l}from"./chunk-L4EZAHCD.js";import{a as y,e as N}from"./chunk-IYWVSMAY.js";import{d as p}from"./chunk-6ZPTNC34.js";import"./chunk-VYW2PAWC.js";import{a as n,d as x,e as R,g as V}from"./chunk-R5ZTCHCE.js";var F=x(R(),1);var e=x(V(),1);var $=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."}}},"H"),q='{ "targetingKey": "user-123", "plan": "premium" }',D=n(a=>a.type==="object"?JSON.stringify(a.value):String(a.value),"R"),Y=n(({initialShardKey:a=""})=>{let t=p(),[o,j]=(0,F.useState)(""),{context:g,error:m}=$(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,L=i?.configured??!1,h=Array.isArray(i?.flags)?[...i.flags].toSorted((r,B)=>r.key.localeCompare(B.key)):[],d;return u&&!L?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)(T,{children:(0,e.jsxs)(f,{children:[(0,e.jsx)(s,{children:t("Key")}),(0,e.jsx)(s,{children:t("Type")}),(0,e.jsx)(s,{children:t("Value")}),(0,e.jsx)(s,{children:t("Reason")}),(0,e.jsx)(s,{children:t("Variant")})]})}),(0,e.jsx)(A,{children:h.map(r=>(0,e.jsxs)(f,{"data-testid":`flags-row-${r.key}`,children:[(0,e.jsx)(l,{className:"font-mono text-xs",children:r.key}),(0,e.jsx)(l,{className:"font-mono text-xs text-muted-foreground",children:r.type}),(0,e.jsx)(l,{className:"font-mono text-xs",children:D(r)}),(0,e.jsx)(l,{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)(l,{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)(C,{htmlFor:"flags-targeting-context",children:t("Targeting context (JSON)")}),(0,e.jsx)(O,{className:"font-mono text-xs","data-testid":"flags-context-input",id:"flags-targeting-context",onChange:n(r=>{j(r.target.value)},"onChange"),placeholder:q,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]})},"W");export{Y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as te}from"./chunk-METRMDIQ.js";import{P as Z}from"./chunk-AOAJGSYZ.js";import"./chunk-TFMQSCGC.js";import{a as O}from"./chunk-BWEXJENB.js";import"./chunk-74ASA4WU.js";import"./chunk-XQS7KSHL.js";import"./chunk-7PIHTTND.js";import{a as K}from"./chunk-VDW32UET.js";import{c as ee}from"./chunk-YUWMB6EV.js";import{f as M}from"./chunk-TBXK3FKP.js";import"./chunk-RCZTUWG3.js";import{a as P}from"./chunk-UANVABQG.js";import{a as D,b as F,c as L,d as h,e as o,f as i}from"./chunk-L4EZAHCD.js";import{a as E,e as _}from"./chunk-IYWVSMAY.js";import{d as H,f as Q,g as V,h as W,o as $}from"./chunk-6ZPTNC34.js";import"./chunk-VYW2PAWC.js";import{a as n,d as Y,e as ne,g as le}from"./chunk-R5ZTCHCE.js";var c=Y(ne(),1);var e=Y(le(),1);var oe=["queued","running","paused","waiting","complete","errored","terminated"],ie=["pause","resume","terminate"],de="WORKFLOWS_NOT_CONFIGURED",ce=n(l=>typeof l=="object"&&l!==null&&l.code===de,"ie"),me=n(l=>{let r=l.error??l.output;if(r===void 0)return"\u2014";try{return JSON.stringify(r)}catch{return"(unserializable)"}},"de"),ue=n(({loadDetail:l,loadInstances:r,readOnly:N,runAction:j,workflowName:g})=>{let A=M(),s=H(),[p,k]=(0,c.useState)(null),[S,C]=(0,c.useState)(null),[v,z]=(0,c.useState)(""),[b,f]=(0,c.useState)(null),[J,I]=(0,c.useState)(!1),[R,U]=(0,c.useState)(null),x=l??(a=>A.getWorkflowInstance(a)),w=N?void 0:j??(r===void 0?a=>A.setWorkflowInstanceStatus(a):void 0),T=n(async()=>{f(null),I(!1);let a=v===""?void 0:v;try{if(r===void 0){let d=await A.listWorkflowInstances({name:g,status:a});if(d.configured===!1){k(null),I(!0);return}k(d.instances);return}k(await r({name:g,status:a}))}catch(d){k(null),ce(d)?I(!0):f(W(d))}},"L");(0,c.useEffect)(()=>{C(null),$(T())},[g,v]);let q=n(async a=>{f(null);try{C(await x({id:a,name:g}))}catch(d){f(W(d))}},"K"),B=n(async(a,d)=>{if(w!==void 0){U(a),f(null);try{await w({action:d,id:a,name:g}),await T()}catch(G){f(W(G))}U(null)}},"q");return(0,e.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-workflow-instances",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsx)("h3",{className:"text-sm font-medium",children:s("Instance history")}),(0,e.jsxs)("select",{"aria-label":s("Filter by status"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"workflow-instances-filter",onChange:n(a=>{z(a.target.value)},"onChange"),value:v,children:[(0,e.jsx)("option",{value:"",children:s("All statuses")}),oe.map(a=>(0,e.jsx)("option",{value:a,children:a},a))]})]}),b!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"workflow-instances-error",role:"alert",children:b}),J&&(0,e.jsx)(P,{description:s("Set CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN in your .dev.vars to enable workflow instance history."),testId:"workflow-instances-unconfigured",title:s("Workflow inspection not configured")}),!J&&p!==null&&p.length===0&&(0,e.jsx)(P,{description:s("No instances match this filter for the selected workflow."),testId:"workflow-instances-empty",title:s("No instances")}),p!==null&&p.length>0&&(0,e.jsx)(E,{className:"overflow-hidden py-0",children:(0,e.jsx)(_,{className:"px-0",children:(0,e.jsxs)(D,{"data-testid":"workflow-instances-table",children:[(0,e.jsx)(F,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:s("Instance id")}),(0,e.jsx)(o,{children:s("Status")}),(0,e.jsx)(o,{children:s("Created")}),(0,e.jsx)(o,{children:s("Ended")}),(0,e.jsx)(o,{"aria-label":s("Actions")})]})}),(0,e.jsx)(L,{children:p.map(a=>(0,e.jsxs)(h,{"data-testid":`workflow-instance-${a.id}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:a.id}),(0,e.jsx)(i,{className:"font-mono text-xs",children:a.status}),(0,e.jsx)(i,{className:"text-muted-foreground tabular-nums",children:a.createdOn??"\u2014"}),(0,e.jsx)(i,{className:"text-muted-foreground tabular-nums",children:a.endedOn??"\u2014"}),(0,e.jsx)(i,{className:"text-right",children:(0,e.jsxs)("div",{className:"flex justify-end gap-1.5",children:[(0,e.jsx)(O,{"data-testid":`workflow-instance-steps-${a.id}`,onClick:n(()=>{$(q(a.id))},"onClick"),size:"sm",type:"button",variant:"outline",children:s("Steps")}),w!==void 0&&ie.map(d=>(0,e.jsx)(O,{"data-testid":`workflow-instance-${d}-${a.id}`,disabled:R===a.id,onClick:n(()=>{$(B(a.id,d))},"onClick"),size:"sm",type:"button",variant:"ghost",children:s(d)},d))]})})]},a.id))})]})})}),S!==null&&(0,e.jsx)(E,{className:"overflow-hidden py-0","data-testid":"workflow-instance-detail",children:(0,e.jsxs)(_,{className:"flex flex-col gap-2 px-4 py-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("span",{className:"font-mono text-xs",children:[s("Steps")," \xB7 ",S.id]}),(0,e.jsx)(O,{"data-testid":"workflow-instance-detail-close",onClick:n(()=>{C(null)},"onClick"),size:"xs",type:"button",variant:"ghost",children:s("Close")})]}),S.steps.length===0?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:s("This instance has no recorded steps yet.")}):(0,e.jsxs)(D,{"data-testid":"workflow-instance-steps",children:[(0,e.jsx)(F,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:s("Step")}),(0,e.jsx)(o,{children:s("Type")}),(0,e.jsx)(o,{children:s("Attempts")}),(0,e.jsx)(o,{children:s("Started")}),(0,e.jsx)(o,{children:s("Output")})]})}),(0,e.jsx)(L,{children:S.steps.map((a,d)=>(0,e.jsxs)(h,{"data-testid":`workflow-step-${String(d)}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:a.name}),(0,e.jsx)(i,{className:"text-xs text-muted-foreground",children:a.type??"\u2014"}),(0,e.jsx)(i,{className:"tabular-nums",children:a.attempts??"\u2014"}),(0,e.jsx)(i,{className:"text-muted-foreground tabular-nums",children:a.start??"\u2014"}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:me(a)})]},`${a.name}:${String(d)}`))})]})]})})]})},"ce"),fe=Q(K.createWorkflowInstance),he=Q(K.getWorkflowInstanceStatus),pe=n(l=>{if(l.error)return`${l.error.name}: ${l.error.message}`;if(l.output===void 0)return"\u2014";try{return JSON.stringify(l.output)}catch{return"(unserializable)"}},"fe"),xe=n((l,r)=>l.some(N=>N.exportName===r)?r:l[0]?.exportName??"","he"),We=n(()=>{let l=M(),r=H(),{data:N,error:j}=ee(K.listWorkflows,{}),[g,A]=(0,c.useState)(""),[s,p]=(0,c.useState)(""),[k,S]=(0,c.useState)(""),[C,v]=(0,c.useState)(!1),[z,b]=(0,c.useState)(null),[f,J]=(0,c.useState)([]),[I,R]=(0,c.useState)(null),U=N!==void 0,x=Array.isArray(N?.workflows)?[...N.workflows].toSorted((t,u)=>t.exportName.localeCompare(u.exportName)):[],w=xe(x,g),T=x.find(t=>t.exportName===w),q=n(t=>{J(u=>{let m=u.filter(y=>!(y.exportName===t.exportName&&y.id===t.id));return[t,...m]})},"C"),B=n(async()=>{let t=w;if(t==="")return;let u,m=k.trim();if(m!=="")try{u=JSON.parse(m)}catch{b(r("Params must be valid JSON"));return}v(!0),b(null);try{let y=s.trim(),X=await l.query(fe,{exportName:t,id:y===""?void 0:y,params:u},V(""));q({exportName:t,id:X.id,status:X.status}),p("")}catch(y){b(W(y))}v(!1)},"L"),a=n(()=>{$(B())},"K"),d=n(async(t,u)=>{R(u);try{let m=await l.query(he,{exportName:t,id:u},V(""));q({error:m.error,exportName:t,id:m.id,output:m.output,status:m.status})}catch(m){b(W(m))}R(null)},"q"),G=n(t=>{A(t.target.value)},"r"),ae=n(t=>{p(t.target.value)},"l"),re=n(t=>{S(t.target.value)},"G"),se=n(t=>{let{export:u,id:m}=t.currentTarget.dataset;u!==void 0&&m!==void 0&&$(d(u,m))},"ee");return(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-workflows-panel",children:[j!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"workflows-error",role:"alert",children:j}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:r("Workflows are declared in code with defineWorkflow and run as durable Cloudflare Workflows. Start an instance and observe its status below.")}),U&&x.length===0?(0,e.jsx)(P,{description:r("No defineWorkflow is declared in lunora/workflows.ts in this deployment. Add one to run a durable, multi-step workflow."),testId:"workflows-empty",title:r("No workflows defined")}):(0,e.jsx)(E,{className:"overflow-hidden py-0",children:(0,e.jsx)(_,{className:"px-0",children:(0,e.jsxs)(D,{"data-testid":"workflows-table",children:[(0,e.jsx)(F,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:r("Export")}),(0,e.jsx)(o,{children:r("Name")}),(0,e.jsx)(o,{children:r("Class")}),(0,e.jsx)(o,{children:r("Binding")})]})}),(0,e.jsx)(L,{children:x.map(t=>(0,e.jsxs)(h,{"data-testid":`workflows-row-${t.exportName}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:t.exportName}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.name}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.className}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.binding})]},t.exportName))})]})})}),x.length>0&&(0,e.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"workflows-start",children:[(0,e.jsx)("h3",{className:"text-sm font-medium",children:r("Start instance")}),z!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"workflows-start-error",role:"alert",children:z}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)("select",{"aria-label":r("Workflow"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"workflows-start-select",onChange:G,value:w,children:x.map(t=>(0,e.jsx)("option",{value:t.exportName,children:t.exportName},t.exportName))}),(0,e.jsx)(Z,{"aria-label":r("Instance id (optional)"),className:"max-w-48","data-testid":"workflows-start-id",onChange:ae,placeholder:r("Instance id (optional)"),value:s}),(0,e.jsx)(O,{"data-testid":"workflows-start-button",disabled:C||w==="",onClick:a,children:r(C?"Starting\u2026":"Start instance")})]}),(0,e.jsx)(te,{"aria-label":r("Params (JSON)"),className:"font-mono","data-testid":"workflows-start-params",onChange:re,placeholder:r("Params (JSON, optional)"),value:k})]}),f.length>0&&(0,e.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"workflows-instances",children:[(0,e.jsx)("h3",{className:"text-sm font-medium",children:r("Instances")}),(0,e.jsx)(E,{className:"overflow-hidden py-0",children:(0,e.jsx)(_,{className:"px-0",children:(0,e.jsxs)(D,{"data-testid":"workflows-instances-table",children:[(0,e.jsx)(F,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:r("Workflow")}),(0,e.jsx)(o,{children:r("Instance id")}),(0,e.jsx)(o,{children:r("Status")}),(0,e.jsx)(o,{children:r("Output")}),(0,e.jsx)(o,{})]})}),(0,e.jsx)(L,{children:f.map(t=>(0,e.jsxs)(h,{"data-testid":`workflows-instance-${t.id}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:t.exportName}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.id}),(0,e.jsx)(i,{className:"font-mono text-xs",children:t.status}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:pe(t)}),(0,e.jsx)(i,{children:(0,e.jsx)(O,{"data-export":t.exportName,"data-id":t.id,"data-testid":`workflows-instance-refresh-${t.id}`,disabled:I===t.id,onClick:se,size:"xs",variant:"outline",children:I===t.id?r("Refreshing\u2026"):r("Refresh")})})]},`${t.exportName}:${t.id}`))})]})})})]}),T!==void 0&&(0,e.jsx)(ue,{workflowName:T.name})]})},"Te");export{We as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as y}from"./chunk-SPDZUX4P.js";import"./chunk-7PIHTTND.js";import{a as R}from"./chunk-UIF57LBO.js";import"./chunk-PZ4QDWTI.js";import"./chunk-FLCK2WWQ.js";import"./chunk-F7JOSNAT.js";import{a as v}from"./chunk-VDW32UET.js";import{c as $}from"./chunk-YUWMB6EV.js";import"./chunk-TBXK3FKP.js";import"./chunk-RCZTUWG3.js";import{a as S}from"./chunk-UANVABQG.js";import{a as A,b as C,c as I,d as x,e as c,f as n}from"./chunk-L4EZAHCD.js";import{a as k,e as w}from"./chunk-IYWVSMAY.js";import{d as N}from"./chunk-6ZPTNC34.js";import"./chunk-VYW2PAWC.js";import{a as f,d as b,f as E,g as O}from"./chunk-R5ZTCHCE.js";var j=b(E(),1);var r=b(O(),1);var _=f((e,t)=>({delete:e("Delete"),list:e("List"),read:e("Read"),write:e("Write")})[t],"I"),T={delete:2,list:3,read:0,write:1},B=f(e=>[...e].toSorted((t,a)=>t.bucket.localeCompare(a.bucket)||T[t.on]-T[a.on]||(t.prefix??"").localeCompare(a.prefix??"")),"O"),q=f(()=>{let e=(0,j.c)(14),t=N(),a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={},e[0]=a):a=e[0];let{data:l,error:i,errorSource:d}=$(v.storageRules,a),h=l!==void 0,m;if(e[1]!==l||e[2]!==i||e[3]!==d||e[4]!==h||e[5]!==t){let g=B(Array.isArray(l?.rules)?l.rules:[]),u;e[7]!==i||e[8]!==d?(u=i!==null&&(0,r.jsx)(R,{error:d,testId:"storage-rules-error"}),e[7]=i,e[8]=d,e[9]=u):u=e[9];let o;e[10]!==t?(o=t("Storage rules are declared in code with defineStorageRule and gate ctx.storage access per bucket. This view is read-only."),e[10]=t,e[11]=o):o=e[11];let p;e[12]!==o?(p=(0,r.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"storage-rules-note",children:o}),e[12]=o,e[13]=p):p=e[13],m=(0,r.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-storage-rules-panel",children:[u,p,h&&g.length===0?(0,r.jsx)(S,{description:t("No defineStorageRule is wired through .use(storageRules(...)) in this deployment. Add one to gate object access by key prefix."),testId:"storage-rules-empty",title:t("No storage rules defined")}):(0,r.jsx)(k,{className:"overflow-hidden py-0",children:(0,r.jsx)(w,{className:"px-0",children:(0,r.jsxs)(A,{"data-testid":"storage-rules-table",children:[(0,r.jsx)(C,{children:(0,r.jsxs)(x,{children:[(0,r.jsx)(c,{children:t("Bucket")}),(0,r.jsx)(c,{children:t("Operation")}),(0,r.jsx)(c,{children:t("Key prefix")}),(0,r.jsx)(c,{children:t("Guarded by")})]})}),(0,r.jsx)(I,{children:g.map(s=>(0,r.jsxs)(x,{"data-testid":`storage-rule-${s.bucket}-${s.on}-${s.prefix??""}`,children:[(0,r.jsx)(n,{className:"font-mono text-xs",children:s.bucket}),(0,r.jsx)(n,{children:(0,r.jsx)(y,{variant:"secondary",children:_(t,s.on)})}),(0,r.jsx)(n,{className:"font-mono text-xs",children:s.prefix??(0,r.jsx)("span",{className:"text-muted-foreground",children:t("(whole bucket)")})}),(0,r.jsx)(n,{className:"font-mono text-xs text-muted-foreground",children:s.procedure})]},`${s.bucket}:${s.on}:${s.prefix??""}:${s.procedure}`))})]})})})]}),e[1]=l,e[2]=i,e[3]=d,e[4]=h,e[5]=t,e[6]=m}else m=e[6];return m},"M");export{q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as w}from"./chunk-BWEXJENB.js";import"./chunk-74ASA4WU.js";import"./chunk-XQS7KSHL.js";import{b as y}from"./chunk-SPDZUX4P.js";import"./chunk-7PIHTTND.js";import{a as C}from"./chunk-UIF57LBO.js";import"./chunk-PZ4QDWTI.js";import"./chunk-FLCK2WWQ.js";import"./chunk-F7JOSNAT.js";import{a as h}from"./chunk-VDW32UET.js";import{c as u}from"./chunk-YUWMB6EV.js";import"./chunk-TBXK3FKP.js";import"./chunk-RCZTUWG3.js";import{a as T}from"./chunk-UANVABQG.js";import{a as S,b as K,c as $,d as g,e as i,f as o}from"./chunk-L4EZAHCD.js";import{a as A,e as k}from"./chunk-IYWVSMAY.js";import{d as M,r as D}from"./chunk-6ZPTNC34.js";import"./chunk-VYW2PAWC.js";import{a as d,d as z,e as ae,g as re}from"./chunk-R5ZTCHCE.js";var O=z(ae(),1);var e=z(re(),1);var Q="agent_threads",se="agent_messages",F="agent_run_queue",R=100,ne=250,ie={},oe={filters:[],limit:R,offset:0,orderBy:{column:"updatedAt",direction:"desc"},skipCount:!0,table:Q},l=d((s,t)=>{let r=s[t];return typeof r=="string"?r:void 0},"i"),j=d((s,t)=>{let r=s[t];return typeof r=="number"?r:void 0},"A"),L=d(s=>{let{usage:t}=s;if(t===null||typeof t!="object")return;let{totalTokens:r}=t;return typeof r=="number"?r:void 0},"U"),de=d(s=>{let{toolCalls:t}=s;return Array.isArray(t)?t.map(r=>r!==null&&typeof r=="object"?r.name:void 0).filter(r=>typeof r=="string"):[]},"ne"),le=d(s=>{switch(s){case"awaiting_input":return"warning";case"cancelled":return"warning";case"error":return"destructive";case"running":return"info";default:return"outline"}},"oe"),ce=d(s=>{switch(s){case"approved":return"success";case"rejected":return"destructive";default:return"warning"}},"de"),Ne=d(({initialShardKey:s=""})=>{let t=M(),[r,I]=(0,O.useState)(void 0),{data:c}=u(h.listTables,ie,{live:!0,shardKey:s}),G=c!==void 0,p=Array.isArray(c)&&c.some(a=>a.name===Q),H=Array.isArray(c)&&c.some(a=>a.name===F),{data:_,error:J,errorSource:V,liveError:W}=u(h.readTablePage,oe,{enabled:p,live:!0,shardKey:s}),X={filters:[{column:"threadKey",operator:"eq",value:r??""}],limit:ne,offset:0,orderBy:{column:"seq",direction:"asc"},skipCount:!0,table:se},{data:q}=u(h.readTablePage,{limit:R,offset:0,orderBy:{column:"position",direction:"asc"},skipCount:!0,table:F},{enabled:H,live:!0,shardKey:s}),{data:B,error:Y,errorSource:Z}=u(h.readTablePage,X,{enabled:p&&r!==void 0,live:!0,shardKey:s}),v=Array.isArray(_?.rows)?_.rows:[],ee=Array.isArray(q?.rows)?q.rows:[],E=d(a=>ee.filter(n=>l(n,"threadKey")===a).length,"w"),P=Array.isArray(B?.rows)?B.rows:[],U=v.find(a=>l(a,"key")===r),f;return G&&!p?f=(0,e.jsx)(T,{description:t("No @lunora/agent tables found in this deployment. Add lunora/agents.ts with defineAgent(...) and merge the agent schema extension to run durable AI agents."),testId:"agents-unconfigured",title:t("No agents configured")}):p&&v.length===0?f=(0,e.jsx)(T,{description:t("No agent has run yet. Start a run with ctx.agents.<name>.run(...) and its thread appears here."),testId:"agents-empty",title:t("No agent threads yet")}):f=(0,e.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,e.jsx)(A,{className:"overflow-hidden py-0",children:(0,e.jsx)(k,{className:"px-0",children:(0,e.jsxs)(S,{"data-testid":"agents-threads-table",children:[(0,e.jsx)(K,{children:(0,e.jsxs)(g,{children:[(0,e.jsx)(i,{children:t("Agent")}),(0,e.jsx)(i,{children:t("Key")}),(0,e.jsx)(i,{children:t("Status")}),(0,e.jsx)(i,{children:t("Queued")}),(0,e.jsx)(i,{children:t("Messages")}),(0,e.jsx)(i,{children:t("Tokens")}),(0,e.jsx)(i,{children:t("Updated")}),(0,e.jsx)(i,{"aria-label":t("Actions")})]})}),(0,e.jsx)($,{children:v.map(a=>{let n=l(a,"key")??"",m=l(a,"status"),x=L(a);return(0,e.jsxs)(g,{"data-active":n===r?"":void 0,"data-testid":`agents-thread-${n}`,children:[(0,e.jsx)(o,{className:"font-mono text-xs",children:l(a,"agent")??"\u2014"}),(0,e.jsx)(o,{className:"font-mono text-xs text-muted-foreground",children:n}),(0,e.jsx)(o,{children:(0,e.jsx)(y,{"data-testid":`agents-thread-status-${n}`,variant:le(m),children:m??"\u2014"})}),(0,e.jsx)(o,{className:"tabular-nums",children:E(n)===0?(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}):(0,e.jsx)(y,{"data-testid":`agents-thread-queued-${n}`,variant:"warning",children:E(n)})}),(0,e.jsx)(o,{className:"tabular-nums",children:j(a,"messageCount")??"\u2014"}),(0,e.jsx)(o,{className:"tabular-nums text-muted-foreground",children:x??"\u2014"}),(0,e.jsx)(o,{className:"text-muted-foreground tabular-nums",children:D(j(a,"updatedAt"),"\u2014")}),(0,e.jsx)(o,{className:"text-right",children:(0,e.jsx)(w,{"data-testid":`agents-thread-open-${n}`,onClick:d(()=>{I(n)},"onClick"),size:"sm",type:"button",variant:"outline",children:t("Timeline")})})]},n)})})]})})}),Y!==null&&(0,e.jsx)(C,{error:Z,testId:"agents-messages-error"}),r!==void 0&&(0,e.jsx)(A,{className:"overflow-hidden py-0","data-testid":"agents-thread-detail",children:(0,e.jsxs)(k,{className:"flex flex-col gap-3 px-4 py-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsxs)("span",{className:"font-mono text-xs",children:[t("Timeline")," \xB7 ",r,U!==void 0&&(0,e.jsxs)("span",{className:"text-muted-foreground",children:[" \xB7 ",t("Usage"),": ",L(U)??0," ",t("Tokens")]})]}),(0,e.jsx)(w,{"data-testid":"agents-thread-detail-close",onClick:d(()=>{I(void 0)},"onClick"),size:"xs",type:"button",variant:"ghost",children:t("Close")})]}),P.length===0?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:t("This thread has no messages yet.")}):(0,e.jsxs)(S,{"data-testid":"agents-messages-table",children:[(0,e.jsx)(K,{children:(0,e.jsxs)(g,{children:[(0,e.jsx)(i,{children:t("Role")}),(0,e.jsx)(i,{children:t("Content")}),(0,e.jsx)(i,{children:t("Tool")}),(0,e.jsx)(i,{children:t("Approval")})]})}),(0,e.jsx)($,{children:P.map((a,n)=>{let m=l(a,"role")??"\u2014",x=de(a),te=l(a,"toolName"),b=l(a,"status"),N=j(a,"seq")??n;return(0,e.jsxs)(g,{"data-testid":`agents-message-${String(N)}`,children:[(0,e.jsx)(o,{className:"font-mono text-xs align-top text-muted-foreground",children:m}),(0,e.jsx)(o,{className:"max-w-md font-mono text-xs whitespace-pre-wrap break-words",children:l(a,"content")??"\u2014"}),(0,e.jsx)(o,{className:"font-mono text-xs align-top text-muted-foreground",children:te??(x.length>0?x.join(", "):"\u2014")}),(0,e.jsx)(o,{className:"align-top",children:b===void 0?(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:"\u2014"}):(0,e.jsx)(y,{"data-testid":`agents-message-approval-${String(N)}`,variant:ce(b),children:b})})]},l(a,"messageKey")??`${m}:${String(N)}`)})})]})]})})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-agents-panel",children:[J!==null&&(0,e.jsx)(C,{error:V,testId:"agents-error"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t("Agents run as durable workflows. Each run persists a thread of assistant and tool messages; select a thread to inspect its timeline, tool calls, approvals, and token usage.")}),W!==void 0&&(0,e.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"agents-live-error",role:"alert",children:t("Live updates unavailable; showing the last evaluation.")}),f]})},"be");export{Ne as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as E}from"./chunk-WUW4ZHRL.js";import{a as w}from"./chunk-BWEXJENB.js";import"./chunk-74ASA4WU.js";import"./chunk-XQS7KSHL.js";import"./chunk-7PIHTTND.js";import{b as T}from"./chunk-YUWMB6EV.js";import{f as A}from"./chunk-TBXK3FKP.js";import"./chunk-RCZTUWG3.js";import{a as j}from"./chunk-UANVABQG.js";import{a as _,b as $,c as C,d as g,e as o,f as l}from"./chunk-L4EZAHCD.js";import{a as I,e as S}from"./chunk-IYWVSMAY.js";import{d as k,o as B,r as R}from"./chunk-6ZPTNC34.js";import"./chunk-VYW2PAWC.js";import{a as h,d as y,f as K,g as L}from"./chunk-R5ZTCHCE.js";var H=y(K(),1);var s=y(L(),1);var z=200,U=h(()=>{let e=(0,H.c)(21),n=A(),t=k(),u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=["lunora-auth-sessions",z],e[0]=u):u=e[0];let p;e[1]!==n?(p=h(()=>n.listAuthSessions({limit:z}),"u"),e[1]=n,e[2]=p):p=e[2];let a=T(u,p),{error:f}=a,i=a.data?.rows??null,x;e[3]!==a?(x=h(()=>{a.refetch()},"p"),e[3]=a,e[4]=x):x=e[4],E(x,!0);let N;e[5]!==n||e[6]!==a?(N=h(r=>{B((async()=>{await n.revokeAuthSession({sessionId:r}),a.refetch()})())},"x"),e[5]=n,e[6]=a,e[7]=N):N=e[7];let v=N,d;e[8]!==f?(d=f!==null&&(0,s.jsx)("p",{className:"text-sm text-destructive","data-testid":"auth-sessions-error",role:"alert",children:f}),e[8]=f,e[9]=d):d=e[9];let c;e[10]!==i||e[11]!==t?(c=i!==null&&i.length===0&&(0,s.jsx)(j,{testId:"auth-sessions-empty",title:t("No active sessions.")}),e[10]=i,e[11]=t,e[12]=c):c=e[12];let m;e[13]!==v||e[14]!==i||e[15]!==t?(m=i!==null&&i.length>0&&(0,s.jsx)(I,{className:"overflow-hidden py-0",children:(0,s.jsx)(S,{className:"px-0",children:(0,s.jsxs)(_,{"data-testid":"auth-sessions-table",children:[(0,s.jsx)($,{children:(0,s.jsxs)(g,{children:[(0,s.jsx)(o,{children:t("user")}),(0,s.jsx)(o,{children:t("expires")}),(0,s.jsx)(o,{children:t("ip")}),(0,s.jsx)(o,{children:t("user agent")}),(0,s.jsx)(o,{children:t("impersonated by")}),(0,s.jsx)(o,{"aria-label":t("Actions")})]})}),(0,s.jsx)(C,{children:i.map(r=>(0,s.jsxs)(g,{"data-testid":`auth-session-${r.id}`,children:[(0,s.jsx)(l,{className:"font-mono text-xs",children:r.userId}),(0,s.jsx)(l,{className:"text-muted-foreground tabular-nums",children:R(r.expiresAt)}),(0,s.jsx)(l,{children:r.ipAddress??""}),(0,s.jsx)(l,{className:"max-w-40 truncate",children:r.userAgent??""}),(0,s.jsx)(l,{className:"font-mono text-xs",children:r.impersonatedBy??""}),(0,s.jsx)(l,{children:(0,s.jsx)(w,{"data-testid":`auth-session-revoke-${r.id}`,onClick:h(()=>{v(r.id)},"onClick"),size:"xs",type:"button",variant:"ghost",children:t("Revoke")})})]},r.id))})]})})}),e[13]=v,e[14]=i,e[15]=t,e[16]=m):m=e[16];let b;return e[17]!==d||e[18]!==c||e[19]!==m?(b=(0,s.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"auth-sessions",children:[d,c,m]}),e[17]=d,e[18]=c,e[19]=m,e[20]=b):b=e[20],b},"K");export{U as default};
|