@lunora/studio 1.0.0-alpha.12 → 1.0.0-alpha.121
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 +836 -786
- 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 +9 -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/reactors-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-B6z7VLYt.js +1 -0
- package/dist/packem_shared/ApiDocsPanel-BMzLPgvv.js +2 -0
- package/dist/packem_shared/ApiReferencePanel-CZDVN7zg.js +1 -0
- package/dist/packem_shared/CommandPalette-kQLn0xlS.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-C68K5QHO.js +4 -0
- package/dist/packem_shared/DataFilters-3nbW0uax.js +1 -0
- package/dist/packem_shared/ErrorBoundary-BWNF98VF.js +1 -0
- package/dist/packem_shared/GlobalDataBrowser-BHFgEqMl.js +1 -0
- package/dist/packem_shared/HomePanel-B-tcMcTZ.js +1 -0
- package/dist/packem_shared/MigrationsPanel-CLRWwPyL.js +1 -0
- package/dist/packem_shared/OpenRpcReferencePanel-XoYdKuMg.js +1 -0
- package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.js +1 -0
- package/dist/packem_shared/ScheduledJobs-DRmOKtDa.js +1 -0
- package/dist/packem_shared/ShardInput-CdawpUiS.js +1 -0
- package/dist/packem_shared/Studio-BYdUxnM5.js +1 -0
- package/dist/packem_shared/StudioApp-Bxmtp-Fi.js +1 -0
- package/dist/packem_shared/StudioI18nProvider-Bl547evf.js +1 -0
- package/dist/packem_shared/advisor-view-CqCG22DB.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-B6gzp_f9.js +6 -0
- package/dist/packem_shared/browser-storage-BH1MxLZs.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-pjv4t5Yi.js +1 -0
- package/dist/packem_shared/data-view-params-qoSTqjAj.js +1 -0
- package/dist/packem_shared/dropdown-menu-U7Tjg1Nb.js +2 -0
- package/dist/packem_shared/empty-state-B939z6K2.js +1 -0
- package/dist/packem_shared/error-alert-CKqB2CiN.js +1 -0
- package/dist/packem_shared/grid-features-AzpmpR3Q.js +6 -0
- package/dist/packem_shared/home-panel-ecz6-nHV.js +3 -0
- package/dist/packem_shared/input-CY5W3wzv.js +1 -0
- package/dist/packem_shared/internal-7bgd8inO.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-D0XBZaDn.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-BPY8sYUl.js +1 -0
- package/dist/packem_shared/reference-view-DY3CaRxH.js +13 -0
- package/dist/packem_shared/schema-diagram-DLhppqVE.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-DU5b3QDI.js +1 -0
- package/dist/packem_shared/shortcuts-lH4Vaqjc.js +1 -0
- package/dist/packem_shared/skeleton-DFBBaJU6.js +1 -0
- package/dist/packem_shared/sparkline-CYbJzfA1.js +1 -0
- package/dist/packem_shared/sql-result-table-blxdNVJ0.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-Cvdwfzxm.js +2 -0
- package/dist/packem_shared/table-BMsuYFhk.js +2 -0
- package/dist/packem_shared/table-list-sidebar-BCxqrZ0s.js +1 -0
- package/dist/packem_shared/textarea-DpO3i-Qo.js +1 -0
- package/dist/packem_shared/trace-handoff-z9sy89Ci.js +1 -0
- package/dist/packem_shared/use-admin-query-DV9xmFl8.js +1 -0
- package/dist/packem_shared/use-async-submit-C9xXjXWX.js +1 -0
- package/dist/packem_shared/use-auth-config-DIAyVsa3.js +1 -0
- package/dist/packem_shared/use-open-trace-ClAdPkGD.js +1 -0
- package/dist/packem_shared/use-shard-key-BsP3o5wT.js +1 -0
- package/dist/packem_shared/use-sql-assistant-CXgVX_PP.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-2AJMY73I.js +1 -0
- package/dist/standalone/chunk-2EJQ7SPV.js +1 -0
- package/dist/standalone/chunk-2EWSVBWG.js +1 -0
- package/dist/standalone/chunk-2FFV3NB7.js +1 -0
- package/dist/standalone/chunk-2HW5M4MK.js +2 -0
- package/dist/standalone/chunk-2SFSTQS4.js +1 -0
- package/dist/standalone/chunk-33TNFS73.js +1 -0
- package/dist/standalone/chunk-3K4F3B56.js +1 -0
- package/dist/standalone/chunk-3WFIPW6W.js +1 -0
- package/dist/standalone/chunk-4HWTEDVV.js +1 -0
- package/dist/standalone/chunk-4O7MEQMU.js +1 -0
- package/dist/standalone/chunk-4YTSKL4R.js +1 -0
- package/dist/standalone/chunk-57VX76PR.js +1 -0
- package/dist/standalone/chunk-5DEXJ766.js +1 -0
- package/dist/standalone/chunk-5JLIP2HH.js +1 -0
- package/dist/standalone/chunk-5QAT5NQ4.js +1 -0
- package/dist/standalone/chunk-5VKIJNHE.js +1 -0
- package/dist/standalone/chunk-5XMZP64Z.js +1 -0
- package/dist/standalone/chunk-6AJONHNM.js +1 -0
- package/dist/standalone/chunk-6UN4V2HB.js +1 -0
- package/dist/standalone/chunk-74ASA4WU.js +1 -0
- package/dist/standalone/chunk-7CVIN6KU.js +6 -0
- package/dist/standalone/chunk-7EOXUWAI.js +1 -0
- package/dist/standalone/chunk-7MO56FXL.js +1 -0
- package/dist/standalone/chunk-7PIHTTND.js +1 -0
- package/dist/standalone/chunk-7SROZWKL.js +1 -0
- package/dist/standalone/chunk-AFKLFS74.js +1 -0
- package/dist/standalone/chunk-AOAJGSYZ.js +2 -0
- package/dist/standalone/chunk-AVBUV42G.js +1 -0
- package/dist/standalone/chunk-B6YM5NAF.js +1 -0
- package/dist/standalone/chunk-BKM6PMSO.js +19 -0
- package/dist/standalone/chunk-BQK2C2Z4.js +1 -0
- package/dist/standalone/chunk-BWEXJENB.js +1 -0
- package/dist/standalone/chunk-CAOUXOL7.js +1 -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-DKSLOJDQ.js +1 -0
- package/dist/standalone/chunk-DPNEFSEC.js +1 -0
- package/dist/standalone/chunk-DUDQV6XJ.js +1 -0
- package/dist/standalone/chunk-DXXXNZ3P.js +1 -0
- package/dist/standalone/chunk-DZGOHOOE.js +1 -0
- package/dist/standalone/chunk-E4RVRJHD.js +1 -0
- package/dist/standalone/chunk-E6P2ERQV.js +1 -0
- package/dist/standalone/chunk-EDHW2EEG.js +1 -0
- package/dist/standalone/chunk-EIWXXEVA.js +1 -0
- package/dist/standalone/chunk-EYGF6TQS.js +1 -0
- package/dist/standalone/chunk-F7JOSNAT.js +1 -0
- package/dist/standalone/chunk-FJ6G6FNE.js +1 -0
- package/dist/standalone/chunk-FKXX3Y2J.js +1 -0
- package/dist/standalone/chunk-FS7FGJOU.js +1 -0
- package/dist/standalone/chunk-GDC3W3DZ.js +1 -0
- package/dist/standalone/chunk-GISVVEPU.js +1 -0
- package/dist/standalone/chunk-GNN5HJ56.js +1 -0
- package/dist/standalone/chunk-ICQTVV6U.js +7 -0
- package/dist/standalone/chunk-INQICZYC.js +1 -0
- package/dist/standalone/chunk-IYWVSMAY.js +1 -0
- package/dist/standalone/chunk-JCSDJBBZ.js +1 -0
- package/dist/standalone/chunk-JUWOEHDD.js +1 -0
- package/dist/standalone/chunk-JV7KTJPY.js +1 -0
- package/dist/standalone/chunk-K3SXMDKL.js +1 -0
- package/dist/standalone/chunk-KJNDUIZG.js +1 -0
- package/dist/standalone/chunk-KNI5YDPT.js +9 -0
- package/dist/standalone/chunk-KR6SZXOI.js +1 -0
- package/dist/standalone/chunk-KTEVBZIV.js +1 -0
- package/dist/standalone/chunk-KVSQKUWD.js +1 -0
- package/dist/standalone/chunk-L4EZAHCD.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-MG7VPUFA.js +1 -0
- package/dist/standalone/chunk-MHB2TOAK.js +1 -0
- package/dist/standalone/chunk-MLYZZD5C.js +4 -0
- package/dist/standalone/chunk-MTGEDJQH.js +1 -0
- package/dist/standalone/chunk-N7PPYEHW.js +1 -0
- package/dist/standalone/chunk-NIUA7EHL.js +11 -0
- package/dist/standalone/chunk-NIX2QSSN.js +1 -0
- package/dist/standalone/chunk-NXXGISFB.js +1 -0
- package/dist/standalone/chunk-O4RQGUJ7.js +1 -0
- package/dist/standalone/chunk-OCZ2IP5A.js +1 -0
- package/dist/standalone/chunk-PAJQOSEU.js +1 -0
- package/dist/standalone/chunk-PGTCEMBA.js +1 -0
- package/dist/standalone/chunk-POD66K2Y.js +1 -0
- package/dist/standalone/chunk-PZ4QDWTI.js +1 -0
- package/dist/standalone/chunk-QBONDY5I.js +1 -0
- package/dist/standalone/chunk-R5ZTCHCE.js +1 -0
- package/dist/standalone/chunk-R7EV3YND.js +1 -0
- package/dist/standalone/chunk-RAFPVMXJ.js +1 -0
- package/dist/standalone/chunk-RCZTUWG3.js +1 -0
- package/dist/standalone/chunk-SPDZUX4P.js +1 -0
- package/dist/standalone/chunk-SQSMHFA7.js +1 -0
- package/dist/standalone/chunk-T7DJP5HM.js +1 -0
- package/dist/standalone/chunk-TCAX32PK.js +1 -0
- package/dist/standalone/chunk-TDH7K7E7.js +1 -0
- package/dist/standalone/chunk-TFMQSCGC.js +1 -0
- package/dist/standalone/chunk-THTL2KBP.js +1 -0
- package/dist/standalone/chunk-TI5RJJRX.js +1 -0
- package/dist/standalone/chunk-TKKRBSUB.js +1 -0
- package/dist/standalone/chunk-TNKECJW4.js +1 -0
- package/dist/standalone/chunk-TPAZM36C.js +1 -0
- package/dist/standalone/chunk-U2FRMJAN.js +1 -0
- package/dist/standalone/chunk-U32MMDFO.js +3 -0
- package/dist/standalone/chunk-UANVABQG.js +1 -0
- package/dist/standalone/chunk-UBT2FIU5.js +8 -0
- package/dist/standalone/chunk-UDCFI5NF.js +14 -0
- package/dist/standalone/chunk-UFUOW6UJ.js +3 -0
- package/dist/standalone/chunk-VJQAOU2U.js +1 -0
- package/dist/standalone/chunk-VR3UJA7B.js +1 -0
- package/dist/standalone/chunk-VTFMI4DC.js +4 -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-WUW4ZHRL.js +1 -0
- package/dist/standalone/chunk-XJSWM47N.js +1 -0
- package/dist/standalone/chunk-XL2OT5WB.js +59 -0
- package/dist/standalone/chunk-XOA5TTRA.js +1 -0
- package/dist/standalone/chunk-XQS7KSHL.js +1 -0
- package/dist/standalone/chunk-XYWLXNTV.js +1 -0
- package/dist/standalone/chunk-YMVKAXBC.js +1 -0
- package/dist/standalone/chunk-ZHPDAJBM.js +1 -0
- package/dist/standalone/chunk-ZPGNTTQ3.js +1 -0
- package/dist/standalone/chunk-ZSOLGJFC.js +1 -0
- package/dist/standalone/chunk-ZWATJNSU.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-CZJCZ4c7.js +0 -47
- package/dist/packem_shared/ApiDocsPanel-yEz0fiof.js +0 -842
- package/dist/packem_shared/ApiReferencePanel-1vubqG5s.js +0 -229
- package/dist/packem_shared/ApiTab-DdubReQI.js +0 -251
- package/dist/packem_shared/AuditPanel-CE5ofjCc.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-DpL8U-Nf.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-ChsSUCYZ.js +0 -197
- package/dist/packem_shared/FileBrowser-DsRBnVhZ.js +0 -2932
- package/dist/packem_shared/FunctionRunner-D4cZ6fuA.js +0 -343
- package/dist/packem_shared/FunctionStatsPanel-BVelWgNv.js +0 -375
- package/dist/packem_shared/GlobalDataBrowser-3X9uRfdO.js +0 -289
- package/dist/packem_shared/HealthPanel-CxUVKfvo.js +0 -648
- package/dist/packem_shared/HomePanel-tfqpZxuu.js +0 -1334
- package/dist/packem_shared/InsightsPanel-DNg3K9XN.js +0 -461
- package/dist/packem_shared/LogsPanel-B4LoSRj0.js +0 -827
- package/dist/packem_shared/MailPanel-CcpdyWYs.js +0 -440
- package/dist/packem_shared/MetricsPanel-CxoyWbNb.js +0 -1611
- package/dist/packem_shared/MigrationsPanel-DGwJGWDA.js +0 -239
- package/dist/packem_shared/OpenRpcReferencePanel-vbcYbv3V.js +0 -191
- package/dist/packem_shared/PitrPanel-CKUzyyHi.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-RclXFo9Q.js +0 -2512
- package/dist/packem_shared/SecurityAdvisorPanel-Dqql1Z5O.js +0 -92
- package/dist/packem_shared/SettingsPanel-D5iTY0YE.js +0 -390
- package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
- package/dist/packem_shared/SqlEditorPanel-Dj-In-B3.js +0 -13
- package/dist/packem_shared/Studio-VWvKNOw4.js +0 -33
- package/dist/packem_shared/StudioApp-BhQ6T2pn.js +0 -657
- package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
- package/dist/packem_shared/TableEditor-BY8bTpCl.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-BVJFkXyj.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-CMdxstu5.js +0 -2562
- package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
- package/dist/packem_shared/studio-D8ry3tJR.js +0 -11043
- package/dist/packem_shared/table-_RzNvy3R.js +0 -246
- package/dist/packem_shared/table-editor-CWx68ZCg.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{a as r,c as o}from"./chunk-ZHPDAJBM.js";import{a as e}from"./chunk-R5ZTCHCE.js";var a="lunora:traces:pending-filter",i=e(s=>{o(a,s,"session")},"i"),d=e(()=>{let s=r("session");if(s!==void 0)try{let n=s.getItem(a);if(n===null)return;let t=JSON.parse(n);return typeof t.traceId!="string"?void 0:{traceId:t.traceId,...typeof t.shardKey=="string"?{shardKey:t.shardKey}:{}}}catch{return}},"c"),p=e(()=>{try{r("session")?.removeItem(a)}catch{}},"d");export{i as a,d as b,p as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as F,b as O}from"./chunk-BQK2C2Z4.js";import{a as B}from"./chunk-E6P2ERQV.js";import{a as V}from"./chunk-CKTKI4IY.js";import{a as T}from"./chunk-6UN4V2HB.js";import"./chunk-KVSQKUWD.js";import"./chunk-ZHPDAJBM.js";import{P as L}from"./chunk-AOAJGSYZ.js";import"./chunk-TFMQSCGC.js";import"./chunk-XQS7KSHL.js";import{b as C}from"./chunk-SPDZUX4P.js";import"./chunk-7PIHTTND.js";import{a as j}from"./chunk-JCSDJBBZ.js";import"./chunk-PZ4QDWTI.js";import"./chunk-GDC3W3DZ.js";import"./chunk-F7JOSNAT.js";import{a as R}from"./chunk-DZGOHOOE.js";import{c as M}from"./chunk-5DEXJ766.js";import"./chunk-NIUA7EHL.js";import"./chunk-RCZTUWG3.js";import{a as K}from"./chunk-UANVABQG.js";import{a as z,b as A,c as q,d as p,e as n,f as d}from"./chunk-L4EZAHCD.js";import{a as I,e as E}from"./chunk-IYWVSMAY.js";import{d as b,s as k}from"./chunk-BKM6PMSO.js";import"./chunk-VYW2PAWC.js";import{a as i,d as y,e as ee,g as te}from"./chunk-R5ZTCHCE.js";var o=y(ee(),1);var e=y(te(),1);var D=80,re=i(s=>{if(s===void 0)return"";let t=JSON.stringify(s);return t.length>D?`${t.slice(0,D)}\u2026`:t},"te"),ae=41,J=480,H=5,ie=i((s,t)=>F(s,l=>{t(l.height>0?l:{height:J,width:l.width})}),"ae"),Ne=i(({initialShardKey:s})=>{let t=b(),{queryShardKey:l,setShardKey:P,shardKey:U}=V(s),[m,W]=(0,o.useState)(""),{data:f,error:g,errorSource:Z,isLoading:_,liveError:$}=M(R.getAuditLog,{},{live:!0,shardKey:l}),h=(0,o.useMemo)(()=>f?.entries??[],[f]),c=(0,o.useMemo)(()=>{let a=m.trim().toLowerCase();return a===""?h:h.filter(r=>r.op.toLowerCase().includes(a)||(r.table??"").toLowerCase().includes(a)||(r.id??"").toLowerCase().includes(a))},[h,m]),x=(0,o.useRef)(null),v=O({count:c.length,estimateSize:i(()=>ae,"estimateSize"),getScrollElement:i(()=>x.current,"getScrollElement"),initialRect:{height:J,width:800},observeElementRect:ie,overscan:8}),u=v.getVirtualItems(),G=v.getTotalSize(),N=u[0]?.start??0,w=G-(u.at(-1)?.end??0),Q={height:N},X={height:w},Y=i(a=>{W(a.target.value)},"_");return(0,e.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-audit",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)(T,{onChange:P,testId:"au-shard-input",value:U}),(0,e.jsx)(B,{message:$,prefix:"au"}),(0,e.jsx)(L,{"aria-label":t("Filter audit log"),className:"h-8 w-48","data-testid":"au-search",onChange:Y,placeholder:t("filter op, table, id"),value:m})]}),g!==null&&(0,e.jsx)(j,{error:Z,testId:"au-error"}),g===null&&!_&&c.length===0&&(0,e.jsx)(K,{description:t("State-changing admin operations are recorded here."),icon:(0,e.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,e.jsx)("path",{d:"M8 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-2M9 3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V3Zm-1 9h8m-8 4h5"})}),testId:"au-empty",title:t("No audit entries.")}),c.length>0&&(0,e.jsx)(I,{className:"overflow-hidden py-0",children:(0,e.jsx)(E,{className:"max-h-[30rem] overflow-auto px-0",ref:x,children:(0,e.jsxs)(z,{"data-testid":"au-table",children:[(0,e.jsx)(A,{children:(0,e.jsxs)(p,{children:[(0,e.jsx)(n,{children:t("time")}),(0,e.jsx)(n,{children:t("op")}),(0,e.jsx)(n,{children:t("table")}),(0,e.jsx)(n,{children:t("id")}),(0,e.jsx)(n,{children:t("detail")})]})}),(0,e.jsxs)(q,{children:[N>0&&(0,e.jsx)("tr",{"aria-hidden":"true",children:(0,e.jsx)("td",{colSpan:H,style:Q})}),u.map(a=>{let r=c[a.index],S=re(r.detail);return(0,e.jsxs)(p,{"data-testid":"au-row",children:[(0,e.jsx)(d,{className:"text-muted-foreground tabular-nums",children:k(r.ts,"\u2014")}),(0,e.jsx)(d,{children:(0,e.jsx)(C,{variant:"secondary",children:r.op})}),(0,e.jsx)(d,{className:"font-medium",children:r.table??(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,e.jsx)(d,{className:"max-w-[20ch] truncate font-mono text-xs",children:r.id??(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,e.jsx)(d,{className:"max-w-[32ch] truncate font-mono text-xs text-muted-foreground",title:S||void 0,children:S||(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})})]},r.seq)}),w>0&&(0,e.jsx)("tr",{"aria-hidden":"true",children:(0,e.jsx)("td",{colSpan:H,style:X})})]})]})})})]})},"Ne");export{Ne as AuditPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ke}from"./chunk-METRMDIQ.js";import{a as A}from"./chunk-NXXGISFB.js";import{a as Pe}from"./chunk-E6P2ERQV.js";import{a as be}from"./chunk-6UN4V2HB.js";import"./chunk-KVSQKUWD.js";import"./chunk-ZHPDAJBM.js";import{P as M}from"./chunk-AOAJGSYZ.js";import"./chunk-TFMQSCGC.js";import{a as T}from"./chunk-BWEXJENB.js";import"./chunk-74ASA4WU.js";import"./chunk-XQS7KSHL.js";import{b as j}from"./chunk-SPDZUX4P.js";import"./chunk-7PIHTTND.js";import{a as ge}from"./chunk-JCSDJBBZ.js";import"./chunk-PZ4QDWTI.js";import"./chunk-GDC3W3DZ.js";import"./chunk-F7JOSNAT.js";import{a as Z}from"./chunk-DZGOHOOE.js";import{c as ae}from"./chunk-5DEXJ766.js";import{f as oe}from"./chunk-NIUA7EHL.js";import"./chunk-RCZTUWG3.js";import{a as de}from"./chunk-UANVABQG.js";import{a as Ne,b as ve,c as we,d as ce,e as le,f as re}from"./chunk-L4EZAHCD.js";import{a as se,b as pe,c as fe,d as ue,e as ne}from"./chunk-IYWVSMAY.js";import{d as V,f as he,g as xe,h as ye,o as te}from"./chunk-BKM6PMSO.js";import"./chunk-VYW2PAWC.js";import{a as d,d as ie,e as _e,f as Fe,g as Te}from"./chunk-R5ZTCHCE.js";var p=ie(_e(),1);var me=ie(Fe(),1);var t=ie(Te(),1);var Ce=["read","insert","update","delete"],Ae=d((e,a)=>({delete:e("Delete"),insert:e("Insert"),read:e("Read"),update:e("Update")})[a],"_e"),Ee=d(e=>{let a=new Set;for(let i of e?.advisories??[])if(i.name==="rls_uncovered_table"){let{table:s}=i.metadata;typeof s=="string"&&s!==""&&a.add(s)}return a},"Ie"),$e=d((e,a,i)=>{let s=new Map,l=d(n=>{let o=s.get(n);if(o!==void 0)return o;let f={cells:{delete:{},insert:{},read:{},update:{}},maskedColumns:new Set,table:n,uncovered:i.has(n)};return s.set(n,f),f},"l");for(let n of e)l(n.table).cells[n.on]={procedure:n.procedure};for(let n of a)l(n.table).maskedColumns.add(n.column);for(let n of i)l(n);return[...s.values()].toSorted((n,o)=>n.table.localeCompare(o.table))},"Ee"),ze=d(e=>{let a=(0,me.c)(17),i;a[0]!==e?(i=e===void 0?{}:e,a[0]=e,a[1]=i):i=a[1];let{onProbe:s}=i,l=V(),n,o;a[2]===Symbol.for("react.memo_cache_sentinel")?(n={},o={live:!0},a[2]=n,a[3]=o):(n=a[2],o=a[3]);let f=ae(Z.rlsPolicies,n,o),r;a[4]===Symbol.for("react.memo_cache_sentinel")?(r={},a[4]=r):r=a[4];let b=ae(Z.maskPolicies,r),h;a[5]===Symbol.for("react.memo_cache_sentinel")?(h={},a[5]=h):h=a[5];let g=ae(Z.getAdvisories,h),N;if(a[6]!==g.data||a[7]!==b.data||a[8]!==s||a[9]!==f||a[10]!==l){let v=null;f.data!==void 0&&(v=Array.isArray(f.data.policies)?f.data.policies:[]);let E=Array.isArray(b.data?.columns)?b.data.columns:[],O=g.data??null,{error:C,errorSource:w,liveError:S}=f,_=v===null?[]:$e(v,E,Ee(O)),k;a[12]!==S?(k=(0,t.jsx)("div",{className:"flex items-center justify-end",children:(0,t.jsx)(Pe,{message:S,prefix:"pm"})}),a[12]=S,a[13]=k):k=a[13];let x;a[14]!==C||a[15]!==w?(x=C!==null&&(0,t.jsx)(ge,{error:w,testId:"pm-error"}),a[14]=C,a[15]=w,a[16]=x):x=a[16],N=(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-permissions-matrix",children:[k,x,v!==null&&_.length===0?(0,t.jsx)(de,{description:l("Add a `definePolicy` and wire it through `.use(rls(...))` to populate this matrix."),testId:"pm-empty",title:l("No policy")}):(0,t.jsxs)(Ne,{"data-testid":"pm-table",children:[(0,t.jsx)(ve,{children:(0,t.jsxs)(ce,{children:[(0,t.jsx)(le,{children:l("Table")}),Ce.map(c=>(0,t.jsx)(le,{children:Ae(l,c)},c)),(0,t.jsx)(le,{children:l("Masked columns")})]})}),(0,t.jsx)(we,{children:_.map(c=>(0,t.jsxs)(ce,{"data-testid":`pm-row-${c.table}`,children:[(0,t.jsx)(re,{className:"font-mono text-xs",children:(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[c.table,c.uncovered&&(0,t.jsx)(j,{"data-testid":`pm-uncovered-${c.table}`,title:l("Uncovered \u2014 reachable without a policy"),variant:"destructive",children:l("Uncovered \u2014 reachable without a policy")})]})}),Ce.map(I=>{let y=c.cells[I];return(0,t.jsx)(re,{"data-testid":`pm-cell-${c.table}-${I}`,children:y.procedure===void 0?(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:l("No policy")}):(0,t.jsxs)("span",{className:"flex flex-col gap-1",children:[(0,t.jsx)(j,{variant:"secondary",children:l("Covered by {procedure}",{procedure:y.procedure})}),s!==void 0&&(0,t.jsx)(T,{className:"h-auto justify-start p-0 text-[11px]","data-testid":`pm-probe-${c.table}-${I}`,onClick:d(()=>{s(c.table,I,y.procedure??"")},"onClick"),size:"xs",type:"button",variant:"ghost",children:l("Probe this")})]})},I)}),(0,t.jsx)(re,{children:c.maskedColumns.size===0?(0,t.jsx)("span",{"aria-hidden":"true",className:"text-muted-foreground",children:"\u2014"}):(0,t.jsx)("span",{className:"flex flex-wrap gap-1",children:[...c.maskedColumns].map(Re)})})]},c.table))})]})]}),a[6]=g.data,a[7]=b.data,a[8]=s,a[9]=f,a[10]=l,a[11]=N}else N=a[11];return N},"Fe");function Re(e){return(0,t.jsx)(j,{variant:"outline",children:e},e)}d(Re,"Re");var Le=he(Z.runAs),Oe=d(()=>{let e=oe();return async({args:a,functionPath:i,shardKey:s="",userId:l})=>{let n=Le;try{return{kind:"allowed",value:await e.query(n,{args:a,functionPath:i,userId:l},xe(s))}}catch(o){return{kind:"denied",message:o instanceof Error?o.message:String(o)}}}},"Le"),je=d(e=>e===void 0?"undefined":JSON.stringify(e,null,2),"Me"),Me=d(({functions:e,prefill:a,runAsIdentity:i=!1}={})=>{let s=oe(),l=V(),n=Oe(),[o,f]=(0,p.useState)(null),[r,b]=(0,p.useState)(null),h=e??o??[],[g,N]=(0,p.useState)(""),[v,E]=(0,p.useState)("{}"),[O,C]=(0,p.useState)(""),[w,S]=(0,p.useState)(""),[_,k]=(0,p.useState)(!1),[x,c]=(0,p.useState)(null),[I,y]=(0,p.useState)(null),F=(0,p.useRef)(-1);(0,p.useEffect)(()=>{if(e!==void 0)return;let m=!1;return s.listFunctions().then(u=>(m||f(u),u)).catch(u=>{m||b(ye(u))}),()=>{m=!0}},[s,e]),(0,p.useEffect)(()=>{if(a===void 0||F.current===a.nonce)return;F.current=a.nonce;let m=a.functionPath;queueMicrotask(()=>{N(m),c(null)})},[a]);let P=g===""?h[0]?.path??"":g,$=d(async()=>{if(P==="")return;let m;try{m=v.trim()===""?{}:JSON.parse(v)}catch(u){y(l("Invalid JSON args: {message}",{message:u.message})),c(null);return}y(null),k(!0);try{let u=await n({args:m,functionPath:P,shardKey:O.trim(),userId:w.trim()});c(u)}finally{k(!1)}},"E"),z=d(()=>{te($())},"F"),Y=d(m=>{N(m.target.value)},"Y"),R=d(m=>{E(m.target.value)},"R"),L=d(m=>{S(m.target.value)},"O");return(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-permissions-playground",children:[r!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"pp-discover-error",role:"alert",children:r}),!i&&(0,t.jsx)(de,{description:l("Dev only: runs the selected function as this user over the admin gate so you can test auth and RLS."),testId:"pp-gate",title:l("Set `runAsIdentity` to forge an identity and probe access.")}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-md border border-border p-3",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(A,{htmlFor:"pp-function",children:l("Function")}),(0,t.jsx)("select",{"aria-label":l("Function"),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","data-testid":"pp-function",id:"pp-function",onChange:Y,value:P,children:h.map(m=>(0,t.jsxs)("option",{value:m.path,children:[m.path," (",m.kind,")"]},m.path))})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(A,{htmlFor:"pp-args",children:l("Arguments")}),(0,t.jsx)(ke,{"aria-label":l("Arguments"),className:"font-mono text-xs","data-testid":"pp-args",id:"pp-args",onChange:R,value:v})]}),(0,t.jsx)(be,{onChange:C,testId:"pp-shard",value:O}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(A,{htmlFor:"pp-user",children:l("Run as (userId)")}),(0,t.jsx)(M,{"aria-label":l("Identity (userId) to run as"),className:"font-mono text-xs","data-testid":"pp-user",id:"pp-user",onChange:L,placeholder:l("Leave empty to run as admin"),value:w})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(T,{"data-testid":"pp-run",disabled:!i||_||P==="",onClick:z,type:"button",children:l(_?"Probing\u2026":"Run probe")}),w.trim()!==""&&(0,t.jsx)(j,{"data-testid":"pp-as-badge",variant:"secondary",children:l("as {userId}",{userId:w.trim()})})]})]}),I!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"pp-args-error",role:"alert",children:I}),x!==null&&x.kind==="allowed"&&(0,t.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"pp-outcome-allowed",children:[(0,t.jsx)(j,{variant:"secondary",children:l("Allowed")}),(0,t.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs","data-testid":"pp-result",children:je(x.value)})]}),x!==null&&x.kind==="denied"&&(0,t.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"pp-outcome-denied",children:[(0,t.jsx)(j,{variant:"destructive",children:l("Denied")}),(0,t.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs text-destructive","data-testid":"pp-denied",role:"alert",children:x.message})]})]})},"$e"),De="/__lunora/policy-scaffold",Ue={"already-wired":"That procedure already has an rls(...) policy wired in.","file-exists":"A policy file with that name already exists \u2014 pick another name or edit it by hand.","invalid-identifier":"Name, table, and policy-set must be plain identifiers (letters, digits, _ or $).","unknown-procedure":"No exported procedure was found at that file path.","unsupported-procedure-shape":"That procedure uses the bare query({\u2026}) form \u2014 convert it to the builder form (c.use(\u2026).query(\u2026)) before wiring RLS."},qe=d(async e=>{let a=await fetch(De,{body:JSON.stringify(e),headers:{"Content-Type":"application/json"},method:"POST"}),i=await a.json();if(i.needsManualEdit===!0)return{kind:"needs-manual-edit",message:i.message??"This change must be made by hand."};if(a.ok)return{diagnostics:i.diagnostics??[],kind:"ok",label:i.fileName??i.exportName??""};let s=i.error;return{kind:"error",message:s===void 0?`policy scaffold failed (${String(a.status)})`:Ue[s]??s}},"Ue"),Se={exportName:"",filePath:"",policyName:"",policies:"",tableName:""},Je=d(()=>{let e=(0,me.c)(69),a=V(),[i,s]=(0,p.useState)(null),[l,n]=(0,p.useState)(!1),[o,f]=(0,p.useState)(null),[r,b]=(0,p.useState)(Se),h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=d(ee=>{let G=ee.target.name,{value:H}=ee.target;b(Ie=>({...Ie,[G]:H}))},"u"),e[0]=h):h=e[0];let g=h,N;e[1]===Symbol.for("react.memo_cache_sentinel")?(N=d(()=>{s(null),b(Se)},"v"),e[1]=N):N=e[1];let v=N,E;e[2]===Symbol.for("react.memo_cache_sentinel")?(E=d(async ee=>{n(!0),f(null);try{let G=await qe(ee);f(G),G.kind==="ok"&&v()}catch(G){let H=G;f({kind:"error",message:H instanceof Error?H.message:String(H)})}n(!1)},"I"),e[2]=E):E=e[2];let O=E,C;e[3]!==r.policyName||e[4]!==r.tableName?(C=d(()=>{te(O({kind:"scaffoldPolicy",name:r.policyName.trim(),table:r.tableName.trim()}))},"P"),e[3]=r.policyName,e[4]=r.tableName,e[5]=C):C=e[5];let w=C,S;e[6]!==r.exportName||e[7]!==r.filePath||e[8]!==r.policies?(S=d(()=>{te(O({exportName:r.exportName.trim(),filePath:r.filePath.trim(),kind:"wireRls",policies:r.policies.trim()}))},"w"),e[6]=r.exportName,e[7]=r.filePath,e[8]=r.policies,e[9]=S):S=e[9];let _=S,k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=d(()=>{f(null),s("scaffold")},"S"),e[10]=k):k=e[10];let x=k,c;e[11]===Symbol.for("react.memo_cache_sentinel")?(c=d(()=>{f(null),s("wire")},"d"),e[11]=c):c=e[11];let I=c,y;e[12]!==a?(y=a("Scaffold access rules"),e[12]=a,e[13]=y):y=e[13];let F;e[14]!==y?(F=(0,t.jsx)(fe,{children:y}),e[14]=y,e[15]=F):F=e[15];let P;e[16]!==a?(P=a("Writes a new deny-by-default policy file under lunora/, or wires one into a procedure, then reruns codegen. Local dev only."),e[16]=a,e[17]=P):P=e[17];let $;e[18]!==P?($=(0,t.jsx)(ue,{children:P}),e[18]=P,e[19]=$):$=e[19];let z;e[20]!==$||e[21]!==F?(z=(0,t.jsxs)(pe,{children:[F,$]}),e[20]=$,e[21]=F,e[22]=z):z=e[22];let Y=i==="scaffold"?"default":"outline",R;e[23]!==a?(R=a("New policy file"),e[23]=a,e[24]=R):R=e[24];let L;e[25]!==Y||e[26]!==R?(L=(0,t.jsx)(T,{"data-testid":"policy-scaffolder-new",onClick:x,size:"xs",type:"button",variant:Y,children:R}),e[25]=Y,e[26]=R,e[27]=L):L=e[27];let m=i==="wire"?"default":"outline",u;e[28]!==a?(u=a("Wire into a procedure"),e[28]=a,e[29]=u):u=e[29];let D;e[30]!==m||e[31]!==u?(D=(0,t.jsx)(T,{"data-testid":"policy-scaffolder-wire",onClick:I,size:"xs",type:"button",variant:m,children:u}),e[30]=m,e[31]=u,e[32]=D):D=e[32];let U;e[33]!==L||e[34]!==D?(U=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[L,D]}),e[33]=L,e[34]=D,e[35]=U):U=e[35];let q;e[36]!==l||e[37]!==r.policyName||e[38]!==r.tableName||e[39]!==i||e[40]!==w||e[41]!==a?(q=i==="scaffold"&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"policy-scaffolder-new-form",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(A,{htmlFor:"policy-scaffolder-name",children:a("Policy name")}),(0,t.jsx)(M,{"data-testid":"policy-scaffolder-name",id:"policy-scaffolder-name",name:"policyName",onChange:g,value:r.policyName})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(A,{htmlFor:"policy-scaffolder-table",children:a("Table name")}),(0,t.jsx)(M,{"data-testid":"policy-scaffolder-table",id:"policy-scaffolder-table",name:"tableName",onChange:g,value:r.tableName})]}),(0,t.jsx)(T,{"data-testid":"policy-scaffolder-create",disabled:l||r.policyName.trim()===""||r.tableName.trim()==="",onClick:w,size:"xs",type:"button",children:a(l?"Creating\u2026":"Create policy file")}),(0,t.jsx)(T,{onClick:v,size:"xs",type:"button",variant:"ghost",children:a("Cancel")})]}),e[36]=l,e[37]=r.policyName,e[38]=r.tableName,e[39]=i,e[40]=w,e[41]=a,e[42]=q):q=e[42];let J;e[43]!==l||e[44]!==r.exportName||e[45]!==r.filePath||e[46]!==r.policies||e[47]!==i||e[48]!==_||e[49]!==a?(J=i==="wire"&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"policy-scaffolder-wire-form",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(A,{htmlFor:"policy-scaffolder-file",children:a("Procedure file path")}),(0,t.jsx)(M,{"data-testid":"policy-scaffolder-file",id:"policy-scaffolder-file",name:"filePath",onChange:g,value:r.filePath})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(A,{htmlFor:"policy-scaffolder-export",children:a("Exported procedure")}),(0,t.jsx)(M,{"data-testid":"policy-scaffolder-export",id:"policy-scaffolder-export",name:"exportName",onChange:g,value:r.exportName})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(A,{htmlFor:"policy-scaffolder-policies",children:a("Policy set identifier")}),(0,t.jsx)(M,{"data-testid":"policy-scaffolder-policies",id:"policy-scaffolder-policies",name:"policies",onChange:g,value:r.policies})]}),(0,t.jsx)(T,{"data-testid":"policy-scaffolder-apply",disabled:l||r.filePath.trim()===""||r.exportName.trim()===""||r.policies.trim()==="",onClick:_,size:"xs",type:"button",children:a(l?"Wiring\u2026":"Wire RLS")}),(0,t.jsx)(T,{onClick:v,size:"xs",type:"button",variant:"ghost",children:a("Cancel")})]}),e[43]=l,e[44]=r.exportName,e[45]=r.filePath,e[46]=r.policies,e[47]=i,e[48]=_,e[49]=a,e[50]=J):J=e[50];let W;e[51]!==o?(W=o?.kind==="error"&&(0,t.jsx)("p",{className:"mt-3 text-sm text-destructive","data-testid":"policy-scaffolder-error",role:"alert",children:o.message}),e[51]=o,e[52]=W):W=e[52];let B;e[53]!==o?.kind||e[54]!==a?(B=o?.kind==="needs-manual-edit"&&(0,t.jsx)("p",{className:"mt-3 text-sm text-amber-600 dark:text-amber-500","data-testid":"policy-scaffolder-manual",role:"alert",children:a("This change must be made by hand \u2014 the scaffolder only adds new, deny-by-default rules.")}),e[53]=o?.kind,e[54]=a,e[55]=B):B=e[55];let K;e[56]!==o||e[57]!==a?(K=o?.kind==="ok"&&(0,t.jsxs)("div",{className:"mt-3 flex flex-col gap-1","data-testid":"policy-scaffolder-ok",children:[(0,t.jsx)("p",{className:"text-sm text-emerald-600 dark:text-emerald-500",children:a("Scaffolded {label} and reran codegen. Fill in the `when` predicates before relying on it.",{label:o.label})}),o.diagnostics.length>0&&(0,t.jsx)("ul",{className:"flex flex-col gap-0.5","data-testid":"policy-scaffolder-diagnostics",children:o.diagnostics.map(We)})]}),e[56]=o,e[57]=a,e[58]=K):K=e[58];let Q;e[59]!==U||e[60]!==q||e[61]!==J||e[62]!==W||e[63]!==B||e[64]!==K?(Q=(0,t.jsxs)(ne,{children:[U,q,J,W,B,K]}),e[59]=U,e[60]=q,e[61]=J,e[62]=W,e[63]=B,e[64]=K,e[65]=Q):Q=e[65];let X;return e[66]!==z||e[67]!==Q?(X=(0,t.jsxs)(se,{"data-testid":"policy-scaffolder",size:"sm",children:[z,Q]}),e[66]=z,e[67]=Q,e[68]=X):X=e[68],X},"je");function We(e){return(0,t.jsx)("li",{className:"font-mono text-[11px] text-destructive",children:e},e)}d(We,"Be");var st=d(({functions:e,runAsIdentity:a=!1,schemaEditable:i=!1}={})=>{let s=V(),[l,n]=(0,p.useState)(void 0),o=d((f,r,b)=>{b!==""&&n(h=>({functionPath:b,nonce:(h?.nonce??0)+1}))},"o");return(0,t.jsxs)("div",{className:"flex flex-col gap-8","data-testid":"lunora-permissions",children:[(0,t.jsxs)("section",{className:"flex flex-col gap-3",children:[(0,t.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,t.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:s("Permissions")})}),(0,t.jsx)(ze,{onProbe:o})]}),(0,t.jsx)("section",{className:"flex flex-col gap-3",children:(0,t.jsxs)(se,{className:"gap-0 py-0",children:[(0,t.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,t.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:s("Probe")})}),(0,t.jsxs)(ne,{className:"px-4 py-4",children:[(0,t.jsx)("p",{className:"mb-3 text-sm text-muted-foreground",children:s("Pick a function and an identity, then run it to see the access outcome.")}),(0,t.jsx)(Me,{functions:e,prefill:l,runAsIdentity:a})]})]})}),i&&(0,t.jsx)("section",{className:"flex flex-col gap-2",children:(0,t.jsx)(Je,{})})]})},"nt");export{st as PermissionsPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as me}from"./chunk-EYGF6TQS.js";import{a as $}from"./chunk-YMVKAXBC.js";import{a as ue}from"./chunk-E6P2ERQV.js";import"./chunk-XL2OT5WB.js";import"./chunk-JV7KTJPY.js";import"./chunk-DPNEFSEC.js";import{a as de}from"./chunk-KVSQKUWD.js";import"./chunk-ZHPDAJBM.js";import"./chunk-INQICZYC.js";import"./chunk-TFMQSCGC.js";import{b as D}from"./chunk-SPDZUX4P.js";import"./chunk-7PIHTTND.js";import"./chunk-F7JOSNAT.js";import{a as M}from"./chunk-DZGOHOOE.js";import{c as ce}from"./chunk-5DEXJ766.js";import{f as ne,g as oe}from"./chunk-NIUA7EHL.js";import"./chunk-RCZTUWG3.js";import{a as A}from"./chunk-IYWVSMAY.js";import{d as T,f as j,g as Q,h as W,o as _,s as ie}from"./chunk-BKM6PMSO.js";import"./chunk-VYW2PAWC.js";import{a as h,d as I,e as Ee,f as ae,g as le,i as E}from"./chunk-R5ZTCHCE.js";var Y=I(ae(),1);var f=I(Ee(),1);var fe=I(ae(),1);var B=I(le(),1);var Me={connected:"bg-success",connecting:"bg-warning",idle:"bg-muted-foreground",offline:"bg-destructive"},pe=h(()=>{let t=(0,fe.c)(16),e=T(),a=oe(),s;e:switch(a){case"connected":{let o;t[0]!==e?(o=e("Connected"),t[0]=e,t[1]=o):o=t[1],s=o;break e}case"connecting":{let o;t[2]!==e?(o=e("Connecting\u2026"),t[2]=e,t[3]=o):o=t[3],s=o;break e}case"idle":{let o;t[4]!==e?(o=e("Idle"),t[4]=e,t[5]=o):o=t[5],s=o;break e}case"offline":{let o;t[6]!==e?(o=e("Offline"),t[6]=e,t[7]=o):o=t[7],s=o;break e}default:s=a}let l=Me[a],c;t[8]!==l?(c=E("size-2 rounded-full",l),t[8]=l,t[9]=c):c=t[9];let i;t[10]!==c?(i=(0,B.jsx)("span",{"aria-hidden":"true",className:c}),t[10]=c,t[11]=i):i=t[11];let n;return t[12]!==a||t[13]!==i||t[14]!==s?(n=(0,B.jsxs)("span",{"aria-live":"polite",className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground","data-status":a,"data-testid":"dash-connection",role:"status",children:[i,s]}),t[12]=a,t[13]=i,t[14]=s,t[15]=n):n=t[15],n},"T");var r=I(le(),1);var Ae={crit:"destructive",ok:"secondary",warn:"default"},U=h((t,e)=>e===0?"\u2014":`${(t/e*100).toFixed(1)}%`,"P"),X=h((t,e,a)=>Number.isNaN(t)?"ok":t>=a?"crit":t>=e?"warn":"ok","Q"),xe=.01,ve=.05,je=h(t=>{let e=(0,Y.c)(36),{errorCount:a,logsError:s,topErrors:l,worstFunctions:c}=t,i=T(),n;e[0]!==i?(n=i("Functions by error rate"),e[0]=i,e[1]=n):n=e[1];let o;e[2]!==n?(o=(0,r.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,r.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:n})}),e[2]=n,e[3]=o):o=e[3];let p;e[4]!==i||e[5]!==c?(p=c.length===0?(0,r.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"hl-functions-empty",children:i("No function activity yet.")}):(0,r.jsx)("ul",{className:"divide-y divide-border",children:c.map(w=>(0,r.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 px-4 py-2 text-xs","data-testid":"hl-fn-row",children:[(0,r.jsx)("span",{className:"truncate font-mono text-foreground",children:w.path}),(0,r.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[(0,r.jsx)("span",{className:"tabular-nums text-muted-foreground",children:i("{count} calls",{count:w.calls.toString()})}),(0,r.jsx)(D,{variant:Ae[X(w.errors/w.calls,xe,ve)],children:U(w.errors,w.calls)})]})]},w.path))}),e[4]=i,e[5]=c,e[6]=p):p=e[6];let g;e[7]!==o||e[8]!==p?(g=(0,r.jsxs)(A,{className:"gap-0 py-0","data-testid":"hl-functions",children:[o,p]}),e[7]=o,e[8]=p,e[9]=g):g=e[9];let b;e[10]!==i?(b=i("Recent errors"),e[10]=i,e[11]=b):b=e[11];let d;e[12]!==b?(d=(0,r.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:b}),e[12]=b,e[13]=d):d=e[13];let u=a>0?"destructive":"outline",x;e[14]!==a||e[15]!==u?(x=(0,r.jsx)(D,{"data-testid":"hl-error-count",variant:u,children:a}),e[14]=a,e[15]=u,e[16]=x):x=e[16];let v;e[17]!==d||e[18]!==x?(v=(0,r.jsxs)("header",{className:"flex items-center justify-between gap-2 border-b border-border px-4 py-3",children:[d,x]}),e[17]=d,e[18]=x,e[19]=v):v=e[19];let k;e[20]!==s?(k=s!==null&&(0,r.jsx)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"hl-logs-error",role:"alert",children:s}),e[20]=s,e[21]=k):k=e[21];let S;e[22]!==s||e[23]!==i||e[24]!==l.length?(S=s===null&&l.length===0&&(0,r.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"hl-errors-empty",children:i("No recent errors.")}),e[22]=s,e[23]=i,e[24]=l.length,e[25]=S):S=e[25];let q;e[26]!==l?(q=l.length>0&&(0,r.jsx)("ul",{className:"divide-y divide-border",children:l.map(Ce)}),e[26]=l,e[27]=q):q=e[27];let N;e[28]!==k||e[29]!==S||e[30]!==q||e[31]!==v?(N=(0,r.jsxs)(A,{className:"gap-0 py-0",children:[v,k,S,q]}),e[28]=k,e[29]=S,e[30]=q,e[31]=v,e[32]=N):N=e[32];let y;return e[33]!==N||e[34]!==g?(y=(0,r.jsxs)("div",{className:"grid gap-3 lg:grid-cols-2",children:[g,N]}),e[33]=N,e[34]=g,e[35]=y):y=e[35],y},"ye");function Ce(t,e){return(0,r.jsxs)("li",{className:"flex flex-col gap-0.5 px-4 py-2 text-xs","data-testid":"hl-error-row",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2",children:[(0,r.jsx)("time",{className:"shrink-0 text-muted-foreground",children:ie(t.timestamp)}),t.functionPath!==void 0&&(0,r.jsx)("span",{className:"truncate font-mono text-foreground",children:t.functionPath})]}),(0,r.jsx)("span",{className:"text-destructive",children:t.message})]},`${t.timestamp.toString()}-${e.toString()}`)}h(Ce,"Te");var he={completed:0,failed:2,in_progress:1},Ie=h(t=>{let e=0,a=0,s=0,l=0,c=!1,i=[];for(let{metrics:n}of t){if(n===null){l+=1;continue}s+=1,e+=n.requests,a+=n.errors,i.push(...n.history??[]),c||=n.historyTruncated===!0}return{errors:a,failed:l,history:i,historyTruncated:c,reachable:s,requests:e}},"Ae"),Te=h(t=>{let e=new Map;for(let a of t)for(let s of a){let l=e.get(s.path);if(l===void 0){e.set(s.path,{...s});continue}l.calls+=s.calls,l.errors+=s.errors,l.totalDurationMs+=s.totalDurationMs,l.scans=(l.scans??0)+(s.scans??0),l.maxDurationMs=Math.max(l.maxDurationMs,s.maxDurationMs),l.lastCalledAt=Math.max(l.lastCalledAt,s.lastCalledAt),(s.lastErrorAt??0)>(l.lastErrorAt??0)&&(l.lastErrorAt=s.lastErrorAt,l.lastErrorMessage=s.lastErrorMessage)}return[...e.values()]},"ke"),De=h(t=>{let e=new Map;for(let a of t)for(let s of a){let l=e.get(s.id);if(l===void 0){e.set(s.id,s);continue}let c=he[s.status]-he[l.status];(c>0||c===0&&(s.updatedAt??0)>(l.updatedAt??0))&&e.set(s.id,s)}return[...e.values()]},"Re"),Pe=j(M.getAuthMetrics),Fe=j(M.getFunctionStats),Le=j(M.getLogs),Re=j(M.getMetrics),ze=j(M.migrationStatus),Oe=5,ge=2e3,_e=5,$e=.1,Be=.3,He=1,Ue=50,Ge=h((t,e,a)=>t>=a?"crit":t>=e?"warn":"ok","Pe"),Ke=h(t=>{let e=new Map;for(let s of t??[]){let l=e.get(s.bucketMs)??{calls:0,errors:0};l.calls+=s.calls,l.errors+=s.errors,e.set(s.bucketMs,l)}let a=[...e.entries()].toSorted((s,l)=>s[0]-l[0]);return{errors:a.map(([,s])=>s.errors),requests:a.map(([,s])=>s.calls)}},"Ge"),Ve=h(t=>{let e=0,a=0;for(let l of t)l.status==="failed"?e+=1:l.status==="in_progress"&&(a+=1);let s="ok";return e>0?s="crit":a>0&&(s="warn"),{failed:e,level:s,running:a}},"Ve"),Je=h((t,e)=>t.failed>0?e("{count} failed",{count:t.failed.toString()}):t.running>0?e("{count} running",{count:t.running.toString()}):e("OK"),"Be"),be={crit:"bg-destructive",ok:"bg-success",warn:"bg-warning"},Ne={crit:"text-destructive",ok:"text-foreground",warn:"text-warning"},Qe={crit:"bg-destructive/10 text-destructive",ok:"bg-success/10 text-success",warn:"bg-warning/10 text-warning"},We=h(t=>t.includes("crit")?"crit":t.includes("warn")?"warn":"ok","Ke"),H=h(t=>{let e=(0,Y.c)(19),{chart:a,label:s,level:l,testId:c,value:i}=t,n=be[l],o;e[0]!==n?(o=E("size-1.5 shrink-0 rounded-full",n),e[0]=n,e[1]=o):o=e[1];let p;e[2]!==o?(p=(0,r.jsx)("span",{"aria-hidden":"true",className:o}),e[2]=o,e[3]=p):p=e[3];let g;e[4]!==s||e[5]!==p?(g=(0,r.jsxs)("span",{className:"flex items-center gap-1.5 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:[p,s]}),e[4]=s,e[5]=p,e[6]=g):g=e[6];let b=Ne[l],d;e[7]!==b?(d=E("truncate text-2xl font-semibold tabular-nums",b),e[7]=b,e[8]=d):d=e[8];let u;e[9]!==d||e[10]!==c||e[11]!==i?(u=(0,r.jsx)("span",{className:d,"data-testid":c,children:i}),e[9]=d,e[10]=c,e[11]=i,e[12]=u):u=e[12];let x;e[13]!==a||e[14]!==u?(x=(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[u,a]}),e[13]=a,e[14]=u,e[15]=x):x=e[15];let v;return e[16]!==g||e[17]!==x?(v=(0,r.jsx)(A,{className:"gap-0 py-0",children:(0,r.jsxs)("div",{className:"flex flex-col gap-2.5 p-4",children:[g,x]})}),e[16]=g,e[17]=x,e[18]=v):v=e[18],v},"U"),Xe=h(async(t,e,a)=>{let s=await Promise.all(a.map(d=>{let u=Q(d);return Promise.allSettled([t.query(Re,{},u),t.query(Fe,{},u),t.query(ze,{},u)])})),l=Q(e),c=typeof t.schedulerStatus=="function"?t.schedulerStatus():Promise.reject(new Error("scheduler status unavailable")),[i,n,o]=await Promise.allSettled([t.query(Le,{},l),t.query(Pe,{},l),c]),p=s.map(([d,u,x])=>({functions:u.status==="fulfilled"?u.value.functions:[],metrics:d.status==="fulfilled"?d.value:null,migrations:x.status==="fulfilled"?x.value.migrations:[]})),g=Ie(p),b=s[0]?.[0];return{auth:n.status==="fulfilled"?n.value:null,entries:i.status==="fulfilled"?i.value.entries:[],functions:Te(p.map(d=>d.functions)),logsError:i.status==="rejected"?W(i.reason):null,metricsError:g.reachable===0&&b?.status==="rejected"?W(b.reason):null,migrations:De(p.map(d=>d.migrations)),scheduler:o.status==="fulfilled"?o.value:null,totals:g}},"$e"),Ye=h(t=>{let e=t?.history??[];return{attempts:e.map(a=>a.attempts),failures:e.map(a=>a.failures)}},"ze"),xt=h(({initialShardKey:t})=>{let e=ne(),a=T(),[s,l]=(0,f.useState)([]),[c,i]=(0,f.useState)(null),[n,o]=(0,f.useState)(null),[p,g]=(0,f.useState)(null),[b,d]=(0,f.useState)([]),[u,x]=(0,f.useState)(null),[v,k]=(0,f.useState)(null),[S,q]=(0,f.useState)([]),[N]=(0,f.useState)(de),y=(0,f.useRef)(!1),w=(0,f.useRef)(!0);(0,f.useEffect)(()=>(w.current=!0,()=>{w.current=!1}),[]);let P=t??"",F=(0,f.useCallback)(async()=>{if(y.current)return;y.current=!0;let m=await Xe(e,P,me(P,N));if(!w.current){y.current=!1;return}o(m.totals),g(m.metricsError),d(m.functions),q(m.migrations),l(m.entries),i(m.logsError),x(m.auth),k(m.scheduler),y.current=!1},[e,N,P]);(0,f.useEffect)(()=>{_(F())},[F]);let G=(0,f.useRef)(0),C=(0,f.useRef)(null),we=h(()=>{let m=Date.now()-G.current;if(m>=ge){G.current=Date.now(),_(F());return}C.current===null&&(C.current=setTimeout(()=>{C.current=null,G.current=Date.now(),_(F())},ge-m))},"ue");(0,f.useEffect)(()=>()=>{C.current!==null&&clearTimeout(C.current)},[]);let{data:Z,liveError:ye}=ce(M.getMetrics,{},{live:!0,shardKey:P});(0,f.useEffect)(()=>{Z!==void 0&&we()},[Z]);let ee=s.filter(m=>m.level==="error"),ke=ee.slice(0,Oe),L=Ke(n?.history),te=Ye(u),Se=b.filter(m=>m.calls>0).toSorted((m,J)=>J.errors/J.calls-m.errors/m.calls||J.calls-m.calls).slice(0,_e),K=Ve(S),qe=n===null||n.requests===0?0:n.errors/n.requests,V=X(qe,xe,ve),re=u===null?"ok":X(u.failureRate,$e,Be),se=v===null?"ok":Ge(v.backlog,He,Ue),R=We([V,re,se,K.level]),z,O;return R==="crit"?(z=a("Critical"),O=a("One or more service levels are breached.")):R==="warn"?(z=a("Degraded"),O=a("Some service levels need attention.")):(z=a("All systems healthy"),O=a("All service levels are within target.")),(0,r.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-health",children:[(0,r.jsxs)(A,{className:"gap-0 py-0",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 p-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:E("flex size-10 shrink-0 items-center justify-center rounded-full",Qe[R]),children:(0,r.jsx)("span",{className:E("size-3 rounded-full",be[R])})}),(0,r.jsxs)("div",{className:"grid leading-tight",children:[(0,r.jsx)("span",{className:"text-sm font-semibold text-foreground","data-testid":"hl-status",children:z}),(0,r.jsx)("span",{className:"text-[13px] text-muted-foreground",children:O})]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,r.jsxs)("div",{className:"text-end",children:[(0,r.jsx)("div",{className:"font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:a("Requests")}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[L.requests.length>=2&&(0,r.jsx)($,{ariaLabel:a("Requests over time"),className:"h-6 w-20 text-foreground",series:L.requests,testId:"hl-spark-requests"}),(0,r.jsx)("span",{className:"text-lg font-semibold tabular-nums text-foreground","data-testid":"hl-requests",children:(n?.requests??0).toString()})]})]}),(0,r.jsx)("span",{"aria-hidden":"true",className:"h-9 w-px bg-border"}),(0,r.jsxs)("div",{className:"text-end",children:[(0,r.jsx)("div",{className:"font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:a("Error rate")}),(0,r.jsx)("div",{className:E("text-lg font-semibold tabular-nums",Ne[V]),"data-testid":"hl-error-rate",children:n===null?"\u2014":U(n.errors,n.requests)})]}),(0,r.jsx)("span",{"aria-hidden":"true",className:"h-9 w-px bg-border"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(pe,{}),(0,r.jsx)(ue,{message:ye,prefix:"hl"})]})]})]}),p!==null&&(0,r.jsx)("div",{className:"border-t border-border bg-destructive/5 px-4 py-2 text-sm text-destructive","data-testid":"hl-metrics-error",role:"alert",children:p}),p===null&&n?.historyTruncated===!0&&(0,r.jsx)("div",{className:"border-t border-border bg-warning/5 px-4 py-2 text-sm text-muted-foreground","data-testid":"hl-history-truncated",children:a("Showing a partial request/error history \u2014 one or more shards have more data than the trend chart can display.")})]}),(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4","data-testid":"hl-slo",children:[(0,r.jsx)(H,{chart:L.errors.length>=2?(0,r.jsx)($,{ariaLabel:a("Errors over time"),className:"h-7 w-20 text-destructive",series:L.errors,testId:"hl-spark-errors"}):void 0,label:a("Error rate"),level:V,testId:"hl-slo-errorrate",value:n===null?"\u2014":U(n.errors,n.requests)}),(0,r.jsx)(H,{chart:te.failures.length>=2?(0,r.jsx)($,{ariaLabel:a("Auth failures over time"),className:"h-7 w-20 text-destructive",series:te.failures,testId:"hl-spark-auth"}):void 0,label:a("Auth failures"),level:re,testId:"hl-slo-auth",value:u===null?"\u2014":U(u.failures,u.attempts)}),(0,r.jsx)(H,{label:a("Scheduler backlog"),level:se,testId:"hl-slo-backlog",value:v===null?"\u2014":v.backlog.toString()}),(0,r.jsx)(H,{label:a("Migrations"),level:K.level,testId:"hl-slo-migrations",value:Je(K,a)})]}),(0,r.jsx)(je,{errorCount:ee.length,logsError:c,topErrors:ke,worstFunctions:Se}),(0,r.jsxs)(A,{className:"gap-0 py-0",children:[(0,r.jsxs)("header",{className:"flex items-center justify-between gap-2 border-b border-border px-4 py-3",children:[(0,r.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:a("Shards seen")}),(0,r.jsx)(D,{"data-testid":"hl-shard-count",variant:"outline",children:N.length})]}),N.length>0&&(0,r.jsx)("ul",{className:"flex flex-wrap gap-1.5 p-4",children:N.map(m=>(0,r.jsx)("li",{"data-testid":"hl-shard",children:(0,r.jsx)(D,{variant:"secondary",children:m})},m))})]})]})},"ut");export{xt as HealthPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as x}from"./chunk-DZGOHOOE.js";import{c as S}from"./chunk-5DEXJ766.js";import{f as q}from"./chunk-NIUA7EHL.js";import{d as _,f as g,g as y,m as C}from"./chunk-BKM6PMSO.js";import{a as u,d as w,e as L,f as T,g as F}from"./chunk-R5ZTCHCE.js";var v=w(L(),1);var j={},A=g(x.aiGenerateSql),I=g(x.aiTableFilter),O=g(x.aiChartConfig),R=u(s=>{let e=q(),[i,d]=(0,v.useState)({}),[n,r]=(0,v.useState)({}),a=S(x.aiAvailable,j,{shardKey:s}),[f,l]=(0,v.useState)(!1),b=f||a.data?.available===!1,p=u(t=>{d(o=>({...o,[t]:!0})),r(o=>({...o,[t]:void 0}))},"i"),h=u((t,o)=>{d(c=>({...c,[t]:!1})),o!==void 0&&r(c=>({...c,[t]:o})),o==="no-ai-binding"&&l(!0)},"a");return{generate:u(async(t,o)=>{p("sql");try{let{result:c}=await e.query(A,{failedError:o?.error,failedSql:o?.sql,prompt:t},y(s));return h("sql",c.degraded?c.reason:void 0),c.degraded?void 0:c.sql}catch{h("sql","ai-error");return}},"generate"),inferChart:u(async t=>{p("chart");try{let{result:o}=await e.query(O,t,y(s));return h("chart",o.degraded?o.reason:void 0),o.degraded?void 0:o.chart}catch{h("chart","ai-error");return}},"inferChart"),pending:u(t=>i[t]===!0,"pending"),reason:u(t=>n[t],"reason"),suggestFilter:u(async(t,o)=>{p("filter");try{let{result:c}=await e.query(I,{prompt:t,table:o},y(s));return h("filter",c.degraded?c.reason:void 0),c.degraded?void 0:c.clauses}catch{h("filter","ai-error");return}},"suggestFilter"),unavailable:b}},"w");var N=w(T(),1);var m=w(F(),1);var G=u((s,e)=>{if(e==="")return[{match:!1,offset:0,text:s}];let i=[],d=s.toLowerCase(),n=e.toLowerCase(),r=0;for(let a=d.indexOf(n);a!==-1;a=d.indexOf(n,r))a>r&&i.push({match:!1,offset:r,text:s.slice(r,a)}),i.push({match:!0,offset:a,text:s.slice(a,a+e.length)}),r=a+e.length;return r<s.length&&i.push({match:!1,offset:r,text:s.slice(r)}),i},"N"),U=u(s=>{let e=(0,N.c)(9),{highlight:i,value:d}=s;if(d==null){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,m.jsx)("span",{className:"text-muted-foreground/50 italic",children:"NULL"}),e[0]=l):l=e[0],l}let n,r,a;if(e[1]!==i||e[2]!==d){a=Symbol.for("react.early_return_sentinel");e:{let l=C(d);if(i===void 0||i===""){a=(0,m.jsx)("span",{title:l,children:l});break e}n=l,r=G(l,i).map(z)}e[1]=i,e[2]=d,e[3]=n,e[4]=r,e[5]=a}else n=e[3],r=e[4],a=e[5];if(a!==Symbol.for("react.early_return_sentinel"))return a;let f;return e[6]!==n||e[7]!==r?(f=(0,m.jsx)("span",{title:n,children:r}),e[6]=n,e[7]=r,e[8]=f):f=e[8],f},"v"),Q=u(s=>{let e=(0,N.c)(22),{columns:i,rows:d}=s,n=_(),r;e[0]!==n?(r=n("Field"),e[0]=n,e[1]=r):r=e[1];let a;e[2]!==r?(a=(0,m.jsx)("th",{className:"border-b border-e border-border px-3 py-1.5 text-start font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:r}),e[2]=r,e[3]=a):a=e[3];let f;if(e[4]!==d||e[5]!==n){let t;e[7]!==n?(t=u((o,c)=>(0,m.jsx)("th",{className:"border-b border-border px-3 py-1.5 text-start font-mono text-[11px] tracking-wide uppercase tabular-nums text-muted-foreground",children:n("Row {n}",{n:c+1})},c),"c"),e[7]=n,e[8]=t):t=e[8],f=d.map(t),e[4]=d,e[5]=n,e[6]=f}else f=e[6];let l;e[9]!==a||e[10]!==f?(l=(0,m.jsx)("thead",{className:"sticky top-0 z-10 bg-muted",children:(0,m.jsxs)("tr",{children:[a,f]})}),e[9]=a,e[10]=f,e[11]=l):l=e[11];let b;if(e[12]!==i||e[13]!==d){let t;e[15]!==d?(t=u(o=>(0,m.jsxs)("tr",{className:"hover:bg-muted/40",children:[(0,m.jsx)("th",{className:"border-b border-e border-border px-3 py-1.5 text-start font-mono font-medium whitespace-nowrap",scope:"row",children:o}),d.map((c,k)=>(0,m.jsx)("td",{className:"max-w-md truncate border-b border-border px-3 py-1.5 font-mono",children:(0,m.jsx)(U,{value:c[o]})},k))]},o),"c"),e[15]=d,e[16]=t):t=e[16],b=i.map(t),e[12]=i,e[13]=d,e[14]=b}else b=e[14];let p;e[17]!==b?(p=(0,m.jsx)("tbody",{children:b}),e[17]=b,e[18]=p):p=e[18];let h;return e[19]!==l||e[20]!==p?(h=(0,m.jsx)("div",{className:"min-h-0 flex-1 overflow-auto","data-testid":"db-transposed",children:(0,m.jsxs)("table",{className:"border-collapse text-xs",children:[l,p]})}),e[19]=l,e[20]=p,e[21]=h):h=e[21],h},"T"),V=u(({children:s,layout:e="card",testId:i})=>(0,m.jsx)("div",{className:e==="fill"?"flex min-h-0 flex-1 flex-col overflow-hidden border-t border-border":"overflow-x-auto border border-border bg-card","data-testid":i,children:s}),"j");function z(s){return(0,m.jsx)("mark",{className:s.match?"rounded-sm bg-warning/40 text-foreground":"bg-transparent text-inherit",children:s.text},s.offset)}u(z,"_");export{R as a,U as b,Q as c,V as d};
|
|
@@ -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-JCSDJBBZ.js";import"./chunk-PZ4QDWTI.js";import"./chunk-GDC3W3DZ.js";import"./chunk-F7JOSNAT.js";import{a as S}from"./chunk-DZGOHOOE.js";import{c as b}from"./chunk-5DEXJ766.js";import"./chunk-NIUA7EHL.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-BKM6PMSO.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{b as Nr}from"./chunk-INQICZYC.js";import{a as Or}from"./chunk-TFMQSCGC.js";import{a,d as k,e as B,g as Z}from"./chunk-R5ZTCHCE.js";var zo=k(B(),1),ae=zo.createContext(null);var Ho=k(B(),1);function N(t){return Ho.useContext(ae)}a(N,"useRouter");var Ue=k(B(),1),bt=Ue.createContext(void 0),jo=Ue.createContext(void 0);function dt(t){return t[t.length-1]}a(dt,"last");function Dr(t){return typeof t=="function"}a(Dr,"isFunction");function J(t,e){return Dr(t)?t(e):t}a(J,"functionalUpdate");var Jo=Object.prototype.hasOwnProperty,Fr=Object.prototype.propertyIsEnumerable;function ht(t){for(let e in t)if(Jo.call(t,e))return!0;return!1}a(ht,"hasKeys");var Ar=a(()=>Object.create(null),"createNull"),pt=a((t,e)=>st(t,e,Ar),"nullReplaceEqualDeep");function st(t,e,o=()=>({}),r=0){if(!1)return e;if(t===e)return t;if(r>500)return e;let n=e,s=Ve(t)&&Ve(n);if(!s&&!(jt(t)&&jt(n)))return n;let u=s?t:Ko(t);if(!u)return n;let i=s?n:Ko(n);if(!i)return n;let l=u.length,c=i.length,f=s?new Array(c):o(),d=0;for(let h=0;h<c;h++){let m=s?h:i[h],g=t[m],p=n[m];if(g===p){f[m]=g,(s?h<l:Jo.call(t,m))&&d++;continue}if(g===null||p===null||typeof g!="object"||typeof p!="object"){f[m]=p;continue}let v=st(g,p,o,r+1);f[m]=v,v===g&&d++}return l===c&&d===l?t:f}a(st,"replaceEqualDeep");function Ko(t){let e=Object.keys(t);if(e.length!==Object.getOwnPropertyNames(t).length)return!1;let o=Object.getOwnPropertySymbols(t);if(o.length===0)return e;for(let r of o){if(!Fr.call(t,r))return!1;e.push(r)}return e}a(Ko,"getEnumerableOwnKeys");function jt(t){if(!qo(t))return!1;let e=t.constructor;if(typeof e>"u")return!0;let o=e.prototype;return!(!qo(o)||!o.hasOwnProperty("isPrototypeOf"))}a(jt,"isPlainObject");function qo(t){return Object.prototype.toString.call(t)==="[object Object]"}a(qo,"hasObjectPrototype");function Ve(t){return Array.isArray(t)&&t.length===Object.keys(t).length}a(Ve,"isPlainArray");function Q(t,e,o){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0,n=t.length;r<n;r++)if(!Q(t[r],e[r],o))return!1;return!0}if(jt(t)&&jt(e)){let r=o?.ignoreUndefined??!0;if(o?.partial){for(let u in e)if((!r||e[u]!==void 0)&&!Q(t[u],e[u],o))return!1;return!0}let n=0;if(!r)n=Object.keys(t).length;else for(let u in t)t[u]!==void 0&&n++;let s=0;for(let u in e)if((!r||e[u]!==void 0)&&(s++,s>n||!Q(t[u],e[u],o)))return!1;return n===s}return!1}a(Q,"deepEqual");var $r=/[\x00-\x1f\x7f"<>`{}]/g;function Br(t){return t.replace($r,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}a(Br,"sanitizePathSegment");function Go(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,o=>{try{return decodeURI(o)}catch{return o}})}return Br(e)}a(Go,"decodeSegment");var We=["http:","https:","mailto:","tel:"];function it(t,e){if(!t)return!1;try{let o=new URL(t);return!e.has(o.protocol)}catch{return!1}}a(it,"isDangerousProtocol");function Nt(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};let e=/%25|%5C/gi,o=0,r="",n;for(;(n=e.exec(t))!==null;)r+=Go(t.slice(o,n.index))+n[0],o=e.lastIndex;r=r+Go(o?t.slice(o):t);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}a(Nt,"decodePath");function Yo(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}a(Yo,"encodePathLikeUrl");function Xo(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}a(Xo,"arraysEqual");function mt(){throw new Error("Invariant failed")}a(mt,"invariant");function Dt(t){let e=new Map,o,r,n=a(s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,o=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)},"touch");return{get(s){let u=e.get(s);if(u)return n(u),u.value},set(s,u){if(e.size>=t&&o){let l=o;e.delete(l.key),l.next&&(o=l.next,l.next.prev=void 0),l===r&&(r=void 0)}let i=e.get(s);if(i)i.value=u,n(i);else{let l={key:s,value:u,prev:r};r&&(r.next=l),r=l,o||(o=l),e.set(s,l)}},clear(){e.clear(),o=void 0,r=void 0}}}a(Dt,"createLRUCache");var gt=4,Qo=5;function Ur(t){let e=t.indexOf("{");if(e===-1)return null;let o=t.indexOf("}",e);return o===-1||e+1>=t.length?null:[e,o]}a(Ur,"getOpenAndCloseBraces");function ze(t,e,o=new Uint16Array(6)){let r=t.indexOf("/",e),n=r===-1?t.length:r,s=t.substring(e,n);if(!s||!s.includes("$"))return o[0]=0,o[1]=e,o[2]=e,o[3]=n,o[4]=n,o[5]=n,o;if(s==="$"){let i=t.length;return o[0]=2,o[1]=e,o[2]=e,o[3]=i,o[4]=i,o[5]=i,o}if(s.charCodeAt(0)===36)return o[0]=1,o[1]=e,o[2]=e+1,o[3]=n,o[4]=n,o[5]=n,o;let u=Ur(s);if(u){let[i,l]=u,c=s.charCodeAt(i+1);if(c===45){if(i+2<s.length&&s.charCodeAt(i+2)===36){let f=i+3,d=l;if(f<d)return o[0]=3,o[1]=e+i,o[2]=e+f,o[3]=e+d,o[4]=e+l+1,o[5]=n,o}}else if(c===36){let f=i+1,d=i+2;return d===l?(o[0]=2,o[1]=e+i,o[2]=e+f,o[3]=e+d,o[4]=e+l+1,o[5]=t.length,o):(o[0]=1,o[1]=e+i,o[2]=e+d,o[3]=e+l,o[4]=e+l+1,o[5]=n,o)}}return o[0]=0,o[1]=e,o[2]=e,o[3]=n,o[4]=n,o[5]=n,o}a(ze,"parseSegment");function ue(t,e,o,r,n,s,u,i){i?.(o);let l=r;{let c=o.fullPath??o.from,f=o.options,d=c.length,h=f?.caseSensitive??t,m=f?.params?.parse??f?.parseParams;for(;l<d;){let p=ze(c,l,e),v,S=l,y=p[5];l=y+1,s++;let w=p[0];switch(w){case 0:{let R=c.substring(p[2],p[3]),L=R,x;h?x=n.static??=new Map:(L=R.toLowerCase(),x=n.staticInsensitive??=new Map);let _=x.get(L);if(_)v=_;else{let b=Ft(c);b.parent=n,b.depth=s,v=b,x.set(L,b)}break}case 1:case 3:case 2:{let R=c.substring(S,p[1]),L=c.substring(p[4],y),x=h&&!!(R||L),_=R?x?R:R.toLowerCase():void 0,b=L?x?L:L.toLowerCase():void 0,P=w===1?n.dynamic:w===3?n.optional:n.wildcard,E=w!==2&&!m&&P?.find(C=>!C.parse&&C.caseSensitive===x&&C.prefix===_&&C.suffix===b);if(E)v=E;else{let C=Vr(w,c,x,_,b);v=C,C.parent=n,C.depth=s;let T;w===1?T=n.dynamic??=[]:w===3?T=n.optional??=[]:T=n.wildcard??=[],T.push(C),T.length===2&&u?.push(T)}break}}n=v}if(m&&o.children&&!o.isRoot&&o.id&&o.id.charCodeAt(o.id.lastIndexOf("/")+1)===95){let p=Ft(c);p.kind=Qo,p.parent=n,s++,p.depth=s,n.pathless??=[],n.pathless.push(p),n=p}let g=(o.path||!o.children)&&!o.isRoot;if(g&&c.endsWith("/")){let p=Ft(c);p.kind=gt,p.parent=n,s++,p.depth=s,n.index=p,n=p}n.parse=m??null,n.priority=f?.params?.priority??0,g&&!n.route&&(n.route=o,n.fullPath=c)}if(o.children)for(let c of o.children)ue(t,e,c,l,n,s,u,i)}a(ue,"parseSegments");function tn(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}a(tn,"sortDynamic");function Ft(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0}}a(Ft,"createStaticNode");function Vr(t,e,o,r,n){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0,caseSensitive:o,prefix:r,suffix:n}}a(Vr,"createDynamicNode");function en(t,e){let o=Ft("/"),r=new Uint16Array(6),n=[];for(let s of t)ue(!1,r,s,1,o,0,n);for(let s of n)s.sort(tn);e.masksTree=o,e.flatCache=Dt(1e3)}a(en,"processRouteMasks");function on(t,e){t||="/";let o=e.flatCache.get(t);if(o)return o;let r=He(t,e.masksTree);return e.flatCache.set(t,r),r}a(on,"findFlatMatch");function nn(t,e,o,r,n){t||="/",r||="/";let s=e?`case\0${t}`:t,u=n.singleCache.get(s);return u||(u=Ft("/"),ue(e,new Uint16Array(6),{from:t},1,u,0),n.singleCache.set(s,u)),He(r,u,o)}a(nn,"findSingleMatch");function rn(t,e,o=!1){let r=o?t:`nofuzz\0${t}`,n=e.matchCache.get(r);if(n!==void 0)return n;t||="/";let s;try{s=He(t,e.segmentTree,o)}catch(u){if(u instanceof URIError)s=null;else throw u}return s&&(s.branch=je(s.route)),e.matchCache.set(r,s),s}a(rn,"findRouteMatch");function Wr(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}a(Wr,"trimPathRight");function sn(t,e=!1,o){let r=Ft(t.fullPath),n=new Uint16Array(6),s=[],u={},i={},l=0;ue(e,n,t,1,r,0,s,c=>{if(o?.(c,l),c.id in u&&mt(),u[c.id]=c,l!==0&&c.path){let f=Wr(c.fullPath);(!i[f]||c.fullPath.endsWith("/"))&&(i[f]=c)}l++});for(let c of s)c.sort(tn);return{processedTree:{segmentTree:r,singleCache:Dt(1e3),matchCache:Dt(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:i}}a(sn,"processRouteTree");function He(t,e,o=!1){let r=t.split("/"),n=Hr(t,r,e,o);if(!n)return null;let[s]=an(t,r,n);return{route:n.node.route,rawParams:s}}a(He,"findMatch");function an(t,e,o){let r=zr(o.node),n=null,s=Object.create(null),u=o.extract?.part??0,i=o.extract?.node??0,l=o.extract?.path??0,c=o.extract?.segment??0;for(;i<r.length;u++,i++,l++,c++){let f=r[i];if(f.kind===gt)break;if(f.kind===Qo){c--,u--,l--;continue}let d=e[u],h=l;if(d&&(l+=d.length),f.kind===1){n??=o.node.fullPath.split("/");let m=n[c],g=f.prefix?.length??0;if(m.charCodeAt(g)===123){let p=f.suffix?.length??0,v=m.substring(g+2,m.length-p-1),S=d.substring(g,d.length-p);s[v]=decodeURIComponent(S)}else{let p=m.substring(1);s[p]=decodeURIComponent(d)}}else if(f.kind===3){if(o.skipped&1<<i){u--,l=h-1;continue}n??=o.node.fullPath.split("/");let m=n[c],g=f.prefix?.length??0,p=f.suffix?.length??0,v=m.substring(g+3,m.length-p-1),S=f.suffix||f.prefix?d.substring(g,d.length-p):d;S&&(s[v]=decodeURIComponent(S))}else if(f.kind===2){let m=f,g=t.substring(h+(m.prefix?.length??0),t.length-(m.suffix?.length??0)),p=decodeURIComponent(g);s["*"]=p,s._splat=p;break}}return o.rawParams&&Object.assign(s,o.rawParams),[s,{part:u,node:i,path:l,segment:c}]}a(an,"extractParams");function je(t){let e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}a(je,"buildRouteBranch");function zr(t){let e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}a(zr,"buildBranch");function Hr(t,e,o,r){if(t==="/"&&o.index)return{node:o.index,skipped:0};let n=!dt(e),s=n&&t!=="/",u=e.length-(n?1:0),i=[{node:o,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],l=null,c=null;for(;i.length;){let f=i.pop(),{node:d,index:h,skipped:m,statics:g,dynamics:p,optionals:v}=f,{extract:S,rawParams:y}=f;if(d.kind===2&&d.route&&!le(c,f))continue;if(d.parse){if(!Zo(t,e,f))continue;y=f.rawParams,S=f.extract}r&&d.route&&d.kind!==gt&&le(l,f)&&(l=f);let w=h===u;if(w&&(d.route&&(!s||d.kind===gt||d.kind===2)&&le(c,f)&&(c=f),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;let R=w?void 0:e[h],L;if(w&&d.index){let x={node:d.index,index:h,skipped:m,statics:g,dynamics:p,optionals:v,extract:S,rawParams:y},_=!0;if(d.index.parse&&(Zo(t,e,x)||(_=!1)),_){if(!p&&!v&&!m&&jr(g,u))return x;le(c,x)&&(c=x)}}if(d.wildcard)for(let x=d.wildcard.length-1;x>=0;x--){let _=d.wildcard[x],{prefix:b,suffix:P}=_;if(!(b&&(w||!(_.caseSensitive?R:L??=R.toLowerCase()).startsWith(b)))){if(P){if(w)continue;let E=e.slice(h).join("/").slice(-P.length);if((_.caseSensitive?E:E.toLowerCase())!==P)continue}i.push({node:_,index:u,skipped:m,statics:g,dynamics:p,optionals:v,extract:S,rawParams:y})}}if(d.optional){let x=m|1<<d.depth+1;for(let _=d.optional.length-1;_>=0;_--){let b=d.optional[_];i.push({node:b,index:h,skipped:x,statics:g,dynamics:p,optionals:v,extract:S,rawParams:y})}if(!w)for(let _=d.optional.length-1;_>=0;_--){let b=d.optional[_],{prefix:P,suffix:E}=b;if(P||E){let C=b.caseSensitive?R:L??=R.toLowerCase();if(P&&!C.startsWith(P)||E&&!C.endsWith(E))continue}i.push({node:b,index:h+1,skipped:m,statics:g,dynamics:p,optionals:v+ce(u,h),extract:S,rawParams:y})}}if(!w&&d.dynamic&&R)for(let x=d.dynamic.length-1;x>=0;x--){let _=d.dynamic[x],{prefix:b,suffix:P}=_;if(b||P){let E=_.caseSensitive?R:L??=R.toLowerCase();if(b&&!E.startsWith(b)||P&&!E.endsWith(P))continue}i.push({node:_,index:h+1,skipped:m,statics:g,dynamics:p+ce(u,h),optionals:v,extract:S,rawParams:y})}if(!w&&d.staticInsensitive){let x=d.staticInsensitive.get(L??=R.toLowerCase());x&&i.push({node:x,index:h+1,skipped:m,statics:g+ce(u,h),dynamics:p,optionals:v,extract:S,rawParams:y})}if(!w&&d.static){let x=d.static.get(R);x&&i.push({node:x,index:h+1,skipped:m,statics:g+ce(u,h),dynamics:p,optionals:v,extract:S,rawParams:y})}if(d.pathless)for(let x=d.pathless.length-1;x>=0;x--){let _=d.pathless[x];i.push({node:_,index:h,skipped:m,statics:g,dynamics:p,optionals:v,extract:S,rawParams:y})}}if(c)return c;if(r&&l){let f=l.index;for(let h=0;h<l.index;h++)f+=e[h].length;let d=f===t.length?"/":t.slice(f);return l.rawParams??=Object.create(null),l.rawParams["**"]=decodeURIComponent(d),l}return null}a(Hr,"getNodeMatch");function ce(t,e){return 2**(t-e-1)}a(ce,"segmentScore");function jr(t,e){return t===2**(e-1)-1}a(jr,"isPerfectStaticMatch");function Zo(t,e,o){let r,n;try{[r,n]=an(t,e,o)}catch{return null}if(o.rawParams=r,o.extract=n,!o.node.parse)return!0;try{if(o.node.parse(r)===!1)return null}catch{}return!0}a(Zo,"validateParseParams");function le(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===gt)>(t.node.kind===gt)||e.node.kind===gt==(t.node.kind===gt)&&e.node.depth>t.node.depth))):!0}a(le,"isFrameMoreSpecific");function Pt(t){return qt(t.filter(e=>e!==void 0).join("/"))}a(Pt,"joinPaths");function qt(t){return t.replace(/\/{2,}/g,"/")}a(qt,"cleanPath");function fe(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}a(fe,"trimPathLeft");function Y(t){let e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}a(Y,"trimPathRight");function Gt(t){return Y(fe(t))}a(Gt,"trimPath");function vt(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}a(vt,"removeTrailingSlash");function de(t,e,o){return vt(t,o)===vt(e,o)}a(de,"exactPathTest");function Ke({base:t,to:e,trailingSlash:o="never",cache:r}){let n=e===".",s=e.startsWith("/"),u;if(r){u=s?e:n?t:t+"\0"+e;let c=r.get(u);if(c)return c}let i;if(n)i=t.split("/");else if(s)i=e.split("/");else{for(i=t.split("/");i.length>1&&dt(i)==="";)i.pop();let c=e.split("/");for(let f=0,d=c.length;f<d;f++){let h=c[f];h===""?f?f===d-1&&i.push(h):i=[h]:h===".."?i.length>1?i.pop():i=[""]:h==="."||i.push(h)}}i.length>1&&(dt(i)===""?o==="never"&&i.pop():o==="always"&&i.push(""));let l=qt(i.join("/"))||"/";return u&&r&&r.set(u,l),l}a(Ke,"resolvePath");function ln(t){let e=new Map(t.map(n=>[encodeURIComponent(n),n])),o=Array.from(e.keys()).map(n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(o,"g");return n=>n.replace(r,s=>e.get(s)??s)}a(ln,"compileDecodeCharMap");function Kt(t,e,o){let r=e[t];return typeof r!="string"?r:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(n=>cn(n,o)).join("/"):cn(r,o)}a(Kt,"encodeParam");function he({path:t,params:e,decoder:o,...r}){let n=!1,s=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:n};if(!t.includes("$"))return{interpolatedPath:t,usedParams:s,isMissingParams:n};if(!1){let f=t.length,d=0,h="";for(;d<f;){for(;d<f&&t.charCodeAt(d)===47;)d++;if(d>=f)break;let m=d,g=t.indexOf("/",d);g===-1&&(g=f),d=g;let p=t.substring(m,g);if(p)if(p.charCodeAt(0)===36)if(p.length===1){let v=e._splat;if(s._splat=v,s["*"]=v,!v){n=!0;continue}let S=Kt("_splat",e,o);h+="/"+S}else{let v=p.substring(1);!n&&!(v in e)&&(n=!0),s[v]=e[v];let S=Kt(v,e,o)??"undefined";h+="/"+S}else h+="/"+p}return t.endsWith("/")&&(h+="/"),{usedParams:s,interpolatedPath:h||"/",isMissingParams:n}}let u=t.length,i=0,l,c="";for(;i<u;){let f=i;l=ze(t,f,l);let d=l[5];if(i=d+1,f===d)continue;let h=l[0];if(h===0){c+="/"+t.substring(f,d);continue}if(h===2){let m=e._splat;s._splat=m,s["*"]=m;let g=t.substring(f,l[1]),p=t.substring(l[4],d);if(!m){n=!0,(g||p)&&(c+="/"+g+p);continue}let v=Kt("_splat",e,o);c+="/"+g+v+p;continue}if(h===1){let m=t.substring(l[2],l[3]);!n&&!(m in e)&&(n=!0),s[m]=e[m];let g=t.substring(f,l[1]),p=t.substring(l[4],d),v=Kt(m,e,o)??"undefined";c+="/"+g+v+p;continue}if(h===3){let m=t.substring(l[2],l[3]),g=e[m];if(g==null)continue;s[m]=g;let p=t.substring(f,l[1]),v=t.substring(l[4],d),S=Kt(m,e,o)??"";c+="/"+p+S+v;continue}}return t.endsWith("/")&&(c+="/"),{usedParams:s,interpolatedPath:c||"/",isMissingParams:n}}a(he,"interpolatePath");function cn(t,e){let o=encodeURIComponent(t);return e?.(o)??o}a(cn,"encodePathParam");function K(t){return t?.isNotFound===!0}a(K,"isNotFound");function Kr(){try{return sessionStorage}catch{return}}a(Kr,"getSafeSessionStorage");var qr="tsr-scroll-restoration-v1_3",dn=Kr();function Gr(){try{return JSON.parse(dn?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}a(Gr,"createScrollRestorationCache");function Jr(){try{dn?.setItem(qr,JSON.stringify(At))}catch{}}a(Jr,"persistScrollRestorationCache");var At=Gr(),un="data-scroll-restoration-id",Yr=a(t=>t.state.__TSR_key||t.href,"defaultGetScrollRestorationKey");function Xr(t){let e=t.getAttribute(un);if(e)return`[${un}="${e}"]`;let o="",r=t,n;for(;n=r.parentNode;){let s=1,u=r;for(;u=u.previousElementSibling;)s++;let i=`${r.localName}:nth-child(${s})`;o=o?`${i} > ${o}`:i,r=n}return o}a(Xr,"getScrollRestorationSelector");var pe=!1,me="window";function qe(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}a(qe,"getElement");function fn(t){let e=new Set;for(let o of t){if(o===me)continue;let r=qe(o);r&&e.add(r)}return e}a(fn,"getScrollToTopElements");function hn(t,e){let o=e??t.options.scrollRestoration,r=t._scroll;if(o&&(r.restoring=!0),!1)return;let n=t.options.getScrollRestorationKey||Yr,s=new Set,u=a(i=>{let l=At[i]||={};for(let c of s)c===document?l[me]={scrollX,scrollY}:c.isConnected&&(l[Xr(c)]={scrollX:c.scrollLeft,scrollY:c.scrollTop})},"snapshotCurrentScrollTargets");o&&!r.restoration&&(r.restoration=!0,pe=!1,history.scrollRestoration="manual",document.addEventListener("scroll",i=>{pe||s.add(i.target)},!0),t.subscribe("onBeforeLoad",i=>{i.fromLocation&&u(n(i.fromLocation)),s.clear()}),addEventListener("pagehide",()=>{u(n(t.stores.resolvedLocation.get()??t.stores.location.get())),Jr()})),!r.reset&&(r.reset=!0,t.subscribe("onRendered",i=>{let l=t.options.scrollRestorationBehavior,c=t.options.scrollToTopSelectors,f=r.next,d=r.hash,h;if(s.clear(),r.next=!0,r.hash=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;let m=n(i.toLocation),g=i.fromLocation&&n(i.fromLocation);if(r.restoring&&g&&g!==m){let p=At[g];if(p){let v=At[m];for(let S in p){if(S===me){if(f)continue}else{let y=qe(S);if(!y||f&&c&&(h??=fn(c),h.has(y)))continue}v||(v=At[m]={}),v[S]??=p[S]}}}pe=!0;try{let p=i.toLocation.hash,v=i.toLocation.state.__hashScrollIntoViewOptions??!0,S=!1;if(f){!p&&c&&(h??=fn(c));let y=p&&v&&d,w=r.restoring?At[m]:void 0;if(w)for(let R in w){let{scrollX:L,scrollY:x}=w[R];if(R===me){if(y)continue;scrollTo({top:x,left:L,behavior:l}),S=!0}else{let _=qe(R);_&&(_.scrollLeft=L,_.scrollTop=x,h?.delete(_))}}if(!p){let R={top:0,left:0,behavior:l};if(S||scrollTo(R),h)for(let L of h)L.scrollTo(R)}}!S&&p&&v&&document.getElementById(p)?.scrollIntoView(v)}finally{pe=!1}}))}a(hn,"setupScrollRestoration");function pn(t,e=String){let o=new URLSearchParams;for(let r in t){let n=t[r];n!==void 0&&o.set(r,e(n))}return o.toString()}a(pn,"encode");function Ge(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}a(Ge,"toValue");function mn(t){let e=new URLSearchParams(t),o=Object.create(null);for(let[r,n]of e.entries()){let s=o[r];s==null?o[r]=Ge(n):Array.isArray(s)?s.push(Ge(n)):o[r]=[s,Ge(n)]}return o}a(mn,"decode");var Zr=/^(?:\s|["[{\d-]|fa|nu|tr)/,gn=Qr(JSON.parse),vn=ts(JSON.stringify,JSON.parse);function Qr(t){return e=>{e[0]==="?"&&(e=e.substring(1));let o=mn(e);for(let r in o){let n=o[r];if(typeof n=="string")try{o[r]=t(n)}catch{}}return o}}a(Qr,"parseSearchWith");function ts(t,e){let o=e===JSON.parse;function r(n){if(n&&typeof n=="object")try{return t(n)}catch{}else if(e&&typeof n=="string"){if(o&&!Zr.test(n))return n;try{return e(n),t(n)}catch{}}return n}return a(r,"stringifyValue"),n=>{let s=pn(n,r);return s?`?${s}`:""}}a(ts,"stringifySearchWith");var tt="__root__";function yn(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}let e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);let o=new Response(null,{status:t.statusCode,headers:e});if(o.options=t,t.throw)throw o;return o}a(yn,"redirect");function Jt(t){return t instanceof Response&&!!t.options}a(Jt,"isRedirect");function _n(t){return{input:a(({url:e})=>{for(let o of t)e=ge(o,e);return e},"input"),output:a(({url:e})=>{for(let o=t.length-1;o>=0;o--)e=Je(t[o],e);return e},"output")}}a(_n,"composeRewrites");function Sn(t){let e=Gt(t.basepath),o=`/${e}`,r=t.caseSensitive?o:o.toLowerCase(),n=`${r}/`;return{input:a(({url:s})=>{let u=t.caseSensitive?s.pathname:s.pathname.toLowerCase();return u===r?s.pathname="/":u.startsWith(n)&&(s.pathname=s.pathname.slice(o.length)),s},"input"),output:a(({url:s})=>(s.pathname=Pt(["/",e,s.pathname]),s),"output")}}a(Sn,"rewriteBasepath");function ge(t,e){let o=t?.input?.({url:e});if(o){if(typeof o=="string")return new URL(o);if(o instanceof URL)return o}return e}a(ge,"executeRewriteInput");function Je(t,e){let o=t?.output?.({url:e});if(o){if(typeof o=="string")return new URL(o);if(o instanceof URL)return o}return e}a(Je,"executeRewriteOutput");function Ye(t){let e=t;return{get(){return e},set(o){e=J(o,e)}}}a(Ye,"createNonReactiveMutableStore");function Xe(t){return{get(){return t()}}}a(Xe,"createNonReactiveReadonlyStore");function Rn(t,e){let{createMutableStore:o,createReadonlyStore:r,batch:n}=e,s=new Map,u=o("idle"),i=o(t),l=o(void 0),c=o([]),f=r(()=>c.get().map(p=>s.get(p).get())),d=r(()=>({status:u.get(),isLoading:u.get()==="pending",matches:f.get(),location:i.get(),resolvedLocation:l.get()}));function h(p){let v=s.get(p);return v||(v=o(void 0),s.set(p,v)),v}a(h,"getMatchStore");let m={status:u,location:i,resolvedLocation:l,ids:c,matches:f,byRoute:s,__store:d,getMatchStore:h,setMatches:g};function g(p){let v=c.get(),S=p.map(y=>y.routeId);n(()=>{Xo(v,S)||c.set(S);for(let y of v)S.includes(y)||s.get(y).set(()=>{});for(let y of p){let w=h(y.routeId);w.get()!==y&&w.set(y)}})}return a(g,"setMatches"),m}a(Rn,"createRouterStores");var yt="__TSR_index",wn="popstate",xn="beforeunload";function Qe(t){let e=t.getLocation(),o=new Set,r=a(u=>{e=t.getLocation(),o.forEach(i=>i({location:e,action:u}))},"notify"),n=a(u=>{t.notifyOnIndexChange??!0?r(u):e=t.getLocation()},"handleIndexChange"),s=a(async({task:u,navigateOpts:i,...l})=>{if(i?.ignoreBlocker??!1){u();return}let c=t.getBlockers?.()??[],f=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&c.length&&f)for(let d of c){let h=$t(l.path,l.state);if(await d.blockerFn({currentLocation:e,nextLocation:h,action:l.type})){t.onBlocked?.();return}}u()},"tryNavigation");return{get location(){return e},get length(){return t.getLength()},subscribers:o,subscribe:a(u=>(o.add(u),()=>{o.delete(u)}),"subscribe"),push:a((u,i,l)=>{let c=e.state[yt];i=Ze(c+1,i),s({task:a(()=>{t.pushState(u,i),r({type:"PUSH"})},"task"),navigateOpts:l,type:"PUSH",path:u,state:i})},"push"),replace:a((u,i,l)=>{let c=e.state[yt];i=Ze(c,i),s({task:a(()=>{t.replaceState(u,i),r({type:"REPLACE"})},"task"),navigateOpts:l,type:"REPLACE",path:u,state:i})},"replace"),go:a((u,i)=>{s({task:a(()=>{t.go(u),n({type:"GO",index:u})},"task"),navigateOpts:i,type:"GO"})},"go"),back:a(u=>{s({task:a(()=>{t.back(u?.ignoreBlocker??!1),n({type:"BACK"})},"task"),navigateOpts:u,type:"BACK"})},"back"),forward:a(u=>{s({task:a(()=>{t.forward(u?.ignoreBlocker??!1),n({type:"FORWARD"})},"task"),navigateOpts:u,type:"FORWARD"})},"forward"),canGoBack:a(()=>e.state[yt]!==0,"canGoBack"),createHref:a(u=>t.createHref(u),"createHref"),block:a(u=>{if(!t.setBlockers)return()=>{};let i=t.getBlockers?.()??[];return t.setBlockers([...i,u]),()=>{let l=t.getBlockers?.()??[];t.setBlockers?.(l.filter(c=>c!==u))}},"block"),flush:a(()=>t.flush?.(),"flush"),destroy:a(()=>t.destroy?.(),"destroy"),notify:r}}a(Qe,"createHistory");function Ze(t,e){e||(e={});let o=eo();return{...e,key:o,__TSR_key:o,[yt]:t}}a(Ze,"assignKeyAndIndex");function to(t){let e=t?.window??(typeof document<"u"?window:void 0),o=e.history.pushState,r=e.history.replaceState,n=[],s=a(()=>n,"_getBlockers"),u=a(_=>n=_,"_setBlockers"),i=t?.createHref??(_=>_),l=t?.parseLocation??(()=>$t(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){let _=eo();e.history.replaceState({[yt]:0,key:_,__TSR_key:_},"")}let c=l(),f,d=!1,h=!1,m=!1,g=!1,p=a(()=>c,"getLocation"),v,S=a(()=>{v&&(x._ignoreSubscribers=!0,(v[2]?e.history.pushState:e.history.replaceState)(v[1],"",v[0]),x._ignoreSubscribers=!1,v=void 0,f=void 0)},"flush"),y=a((_,b,P)=>{let E=i(b),C=!!v;C||(f=c),c=$t(b,P),v=[E,P,v?.[2]||_],C||queueMicrotask(()=>S())},"queueHistoryAction"),w=a(_=>{c=l(),x.notify({type:_})},"onPushPop"),R=a(async()=>{if(h){h=!1;return}let _=l(),b=_.state[yt]-c.state[yt],P=b===1,E=b===-1,C=!P&&!E||d;d=!1;let T=C?"GO":E?"BACK":"FORWARD",D=C?{type:"GO",index:b}:{type:E?"BACK":"FORWARD"};if(m)m=!1;else{let wt=s();if(typeof document<"u"&&wt.length){for(let rt of wt)if(await rt.blockerFn({currentLocation:c,nextLocation:_,action:T})){h=!0,e.history.go(1),x.notify(D);return}}}c=l(),x.notify(D)},"onPushPopEvent"),L=a(_=>{if(g){g=!1;return}let b=!1,P=s();if(typeof document<"u"&&P.length)for(let E of P){let C=E.enableBeforeUnload??!0;if(C===!0){b=!0;break}if(typeof C=="function"&&C()===!0){b=!0;break}}if(b)return _.preventDefault(),_.returnValue=""},"onBeforeUnload"),x=Qe({getLocation:p,getLength:a(()=>e.history.length,"getLength"),pushState:a((_,b)=>y(!0,_,b),"pushState"),replaceState:a((_,b)=>y(!1,_,b),"replaceState"),back:a(_=>(_&&(m=!0),g=!0,e.history.back()),"back"),forward:a(_=>{_&&(m=!0),g=!0,e.history.forward()},"forward"),go:a(_=>{d=!0,e.history.go(_)},"go"),createHref:a(_=>i(_),"createHref"),flush:S,destroy:a(()=>{e.history.pushState=o,e.history.replaceState=r,e.removeEventListener(xn,L,{capture:!0}),e.removeEventListener(wn,R)},"destroy"),onBlocked:a(()=>{f&&c!==f&&(c=f)},"onBlocked"),getBlockers:s,setBlockers:u,notifyOnIndexChange:!1});return e.addEventListener(xn,L,{capture:!0}),e.addEventListener(wn,R),e.history.pushState=function(..._){let b=o.apply(e.history,_);return x._ignoreSubscribers||w("PUSH"),b},e.history.replaceState=function(..._){let b=r.apply(e.history,_);return x._ignoreSubscribers||w("REPLACE"),b},x}a(to,"createBrowserHistory");function es(t={initialEntries:["/"]}){let e=t.initialEntries,o=t.initialIndex?Math.min(Math.max(t.initialIndex,0),e.length-1):e.length-1,r=e.map((l,c)=>Ze(c,void 0)),n=a(()=>$t(e[o],r[o]),"getLocation"),s=[];return Qe({getLocation:n,getLength:a(()=>e.length,"getLength"),pushState:a((l,c)=>{o<e.length-1&&(e.splice(o+1),r.splice(o+1)),r.push(c),e.push(l),o=Math.max(e.length-1,0)},"pushState"),replaceState:a((l,c)=>{r[o]=c,e[o]=l},"replaceState"),back:a(()=>{o=Math.max(o-1,0)},"back"),forward:a(()=>{o=Math.min(o+1,e.length-1)},"forward"),go:a(l=>{o=Math.min(Math.max(o+l,0),e.length-1)},"go"),createHref:a(l=>l,"createHref"),getBlockers:a(()=>s,"_getBlockers"),setBlockers:a(l=>s=l,"_setBlockers")})}a(es,"createMemoryHistory");function os(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}a(os,"sanitizePath");function $t(t,e){let o=os(t),r=o.indexOf("#"),n=o.indexOf("?"),s=eo();return{href:o,pathname:o.substring(0,r>0?n>0?Math.min(r,n):r:n>0?n:o.length),hash:r>-1?o.substring(r):"",search:n>-1?o.slice(n,r===-1?void 0:r):"",state:e||{[yt]:0,key:s,__TSR_key:s}}}a($t,"parseHref");function eo(){return(Math.random()+1).toString(36).substring(7)}a(eo,"createRandomKey");function bn(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}a(bn,"routeNeedsLoad");function Ct(t,e){return{fromLocation:e,toLocation:t,pathChanged:e?.pathname!==t.pathname,hrefChanged:e?.href!==t.href,hashChanged:e?.hash!==t.hash}}a(Ct,"getLocationChangeInfo");function Pn({key:t,__TSR_key:e,__TSR_index:o,__hashScrollIntoViewOptions:r,...n}){return n}a(Pn,"_getUserHistoryState");function En(t,e,o,r){for(let n of e){if(r?.()===!1)return;o.some(s=>s.routeId===n.routeId)||t.routesById[n.routeId].options.onLeave?.(n)}for(let n of o){if(r?.()===!1)return;t.routesById[n.routeId].options[e.some(s=>s.routeId===n.routeId)?"onStay":"onEnter"]?.(n)}}a(En,"runRouteLifecycle");var oo=class{static{a(this,"RouterCore")}constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async o=>(o(),!1),this.update=o=>{let r=this.options,n=this.basepath??r?.basepath??"/",s=this.basepath===void 0,u=r?.rewrite;if(this.options={...r,...o},this.isServer=this.options.isServer??!1??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=ln(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=to()),this.origin=this.options.origin,this.origin||(!!1&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let c;if(!1){let f=globalThis.__TSR_CACHE__;this.resolvePathCache=f.resolvePathCache,c=f.processRouteTreeResult}else this.resolvePathCache=Dt(1e3),c=this.buildRouteTree(),!1;this.setRoutes(c)}if(!this.stores&&this.latestLocation){let c=this.getStoreConfig(this);this.batch=c.batch,this.stores=Rn(this.latestLocation,c),hn(this)}let i=this.options.basepath??"/",l=this.options.rewrite;if(s||n!==i||u!==l){this.basepath=i;let c=[],f=Gt(i);f&&f!=="/"&&c.push(Sn({basepath:i})),l&&c.push(l),this.rewrite=c.length===0?void 0:c.length===1?c[0]:_n(c),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let o=sn(this.routeTree,this.options.caseSensitive,(r,n)=>{r.init({originalIndex:n})});return this.options.routeMasks&&en(this.options.routeMasks,o.processedTree),o},this.subscribe=(o,r)=>{let n={eventType:o,fn:r};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=o=>{for(let r of this.subscribers)if(r.eventType===o.type)try{r.fn(o)}catch(n){console.error(n)}},this.parseLocation=(o,r)=>{let n=a(({pathname:l,search:c,hash:f,href:d,state:h})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){let S=this.options.parseSearch(c),y=this.options.stringifySearch(S);return{href:l+y+f,publicHref:l+y+f,pathname:Nt(l).path,external:!1,searchStr:y,search:pt(r?.search,S),hash:Nt(f.slice(1)).path,state:st(r?.state,h)}}let m=new URL(d,this.origin),g=ge(this.rewrite,m),p=this.options.parseSearch(g.search),v=this.options.stringifySearch(p);return g.search=v,{href:g.href.replace(g.origin,""),publicHref:d,pathname:Nt(g.pathname).path,external:!!this.rewrite&&g.origin!==this.origin,searchStr:v,search:pt(r?.search,p),hash:Nt(g.hash.slice(1)).path,state:st(r?.state,h)}},"parse"),s=n(o),{__tempLocation:u,__tempKey:i}=s.state;if(u&&(!i||i===this.tempLocationKey)){let l=n(u);return l.state.key=s.state.key,l.state.__TSR_key=s.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:s}}return s},this.resolvePathWithBase=(o,r)=>Ke({base:o,to:r.includes("//")?qt(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(o,r,n)=>typeof o=="string"?this.matchRoutesInternal({pathname:o,search:r},n):this.matchRoutesInternal(o,r),this.getMatchedRoutes=o=>{let r=Object.create(null),n=rn(Y(o),this.processedTree,!0);return n&&Object.assign(r,n.rawParams),[n?.branch||[this.routesById.__root__],r,n?.route]},this.buildLocation=o=>{let r=a((s={})=>{let u=s._fromLocation||this._pendingLocation||this.latestLocation,i=this.matchRoutesLightweight(u);s.from;let l=s.unsafeRelative==="path"?u.pathname:s.from??i[1],c=s.to?`${s.to}`:void 0,f=i[2],d=Object.assign(Object.create(null),i[3]),h=c?.charCodeAt(0)===47?"/":this.resolvePathWithBase(l,"."),m=c?this.resolvePathWithBase(h,c):h,g=Cn(s.params,d),p=this.routesByPath[Y(m)],v;if(p)v=this.getRouteBranch(p);else if(m.includes("$"))v=[];else{let[C,T,D]=this.getMatchedRoutes(m);v=C,this.options.notFoundRoute&&(!D||D.path!=="/"&&T["**"])&&(v=[...v,this.options.notFoundRoute])}if(v.length&&ht(g))for(let C of v){let T=C.options.params?.stringify??C.options.stringifyParams;if(T)try{Object.assign(g,T(g))}catch{}}let S=o.leaveParams?m:Nt(he({path:m,params:g,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,y=f;if(o._includeValidateSearch&&this.options.search?.strict){let C={};v.forEach(T=>{if(T.options.validateSearch)try{Object.assign(C,ve(T.options.validateSearch,{...C,...y}))}catch{}}),y=C}y=ns(y,s,v,o._includeValidateSearch),y=pt(f,y);let w=this.options.stringifySearch(y),R=s.hash===!0?u.hash:s.hash?J(s.hash,u.hash):void 0,L=R?`#${R}`:"",x=s.state===!0?u.state:s.state?J(s.state,u.state):{};x=st(u.state,x);let _=`${S}${w}${L}`,b,P,E=!1;if(this.rewrite){let C=new URL(_,this.origin),T=Je(this.rewrite,C);b=C.href.replace(C.origin,""),T.origin!==this.origin?(P=T.href,E=!0):P=T.pathname+T.search+T.hash}else b=Yo(_),P=b;return{publicHref:P,href:b,pathname:S,search:y,searchStr:w,state:x,hash:R??"",external:E,unmaskOnReload:s.unmaskOnReload}},"build"),n=a((s={},u)=>{let i=r(s),l=u?r(u):void 0;if(!l){let c=Object.create(null);if(this.options.routeMasks){let f=on(i.pathname,this.processedTree);if(f){Object.assign(c,f.rawParams);let{from:d,params:h,...m}=f.route,g=Cn(h,c);u={from:o.from,...m,params:g},l=r(u)}}}return l&&(i.maskedLocation=l),i},"buildWithMatches");return o.mask?n(o,{from:o.from,...o.mask}):n(o)},this.commitLocation=async({viewTransition:o,ignoreBlocker:r,...n})=>{let s,u=Y(this.latestLocation.href)===Y(n.href)&&Q(Pn(n.state),Pn(this.latestLocation.state)),i=this._commitPromise,l,c=new Promise(f=>{l=f});if(c.resolve=()=>{l(),i?.resolve()},this._commitPromise=c,u)this.load();else{let{maskedLocation:f,hashScrollIntoView:d,...h}=n;f&&(h={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=d??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=o,s=n.replace?"REPLACE":"PUSH",this.history[s==="REPLACE"?"replace":"push"](h.publicHref,h.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:s}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:o,resetScroll:r,hashScrollIntoView:n,viewTransition:s,ignoreBlocker:u,_redirects:i,href:l,...c}={})=>{if(l){let h=this.history.location.state.__TSR_index,m=$t(l,{__TSR_index:o?h:h+1}),g=new URL(m.pathname,this.origin);c.to=ge(this.rewrite,g).pathname,c.search=this.options.parseSearch(m.search),c.hash=m.hash.slice(1)}let f=this.buildLocation({...c,_includeValidateSearch:!0});i&&(f._redirects=i),this._pendingLocation=f;let d=this.commitLocation({...f,viewTransition:s,replace:o,resetScroll:r,hashScrollIntoView:n,ignoreBlocker:u});return queueMicrotask(()=>{this._pendingLocation===f&&(this._pendingLocation=void 0)}),d},this.navigate=async({to:o,reloadDocument:r,href:n,publicHref:s,...u})=>{let i=!1;if(n)try{new URL(`${n}`),i=!0}catch{}if(i&&!r&&(r=!0),r){if(o!==void 0||!n){let c=this.buildLocation({to:o,...u});n=n??c.publicHref,s=s??c.publicHref}let l=!i&&s?s:n;if(it(l,this.protocolAllowlist))return;if(!u.ignoreBlocker){let c=this.history.getBlockers?.()??[];for(let f of c)if(f?.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}u.replace?window.location.replace(l):window.location.href=l;return}return this.buildAndCommitLocation({...u,href:n,to:o,_isNavigate:!0})},this.load=async o=>{if(!1)return(void 0)(this,o);this.updateLatestLocation(),o?.action&&(this._scroll.hash=o.action.type==="PUSH"||o.action.type==="REPLACE"),await In(this,o)},this.startViewTransition=o=>{let r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&!!1&&typeof document.startViewTransition=="function"){let n;if(typeof r=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){let s=this.latestLocation,u=this.stores.resolvedLocation.get(),i=typeof r.types=="function"?r.types(Ct(s,u)):r.types;if(i===!1)return o();n={update:o,types:i}}else n=o;return document.startViewTransition(n).updateCallbackDone}return o()},this.invalidate=o=>{let r=this._committed,n=o?.filter,s=this._preloads,u=new Set([...r,...this._cache.values(),...[...s?.values()??[]].flat(),...this._tx?.[3]??[]].filter(c=>!n||n(c)).map(c=>c.id)),i=[];for(let[c,f]of s??[])f.some(d=>u.has(d.id))&&(s.delete(c),i.push(c));let l=a(c=>{if(u.has(c.id)){let f=this.routesById[c.routeId],d={...c,invalid:!0,...(o?.forcePending||c.status==="error"||c.status==="notFound")&&bn(f)?{status:"pending",error:void 0}:void 0};return c._flight=void 0,d}return c},"invalidate");this._committed=r.map(l);for(let[c,f]of this._cache)u.has(c)&&(f.invalid=!0,o?.forcePending&&(f.status="pending"));for(let c of u)this._flights?.delete(c);for(let c of i)c.abort();return this.shouldViewTransition=!1,this.load({sync:o?.sync})},this.resolveRedirect=o=>{let r=o.headers.get("Location");if(!o.options.href||o.options._builtLocation){let n=(o.options._builtLocation??this.buildLocation(o.options)).publicHref||"/";o.options.href=n,o.headers.set("Location",n)}else if(r)try{let n=new URL(r);if(this.origin&&n.origin===this.origin){let s=n.pathname+n.search+n.hash;o.options.href=s,o.headers.set("Location",s)}}catch{}if(o.options.href&&!o.options._builtLocation&&it(o.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return o.headers.get("Location")||o.headers.set("Location",o.options.href),o},this.clearCache=o=>{let r=this._cache,n=this._preloads,s=o?.filter,u=[],i=[];for(let[c,f]of r)(!s||s(f))&&(i.push(c),u.push(f));let l=[];for(let[c,f]of n??[])(!s||f.some(s))&&(l.push(c),u.push(...f));for(let c of i)r.delete(c);for(let c of l)n.delete(c);for(let c of u){let f=c._flight;c._flight=void 0,f&&!--f[2]&&(this._flights?.get(c.id)===f&&this._flights.delete(c.id),l.push(f[1]))}for(let c of l)c.abort()},this.loadRouteChunk=Lt,this.preloadRoute=o=>no(this,o),this.matchRoute=(o,r)=>{let n={...o,to:o.to?this.resolvePathWithBase(o.from||"",o.to):void 0,params:o.params||{},leaveParams:!0},s=this.buildLocation(n),u=this.stores.status.get()==="pending";if(r?.pending&&!u)return!1;let i=r?.pending??!u?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),l=nn(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,i.pathname,this.processedTree);return!l||o.params&&!Q(l.rawParams,o.params,{partial:!0})?!1:r?.includeSearch??!0?Q(i.search,s.search,{partial:!0})?l.rawParams:!1:l.rawParams},this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??vn,parseSearch:t.parseSearch??gn,protocolAllowlist:t.protocolAllowlist??We}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:e,processedTree:o}){this.routesById=t,this.routesByPath=e,this.processedTree=o;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(t){let e=this.routeBranchCache.get(t);return e||(e=je(t),this.routeBranchCache.set(t,e)),e}matchRoutesInternal(t,e){let[o,r,n]=this.getMatchedRoutes(t.pathname),s=o,u=!1;(n?n.path!=="/"&&r["**"]:Y(t.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:u=!0);let i=u?rs(this.options.notFoundMode,s):void 0,l=new Array(s.length),c=this._committed,f=a((h,m)=>{let g=c[m];return g?.routeId===h.id?g:h===this.options.notFoundRoute?c.find(p=>p.routeId===h.id):void 0},"previousAt"),d;for(let h=0;h<s.length;h++){let m=s[h],g=l[h-1],p,v,S;{let D=g?.search??t.search,wt=g?._strictSearch??void 0;try{let rt=ve(m.options.validateSearch,{...D})??void 0;p={...D,...rt},v={...wt,...rt}}catch(rt){let re=rt;if(rt instanceof Yt||(re=new Yt(rt.message,{cause:rt})),e?.throwOnError)throw re;p=D,v={},S=re}}let y="",w="";try{y=m.options.loaderDeps?.({search:p})??"",w=y&&JSON.stringify(y)||""}catch(D){if(e?.throwOnError)throw D;S??=D}let{interpolatedPath:R,usedParams:L}=he({path:m.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),x=m.id+R+w,_=f(m,h),b=this._cache.get(x)??(_?.id===x?_:void 0);d=b?._strictParams??Object.assign(L,d);let P;if(!b)try{Ln(m,d)}catch(D){if(K(D)||Jt(D)?P=D:P=new kn(D.message,{cause:D}),e?.throwOnError)throw P}let E=_?"stay":"enter",C;if(b)C={...b,cause:E,search:_?pt(_.search,p):pt(b.search,p),_strictSearch:v,searchError:S};else{let D=bn(m)?"pending":"success";C={id:x,ssr:m.options.ssr,index:h,routeId:m.id,params:_?.params??d,_strictParams:d,pathname:R,updatedAt:Date.now(),search:_?pt(_.search,p):p,_strictSearch:v,searchError:S,status:D,isFetching:!1,error:void 0,paramsError:P,context:{},abortController:e?._controller??new AbortController,cause:E,loaderDeps:_?st(_.loaderDeps,y):y,invalid:!1,preload:!1,staticData:m.options.staticData||{},fullPath:m.fullPath}}let T=i===m.id;C._notFound&&!T&&(C.error=void 0),C._notFound=T,l[h]=C}for(let h=0;h<l.length;h++){let m=l[h];m.params=m.cause==="stay"?pt(m.params,d):d,e?._controller&&(m.context={})}return l}matchRoutesLightweight(t){let e=dt(this.stores.ids.get()),o=e?this.stores.byRoute.get(e).get():void 0,r=o?.id,n=this.lightweightCache.get(t);if(n&&n[0]===r)return n[1];let[s,u]=this.getMatchedRoutes(t.pathname),i=dt(s),l={...t.search};for(let h of s)try{Object.assign(l,ve(h.options.validateSearch,l))}catch{}let c=o&&o.routeId===i.id&&o.pathname===t.pathname,f;if(c)f=o.params;else{let h=Object.assign(Object.create(null),u);for(let m of s)try{Ln(m,h)}catch{}f=h}let d=[s,i.fullPath,l,f];return this.lightweightCache.set(t,[r,d]),d}},Yt=class extends Error{static{a(this,"SearchParamError")}},kn=class extends Error{static{a(this,"PathParamError")}};function ve(t,e){if(t==null)return{};if("~standard"in t){let o=t["~standard"].validate(e);if(o instanceof Promise)throw new Yt("Async validation not supported");if(o.issues)throw new Yt(JSON.stringify(o.issues,void 0,2),{cause:o});return o.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}a(ve,"validateSearch");function ns(t,e,o,r){let n=[];for(let u of o){let i=u.options;if("search"in i)i.search?.middlewares&&n.push(...i.search.middlewares);else if(i.preSearchFilters||i.postSearchFilters){let c=a(({search:f,next:d})=>{let h=d(i.preSearchFilters?i.preSearchFilters.reduce((m,g)=>g(m),f):f);return i.postSearchFilters?i.postSearchFilters.reduce((m,g)=>g(m),h):h},"legacyMiddleware");n.push(c)}let l=i.validateSearch;if(l){let c=a(({search:f,next:d,meta:h})=>{let m=d(f);if(r)try{let g=ve(l,m);if(h&&g)for(let p in g)p in m||(h.defaulted||=new Map).set(p,g[p]);return{...m,...g}}catch{}return m},"validate");n.push(c)}}let s=a((u,i,l)=>{if(u>=n.length){if(!e.search)return{};if(e.search===!0)return i;let f=J(e.search,i);return l&&(l.explicit=f),f}let c=a((f,d)=>{if(d){let h=l||{};return{search:s(u+1,f,h),meta:h}}return s(u+1,f,l)},"next");return n[u]({search:i,next:c,meta:l})},"applyNext");return s(0,t)}a(ns,"applySearchMiddleware");function rs(t,e){if(t!=="root"){let o;for(let r=e.length-1;r>=0;r--){let n=e[r];if(n.options.notFoundComponent)return n.id;o||=n.children&&n.id}if(o)return o}return tt}a(rs,"findGlobalNotFoundRouteId");function Cn(t,e){return t===!1||t===null?Object.create(null):(t??!0)===!0?e:Object.assign(e,J(t,e))}a(Cn,"resolveNextParams");function Ln(t,e){let o=t.options.params?.parse??t.options.parseParams;o&&Object.assign(e,o(e))}a(Ln,"extractStrictParams");function ro(t,e){return t.options[e]?.preload?.()}a(ro,"preloadComponent");function ss(t,e){let o=ro(t,"component"),r=ro(t,"pendingComponent"),n=e&&r?r.then(e):r;return e&&!r&&e(),o&&n?Promise.all([o,n]).then(()=>{}):o??n}a(ss,"loadComponents");function Lt(t,e,o){let r=a(()=>e===!1?void 0:e?ro(t,e):ss(t,o),"afterLazy"),n=t._lazy;if(n)return n===!0?r():n.then(r);if(!t.lazyFn)return r();let s=t.lazyFn().then(u=>{{let{id:i,...l}=u.options;Object.assign(t.options,l),t._lazy=!0}},u=>{throw t._lazy=void 0,u});return t._lazy=s,s.then(r)}a(Lt,"loadRouteChunk");function Fn(t){let e=t.findIndex(o=>o.status!=="success"||o._notFound)+1;return e&&e<t.length?t.slice(0,e):t}a(Fn,"_getRenderedMatches");var at=0,_t=1,_e=2,et=3,kt=4;function Zt(t){return typeof t[0]=="number"}a(Zt,"isControl");function St(t,e){return e.aborted?Promise.race([Promise.reject(e),t]):new Promise((o,r)=>{let n=a(()=>r(e),"abort");e.addEventListener("abort",n,{once:!0}),Promise.resolve(t).then(o,r).finally(()=>e.removeEventListener("abort",n))})}a(St,"waitFor");function It(t,e){return t.routesById[e.routeId]}a(It,"getRoute");function Qt(t,e,o){return Jt(t)?[et,t]:K(t)?(t.routeId||=o,[_e,t]):(e&&typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),e?[_t,t]:[at,t])}a(Qt,"normalize");function An(t,e){let o=Qt(e,!0,t.id);if(o[0]!==_t)return o;try{t.options.onError?.(o[1])}catch(r){o=Qt(r,!0,t.id)}return o}a(An,"normalizeError");function Xt(t,e,o){return o[0].signal.aborted||!o[2]()?(o[0].abort(),[kt]):An(t,e)}a(Xt,"normalizeLaneError");function $n(t,e){return o=>t.navigate({...o,_fromLocation:e})}a($n,"navigateFrom");async function is(t,e,o,r,n,s){let[u,i]=e,l=o[0].signal,c=!!o[4];for(let f=o[7]??0;f<r;f++){let d=i[f],h=It(t,d);d.abortController=o[0];let m=i[f-1]?.context??t.options.context??{},g={params:d.params,location:u,navigate:$n(t,u),buildLocation:t.buildLocation,cause:c?"preload":d.cause,abortController:o[0],preload:c,matches:i,routeId:h.id},p=m;try{let R=d._ctx;!R&&h.options.context&&(R=d._ctx=h.options.context({...g,deps:d.loaderDeps,context:m})||{}),p={...m,...R},d.context=p}catch(R){return ut(t,d),[f,Xt(h,R,o)]}if(l.aborted||!o[2]())return o[0].abort(),[f,[kt]];let v=d.paramsError??d.searchError;if(v!==void 0)return ut(t,d),[f,Xt(h,v,o)];let S=h.options.beforeLoad;if(!S)continue;let y={...g,search:d.search,context:p,...t.options.additionalContext},w=d.status;w==="success"&&f>=s&&(d.status="pending"),o[8]?.();try{te(t,d,"beforeLoad",o[0]);let R=await St(S(y),l);if(!o[2]())return o[0].abort(),[f,[kt]];let L=Qt(R,!1,h.id);if(L[0]!==at)return ut(t,d),[f,L];d.context={...p,...R}}catch(R){return ut(t,d),[f,Xt(h,R,o)]}finally{w==="success"&&d.status==="pending"&&(d.status="success"),te(t,d,!1,o[0])}}n()}a(is,"contextualize");function ao(t,e,o){if(!(!o||--o[2])){if(t._flights?.get(e.id)===o){let r=t._tx;if(r&&!r[0].signal.aborted&&!r[3].includes(e)&&r[3].some(n=>n.id===e.id)&&r[3].some(n=>n.isFetching==="beforeLoad"))return;t._flights.delete(e.id)}return o[1]}}a(ao,"releaseOwnedFlight");function ut(t,e){let o=e._flight;e._flight=void 0,ao(t,e,o)?.abort()}a(ut,"releaseFlight");function q(t,e,o,r){let n=[];for(let s of e)if(!o?.includes(s)){let u=s._flight;if(s._flight=void 0,r&&u?.[2]===1&&t._flights?.get(s.id)===u&&o?.some(i=>i.id===s.id))u[2]=0;else{let i=ao(t,s,u);i&&n.push(i)}}for(let s of n)s.abort()}a(q,"transferMatchResources");function co(t){for(let e of t){let o=e._flight;o&&o[2]++}}a(co,"acquireMatchResources");function te(t,e,o,r){if(e.isFetching=o,r&&t._tx?.[0]!==r)return;let n=t.stores.byRoute.get(e.routeId),s=n?.get();s?.id===e.id&&n.set({...s,isFetching:o})}a(te,"setFetching");function Bn(t,e,o,r,n,s,u){let i=e[0];return{params:o.params,location:i,navigate:$n(t,i),cause:u?"preload":o.cause,abortController:n,preload:u,deps:o.loaderDeps,parentMatchPromise:s,context:o.context,route:r,...t.options.additionalContext}}a(Bn,"getLoaderContext");async function Tn(t,e,o,r,n,s,u,i){let l=i.signal;if(l.aborted)return[kt];if(!n)return[at,void 0];let c=o._flight;te(t,o,"loader",i);try{if(!c){let f=new AbortController;c=[Promise.resolve().then(()=>n(Bn(t,e,o,r,f,s,u))).then(d=>Qt(d,!1,r.id),d=>Qt(d,!0,r.id)).then(d=>(d[0]!==at&&t._flights?.get(o.id)===c&&(t._flights.delete(o.id),c[2]||f.abort()),d[0]===_t&&c[2]?An(r,d[1]):d)),f,1],(t._flights??=new Map).set(o.id,c)}return o._flight=c,o.abortController=c[1],await St(c[0],l)}catch(f){if(f!==l)throw f;return ut(t,o),[kt]}finally{te(t,o,!1,i)}}a(Tn,"loadResource");function Mn(t,e,o){e[0]===at?(t.loaderData=e[1],t.error=void 0,t.status="success",t.invalid=!1,t.updatedAt=Date.now(),t.preload=o):e[0]!==et&&(t.status="success",t.error=void 0,t.invalid=!0)}a(Mn,"settleInto");function as(t,e,o){let r=t._cache.get(e.id);if(r!==o||t._committed.some(s=>s.id===e.id&&s._flight===e._flight))return;let n={...e,_notFound:void 0,context:{}};n._flight&&n._flight[2]++,t._cache.set(e.id,n),r&&ut(t,r)}a(as,"cacheLoaderMatch");function On(t,e){return e[0]===_t||e[0]===_e?{...t,status:e[0]===_t?"error":"notFound",error:e[1],_flight:void 0}:t}a(On,"getParentSnapshot");function cs(t,e,o,r,n,s,u){let i=e[1][o],l=It(t,i),c=!!s[4],f=c?t._cache.get(i.id):void 0,d,h=!1,m;try{if(i.status==="success"&&(d=l.options.shouldReload,typeof d=="function"&&(d=d(Bn(t,e,i,l,s[0],n,c))),s[2]()||(s[0].abort(),m=[kt])),!m)if(i.status!=="success")h=!0;else{let P=s[4]||i.preload?l.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:l.options.staleTime??t.options.defaultStaleTime??0;h=!!(i.invalid||d||d===void 0&&Date.now()-i.updatedAt>=P&&(s[6]||i.cause==="enter"||s[3].some(E=>E.routeId===i.routeId&&E.id!==i.id)))}}catch(P){i.invalid=!0,ut(t,i),m=Xt(l,P,s)}let g=l.options.loader,p=typeof g=="function"?g:g?.handler,v=(!c||l.options.preload!==!1)&&g?t._flights?.get(i.id):void 0;v===i._flight||m?v=void 0:v&&!h&&!c&&d===void 0?h=!0:h||(v=void 0);let S=!!(g&&h&&i.status==="success"&&!c&&!s[5]&&((typeof g=="function"?void 0:g?.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),y=h&&(!c||l.options.preload!==!1),w=y&&!S&&(i.status!=="success"||!!g),R=l.lazyFn&&l._lazy!==!0?s[8]:void 0;if(y&&!g&&(i.invalid=!1,i.updatedAt=Date.now()),v&&v[2]++,w){let P=i._flight;i._flight=v,ao(t,i,P)?.abort(),i.status==="success"&&o>=u&&(i.status="pending"),s[8]?.()}y||(i.isFetching=!1);let L=(m?Promise.resolve(m):w?Tn(t,e,i,l,p,n,c,s[0]):Promise.resolve([at,i.loaderData])).then(P=>(w&&(Mn(i,P,c),P[0]===at&&(c&&g&&!s[0].signal.aborted&&as(t,i,f),i.status="pending")),P)),x=St(Promise.resolve().then(()=>Lt(l,void 0,R)),s[0].signal).then(()=>{},P=>[o,Xt(l,P,s)]).then(P=>L.then(E=>(w&&!P&&E[0]===at&&i.status==="pending"&&s[2]()&&(i.status="success",s[8]?.()),P)));if(r.push([o,L,x]),!S)return L.then(P=>On(i,P));let _={...i,status:"pending",preload:!1,_flight:v};i.invalid=!1,i.isFetching="loader";let b=Tn(t,e,_,l,p,n,!1,s[0]).then(P=>(i.isFetching=!1,Mn(_,P,!1),P));return(e[2]??=[]).push([o,b,x,_]),b.then(P=>On(_,P))}a(cs,"createLoaderTask");async function so(t,e,o,r,n=0){let s=o?.[1][1],u=s?.routeId?e.findIndex(i=>i.routeId===s.routeId):o?.[0]??e.length-1;u<0&&(u=0);for(let i=u;i>=0;i--){let l=It(t,e[i]),c=Lt(l,!1);if(c)try{await St(c,r)}catch(f){if(f===r)throw f}if(l.options.notFoundComponent)return i}return s?.routeId?u:n}a(so,"getNotFoundBoundary");function Bt(t,e){e[2]&&(q(t,e[2].map(o=>o[3])),e[2]=void 0)}a(Bt,"discardBackground");async function Nn(t,e,o,r){let n;try{await Promise.all(t.map(s=>s[1].then(async u=>{let i=s[0];if(!(r&&i>=await r)){if(u[0]>=et)throw[i,u];!n&&u[0]!==at&&(n=[i,u],await Promise.all((o??[]).map(l=>{if(!(l[0]<=i))return l[1].then(c=>{if(c[0]===et)throw[l[0],c]})})))}})))}catch(s){return s}return e??n}a(Nn,"settleTasks");async function Un(t,e,o,r,n,s,u){let i=e[1],l=await s,c=!1,f=i.findIndex(g=>g._notFound),d=a(g=>g[1][0]===_e?so(t,i,g,r.signal):g[0],"boundaryOf"),h=f<0?i.length:f;if((l?.[1][0]??0)>=et)h=0;else if(l){h=l[2]??=await d(l);for(let g of o){if(g[0]>=h)break;let p=await g[1];if(p[0]!==at&&p[0]<et&&!("loaderData"in i[g[0]])){l=[g[0],p],h=l[2]=await d(l);break}}}for(let g of o){if(g[0]>=h)break;let p=await g[2];if(p){l=p;break}}if((l?.[1][0]??0)>=et){let g=l[1];if(g[0]!==et||g[1].options.reloadDocument||n<20)return Bt(t,e),g;c=!0,l=[0,[_t,new Error("Too many redirects")]]}let m=l?l[2]??await d(l):f;if(m>=0){let g=l?.[1],p=g?.[0],v=i[m],S=g?.[1],y=a(()=>{g&&(v._notFound=void 0,p===_t?v.status="error":(S.routeId=v.routeId,v.routeId===t.routeTree.id?(v.status="success",v._notFound=!0):v.status="notFound"),v.error=S,v.isFetching=!1)},"install");y();let w=It(t,v);try{await St(g?Promise.resolve().then(()=>Lt(w,p===_t?"errorComponent":"notFoundComponent")):Promise.all([Lt(w),Lt(w,"notFoundComponent")]),r.signal)}catch(R){if(R===r.signal)return Bt(t,e),[kt]}g?c&&(r.abort(),await Promise.all([...o.map(R=>R[1]),...o.map(R=>R[2]),...(e[2]??[]).map(R=>R[1])]),Bt(t,e),q(t,i),y()):(v.status="success",u?.())}return e}a(Un,"reduceLane");async function Vn(t,e,o,r=0,n=e[1].length){let s=e[1];for(let u=r;u<n;u++){let i=s[u],l=It(t,i).options;if(l.head||l.scripts)try{let c={ssr:t.options.ssr,matches:s,match:i,params:i.params,loaderData:i.loaderData},[f,d]=await St(Promise.all([l.head?.(c),l.scripts?.(c)]),o);i.meta=f?.meta,i.links=f?.links,i.headScripts=f?.scripts,i.styles=f?.styles,i.scripts=d}catch(c){if(c===o)break;console.error(c)}if(i.status!=="success"||i._notFound)break}return e}a(Vn,"projectLane");async function Wn(t,e,o,r){let n=[e,o],s=t.stores.matches.get(),u=o.findIndex(p=>p._notFound);if(t.options.notFoundMode!=="root"&&u>=0){let p=await so(t,n[1],void 0,r[0].signal,u);p!==u&&(o[u]._notFound=void 0,o[p]._notFound=!0),u=p}let i=u<0?o.length:u+1,l=0;for(;l<i&&l!==u;){let p=o[l],v=r[3][l],S=s[l];if(v?.id!==p.id||v.status!=="success"||v._notFound||p.preload||S?.id!==p.id||S.status!=="success"||S._notFound)break;l++}let c=[],f=r[7]??0,d=f?Promise.resolve(n[1][f-1]):void 0,h=a(()=>{for(let p=f;p<i&&!r[0].signal.aborted;p++)d=cs(t,n,p,c,d,r,l)},"planSuccessfulLane"),m=await is(t,n,r,i,h,l);if(m&&(r[5]=!0,i=m[0],m[1][0]===_e?(m[2]=await so(t,n[1],m,r[0].signal),i=Math.min(i,m[2]+1)):m[1][0]>=et&&(i=0),h()),r[2]()&&!r[4]){let p=[];for(let[v,S]of t._flights??[])S[2]||(t._flights.delete(v),p.push(S[1]));for(let v of p)v.abort()}let g;try{let p=Un(t,n,c,r[0],r[1],Nn(c,m,n[2]),r[8]);n[2]?.length&&(n[3]=Nn(n[2],void 0,void 0,p.then(v=>Zt(v)?0:Fn(v[1]).length,()=>0))),g=await p}catch(p){throw Bt(t,n),p}return Zt(g)?g:Vn(t,g,r[0].signal,r[7]===g[1].length?r[7]:0)}a(Wn,"executeClientLane");function io(t,e){if(t._tx!==e)return;let o=t._pending,r=!1,n=o?.[0][3][o[1]]?.id;o?.[0]!==e&&(o&&e[3][o[1]]?.id===n?(o[0]=e,r=!0):(clearTimeout(o?.[3]),t._pending=o=void 0));let s=e[3],u=t.stores.matches.get(),i=-1,l,c,f,d=!1;for(let p=0;p<s.length;p++){let v=s[p],S=v.status==="success";if(d=u[p]?.id===v.id&&u[p]?.status==="pending",S&&!d)continue;let y=It(t,v);if(l=S&&d||v.invalid?0:y.options.pendingMs??t.options.defaultPendingMs,f=y.options.pendingComponent??t.options.defaultPendingComponent,!f||typeof l!="number"||l===1/0)return;i=p,c=y.options.pendingMinMs??t.options.defaultPendingMinMs??0;break}if(i<0)return;let h=s[i].id;if((!o||o[1]!==i||n!==h)&&(clearTimeout(o?.[3]),t._pending=o=[e,i,d?Date.now()+c:e[4]+l,void 0,d?Promise.resolve(!0):void 0,f]),o[4]&&!r&&o[5]===f)return;if(o[5]=f,!o[4]){clearTimeout(o[3]);let p=o[2]-Date.now();if(p>0){o[3]=setTimeout(()=>io(t,e),p);return}o[2]=0}let m=s.map(p=>({...p,_flight:void 0}));m[i].status="pending";let g=t.startTransition(()=>t.stores.setMatches(m),m).then(p=>(p&&t._pending===o&&o[4]===g&&!o[2]&&(o[2]=Date.now()+c),p));o[4]=g}a(io,"offerPending");function ye(t,e){let o=t._pending;o?.[0]===e&&(clearTimeout(o[3]),t._pending=void 0)}a(ye,"finishPending");function zn(t,e){t._committed=e,t.stores.setMatches(e)}a(zn,"publishMatches");function Dn(t,e){q(t,e[1]),Bt(t,e)}a(Dn,"discardLane");function ls(t,e,o,r){let n=t._committed,s=t._cache;for(let c of o)c.preload=!1,r&&(c._assetEnd=void 0);let u=Fn(o).length,i=new Map,l=Date.now();for(let c of[...n,...s.values()]){if(c.status!=="success"||o.some((d,h)=>d.id===c.id&&(h<u||d.status==="success")))continue;let f=It(t,c);!f.options.loader||l-c.updatedAt>=(c.preload?f.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:f.options.gcTime??t.options.defaultGcTime??3e5)||i.set(c.id,s.get(c.id)===c?c:{...c,_flight:void 0,isFetching:!1,context:{}})}e[3]=[],t._cache=i,zn(t,o),q(t,[...s.values(),...n],[...o,...i.values()]),En(t,n,o,()=>t._tx===e)}a(ls,"commitMatches");async function Et(t,e){let o=t._tx;for(;o&&o!==e;){if(await o[5],t._tx===o)return;o=t._tx}}a(Et,"awaitCurrent");async function Hn(t,e,o){await t.navigate({...o.options,replace:!0,ignoreBlocker:!0,_redirects:e[1]+1})}a(Hn,"followRedirect");function jn(t,e){ye(t,e),e[0].abort(),q(t,e[3]),e[3]=[],t._tx===e&&(t.batch(()=>{t.stores.status.set("idle"),t.stores.setMatches(t._committed)}),t._tx===e&&(t._commitPromise?.resolve(),t._commitPromise=void 0))}a(jn,"restoreCommitted");async function us(t,e,o,r,n){let s=o.map(c=>({...c}));co(s);for(let c of r)ut(t,s[c[0]]),s[c[0]]=c[3];let u=[e[2],s],i;try{i=await Un(t,u,r,e[0],e[1],n)}catch(c){throw q(t,s),c}if(Zt(i)){q(t,s),i[0]===et&&t._tx===e&&t._committed===o&&await Hn(t,e,i[1]);return}let l=await Vn(t,i,e[0].signal);if(t._tx!==e||t._committed!==o){q(t,l[1]);return}for(let c of l[1]){let f=t._cache.get(c.id);f?._flight&&f._flight===c._flight&&(t._cache.delete(c.id),ut(t,f))}zn(t,l[1]),q(t,o,l[1])}a(us,"runBackground");async function fs(t,e,o,r,n,s){let u=[e[0],e[1],()=>t._tx===e&&!!e[3].length,t._committed,void 0,n,o,s,r],i=await Wn(t,e[2],e[3],u);if(Zt(i)){i[0]===et&&t._tx===e?(ye(t,e),q(t,e[3]),e[3]=[],t._tx===e&&await Hn(t,e,i[1])):jn(t,e);return}let l=t._pending;if(l?.[0]===e&&(clearTimeout(l[3]),l[4])){let h=e[0].signal,m=!1;try{m=await St(l[4],h)}catch(g){if(g!==h)throw g}if(m&&t._pending===l&&l[0]===e){let g=l[2]-Date.now();if(g>0){try{await St(new Promise(p=>{l[3]=setTimeout(p,g)}),h)}catch{}clearTimeout(l[3])}}}if(t._tx!==e){ye(t,e),Dn(t,i);return}let c=e[2],f=Ct(c,t.stores.resolvedLocation.get()),d=i[2];await t.startViewTransition(async()=>{if(t._tx!==e){Dn(t,i);return}let h=a(()=>{ye(t,e),ls(t,e,i[1],s),t._tx===e&&(t.emit({type:"onLoad",...f}),t._tx===e&&t.emit({type:"onBeforeRouteMount",...f}))},"commit"),m=await t.startTransition(h,i[1]);if(t._tx!==e){Bt(t,i);return}d?.length&&us(t,e,i[1],d,i[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(c),t.stores.status.set("idle"),t._tx===e&&t.emit({type:"onResolved",...f}),m&&t._tx===e&&t.emit({type:"onRendered",...f})}),t._tx===e&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}a(fs,"runClientTransaction");async function In(t,e){let o=!1,r=o?t.stores.matches.get():void 0,n=t._tx,s=t.stores.resolvedLocation.get(),u=s??t.stores.location.get(),i=t.latestLocation,l=t._pendingLocation,c=l?.href===i.href?l._redirects??0:0,f=t._handoff,d=o?void 0:f?.[0](),h=new AbortController,m=t._preflight;if(t._preflight=h,!o&&!d&&f?.[1](),m?.abort(),h.signal.aborted){await Et(t,n);return}let g=Ct(i,s);if(t.emit({type:"onBeforeNavigate",...g}),h.signal.aborted||t.emit({type:"onBeforeLoad",...g}),h.signal.aborted){await Et(t,n);return}let p=u.href===i.href,v,S=h;try{v=t.matchRoutes(i,{_controller:h}),co(v)}catch(R){if(h.abort(),!Jt(R)){await Et(t),t._commitPromise?.resolve(),t._commitPromise=void 0;return}await t.navigate({...R.options,replace:!0,ignoreBlocker:!0}),await Et(t,n);return}let y=d?f[1](v):void 0;if(y?S=d:d?.abort(),h.signal.aborted){q(t,v),await Et(t,n);return}t._preflight=void 0;let w=[S,c,i,v,Date.now(),Promise.resolve().then(()=>fs(t,w,p,()=>io(t,w),e?.sync,y)).catch(()=>{t._tx===w&&jn(t,w)})];if(t._tx=w,n){for(let R of t.stores.matches.get()){if(t._tx!==w)break;R.isFetching&&te(t,R,!1)}n[0].abort(),q(t,n[3],w[3],!0)}if(t._tx!==w){q(t,w[3]),w[3]=[],await Et(t,w);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(i)}),!s&&!v.some(R=>R._notFound)&&io(t,w);try{await w[5]}finally{await Et(t,w)}}a(In,"loadClientRoute");async function no(t,e,o=0){if(o>20)return;let r=e._builtLocation??t.buildLocation(e),n=t._committed,s=new AbortController,u;try{u=t.matchRoutes(r,{_controller:s}),co(u)}catch(l){s.abort(),K(l)||console.error(l);return}(t._preloads??=new Map).set(s,u);let i;try{let l;try{l=await Wn(t,r,u,[s,o,()=>!0,n,!0])}finally{i=t._preloads.delete(s),q(t,u),s.abort()}if(!Zt(l))return l[1];if(i&&l[0]===et&&!l[1].options.reloadDocument)return no(t,{...l[1].options,_fromLocation:r},o+1)}catch(l){K(l)||console.error(l)}}a(no,"preloadClientRoute");var lo="Error preloading route! \u261D\uFE0F";var Se=class{static{a(this,"BaseRoute")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;let o=this.options,r=!o?.path&&!o?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=tt:this.parentRoute||mt();let n=r?tt:o?.path;n&&n!=="/"&&(n=fe(n));let s=o?.id||n,u=r?tt:Pt([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);n==="__root__"&&(n="/"),u!=="__root__"&&(u=Pt(["/",u]));let i=u==="__root__"?"/":Pt([this.parentRoute.fullPath,n]);this._path=n,this._id=u,this._fullPath=i,this._to=Y(i)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>yn({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}};var uo=class extends Se{static{a(this,"BaseRootRoute")}constructor(t){super(t)}};var Pe=k(B(),1);var O=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(O||{});function Kn({update:t,notify:e,unwatched:o}){return{link:r,unlink:n,propagate:s,checkDirty:u,shallowPropagate:i};function r(c,f,d){let h=f.depsTail;if(h!==void 0&&h.dep===c)return;let m=h!==void 0?h.nextDep:f.deps;if(m!==void 0&&m.dep===c){m.version=d,f.depsTail=m;return}let g=c.subsTail;if(g!==void 0&&g.version===d&&g.sub===f)return;let p=f.depsTail=c.subsTail={version:d,dep:c,sub:f,prevDep:h,nextDep:m,prevSub:g,nextSub:void 0};m!==void 0&&(m.prevDep=p),h!==void 0?h.nextDep=p:f.deps=p,g!==void 0?g.nextSub=p:c.subs=p}function n(c,f=c.sub){let d=c.dep,h=c.prevDep,m=c.nextDep,g=c.nextSub,p=c.prevSub;return m!==void 0?m.prevDep=h:f.depsTail=h,h!==void 0?h.nextDep=m:f.deps=m,g!==void 0?g.prevSub=p:d.subsTail=p,p!==void 0?p.nextSub=g:(d.subs=g)===void 0&&o(d),m}function s(c){let f=c.nextSub,d;t:do{let h=c.sub,m=h.flags;if(m&60?m&12?m&4?!(m&48)&&l(c,h)?(h.flags=m|40,m&=1):m=0:h.flags=m&-9|32:m=0:h.flags=m|32,m&2&&e(h),m&1){let g=h.subs;if(g!==void 0){let p=(c=g).nextSub;p!==void 0&&(d={value:f,prev:d},f=p);continue}}if((c=f)!==void 0){f=c.nextSub;continue}for(;d!==void 0;)if(c=d.value,d=d.prev,c!==void 0){f=c.nextSub;continue t}break}while(!0)}function u(c,f){let d,h=0,m=!1;t:do{let g=c.dep,p=g.flags;if(f.flags&16)m=!0;else if((p&17)===17){if(t(g)){let v=g.subs;v.nextSub!==void 0&&i(v),m=!0}}else if((p&33)===33){(c.nextSub!==void 0||c.prevSub!==void 0)&&(d={value:c,prev:d}),c=g.deps,f=g,++h;continue}if(!m){let v=c.nextDep;if(v!==void 0){c=v;continue}}for(;h--;){let v=f.subs,S=v.nextSub!==void 0;if(S?(c=d.value,d=d.prev):c=v,m){if(t(f)){S&&i(v),f=c.sub;continue}m=!1}else f.flags&=-33;f=c.sub;let y=c.nextDep;if(y!==void 0){c=y;continue t}}return m}while(!0)}function i(c){do{let f=c.sub,d=f.flags;(d&48)===32&&(f.flags=d|16,(d&6)===2&&e(f))}while((c=c.nextSub)!==void 0)}function l(c,f){let d=f.depsTail;for(;d!==void 0;){if(d===c)return!0;d=d.prevDep}return!1}}a(Kn,"createReactiveSystem");function Jn(t,e,o){let r=typeof t=="object",n=r?t:void 0;return{next:(r?t.next:t)?.bind(n),error:(r?t.error:e)?.bind(n),complete:(r?t.complete:o)?.bind(n)}}a(Jn,"toObserver");var fo=[],we=0,{link:qn,unlink:ps,propagate:ms,checkDirty:Yn,shallowPropagate:Gn}=Kn({update(t){return t._update()},notify(t){fo[ho++]=t,t.flags&=~O.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=O.Mutable|O.Dirty,xe(t))}}),Re=0,ho=0,ct,po=0;function mo(t){try{++po,t()}finally{--po||go()}}a(mo,"batch");function xe(t){let e=t.depsTail,o=e!==void 0?e.nextDep:t.deps;for(;o!==void 0;)o=ps(o,t)}a(xe,"purgeDeps");function go(){if(!(po>0)){for(;Re<ho;){let t=fo[Re];fo[Re++]=void 0,t.notify()}Re=0,ho=0}}a(go,"flush");function be(t,e){let o=typeof t=="function",r=t,n={_snapshot:o?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:o?O.None:O.Mutable,get(){return ct!==void 0&&qn(n,ct,we),n._snapshot},subscribe(s){let u=Jn(s),i={current:!1},l=gs(()=>{n.get(),i.current?u.next?.(n._snapshot):i.current=!0});return{unsubscribe:a(()=>{l.stop()},"unsubscribe")}},_update(s){let u=ct,i=e?.compare??Object.is;if(o)ct=n,++we,n.depsTail=void 0;else if(s===void 0)return!1;o&&(n.flags=O.Mutable|O.RecursedCheck);try{let l=n._snapshot,c=typeof s=="function"?s(l):s===void 0&&o?r(l):s;return l===void 0||!i(l,c)?(n._snapshot=c,!0):!1}finally{ct=u,o&&(n.flags&=~O.RecursedCheck),xe(n)}}};return o?(n.flags=O.Mutable|O.Dirty,n.get=function(){let s=n.flags;if(s&O.Dirty||s&O.Pending&&Yn(n.deps,n)){if(n._update()){let u=n.subs;u!==void 0&&Gn(u)}}else s&O.Pending&&(n.flags=s&~O.Pending);return ct!==void 0&&qn(n,ct,we),n._snapshot}):n.set=function(s){if(n._update(s)){let u=n.subs;u!==void 0&&(ms(u),Gn(u),go())}},n}a(be,"createAtom");function gs(t){let e=a(()=>{let r=ct;ct=o,++we,o.depsTail=void 0,o.flags=O.Watching|O.RecursedCheck;try{return t()}finally{ct=r,o.flags&=~O.RecursedCheck,xe(o)}},"run"),o={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:O.Watching|O.RecursedCheck,notify(){let r=this.flags;r&O.Dirty||r&O.Pending&&Yn(this.deps,this)?e():this.flags=O.Watching},stop(){this.flags=O.None,this.depsTail=void 0,xe(this)}};return e(),o}a(gs,"effect");var vo=k(B(),1),Xn=k(Nr(),1);function vs(t,e){return t===e}a(vs,"defaultCompare");function W(t,e,o=vs){let r=(0,vo.useCallback)(u=>{if(!t)return()=>{};let{unsubscribe:i}=t.subscribe(u);return i},[t]),n=(0,vo.useCallback)(()=>t?.get(),[t]);return(0,Xn.useSyncExternalStoreWithSelector)(r,n,n,e,o)}a(W,"useStore");var Zn={};function yo(t,e){let o=Pe.useRef();return r=>{let n=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?o.current=st(o.current,n):n}}a(yo,"useStructuralSharing");function X(t){let e=N(),o=Pe.useContext(t.from?jo:bt),r=t.from??o,n=e.stores.getMatchStore(r);if(!1){let i=n.get();if(!i){(t.shouldThrow??!0)&&mt();return}return t.select?t.select(i):i}let s=yo(t,e),u=W(n,i=>i?s(i):Zn);if(u!==Zn)return u;(t.shouldThrow??!0)&&mt()}a(X,"useMatch");function Ce(t){return X({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:a(e=>t.select?t.select(e.search):e.search,"select")})}a(Ce,"useSearch");var lt=k(B(),1);var Le=lt.useLayoutEffect;function Qn(t,e,o={},r){lt.useEffect(()=>{if(!t.current||r||typeof IntersectionObserver!="function")return;let n=new IntersectionObserver(([s])=>{e(s)},o);return n.observe(t.current),()=>{n.disconnect()}},[e,r,o,t])}a(Qn,"useIntersectionObserver");function tr(t){let e=lt.useRef(null);return lt.useImperativeHandle(t,()=>e.current,[]),e}a(tr,"useForwardedRef");var _o=k(B(),1);function Ee(t){let e=N();return _o.useCallback(o=>e.navigate({...o,from:o.from??t?.from}),[t?.from,e])}a(Ee,"useNavigate");var Ut=k(B(),1),nt=k(Z(),1);function Tt(t){return(0,nt.jsx)(ys,{...t})}a(Tt,"CatchBoundary");var ys=class extends Ut.Component{static{a(this,"CatchBoundaryImpl")}constructor(...t){super(...t),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(t,e){let o=t.getResetKey();return e.error&&e.resetKey!==o?{resetKey:o,error:null}:{resetKey:o}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,e){this.props.onCatch?.(t,e)}render(){let t=this.state.error;return t?Ut.createElement(this.props.errorComponent??So,{error:t,reset:this.reset}):this.props.children}};function So({error:t}){let[e,o]=Ut.useState(!1);return(0,nt.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,nt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,nt.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,nt.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:a(()=>o(r=>!r),"onClick"),children:e?"Hide Error":"Show Error"})]}),(0,nt.jsx)("div",{style:{height:".25rem"}}),e?(0,nt.jsx)("div",{children:(0,nt.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?(0,nt.jsx)("code",{children:t.message}):null})}):null]})}a(So,"ErrorComponent");var Ro=k(B(),1),er=k(Z(),1);function or({children:t,fallback:e=null}){return(0,er.jsx)(Ro.default.Fragment,{children:wo()?t:e})}a(or,"ClientOnly");function wo(){return Ro.default.useSyncExternalStore(_s,()=>!0,()=>!1)}a(wo,"useHydrated");function _s(){return()=>{}}a(_s,"subscribe");function xo(t){return X({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:a(e=>t.select?t.select(e.loaderData):e.loaderData,"select")})}a(xo,"useLoaderData");function bo(t){let{select:e,...o}=t;return X({...o,select:a(r=>e?e(r.loaderDeps):r.loaderDeps,"select")})}a(bo,"useLoaderDeps");function Po(t){return X({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:a(e=>{let o=t.strict===!1?e.params:e._strictParams;return t.select?t.select(o):o},"select")})}a(Po,"useParams");function Co(t){return X({...t,select:a(e=>t.select?t.select(e.context):e.context,"select")})}a(Co,"useRouteContext");var U=k(B(),1);var Ss=k(Z(),1);var ar=k(Or(),1);function Lo(t){let e=U.useRef(t);return Q(e.current,t,{ignoreUndefined:!1})||(e.current=t),e.current}a(Lo,"useValueStable");function Rs(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}a(Rs,"compareLinkState");function ws(t,e,o){if(t?.external)return it(t.href,o)?void 0:t.href;if(!cr(e)&&!(typeof e!="string"||e.indexOf(":")===-1))try{return new URL(e),it(e,o)?void 0:e}catch{}}a(ws,"resolveExternalLink");function xs(t,e,o,r,n,s){if(s)return!1;if(o?.exact){if(!de(t.pathname,e.pathname,r))return!1}else{let u=vt(t.pathname,r),i=vt(e.pathname,r);if(!(u.startsWith(i)&&(u.length===i.length||u[i.length]==="/")))return!1}return(o?.includeSearch??!0)&&!Q(t.search,e.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:o?.includeHash?n&&t.hash===e.hash:!0}a(xs,"resolveIsActive");function bs(t,e){let o=N(),r=tr(e),{activeProps:n,inactiveProps:s,activeOptions:u,to:i,preload:l,preloadDelay:c,preloadIntentProximity:f,hashScrollIntoView:d,replace:h,startTransition:m,resetScroll:g,viewTransition:p,children:v,target:S,disabled:y,style:w,className:R,onClick:L,onBlur:x,onFocus:_,onMouseEnter:b,onMouseLeave:P,onTouchStart:E,ignoreBlocker:C,params:T,search:D,hash:wt,state:rt,mask:re,reloadDocument:Ds,unsafeRelative:Fs,from:As,_fromLocation:$s,...Mt}=t;if(!1){let F=cr(i);if(typeof i=="string"&&!F&&i.indexOf(":")>-1)try{return new URL(i),it(i,o.protocolAllowlist)?{...Mt,ref:r,href:void 0,...v&&{children:v},...S&&{target:S},...y&&{disabled:y},...w&&{style:w},...R&&{className:R}}:{...Mt,ref:r,href:i,...v&&{children:v},...S&&{target:S},...y&&{disabled:y},...w&&{style:w},...R&&{className:R}}}catch{}let I=o.buildLocation({...t,from:t.from}),z=ir(I.maskedLocation?I.maskedLocation.publicHref:I.publicHref,I.maskedLocation?I.maskedLocation.external:I.external,o.history,y),ft=(()=>{if(z?.external)return it(z.href,o.protocolAllowlist)?void 0:z.href;if(!F&&typeof i=="string"&&i.indexOf(":")>-1)try{return new URL(i),it(i,o.protocolAllowlist)?void 0:i}catch{}})(),Ae=(()=>{if(ft)return!1;let $=o.stores.location.get(),H=u?.exact??!1;if(H){if(!de($.pathname,I.pathname,o.basepath))return!1}else{let V=vt($.pathname,o.basepath),j=vt(I.pathname,o.basepath);if(!(V.startsWith(j)&&(V.length===j.length||V[j.length]==="/")))return!1}if((u?.includeSearch??!0)&&$.search!==I.search){let V=!$.search||typeof $.search=="object"&&!ht($.search),j=!I.search||typeof I.search=="object"&&!ht(I.search);if(!(V&&j)&&!Q($.search,I.search,{partial:!H,ignoreUndefined:!u?.explicitUndefined}))return!1}return!u?.includeHash})();if(ft)return{...Mt,ref:r,href:ft,...v&&{children:v},...S&&{target:S},...y&&{disabled:y},...w&&{style:w},...R&&{className:R}};let $e=Ae?J(n,{})??nr:Vt,Be=Ae?Vt:J(s,{})??Vt,Vo=(()=>{let $=w,H=$e.style,V=Be.style;if(!(!$&&!H&&!V))return $&&!H&&!V?$:!$&&H&&!V?H:!$&&!H&&V?V:{...$,...H,...V}})(),Wo=(()=>{let $=R,H=$e.className,V=Be.className;if(!$&&!H&&!V)return"";let j="";return $&&(j=$),H&&(j=j?`${j} ${H}`:H),V&&(j=j?`${j} ${V}`:V),j})();return{...Mt,...$e,...Be,href:z?.href,ref:r,disabled:!!y,target:S,...Vo&&{style:Vo},...Wo&&{className:Wo},...y&&rr,...Ae&&sr}}let Oe=wo(),Cr=Lo(t.search),Lr=Lo(t.params),No=Lo(u),Ht=U.useMemo(()=>t,[o,t.from,t._fromLocation,t.hash,t.to,Cr,Lr,t.state,t.mask,t.unsafeRelative]),Er=U.useCallback(F=>{let I=o.buildLocation({_fromLocation:F,...Ht}),z=ir(I.maskedLocation?I.maskedLocation.publicHref:I.publicHref,I.maskedLocation?I.maskedLocation.external:I.external,o.history,y),ft=ws(z,i,o.protocolAllowlist);return[z?.href,ft,xs(F,I,No,o.basepath,Oe,ft!==void 0)]},[No,y,Oe,Ht,o,i]),[kr,Ne,De]=W(o.stores.location,Er,Rs),se=De?J(n,{})??nr:Vt,ie=De?Vt:J(s,{})??Vt,Do=[R,se.className,ie.className].filter(Boolean).join(" "),Fo=(w||se.style||ie.style)&&{...w,...se.style,...ie.style},[Ir,Ao]=U.useState(!1),$o=U.useRef(!1),Ot=t.reloadDocument||Ne?!1:l??o.options.defaultPreload,Fe=c??o.options.defaultPreloadDelay??0,xt=U.useCallback(()=>{o.preloadRoute(Ht).catch(F=>{console.warn(F),console.warn(lo)})},[o,Ht]);Qn(r,U.useCallback(F=>{F?.isIntersecting&&xt()},[xt]),Cs,!!y||Ot!=="viewport"),U.useEffect(()=>{$o.current||!y&&Ot==="render"&&(xt(),$o.current=!0)},[y,xt,Ot]);let Tr=a(F=>{let I=F.currentTarget.getAttribute("target"),z=S!==void 0?S:I;if(!y&&!Ls(F)&&!F.defaultPrevented&&(!z||z==="_self")&&F.button===0){F.preventDefault(),(0,ar.flushSync)(()=>{Ao(!0)});let ft=o.subscribe("onResolved",()=>{ft(),Ao(!1)});o.navigate({...Ht,replace:h,resetScroll:g,hashScrollIntoView:d,startTransition:m,viewTransition:p,ignoreBlocker:C})}},"handleClick");if(Ne)return{...Mt,ref:r,href:Ne,...v&&{children:v},...S&&{target:S},...y&&{disabled:y},...w&&{style:w},...R&&{className:R},...L&&{onClick:L},...x&&{onBlur:x},..._&&{onFocus:_},...b&&{onMouseEnter:b},...P&&{onMouseLeave:P},...E&&{onTouchStart:E}};let Bo=a(F=>{if(y||Ot!=="intent")return;if(!Fe){xt();return}let I=F.currentTarget;if(ee.has(I))return;let z=setTimeout(()=>{ee.delete(I),xt()},Fe);ee.set(I,z)},"enqueueIntentPreload"),Mr=a(F=>{y||Ot!=="intent"||xt()},"handleTouchStart"),Uo=a(F=>{if(y||!Ot||!Fe)return;let I=F.currentTarget,z=ee.get(I);z&&(clearTimeout(z),ee.delete(I))},"handleLeave");return{...Mt,...se,...ie,href:kr,ref:r,onClick:Wt([L,Tr]),onBlur:Wt([x,Uo]),onFocus:Wt([_,Bo]),onMouseEnter:Wt([b,Bo]),onMouseLeave:Wt([P,Uo]),onTouchStart:Wt([E,Mr]),disabled:!!y,target:S,...Fo&&{style:Fo},...Do&&{className:Do},...y&&rr,...De&&sr,...Oe&&Ir&&Ps}}a(bs,"useLinkProps");var Vt={},nr={className:"active"},rr={role:"link","aria-disabled":!0},sr={"data-status":"active","aria-current":"page"},Ps={"data-transitioning":"transitioning"},ee=new WeakMap,Cs={rootMargin:"100px"},Wt=a(t=>e=>{for(let o of t)if(o){if(e.defaultPrevented)return;o(e)}},"composeHandlers");function ir(t,e,o,r){if(!r)return e?{href:t,external:!0}:{href:o.createHref(t)||"/",external:!1}}a(ir,"getHrefOption");function cr(t){if(typeof t!="string")return!1;let e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}a(cr,"isSafeInternal");var Eo=U.forwardRef((t,e)=>{let{_asChild:o,...r}=t,{type:n,...s}=bs(r,e),u=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!o){let{disabled:i,...l}=s;return U.createElement("a",l,u)}return U.createElement(o,s,u)});function Ls(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}a(Ls,"isCtrlEvent");var ko=k(B(),1),Io=k(Z(),1);var lr=class extends Se{static{a(this,"Route")}constructor(t){super(t),this.useMatch=e=>X({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Co({...e,from:this.id}),this.useSearch=e=>Ce({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Po({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>bo({...e,from:this.id}),this.useLoaderData=e=>xo({...e,from:this.id}),this.useNavigate=()=>Ee({from:this.fullPath}),this.Link=ko.default.forwardRef((e,o)=>(0,Io.jsx)(Eo,{ref:o,from:this.fullPath,...e}))}};function Es(t){return new lr(t)}a(Es,"createRoute");var ur=class extends uo{static{a(this,"RootRoute")}constructor(t){super(t),this.useMatch=e=>X({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Co({...e,from:this.id}),this.useSearch=e=>Ce({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Po({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>bo({...e,from:this.id}),this.useLoaderData=e=>xo({...e,from:this.id}),this.useNavigate=()=>Ee({from:this.fullPath}),this.Link=ko.default.forwardRef((e,o)=>(0,Io.jsx)(Eo,{ref:o,from:this.fullPath,...e}))}};function ks(t){return new ur(t)}a(ks,"createRootRoute");var Bc=k(B(),1);var ke=k(Z(),1);function fr(t){let e=N();if(!1){let r=`not-found-${e.stores.location.get().pathname}-${e.stores.status.get()}`;return(0,ke.jsx)(Tt,{getResetKey:a(()=>r,"getResetKey"),onCatch:a((n,s)=>{if(K(n))t.onCatch?.(n,s);else throw n},"onCatch"),errorComponent:a(({error:n})=>{if(K(n))return t.fallback?.(n);throw n},"errorComponent"),children:t.children})}let o=`not-found-${W(e.stores.location,r=>r.pathname)}-${W(e.stores.status,r=>r)}`;return(0,ke.jsx)(Tt,{getResetKey:a(()=>o,"getResetKey"),onCatch:a((r,n)=>{if(K(r))t.onCatch?.(r,n);else throw r},"onCatch"),errorComponent:a(({error:r})=>{if(K(r))return t.fallback?.(r);throw r},"errorComponent"),children:t.children})}a(fr,"CatchNotFound");function dr(){return(0,ke.jsx)("p",{children:"Not Found"})}a(dr,"DefaultGlobalNotFound");var hr=k(Z(),1);function pr({children:t}){let e=N();return null}a(pr,"ScriptOnce");var Kc=k(B(),1),Ie=k(Z(),1);function Rt(t){return(0,Ie.jsx)(Ie.Fragment,{children:t.children})}a(Rt,"SafeFragment");var Yc=k(B(),1),Te=k(Z(),1);function To(t,e,o){return e.options.notFoundComponent?(0,Te.jsx)(e.options.notFoundComponent,{...o}):t.options.defaultNotFoundComponent?(0,Te.jsx)(t.options.defaultNotFoundComponent,{...o}):(0,Te.jsx)(dr,{})}a(To,"renderRouteNotFound");var gr=k(Z(),1);function mr(t){return null}a(mr,"getScrollRestorationScriptForRouter");function vr(){let t=mr(N());return t?(0,gr.jsx)(pr,{children:t}):null}a(vr,"ScrollRestoration");var G=k(B(),1);var A=k(Z(),1);function oe(t,e){let o=e?.options.pendingComponent??t.options.defaultPendingComponent;return o?(0,A.jsx)(o,{}):null}a(oe,"renderPending");var Is=a((t,e)=>t[0]===e[0]&&t[1]===e[1],"outletMatchSelectionEqual"),Me=G.memo(a(function({routeId:e}){let o=N();return(0,A.jsx)(yr,{router:o,match:W(o.stores.getMatchStore(e),r=>r)})},"MatchImpl"));function yr({router:t,match:e}){let o=t.routesById[e.routeId],r=oe(t,o),n=o.options.errorComponent??t.options.defaultErrorComponent,s=o.options.onCatch??t.options.defaultOnCatch,u=o.isRoot?o.options.notFoundComponent??t.options.notFoundRoute?.options.component:o.options.notFoundComponent,i=e.ssr===!1||e.ssr==="data-only",l=o.options.wrapInSuspense??r??(o.options.errorComponent?.preload||i)?G.Suspense:Rt,c=n?Tt:Rt,f=u?fr:Rt;return(0,A.jsxs)(o.isRoot?o.options.shellComponent??Rt:Rt,{children:[(0,A.jsx)(bt.Provider,{value:e.routeId,children:(0,A.jsx)(l,{fallback:r,children:(0,A.jsx)(c,{getResetKey:a(()=>e,"getResetKey"),errorComponent:n,onCatch:a((d,h)=>{if(K(d))throw d.routeId??=e.routeId,d;s?.(d,h)},"onCatch"),children:(0,A.jsx)(f,{fallback:a(d=>{if(d.routeId??=e.routeId,d.routeId!==e.routeId)throw d;return G.createElement(u,d)},"fallback"),children:i?(0,A.jsx)(or,{fallback:r,children:(0,A.jsx)(_r,{match:e})}):(0,A.jsx)(_r,{match:e})})})})}),null]})}a(yr,"MatchView");var _r=G.memo(a(function({match:e}){let o=N(),r=e.routeId,n=o.routesById[r],s=G.useMemo(()=>{let i=(n.options.remountDeps??o.options.defaultRemountDeps)?.({routeId:r,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[r,e.loaderDeps,e._strictParams,e._strictSearch,n.options.remountDeps,o.options.defaultRemountDeps]),u=G.useMemo(()=>{let i=n.options.component??o.options.defaultComponent;return i?(0,A.jsx)(i,{},s):(0,A.jsx)(Sr,{})},[s,n.options.component,o.options.defaultComponent]);if(e.status==="pending"){if(o._tx)throw o._tx[5];return oe(o,n)}if(e.status==="notFound")return To(o,n,e.error);if(e.status==="error"){if(!1)return(0,A.jsx)((n.options.errorComponent??o.options.defaultErrorComponent)||So,{error:e.error,reset:void 0,info:{componentStack:""}});throw e.error}return u},"MatchInnerImpl")),Sr=G.memo(a(function(){let e=N(),o=G.useContext(bt),r,n,s;if(!1){let i=e.stores.matches.get(),l=i.findIndex(f=>f.routeId===o),c=i[l];r=!!c._notFound,n=c.error,s=i[l+1]?.routeId}else{let i=e.stores.getMatchStore(o);[r,n]=W(i,l=>[!!l._notFound,l.error],Is),s=W(e.stores.ids,l=>l[l.indexOf(o)+1])}if(r)return To(e,e.routesById[o],n);if(!s)return null;let u=(0,A.jsx)(Me,{routeId:s});return o===tt?(0,A.jsx)(G.Suspense,{fallback:oe(e),children:u}):u},"OutletImpl"));var Mo=k(B(),1);function Oo(t,e){let o=t[1];t.length=0,o?.(e)}a(Oo,"settleOwner");function Rr({t}){let e=N(),o=e._rendered??=[],r=void 0;return e.startTransition=(n,s)=>new Promise((u,i)=>{Oo(o,!1),o.push(s,u),t(e),Mo.startTransition(()=>{try{n()}catch(l){o[1]===u&&(o.length=0),i(l)}})}),Le(()=>{let n=e.history.subscribe(e.load);if(r?.current)return n;r&&(r.current=!0),e.updateLatestLocation();let s=e.latestLocation,u=e.buildLocation({to:s.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Y(s.publicHref)!==Y(u.publicHref))return e.commitLocation({...u,replace:!0,ignoreBlocker:!0}),n;let i=e.stores.resolvedLocation.get();return i?.href===s.href&&i.state.__TSR_key===s.state.__TSR_key?o.push(e.stores.matches.get(),l=>{l&&e.emit({type:"onRendered",...Ct(i,i)})}):e._tx||e.load().catch(console.error),n},[e,e.history]),null}a(Rr,"Transitioner");var zt=k(B(),1);var ot=k(Z(),1);function wr(){let t=N(),e=t.routesById[tt],o=oe(t,e),r=t.ssr?Rt:zt.Suspense,n=(0,ot.jsxs)(ot.Fragment,{children:[!!1&&(0,ot.jsx)(Rr,{t:zt.useState()[1]}),(0,ot.jsx)(r,{fallback:o,children:(0,ot.jsx)(Ts,{})})]});return t.options.InnerWrap?(0,ot.jsx)(t.options.InnerWrap,{children:n}):n}a(wr,"Matches");function Ts(){let t=N(),e=t._rendered,o=W(t.stores.matches,u=>e[0]??u),r=o[0],n=r?.routeId;Le(()=>{e[0]===o&&Oo(e,!0)},[e,o]);let s=n?(0,ot.jsx)(Me,{routeId:n}):null;return(0,ot.jsx)(bt.Provider,{value:n,children:t.options.disableGlobalCatchBoundary?s:(0,ot.jsx)(Tt,{getResetKey:a(()=>r,"getResetKey"),onCatch:void 0,children:s})})}a(Ts,"MatchesInner");var xr=a(t=>({createMutableStore:be,createReadonlyStore:be,batch:mo}),"getStoreFactory");var Ms=a(t=>new br(t),"createRouter"),br=class extends oo{static{a(this,"Router")}constructor(t){super(t,xr)}};var Kl=k(B(),1),ne=k(Z(),1);function Pr({router:t,children:e,...o}){ht(o)&&t.update({...t.options,...o,context:{...t.options.context,...o.context}});let r=(0,ne.jsx)(ae.Provider,{value:t,children:e});return t.options.Wrap?(0,ne.jsx)(t.options.Wrap,{children:r}):r}a(Pr,"RouterContextProvider");function Os({router:t,...e}){return(0,ne.jsx)(Pr,{router:t,...e,children:(0,ne.jsx)(wr,{})})}a(Os,"RouterProvider");function Ns(t){let e=N({warn:t?.router===void 0}),o=t?.router||e;if(!1){let r=o.stores.__store.get();return t?.select?t.select(r):r}return W(o.stores.__store,yo(t,o))}a(Ns,"useRouterState");export{to as a,es as b,N as c,Ce as d,Ee as e,Es as f,ks as g,Sr as h,Ms as i,Os as j,Ns as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as h}from"./chunk-BQK2C2Z4.js";import{a as e}from"./chunk-R5ZTCHCE.js";var m=e((i,o,s)=>h(i,t=>{o(t.height>0?t:{height:s,width:t.width})}),"s");export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as P,c as v,d as I,f as g}from"./chunk-NIUA7EHL.js";import{f as S,g as q,h as k,o as w}from"./chunk-BKM6PMSO.js";import{a as i,d as D,e as N,f as R}from"./chunk-R5ZTCHCE.js";var _=D(R(),1);var p=D(N(),1);var T=300,d=i(t=>typeof t=="string"?t===""?void 0:t:typeof t=="number"||typeof t=="boolean"?String(t):void 0,"l"),c=i(t=>t.filter(e=>e!==void 0).join(" "),"d"),$={deleteRows:i(t=>c([d(t.table),Array.isArray(t.ids)?`${String(t.ids.length)} rows`:void 0]),"deleteRows"),facetColumn:i(t=>c([d(t.table),d(t.column)]),"facetColumn"),lintSql:i(()=>"sql","lintSql"),readTablePage:i(t=>c([d(t.table),Array.isArray(t.filters)&&t.filters.length>0?`${String(t.filters.length)} filters`:void 0,typeof t.search=="string"&&t.search!==""?"search":void 0,typeof t.limit=="number"?`limit ${String(t.limit)}`:void 0]),"readTablePage"),runMigration:i(t=>c([d(t.id),d(t.direction),t.dryRun===!0?"dry-run":void 0]),"runMigration"),runSql:i(t=>typeof t.sql=="string"?`${String(t.sql.length)} chars`:"","runSql"),schemaVersion:i(t=>typeof t.hash=="string"?t.hash.slice(0,8):"","schemaVersion"),writeRow:i(t=>c([d(t.table),"1 row"]),"writeRow")},E="__lunora_admin__:",F=i((t,e)=>{let r=t.startsWith(E)?t.slice(E.length):t,s=$[r];if(s!==void 0)return s(e);let o=Object.keys(e);return o.length===0?"":o.join(", ")},"j"),C=i(t=>{if(Array.isArray(t))return t.length;if(!(typeof t!="object"||t===null)){for(let e of Object.values(t))if(Array.isArray(e))return e.length}},"x"),A=class{static{i(this,"C")}entries=[];listeners=new Set;nextSeq=1;getSnapshot=i(()=>this.entries,"getSnapshot");subscribe=i(e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),"subscribe");start(e,r,s){return this.append(e,r,s,"call","pending")}startSubscription(e,r,s){return this.append(e,r,s,"subscription","live")}recordPush(e){if(this.listeners.size===0){let r=this.entries.find(s=>s.seq===e);r!==void 0&&(r.pushes=(r.pushes??0)+1);return}this.patch(e,r=>({...r,pushes:(r.pushes??0)+1}))}failSubscription(e,r){this.patch(e,s=>({...s,error:r,status:"error"}))}endSubscription(e){this.patch(e,r=>r.status==="error"?r:{...r,durationMs:Date.now()-r.startedAt,status:"closed"})}lastErrorSeq(){return this.entries.findLast(e=>e.status==="error")?.seq}settle(e,r){this.patch(e,s=>({...s,durationMs:Date.now()-s.startedAt,...r.error===void 0?{resultCount:C(r.result),status:"ok"}:{error:r.error,status:"error"}}))}clear(){this.entries=[],this.emit()}append(e,r,s,o,a){let u=this.nextSeq;this.nextSeq+=1;let l={functionPath:e,kind:o,seq:u,shardKey:s,startedAt:Date.now(),status:a,summary:F(e,r),...o==="subscription"?{pushes:0}:{}},n=[...this.entries,l];return this.entries=n.length>T?n.slice(n.length-T):n,this.emit(),u}patch(e,r){let s=this.entries.findIndex(o=>o.seq===e);s!==-1&&(this.entries=this.entries.with(s,r(this.entries[s])),this.emit())}emit(){for(let e of this.listeners)e()}},f=new A,j=i((t,e,r)=>["lunora-admin",t,e,r.trim()],"w"),x=i((t,e)=>[...t,e],"E");function J(t,e,r={}){let s=g(),{enabled:o=!0,keepPreviousData:a=!1,staleTime:u=0}=r,l=x(t,s.clientIdentifier()),n=I({enabled:o,queryFn:e,placeholderData:a?P:void 0,queryKey:l,staleTime:u});return{data:n.data,error:n.error?k(n.error):n.error,errorSource:n.error??void 0,isLoading:n.isLoading,liveError:void 0,refetch:i(()=>{w(n.refetch())},"refetch")}}i(J,"F");function W(t,e,r={}){let s=g(),o=v(),{enabled:a=!0,keepPreviousData:u=!1,live:l=!1,shardKey:n="",staleTime:K}=r,m=j(t,e,n),L=J(m,()=>s.query(S(t),e,q(n)),{enabled:a,keepPreviousData:u,staleTime:K??(l?Number.POSITIVE_INFINITY:0)}),[O,y]=(0,p.useState)(void 0),Q=JSON.stringify(m);return(0,p.useEffect)(()=>{if(!a||!l)return;y(void 0);let b=f.startSubscription(t,e,n),M=s.subscribe(S(t),e,h=>{f.recordPush(b),y(void 0),o.setQueryData(x(m,s.clientIdentifier()),h)},{...q(n),onError:i(h=>{f.failSubscription(b,h.message),y(h.message)},"onError")});return()=>{f.endSubscription(b),M()}},[Q,a,l]),{...L,liveError:a&&l?O:void 0}}i(W,"J");var Y=i(()=>{let t=(0,_.c)(2),e=v(),r;return t[0]!==e?(r=i((s,o,a)=>{let u=o===void 0?["lunora-admin",s]:j(s,o,a??"");w(e.invalidateQueries({queryKey:u}))},"r"),t[0]=e,t[1]=r):r=t[1],r},"U");export{f as a,J as b,W as c,Y as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n,d as v,f as N,g as z,i as k}from"./chunk-R5ZTCHCE.js";var y=v(N(),1);var u=v(z(),1);var C={dialog:"fixed inset-0 z-[1000] flex justify-center bg-black/20 pt-[10vh]",drawer:"fixed inset-0 z-[1000] flex justify-end bg-black/20"},I={dialog:"flex h-fit w-[min(28rem,92vw)] flex-col gap-3 rounded-lg border border-border bg-background p-4 shadow-xl",drawer:"flex h-full w-[min(34rem,100vw)] flex-col gap-4 overflow-auto border-l border-border bg-background p-4 shadow-xl"},A=n(j=>{let e=(0,y.c)(18),{className:i,children:c,label:b,onClose:r,panelTestId:f,testId:g,variant:h}=j,o;e[0]!==r?(o=n(s=>{s.target===s.currentTarget&&r()},"r"),e[0]=r,e[1]=o):o=e[1];let m=o,t;e[2]!==r?(t=n(s=>{s.key==="Escape"&&r()},"a"),e[2]=r,e[3]=t):t=e[3];let p=t,x=C[h],w=I[h],l;e[4]!==i||e[5]!==w?(l=k(w,i),e[4]=i,e[5]=w,e[6]=l):l=e[6];let a;e[7]!==c||e[8]!==b||e[9]!==f||e[10]!==l?(a=(0,u.jsx)("div",{"aria-label":b,className:l,"data-testid":f,role:"dialog",children:c}),e[7]=c,e[8]=b,e[9]=f,e[10]=l,e[11]=a):a=e[11];let d;return e[12]!==m||e[13]!==p||e[14]!==x||e[15]!==a||e[16]!==g?(d=(0,u.jsx)("div",{className:x,"data-testid":g,onClick:m,onKeyDown:p,role:"presentation",children:a}),e[12]=m,e[13]=p,e[14]=x,e[15]=a,e[16]=g,e[17]=d):d=e[17],d},"_");export{A as a};
|