feat(webui): grouped topbar navigation, built from components

Five top-level items instead of eleven flat ones: Dashboard as a link, then
Work, Agent, Events and System as dropdowns, with each item's one-line
description on a hover tooltip. Configuration dissolves into /system/{status,
appearance,tasks,models,repos,advanced} and /settings redirects to the first of
them, so existing bookmarks still land somewhere. Logs gets a nav entry for the
first time.

The bar is composed from named components rather than one file: Brand (Logo,
BrandName), Nav (NavTrigger, NavGroup, NavItem), SearchBar, SupportLink,
ThemeToggle, ProfileDropdown. The nav model reads the route table, so a route
and its nav entry cannot disagree, and a group whose every child is gated off
is dropped while a group left with one child stays a dropdown.

The Go page registry moves with it, which its parse-the-route-table test
enforces.
This commit is contained in:
sam committed 2026-09-20 18:46:11 +10:00
1 parent b3c06de5ee
commit 2bddb9f36a
36 files changed
+925 -24

No files matched your search

+102
View File
@@ -0,0 +1,102 @@
# Dashboard port: what the agent delivers
**Status:** Active working agreement
**Date:** 2026-09-20
**Beads:** `archie-core-tavn` (epic), `archie-core-ocfm` (navigation)
**Reads with:** `docs/prds/vue-migration-checklist.md` (the item-by-item),
`docs/prds/dashboard-navigation-groups.md` (the approved nav design)
This is the standard the port is held to. The checklist says what to port; this
says how, and what counts as done. It exists because the first attempt ported
the flat topbar verbatim and invented a palette, both of which had already been
decided elsewhere.
## The deliverable
The Preact dashboard, rebuilt in Vue 3 with shadcn-vue, feature complete
against the checklist, gate clean, with `ui/dist` rebuilt and committed in the
same commit as the source it was built from.
## Non-negotiables
- **Vue 3 + shadcn-vue (Reka UI, Tailwind v4, Lucide).** A component that
exists in shadcn-vue is not hand-rolled. Add it with the CLI
(`npx shadcn-vue@latest add <name>`), do not paste it in.
- **History routing.** `createWebHistory`, `base: "/"`. No hash routing.
`src/legacy-hash-redirect.ts` handles old `#/path` links and stays.
- **No test port.** 43 Preact test files are deliberately dropped.
`task test:ui` is a `vue-tsc` typecheck. Write a test when there is a real
failure to pin, not to re-assert a port.
- **Do not downgrade TypeScript.** The target is TS 7 native, not TS 5.
- **`ui/dist` is law.** Never hand-edit it, never omit it, never revert it.
- **`task check` is the gate.** Not an assembled substitute for it.
- **Beads, not markdown TODOs**, for anything that outlives the change.
- **Conventional commits**, scoped `feat(webui):`. Commit gate-clean work
without asking. Do not push without being told.
## Componentisation
One component, one job, one file. A surface is composed from named components,
not assembled inside a single large file. The topbar is the worked example and
the required shape:
```
components/topbar/
Topbar.vue composes the header, owns nothing else
Brand.vue Logo + BrandName, links to /
Logo.vue
BrandName.vue
Nav.vue reads the nav model, renders links and groups
NavTrigger.vue the shared top-level control, link or dropdown trigger
NavGroup.vue one dropdown
NavItem.vue one item inside a dropdown, with its tooltip
SearchBar.vue
SupportLink.vue
ThemeToggle.vue
ProfileDropdown.vue
```
The same rule applies to every page ported after it. If a file is doing the
work of four named things, it is four files. Data and behaviour that more than
one component needs lives in `src/lib/`, not passed down through a chain of
props.
## Ordering
Build the navigation restructure during the port, not after it. Porting the
flat eleven-item bar first and restructuring later means writing the topbar
twice and touching the Go route registry twice. The approved design is five
top-level items (Dashboard, Work, Agent, Events, System), items renamed because
their group carries the context, per-item descriptions shown as hover tooltips,
Configuration split into `/system/*`, `/settings` kept as a redirect, and Logs
finally given a nav entry.
## Design authority
- The approved documents win. Where a document decides something, implement it
rather than re-deciding it.
- **Do not invent a visual direction.** Palette, typography and density are the
maintainer's call. A palette change is its own request, never a side effect
of a port.
- Contrast is AA against every surface the foreground lands on, hover states
included. The corrected values (`--fg-subtle`, the dark
`--primary-foreground`) came from a measured failure and must survive.
- `color-scheme` follows the theme so the UA paints controls, scrollbars and
overscroll to match.
## Code style
Comment the non-obvious why: an invariant, a trap, a measurement, a contract
another file depends on. Do not narrate what the code plainly does, do not
explain a choice that was never in question, and do not write migration phase
history into a diff. That history belongs in the commit message.
## Done, per surface
1. Renders with real data against `task dev`, not just typechecks.
2. Keyboard reachable, focus visible, and the nav announces where you are.
3. Works at 1440x900 and at 720px wide, with nothing clipped and no horizontal
page scroll.
4. Empty, loading, failed and unconfigured (501) states all say something true.
A section that cannot load says so; it does not render blank.
5. `task check` passes, `ui/dist` rebuilt, committed together.
+10 -5
View File
@@ -29,15 +29,20 @@ type DashboardPage struct {
var dashboardPages = []DashboardPage{
{Path: "/", Label: "Dashboard", Description: "The control room: what Archie is working on, what needs you, and token spend."},
{Path: "/tasks", Label: "Tasks", Description: "Issues Archie has picked up and where they stand: the work queue."},
{Path: "/logs", Label: "Logs", Description: "The daemon log stream, filterable by level and component."},
{Path: "/workflows", Label: "Workflows", Description: "The routed workflows (bootstrap, implement, tdd, feasibility) and their run history."},
{Path: "/skills", Label: "Skills", Description: "The SKILL.md capabilities Archie can activate."},
{Path: "/curators", Label: "Curators", Description: "The scheduled passes that curate Archie's memory and captures."},
{Path: "/captures", Label: "Event inspector", Description: "Captured inbound events for inspection."},
{Path: "/mappings", Label: "Field mappings", Description: "How inbound event fields map onto internal ones."},
{Path: "/bindings", Label: "Playbook bindings", Description: "How captured events are bound to the workflows they start."},
{Path: "/skills", Label: "Skills", Description: "The SKILL.md capabilities Archie can activate."},
{Path: "/workflows", Label: "Workflows", Description: "The routed workflows (bootstrap, implement, tdd, feasibility) and their run history."},
{Path: "/curators", Label: "Curators", Description: "The scheduled passes that curate Archie's memory and captures."},
{Path: "/logs", Label: "Logs", Description: "The daemon log stream, filterable by level and component."},
{Path: "/channels", Label: "Channels", Description: "Inbound chat and notification channels (e.g. Telegram) and their state."},
{Path: "/settings", Label: "Configuration", Description: "Daemon configuration editable from the dashboard."},
{Path: "/system/status", Label: "Status", Description: "Update state, where the running configuration came from, and the daemon listen address."},
{Path: "/system/appearance", Label: "Appearance", Description: "Dashboard theme and display preferences."},
{Path: "/system/tasks", Label: "Task settings", Description: "Work lifecycle configuration: statuses, operator actions, and budgets."},
{Path: "/system/models", Label: "Models", Description: "Model roles and the providers backing them."},
{Path: "/system/repos", Label: "Repositories", Description: "Repositories Archie watches, and their per-repo gate overrides."},
{Path: "/system/advanced", Label: "Advanced", Description: "Identity, storage and sandboxing, and the dangerous actions."},
}
// DashboardPages returns a copy of the dashboard page registry.
+1 -2
View File
@@ -1,2 +1 @@
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){:root,:host{--shimmer-angle:20deg}*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--scroll-fade-t:0;--scroll-fade-b:0;--scroll-fade-s:0;--scroll-fade-e:0;--scroll-fade-mask:initial;--shimmer-image:initial;--shimmer-text-fill:initial}}}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@layer theme{:root,:host{--font-sans:"Geist Variable", sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-widest:.1em;--radius-md:calc(var(--radius) - 2px);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Geist Variable", sans-serif;--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, Line truncated
@import "https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap";@layer components;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){:root,:host{--shimmer-angle:20deg}*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--scroll-fade-t:0;--scroll-fade-b:0;--scroll-fade-s:0;--scroll-fade-e:0;--scroll-fade-mask:initial;--shimmer-image:initial;--shimmer-text-fill:initial}}}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@layer theme{:root,:host{--font-sans:"Geist Variable", sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--container-xs:20rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--radius-xs:.125rem;--radius-md:calc(var(--radius) - 2px);--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Geist Variable", sans-serif;--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100Line truncated
+6 -1
View File
@@ -1 +1,6 @@
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=window.location.hash;if(e.startsWith(`#/`)){let t=e.slice(1);window.history.replaceState(null,``,t+window.location.search)}function t(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var n={},r=[],i=()=>{},a=()=>!1,o=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),s=e=>e.startsWith(`onUpdate:`),c=Object.assign,l=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,d=(e,t)=>u.call(e,t),f=Array.isArray,p=e=>S(e)===`[object Map]`,m=e=>S(e)===`[object Set]`,h=e=>S(e)===`[object Date]`,g=e=>typeof e==`function`,_=e=>typeof e==`string`,v=e=>typeof e==`symbol`,y=e=>typeof e==`object`&&!!e,b=e=>(y(e)||g(e))&&g(e.then)&&g(e.catch),x=Object.prototype.toString,S=e=>x.call(e),C=e=>S(e).slice(8,-1),w=e=>S(e)===`[object Object]`,T=e=>_(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ee=t(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),E=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},te=/-\w/g,D=E(e=>e.replace(te,e=>e.slice(1).toUpperCase())),ne=/\B([A-Z])/g,O=E(e=>e.replace(ne,`-$1`).toLowerCase()),re=E(e=>e.charAt(0).toUpperCase()+e.slice(1)),ie=E(e=>e?`on${re(e)}`:``),k=(e,t)=>!Object.is(e,t),A=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ae=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},oe=e=>{let t=parseFloat(e);return isNaN(t)?e:t},se,ce=()=>se||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function le(e){if(f(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=_(r)?j(r):le(r);if(i)for(let e in i)t[e]=i[e]}return t}if(_(e)||y(e))return e}var ue=/;(?![^(]*\))/g,de=/:([^]+)/,fe=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function j(e){let t={};return e.replace(fe,e=>e.startsWith(`/*`)?``:e).split(ue).forEach(e=>{if(e){let n=e.split(de);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function pe(e){let t=``;if(_(e))t=e;else if(f(e))for(let n=0;n<e.length;n++){let r=pe(e[n]);r&&(t+=r+` `)}else if(y(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var me=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,he=t(me);me+``;function ge(e){return!!e||e===``}function _e(e,t,n){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=xe(e[i],t[i],n);return r}function ve(e,t,n){if(e.size!==t.size)return!1;let r=Array.from(t),i=new Uint8Array(r.length);for(let t of e){let e=-1;for(let a=0;a<r.length;a++)if(!i[a]&&xe(t,r[a],n)){e=a;break}if(e<0)return!1;i[e]=1}return!0}function ye(e,t,n){let r=p(e),i=p(t);if(r||i||(r=m(e),i=m(t),r||i))return r&&i?ve(e,t,n):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e){let i=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(i&&!a||!i&&a||!xe(e[r],t[r],n))return!1}return String(e)===String(t)}function be(e,t,n,r){n||=[new Map,new Map];let[i,a]=n;if(i.has(e)||a.has(t))return i.get(e)===t&&a.get(t)===e;i.set(e,t),a.set(t,e);let o=r(e,t,n);return i.delete(e),a.delete(t),o}function xe(e,t,n){if(e===t)return!0;let r=h(e),i=h(t);return r||i?r&&i?e.getTime()===t.getTime():!1:(r=v(e),i=v(t),r||i?e===t:(r=f(e),i=f(t),r||i?r&&i?be(e,t,n,_e):!1:(r=y(e),i=y(t),r||i?!r||!i?!1:be(e,t,n,ye):String(e)===String(t))))}var Se=e=>!!(e&&e.__v_isRef===!0),Ce=e=>_(e)?e:e==null?``:f(e)||y(e)&&(e.toString===x||!g(e.toString))?Se(e)?Ce(e.value):JSON.stringify(e,we,2):String(e),we=(e,t)=>Se(t)?we(e,t.value):p(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Te(t,r)+` =>`]=n,e),{})}:m(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Te(e))}:v(t)?Te(t):y(t)&&!f(t)&&!w(t)?String(t):t,Te=(e,t=``)=>v(e)?`Symbol(${e.description??t})`:e,M,Ee=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&M&&(M.active?(this.parent=M,this.index=(M.scopes||(M.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._activeLine truncated
var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var n=window.location.hash;if(n.startsWith(`#/`)){let e=n.slice(1);window.history.replaceState(null,``,e+window.location.search)}function r(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var i={},a=[],o=()=>{},s=()=>!1,c=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),l=e=>e.startsWith(`onUpdate:`),u=Object.assign,d=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},f=Object.prototype.hasOwnProperty,p=(e,t)=>f.call(e,t),m=Array.isArray,h=e=>T(e)===`[object Map]`,g=e=>T(e)===`[object Set]`,_=e=>T(e)===`[object Date]`,v=e=>T(e)===`[object RegExp]`,y=e=>typeof e==`function`,b=e=>typeof e==`string`,x=e=>typeof e==`symbol`,S=e=>typeof e==`object`&&!!e,C=e=>(S(e)||y(e))&&y(e.then)&&y(e.catch),w=Object.prototype.toString,T=e=>w.call(e),E=e=>T(e).slice(8,-1),D=e=>T(e)===`[object Object]`,ee=e=>b(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,te=r(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),ne=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},re=/-\w/g,O=ne(e=>e.replace(re,e=>e.slice(1).toUpperCase())),ie=/\B([A-Z])/g,ae=ne(e=>e.replace(ie,`-$1`).toLowerCase()),k=ne(e=>e.charAt(0).toUpperCase()+e.slice(1)),A=ne(e=>e?`on${k(e)}`:``),j=(e,t)=>!Object.is(e,t),oe=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},se=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ce=e=>{let t=parseFloat(e);return isNaN(t)?e:t},M=e=>{let t=b(e)?Number(e):NaN;return isNaN(t)?e:t},N,le=()=>N||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{},ue=r(`Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol`);function P(e){if(m(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=b(r)?me(r):P(r);if(i)for(let e in i)t[e]=i[e]}return t}if(b(e)||S(e))return e}var de=/;(?![^(]*\))/g,fe=/:([^]+)/,pe=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function me(e){let t={};return e.replace(pe,e=>e.startsWith(`/*`)?``:e).split(de).forEach(e=>{if(e){let n=e.split(fe);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function he(e){let t=``;if(b(e))t=e;else if(m(e))for(let n=0;n<e.length;n++){let r=he(e[n]);r&&(t+=r+` `)}else if(S(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}function ge(e){if(!e)return null;let{class:t,style:n}=e;return t&&!b(t)&&(e.class=he(t)),n&&(e.style=P(n)),e}var _e=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,ve=r(_e);_e+``;function ye(e){return!!e||e===``}function be(e,t,n){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=we(e[i],t[i],n);return r}function xe(e,t,n){if(e.size!==t.size)return!1;let r=Array.from(t),i=new Uint8Array(r.length);for(let t of e){let e=-1;for(let a=0;a<r.length;a++)if(!i[a]&&we(t,r[a],n)){e=a;break}if(e<0)return!1;i[e]=1}return!0}function Se(e,t,n){let r=h(e),i=h(t);if(r||i||(r=g(e),i=g(t),r||i))return r&&i?xe(e,t,n):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e){let i=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(i&&!a||!i&&a||!we(e[r],t[r],n))return!1}return String(e)===String(t)}function Ce(e,t,n,r){n||=[new Map,new Map];let[i,a]=n;if(i.has(e)||a.has(t))return i.get(e)===t&&a.get(t)===e;i.set(e,t),a.set(t,e);let o=r(e,t,n);return i.delete(e),a.delete(t),o}function we(e,t,n){if(e===t)return!0;let r=_(e),i=_(t);return r||i?r&&i?e.getTime()===t.getTime():!1:(r=x(e),i=x(t),r||i?e===t:(r=m(e),i=m(t),r||i?r&&i?Ce(e,t,n,be):!1:(r=S(e),i=S(t),r||i?!r||!i?!1:Ce(e,t,n,Se):String(e)===String(t))))}function Te(e,t){return e.findIndex(e=>we(e,t))}var Ee=e=>!!(e&&e.__v_isRef===!0),De=e=>b(e)?e:e==null?``:m(e)||S(e)&&(e.toString===w||!y(e.toString))?Ee(e)?De(e.value):JSON.stringify(e,Oe,2):String(e),Oe=(e,t)=>Ee(t)?Oe(e,t.value):h(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[ke(t,r)+` =>`]=n,e),{})}:g(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>ke(e))}:x(t)?ke(t):S(Line truncated
`&&(e.tagName===`PRE`||e.tagName===`TEXTAREA`)&&(n=n.slice(1));let{textContent:r}=e;r!==n&&r!==n.replace(/\r\n|\r/g,`
`)&&(bi(e,0)||ui(),e.textContent=t.children)}if(d){if(_||b||!o||f&48){let t=e.tagName.includes(`-`),i=e.namespaceURI.includes(`svg`)?`svg`:e.namespaceURI.includes(`MathML`)?`mathml`:void 0;for(let a in d)if(_&&(a.endsWith(`value`)||a===`indeterminate`)||c(a)&&!te(a)||a[0]===`.`||t&&!te(a)||u&&u.includes(a)){if(_i(e,a,d[a]))continue;r(e,a,null,d[a],i,n)}}else if(d.onClick)r(e,`onClick`,null,d.onClick,void 0,n);else if(f&4&&en(d.style))for(let e in d.style)d.style[e]}let x;(x=d&&d.onVnodeBeforeMount)&&As(x,n,t),h&&hr(t,null,n,`beforeMount`),((x=d&&d.onVnodeMounted)||h||l)&&ts(()=>{x&&As(x,n,t),l&&g.enter(e),h&&hr(t,null,n,`mounted`)},i)}return e.nextSibling},m=(e,t,r,o,s,c,u)=>{u||=!!t.dynamicChildren;let d=t.children,p=d.length,m=!1;for(let t=0;t<p;t++){let h=u?d[t]:d[t]=Ds(d[t]),g=h.type===as;e?(g&&!u&&t+1<p&&Ds(d[t+1]).type===as&&(l(i(e.data.slice(h.children.length)),r,a(e)),e.data=h.children),e=f(e,h,o,s,c,u)):g&&!h.children?l(h.el=i(``),r):(m||(m=!0,bi(r,1)||ui()),n(null,h,r,null,o,s,pi(r),c))}return e},h=(e,t,n,r,i,s)=>{let{slotScopeIds:c}=t;c&&(i=i?i.concat(c):c);let d=o(e),f=m(a(e),t,d,n,r,i,s);return f&&mi(f)&&f.data===`]`?a(t.anchor=f):(ui(),l(t.anchor=u(`]`),d,f),f)},g=(e,t,r,i,c,l)=>{if(Si(e,t)||ui(),t.el=null,l){let t=_(e);for(;;){let n=a(e);if(n&&n!==t)s(n);else break}}let u=a(e),d=o(e);return s(e),n(null,t,d,u,r,i,pi(d),c),r&&(r.vnode.el=t.el,mo(r,t.el)),u},_=(e,t=`[`,n=`]`)=>{let r=0;for(;e;)if(e=a(e),e&&mi(e)&&(e.data===t&&r++,e.data===n)){if(r===0)return a(e);r--}return e},v=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>e.nodeType===1&&e.tagName===`TEMPLATE`;return[d,f]}var gi=new Set([`src`,`srcset`,`href`,`poster`]);function _i(e,t,n){return gi.has(t)?e.getAttribute(t)===(n==null?null:`${n}`):!1}var vi=`data-allow-mismatch`,yi={0:`text`,1:`children`,2:`class`,3:`style`,4:`attribute`};function bi(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(vi);)e=e.parentElement;return xi(e&&e.getAttribute(vi),t)}function xi(e,t){if(e==null)return!1;if(e===``)return!0;{let n=e.split(`,`);return t===0&&n.includes(`children`)?!0:n.includes(yi[t])}}function Si(e,t){return bi(e.parentElement,1)||Ci(e)||wi(t)}function Ci(e){return e.nodeType===1&&xi(e.getAttribute(vi),1)}function wi({props:e}){let t=e&&e[vi];return typeof t==`string`&&xi(t,1)}var Ti=le().requestIdleCallback||(e=>setTimeout(e,1)),Ei=le().cancelIdleCallback||(e=>clearTimeout(e)),Di=(e=1e4)=>t=>{let n=Ti(t,{timeout:e});return()=>Ei(n)};function Oi(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window;return(t>0&&t<a||r>0&&r<a)&&(n>0&&n<o||i>0&&i<o)}var ki=e=>(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(Oi(e))return t(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},Ai=e=>t=>{if(e){let n=matchMedia(e);if(n.matches)t();else return n.addEventListener(`change`,t,{once:!0}),()=>n.removeEventListener(`change`,t)}},ji=(e=[])=>(t,n)=>{b(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,a(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},a=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),a};function Mi(e,t){if(mi(e)&&e.data===`[`){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(mi(r)){if(r.data===`]`){if(--n===0)break}else r.data===`[`&&n++}r=r.nextSibling}}else t(e)}var Ni=e=>!!e.type.__asyncLoader;function Pi(e){y(e)&&(e={loader:e});let{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:a,timeout:o,suspensible:s=!0,onError:c}=e,l=null,u,d=0,f=()=>(d++,l=null,p()),p=()=>{let e;return l||(e=l=t().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(f()),()=>n(e),d+1)});throw e}).then(t=>e!==l&&l?l:(t&&(t.__esModule||t[Symbol.toStringTag]===`Module`)&&(t=t.default),u=t,t)))};return H({name:`AsyncComponentWrapper`,__asyncLoader:p,__asyncHydrate(e,t,n){let r=e.isConnected,i=!1;(t.bu||=[]).push(()=>i=!0);let o=()=>{i||!e.parentNode||r&&!e.isConnected||n()},s=a?()=>{let n=a(o,t=>Mi(e,t));n&&(t.bum||=[]).push(n)}:o;u?s():p().then(()=>!t.isUnmounted&&s())},get __asyncResolved(){return u},setup(){let e=Ps;if(ri(e),u)return()=>Fi(u,e);let t=t=>{l=null,Vn(t,e,13,!r)};if(s&&e.suspense||Vs)return p().then(t=>()=>Fi(t,e)).catch(e=>(t(e),()=>r?K(r,{error:e}):null));let a=R(!1),c=R(),d=R(!!i),f,m;return Qi(()=>{f!=null&&clearTimeout(f),m!=null&&clearTimeout(m)}),i&&(m=setTimeout(()=>{e.isUnmounted||(d.value=!1)},i)),o!=null&&(f=setTimeout(()=>{if(!e.isUnmounted&&!a.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);t(e),c.value=e}},o)),p().then(()=>{e.isUnmounted||(a.value=!0,e.parent&&Ii(e.parent.vnode)&&e.parent.update())}).catch(n=>{if(e.isUnmounted){l=null;return}t(n),c.value=n}),()=>{if(a.value&&u)return Fi(u,e);if(c.value&&r)return K(r,{error:c.value});if(n&& Line truncated
`))),e[Hl]=zl(i);let a=r||i.props&&i.props.type===`number`;ol(e,t?`change`:`input`,t=>{t.target.composing||e[Hl](Wl(e.value,n,a))}),(n||a)&&ol(e,`change`,()=>{e.value=Wl(e.value,n,a)}),t||(ol(e,`compositionstart`,Bl),ol(e,`compositionend`,Vl),ol(e,`change`,Vl))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t??``,a=e[Ul];delete e[Ul],a!==void 0&&(e.type===`text`||e.type===`textarea`)&&e.value!==a?e[Hl](Wl(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Hl]=zl(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?ce(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},Kl={deep:!0,created(e,t,n){e[Hl]=zl(n),ol(e,`change`,()=>{let t=e._modelValue,n=Ql(e),r=e.checked,i=e[Hl];if(m(t)){let e=Te(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(g(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i($l(e,r))})},mounted:ql,beforeUpdate(e,t,n){e[Hl]=zl(n),ql(e,t,n)}};function ql(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(m(t))i=Te(t,r.props.value)>-1;else if(g(t))i=t.has(r.props.value);else{if(t===n)return;i=we(t,$l(e,!0))}e.checked!==i&&(e.checked=i)}var Jl={created(e,{value:t},n){e.checked=we(t,n.props.value),e[Hl]=zl(n),ol(e,`change`,()=>{e[Hl](Ql(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Hl]=zl(r),t!==n&&(e.checked=we(t,r.props.value))}},Yl={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,ol(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?ce(Ql(e)):Ql(e)),r=e.multiple,i=r?g(e._modelValue)?new Set(t):t:t[0],a=e._pendingValue=[r,r?m(i)?t.slice():t:i];try{e[Hl](i)}finally{Xn(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[Hl]=zl(r)},mounted(e,{value:t}){Zl(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Hl]=zl(n)},updated(e,{value:t}){let n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Xl(t,n[1],n[0]))&&Zl(e,t)}};function Xl(e,t,n){if(!n||m(e))return we(e,t);if(g(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function Zl(e,t){let n=e.multiple,r=m(t);if(!n||r||g(t)){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=Ql(a);if(n){if(r){let e=typeof o;a.selected=e===`string`||e===`number`?t.some(e=>String(e)===String(o)):Te(t,o)>-1}else a.selected=t.has(o)}else if(we(Ql(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ql(e){return`_value`in e?e._value:e.value}function $l(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var eu={created(e,t,n){nu(e,t,n,null,`created`)},mounted(e,t,n){nu(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){nu(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){nu(e,t,n,r,`updated`)}};function tu(e,t){switch(e){case`SELECT`:return Yl;case`TEXTAREA`:return Gl;default:switch(t){case`checkbox`:return Kl;case`radio`:return Jl;default:return Gl}}}function nu(e,t,n,r,i){let a=tu(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}function ru(){Gl.getSSRProps=({value:e})=>({value:e}),Jl.getSSRProps=({value:e},t)=>{if(t.props&&we(t.props.value,e))return{checked:!0}},Kl.getSSRProps=({value:e},t)=>{if(m(e)){if(t.props&&Te(e,t.props.value)>-1)return{checked:!0}}else if(g(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},eu.getSSRProps=(e,t)=>{if(typeof t.type!=`string`)return;let n=tu(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}var iu=[`ctrl`,`shift`,`alt`,`meta`],au={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>iu.some(n=>e[`${n}Key`]&&!t.includes(n))},ou=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=au[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},su={esc:`escape`,space:` `,up:`arrow-up`,left:`arrow-left`,right:`arrow-right`,down:`arrow-down`,delete:`backspace`},cu=(e,t)=>{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=ae(n.key);if(t.some(e=>e===r||su[e]===r))return e(n)}))},lu=u({patchProp:vl},vc),uu,du=!1;function fu(){return uu||=Po(lu)}function pu(){return uu=du?uu:Fo(lu),du=!0,uu}var mu=((...e)=>{fu().render(...e)}),hu=((...e)=>{pu().hydrate(...e)}),gu=((...e)=>{let t=fu().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=yu(e);if(!r)return;let i=t._component;!y(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,vu(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t}),_u=(( Line truncated
`)].join(`
`))}return()=>i.value||r.value||o.value?tc(t.default({present:o.value})[0],{ref:e=>{let t=ep(e);return t?.hasAttribute===void 0||(t?.hasAttribute(`data-reka-popper-content-wrapper`)?a.value=t.firstElementChild:a.value=t),t}}):null}}),nm=H({name:`PrimitiveSlot`,inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;let e=sp(n.default()),r=e.findIndex(e=>e.type!==os);if(r===-1)return e;let i=e[r];delete i.props?.ref;let a=i.props?q(t,i.props):t,o=Cs({...i,props:{}},a);return e.length===1?o:(e[r]=o,e)}}}),rm=[`area`,`img`,`input`],im=H({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&rm.includes(r)?()=>tc(r,t):r===`template`?()=>tc(nm,t,{default:n.default}):()=>tc(e.as,t,{default:n.default})}});function am(){let e=R();return{primitiveElement:e,currentElement:J(()=>[`#text`,`#comment`].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:ep(e))}}var om=`dismissableLayer.pointerDownOutside`,sm=`dismissableLayer.focusOutside`;function cm(e,t){if(!(t instanceof Element))return!1;let n=t.closest(`[data-dismissable-layer]`),r=e.dataset.dismissableLayer===``?e:e.querySelector(`[data-dismissable-layer]`),i=Array.from(e.ownerDocument.querySelectorAll(`[data-dismissable-layer]`));return!!(n&&(r===n||i.indexOf(r)<i.indexOf(n)))}function lm(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=R(!1),a=R(()=>{});return xr(o=>{if(!Bf||!fn(n))return;let s=async n=>{let o=n.target;if(t?.value&&o){if(cm(t.value,o)){i.value=!1;return}if(n.target&&!i.value){let t={originalEvent:n};function i(){Ff(om,e,t)}n.pointerType===`touch`?(r.removeEventListener(`click`,a.value),a.value=i,r.addEventListener(`click`,a.value,{once:!0})):i()}else r.removeEventListener(`click`,a.value);i.value=!1}},c=window.setTimeout(()=>{r.addEventListener(`pointerdown`,s)},0);o(()=>{window.clearTimeout(c),r.removeEventListener(`pointerdown`,s),r.removeEventListener(`click`,a.value)})}),{onPointerDownCapture:()=>{fn(n)&&(i.value=!0)}}}function um(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=R(!1);return xr(a=>{if(!Bf||!fn(n))return;let o=async n=>{if(!t?.value)return;await Xn(),await Xn();let r=n.target;t.value&&r&&!cm(t.value,r)&&n.target&&!i.value&&Ff(sm,e,{originalEvent:n})};r.addEventListener(`focusin`,o),a(()=>r.removeEventListener(`focusin`,o))}),{onFocusCapture:()=>{fn(n)&&(i.value=!0)},onBlurCapture:()=>{fn(n)&&(i.value=!1)}}}var dm=H({__name:`DismissableLayer`,props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1,default:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`dismiss`],setup(e,{emit:t}){let n=e,r=t,{forwardRef:i,currentElement:a}=X(),o=J(()=>a.value?.ownerDocument??globalThis.document),s=J(()=>pp.layersRoot),c=J(()=>a.value?Array.from(s.value).indexOf(a.value):-1),l=J(()=>pp.layersWithOutsidePointerEventsDisabled.size>0),u=J(()=>{let e=Array.from(s.value),[t]=[...pp.layersWithOutsidePointerEventsDisabled].slice(-1),n=e.indexOf(t);return c.value>=n}),d=lm(async e=>{let t=[...pp.branches].some(t=>t?.contains(e.target));n.present&&u.value&&!t&&(r(`pointerDownOutside`,e),r(`interactOutside`,e),await Xn(),e.defaultPrevented||r(`dismiss`))},a,()=>n.present),f=um(e=>{let t=[...pp.branches].some(t=>t?.contains(e.target));n.present&&!t&&(r(`focusOutside`,e),r(`interactOutside`,e),e.defaultPrevented||r(`dismiss`))},a);return ip(`Escape`,e=>{n.present&&c.value===s.value.size-1&&(r(`escapeKeyDown`,e),e.defaultPrevented||r(`dismiss`))}),V([a,()=>n.disableOutsidePointerEvents,()=>n.present],([e,t,n],r,i)=>{e&&n&&t&&(pp.layersWithOutsidePointerEventsDisabled.size===0&&(pp.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents=`none`),pp.layersWithOutsidePointerEventsDisabled.add(e),i(()=>{pp.layersWithOutsidePointerEventsDisabled.delete(e),pp.layersWithOutsidePointerEventsDisabled.size===0&&!If(pp.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=pp.originalBodyPointerEvents)}))},{immediate:!0}),V([a,()=>n.present],([e,t],n,r)=>{e&&t&&(s.value.add(e),r(()=>{s.value.delete(e)}))},{immediate:!0}),xr(e=>{e(()=>{a.value&&(s.value.delete(a.value),pp.layersWithOutsidePointerEventsDisabled.delete(a.value))})}),(e,t)=>(W(),G(z(im),{ref:z(i),"as-child":e.asChild,as:e.as,"data-dismissable-layer":``,style:P({pointerEvents:l.value?u.value?`auto`:`none`:void 0}),onFocusCapture:z(f).onFocusCapture,onBlurCapture:z(f).onBlurCapture,onPointerdownCapture:z(d).onPointerDownCapture},{default:B(()=>[U(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`style`,`onFocusCapture`,`onBlurCapture`,`onPointerdownCapture`]))}}),fm=zf(()=>R([]));function pm(){let e=fm();return{add(t){let n=e.value[0];t!==n&&n?.pause(),e.value=mm(e.value,t),e.value.unshift(t)},remove(t){e.value=mm( Line truncated
+24 -2
View File
@@ -1,5 +1,27 @@
<script setup lang="ts"></script>
<script setup lang="ts">
import { onMounted } from "vue";
import Topbar from "@/components/topbar/Topbar.vue";
import { TooltipProvider } from "@/components/ui/tooltip";
import { hidden, loadCapabilities } from "@/lib/capabilities";
onMounted(() => {
void loadCapabilities();
});
</script>
<template>
<RouterView />
<TooltipProvider :delay-duration="350">
<Topbar :hidden="hidden" />
<main>
<!--
Keyed on the path and its parameters but not the query: a query-only
change is an entry state, so the page keeps the operator's filters,
while two different :id values get fresh instances.
-->
<RouterView v-slot="{ Component, route }">
<component :is="Component" :key="route.path" />
</RouterView>
</main>
</TooltipProvider>
</template>
+11
View File
@@ -0,0 +1,11 @@
<script setup lang="ts">
import Logo from "./Logo.vue";
import BrandName from "./BrandName.vue";
</script>
<template>
<RouterLink to="/" class="flex items-center gap-2 rounded-md px-1 py-1 outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50">
<Logo />
<BrandName class="hidden sm:inline" />
</RouterLink>
</template>
+3
View File
@@ -0,0 +1,3 @@
<template>
<span class="text-[15px] font-semibold tracking-tight">Archie</span>
</template>
+17
View File
@@ -0,0 +1,17 @@
<script setup lang="ts">
withDefaults(defineProps<{ size?: number }>(), { size: 22 });
</script>
<template>
<svg
:width="size"
:height="size"
viewBox="0 0 24 24"
fill="none"
aria-hidden="true"
class="text-primary shrink-0"
>
<path d="M12 2.5 21 20h-4.1L12 10.6 7.1 20H3l9-17.5Z" fill="currentColor" />
<path d="M8.6 16.2h6.8" stroke="var(--background)" stroke-width="1.6" stroke-linecap="round" />
</svg>
</template>
+31
View File
@@ -0,0 +1,31 @@
<script setup lang="ts">
import { computed } from "vue";
import { useRoute } from "vue-router";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import { activeNavPath, navTree } from "@/lib/nav";
import NavGroup from "./NavGroup.vue";
import NavTrigger from "./NavTrigger.vue";
const props = defineProps<{ hidden: string[] }>();
const route = useRoute();
const tree = computed(() => navTree(props.hidden));
const activePath = computed(() => activeNavPath(route.path));
</script>
<template>
<nav aria-label="Sections" class="flex min-w-0 flex-1 items-center gap-0.5 overflow-x-auto">
<template v-for="node in tree" :key="node.kind === 'link' ? node.entry.path : node.label">
<Tooltip v-if="node.kind === 'link'">
<TooltipTrigger as-child>
<NavTrigger :to="node.entry.path" :current="activePath === node.entry.path">
{{ node.entry.label }}
</NavTrigger>
</TooltipTrigger>
<TooltipContent :side-offset="8" class="max-w-64">{{ node.entry.description }}</TooltipContent>
</Tooltip>
<NavGroup v-else :label="node.label" :items="node.items" :active-path="activePath" />
</template>
</nav>
</template>
+26
View File
@@ -0,0 +1,26 @@
<script setup lang="ts">
import { ChevronDown } from "@lucide/vue";
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "@/components/ui/dropdown-menu";
import type { NavEntry } from "@/lib/nav";
import NavItem from "./NavItem.vue";
import NavTrigger from "./NavTrigger.vue";
const props = defineProps<{ label: string; items: NavEntry[]; activePath: string }>();
const holds = (path: string) => props.activePath === path;
</script>
<template>
<DropdownMenu>
<DropdownMenuTrigger as-child>
<NavTrigger :current="items.some((item) => holds(item.path))">
{{ label }}
<ChevronDown :size="14" class="opacity-60" />
</NavTrigger>
</DropdownMenuTrigger>
<DropdownMenuContent align="start" class="w-52">
<NavItem v-for="item in items" :key="item.path" :entry="item" :current="holds(item.path)" />
</DropdownMenuContent>
</DropdownMenu>
</template>
+28
View File
@@ -0,0 +1,28 @@
<script setup lang="ts">
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import type { NavEntry } from "@/lib/nav";
defineProps<{ entry: NavEntry; current: boolean }>();
</script>
<template>
<Tooltip>
<TooltipTrigger as-child>
<DropdownMenuItem
as-child
:data-current="current ? '' : undefined"
:disabled="entry.soon"
class="data-current:text-foreground data-current:bg-accent/60 px-2 py-1.5"
>
<RouterLink :to="entry.path" class="w-full cursor-pointer">
<span class="flex-1">{{ entry.label }}</span>
<span v-if="entry.soon" class="text-muted-foreground text-[11px] tracking-wide uppercase">soon</span>
</RouterLink>
</DropdownMenuItem>
</TooltipTrigger>
<TooltipContent side="right" :side-offset="10" class="max-w-64">
{{ entry.soon ? "Coming soon. " + entry.description : entry.description }}
</TooltipContent>
</Tooltip>
</template>
+16
View File
@@ -0,0 +1,16 @@
<script setup lang="ts">
defineProps<{ to?: string; current?: boolean }>();
</script>
<template>
<component
:is="to ? 'RouterLink' : 'button'"
:to="to"
:type="to ? undefined : 'button'"
:aria-current="to && current ? 'page' : undefined"
:data-current="current ? '' : undefined"
class="text-muted-foreground hover:text-foreground hover:bg-accent data-current:text-foreground data-current:bg-accent focus-visible:ring-ring/50 inline-flex h-8 shrink-0 items-center gap-1 rounded-md px-2.5 text-sm font-medium whitespace-nowrap transition-colors outline-none focus-visible:ring-[3px]"
>
<slot />
</component>
</template>
@@ -0,0 +1,36 @@
<script setup lang="ts">
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
</script>
<template>
<DropdownMenu>
<DropdownMenuTrigger
class="focus-visible:ring-ring/50 rounded-full outline-none focus-visible:ring-[3px]"
aria-label="Operator menu"
>
<Avatar class="size-7">
<AvatarFallback class="text-xs">A</AvatarFallback>
</Avatar>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" class="w-48">
<DropdownMenuLabel class="text-muted-foreground text-xs font-normal">
Signed in locally
</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuItem as-child>
<RouterLink to="/system/appearance" class="w-full cursor-pointer">Appearance</RouterLink>
</DropdownMenuItem>
<DropdownMenuItem as-child>
<RouterLink to="/system/status" class="w-full cursor-pointer">Status</RouterLink>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</template>
+77
View File
@@ -0,0 +1,77 @@
<script setup lang="ts">
import { computed, nextTick, ref } from "vue";
import { useRouter } from "vue-router";
import { Search } from "@lucide/vue";
import { Input } from "@/components/ui/input";
import { navEntries } from "@/lib/nav";
const props = defineProps<{ hidden: string[] }>();
const router = useRouter();
const field = ref<{ $el: HTMLInputElement } | null>(null);
const query = ref("");
const open = ref(false);
const entries = computed(() => navEntries(props.hidden).filter((entry) => !entry.soon));
// Jumping between sections, deliberately not a data search: each section owns
// its own filtering, and one box that means something different on every page
// is worse than none.
const hit = computed(() => {
const wanted = query.value.trim().toLowerCase();
if (!wanted) return undefined;
return entries.value.find((entry) => entry.label.toLowerCase().startsWith(wanted));
});
async function toggle() {
open.value = !open.value;
if (!open.value) return;
await nextTick();
field.value?.$el.focus();
}
function onKeydown(event: KeyboardEvent) {
const input = event.target as HTMLInputElement;
if (event.key === "Escape") {
// Consumed here so a dismissal of the field is not also read as a
// dismissal of whatever is open behind it.
event.preventDefault();
query.value = "";
open.value = false;
input.blur();
return;
}
if (event.key !== "Enter" || !hit.value) return;
void router.push(hit.value.path);
query.value = "";
open.value = false;
input.blur();
}
</script>
<template>
<div class="flex items-center">
<button
type="button"
class="text-muted-foreground hover:text-foreground hover:bg-accent focus-visible:ring-ring/50 inline-flex size-8 items-center justify-center rounded-md outline-none focus-visible:ring-[3px] lg:hidden"
aria-label="Jump to a section"
:aria-expanded="open"
@click="toggle()"
>
<Search :size="16" />
</button>
<div class="relative" :class="open ? 'block' : 'hidden lg:block'">
<Search :size="15" class="text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 -translate-y-1/2" />
<Input
ref="field"
v-model="query"
type="search"
class="h-8 w-44 pl-8 text-sm"
placeholder="Jump to…"
aria-label="Jump to a section"
@keydown="onKeydown"
/>
</div>
</div>
</template>
+22
View File
@@ -0,0 +1,22 @@
<script setup lang="ts">
import { CircleQuestionMark } from "@lucide/vue";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
</script>
<template>
<Tooltip>
<TooltipTrigger as-child>
<a
href="https://github.com/samcharles93/archie-core/tree/main/docs"
target="_blank"
rel="noreferrer noopener"
class="text-muted-foreground hover:text-foreground hover:bg-accent focus-visible:ring-ring/50 inline-flex size-8 items-center justify-center rounded-md outline-none focus-visible:ring-[3px]"
aria-label="Documentation"
>
<CircleQuestionMark :size="16" />
</a>
</TooltipTrigger>
<TooltipContent :side-offset="8">Documentation</TooltipContent>
</Tooltip>
</template>
+25
View File
@@ -0,0 +1,25 @@
<script setup lang="ts">
import { computed } from "vue";
import { Moon, Sun } from "@lucide/vue";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import { theme, toggleTheme } from "@/lib/theme";
const label = computed(() => (theme.value === "dark" ? "Switch to light" : "Switch to dark"));
</script>
<template>
<Tooltip>
<TooltipTrigger as-child>
<button
type="button"
class="text-muted-foreground hover:text-foreground hover:bg-accent focus-visible:ring-ring/50 inline-flex size-8 items-center justify-center rounded-md outline-none focus-visible:ring-[3px]"
:aria-label="label"
@click="toggleTheme()"
>
<component :is="theme === 'dark' ? Moon : Sun" :size="16" />
</button>
</TooltipTrigger>
<TooltipContent :side-offset="8">{{ label }}</TooltipContent>
</Tooltip>
</template>
+23
View File
@@ -0,0 +1,23 @@
<script setup lang="ts">
import Brand from "./Brand.vue";
import Nav from "./Nav.vue";
import ProfileDropdown from "./ProfileDropdown.vue";
import SearchBar from "./SearchBar.vue";
import SupportLink from "./SupportLink.vue";
import ThemeToggle from "./ThemeToggle.vue";
defineProps<{ hidden: string[] }>();
</script>
<template>
<header class="bg-background/80 sticky top-0 z-40 flex h-14 items-center gap-3 border-b px-3 backdrop-blur-xl sm:px-4">
<Brand />
<Nav :hidden="hidden" />
<div class="flex shrink-0 items-center gap-1">
<SearchBar :hidden="hidden" />
<SupportLink />
<ThemeToggle />
<ProfileDropdown />
</div>
</header>
</template>
+22
View File
@@ -0,0 +1,22 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import type { AvatarVariants } from '.'
import { AvatarRoot } from 'reka-ui'
import { cn } from '@/lib/utils'
import { avatarVariants } from '.'
const props = defineProps<{
class?: HTMLAttributes['class']
size?: AvatarVariants['size']
}>()
</script>
<template>
<AvatarRoot
data-slot="avatar"
:data-size="size ?? 'default'"
:class="cn(avatarVariants({ size }), props.class)"
>
<slot />
</AvatarRoot>
</template>
@@ -0,0 +1,23 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<{
class?: HTMLAttributes['class']
}>()
</script>
<template>
<span
data-slot="avatar-badge"
:class="cn(
'bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 select-none',
'group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden',
'group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2',
'group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2',
props.class,
)"
>
<slot />
</span>
</template>
@@ -0,0 +1,21 @@
<script setup lang="ts">
import type { AvatarFallbackProps } from 'reka-ui'
import type { HTMLAttributes } from 'vue'
import { reactiveOmit } from '@vueuse/core'
import { AvatarFallback } from 'reka-ui'
import { cn } from '@/lib/utils'
const props = defineProps<AvatarFallbackProps & { class?: HTMLAttributes['class'] }>()
const delegatedProps = reactiveOmit(props, 'class')
</script>
<template>
<AvatarFallback
data-slot="avatar-fallback"
v-bind="delegatedProps"
:class="cn('bg-muted text-muted-foreground rounded-full flex size-full items-center justify-center text-sm group-data-[size=sm]/avatar:text-xs', props.class)"
>
<slot />
</AvatarFallback>
</template>
@@ -0,0 +1,20 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<{
class?: HTMLAttributes['class']
}>()
</script>
<template>
<div
data-slot="avatar-group"
:class="cn(
'group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background',
props.class,
)"
>
<slot />
</div>
</template>
@@ -0,0 +1,20 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<{
class?: HTMLAttributes['class']
}>()
</script>
<template>
<div
data-slot="avatar-group-count"
:class="cn(
'bg-muted text-muted-foreground size-8 rounded-full text-sm group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3 relative flex shrink-0 items-center justify-center ring-2 ring-background',
props.class,
)"
>
<slot />
</div>
</template>
@@ -0,0 +1,16 @@
<script setup lang="ts">
import type { AvatarImageProps } from 'reka-ui'
import { AvatarImage } from 'reka-ui'
const props = defineProps<AvatarImageProps>()
</script>
<template>
<AvatarImage
data-slot="avatar-image"
v-bind="props"
class="rounded-full aspect-square size-full object-cover"
>
<slot />
</AvatarImage>
</template>
+27
View File
@@ -0,0 +1,27 @@
import type { VariantProps } from 'class-variance-authority'
import { cva } from 'class-variance-authority'
export { default as Avatar } from './Avatar.vue'
export { default as AvatarBadge } from './AvatarBadge.vue'
export { default as AvatarFallback } from './AvatarFallback.vue'
export { default as AvatarGroup } from './AvatarGroup.vue'
export { default as AvatarGroupCount } from './AvatarGroupCount.vue'
export { default as AvatarImage } from './AvatarImage.vue'
export const avatarVariants = cva(
'size-8 rounded-full after:rounded-full data-[size=lg]:size-10 data-[size=sm]:size-6 group/avatar relative flex shrink-0 select-none after:absolute after:inset-0 after:border after:border-border after:mix-blend-darken dark:after:mix-blend-lighten',
{
variants: {
size: {
sm: '',
default: '',
lg: '',
},
},
defaultVariants: {
size: 'default',
},
},
)
export type AvatarVariants = VariantProps<typeof avatarVariants>
+31
View File
@@ -0,0 +1,31 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { useVModel } from '@vueuse/core'
import { cn } from '@/lib/utils'
const props = defineProps<{
defaultValue?: string | number
modelValue?: string | number
class?: HTMLAttributes['class']
}>()
const emits = defineEmits<{
(e: 'update:modelValue', payload: string | number): void
}>()
const modelValue = useVModel(props, 'modelValue', emits, {
passive: true,
defaultValue: props.defaultValue,
})
</script>
<template>
<input
v-model="modelValue"
data-slot="input"
:class="cn(
'dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',
props.class,
)"
>
</template>
+1
View File
@@ -0,0 +1 @@
export { default as Input } from './Input.vue'
+19
View File
@@ -0,0 +1,19 @@
<script setup lang="ts">
import type { TooltipRootEmits, TooltipRootProps } from 'reka-ui'
import { TooltipRoot, useForwardPropsEmits } from 'reka-ui'
const props = defineProps<TooltipRootProps>()
const emits = defineEmits<TooltipRootEmits>()
const forwarded = useForwardPropsEmits(props, emits)
</script>
<template>
<TooltipRoot
v-slot="slotProps"
data-slot="tooltip"
v-bind="forwarded"
>
<slot v-bind="slotProps" />
</TooltipRoot>
</template>
@@ -0,0 +1,34 @@
<script setup lang="ts">
import type { TooltipContentEmits, TooltipContentProps } from 'reka-ui'
import type { HTMLAttributes } from 'vue'
import { reactiveOmit } from '@vueuse/core'
import { TooltipArrow, TooltipContent, TooltipPortal, useForwardPropsEmits } from 'reka-ui'
import { cn } from '@/lib/utils'
defineOptions({
inheritAttrs: false,
})
const props = withDefaults(defineProps<TooltipContentProps & { class?: HTMLAttributes['class'] }>(), {
sideOffset: 0,
})
const emits = defineEmits<TooltipContentEmits>()
const delegatedProps = reactiveOmit(props, 'class')
const forwarded = useForwardPropsEmits(delegatedProps, emits)
</script>
<template>
<TooltipPortal>
<TooltipContent
data-slot="tooltip-content"
v-bind="{ ...forwarded, ...$attrs }"
:class="cn('data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm bg-foreground text-background z-50 w-fit max-w-xs origin-(--reka-tooltip-content-transform-origin)', props.class)"
>
<slot />
<TooltipArrow class="size-2.5 rotate-45 rounded-xs bg-foreground fill-foreground z-50 translate-y-[calc(-50%_-_2px)]" />
</TooltipContent>
</TooltipPortal>
</template>
@@ -0,0 +1,14 @@
<script setup lang="ts">
import type { TooltipProviderProps } from 'reka-ui'
import { TooltipProvider } from 'reka-ui'
const props = withDefaults(defineProps<TooltipProviderProps>(), {
delayDuration: 0,
})
</script>
<template>
<TooltipProvider v-bind="props">
<slot />
</TooltipProvider>
</template>
@@ -0,0 +1,15 @@
<script setup lang="ts">
import type { TooltipTriggerProps } from 'reka-ui'
import { TooltipTrigger } from 'reka-ui'
const props = defineProps<TooltipTriggerProps>()
</script>
<template>
<TooltipTrigger
data-slot="tooltip-trigger"
v-bind="props"
>
<slot />
</TooltipTrigger>
</template>
+4
View File
@@ -0,0 +1,4 @@
export { default as Tooltip } from './Tooltip.vue'
export { default as TooltipContent } from './TooltipContent.vue'
export { default as TooltipProvider } from './TooltipProvider.vue'
export { default as TooltipTrigger } from './TooltipTrigger.vue'
+38
View File
@@ -0,0 +1,38 @@
import { ref } from "vue";
import { routes } from "@/router";
export type CapabilitySections = Record<string, boolean>;
interface RouteMeta {
section?: string;
}
/** hidden lists the route paths this composition cannot serve. */
export const hidden = ref<string[]>([]);
function hiddenFor(sections: CapabilitySections | undefined): string[] {
if (!sections) return [];
return (routes as Array<{ path: string; meta?: RouteMeta }>)
.filter((route) => {
const section = route.meta?.section;
return typeof section === "string" && sections[section] === false;
})
.map((route) => route.path);
}
/**
* loadCapabilities asks once, after the shell is up: the nav paints immediately
* and loses what this process cannot back a moment later, rather than holding
* the page behind a request. A failed read hides nothing.
*/
export async function loadCapabilities(): Promise<void> {
try {
const response = await fetch("/api/capabilities", { headers: { Accept: "application/json" } });
if (!response.ok) return;
const body = (await response.json()) as { sections?: CapabilitySections } | null;
hidden.value = hiddenFor(body?.sections);
} catch {
// Offline or an older server: every section stays visible.
}
}
+97
View File
@@ -0,0 +1,97 @@
import { routes } from "@/router";
export interface NavEntry {
path: string;
label: string;
description: string;
section?: string;
soon?: boolean;
}
export interface NavLink {
kind: "link";
entry: NavEntry;
}
export interface NavGroup {
kind: "group";
label: string;
items: NavEntry[];
}
export type NavNode = NavLink | NavGroup;
interface RouteMeta {
label?: string;
description?: string;
section?: string;
nav?: boolean;
navPath?: string;
soon?: boolean;
}
const table = routes as Array<{ path: string; meta?: RouteMeta }>;
// The group owns the context, so the items inside it are named for what they
// are rather than what they belong to. Order is the reading order of the menu.
const groups: Array<{ label: string; paths: string[] }> = [
{ label: "Work", paths: ["/tasks", "/workflows"] },
{ label: "Agent", paths: ["/skills", "/curators"] },
{ label: "Events", paths: ["/captures", "/mappings", "/bindings"] },
{
label: "System",
paths: [
"/system/status",
"/logs",
"/system/appearance",
"/system/tasks",
"/system/models",
"/system/repos",
"/channels",
"/system/advanced",
],
},
];
function entryFor(path: string): NavEntry {
const route = table.find((r) => r.path === path);
if (!route) throw new Error(`nav references ${path}, which is not a route`);
return {
path,
label: route.meta?.label ?? path,
description: route.meta?.description ?? "",
section: route.meta?.section,
soon: route.meta?.soon,
};
}
/**
* navTree returns the bar, with routes the serving composition cannot back
* removed. A group whose every child is hidden is dropped; a group left with
* one child stays a group, so the bar has the same shape on every deployment.
*/
export function navTree(hidden: string[] = []): NavNode[] {
const visible = (e: NavEntry) => !hidden.includes(e.path);
const nodes: NavNode[] = [{ kind: "link", entry: entryFor("/") }];
for (const group of groups) {
const items = group.paths.map(entryFor).filter(visible);
if (items.length > 0) nodes.push({ kind: "group", label: group.label, items });
}
return nodes;
}
/** navEntries flattens the tree to the destinations it can reach. */
export function navEntries(hidden: string[] = []): NavEntry[] {
return navTree(hidden).flatMap((node) => (node.kind === "link" ? [node.entry] : node.items));
}
/**
* activeNavPath maps the current route onto the nav entry that should read as
* current, so /tasks/42 keeps Tasks lit rather than lighting nothing.
*/
export function activeNavPath(path: string): string {
const route = table.find((r) => r.path === path);
const navPath = route?.meta?.navPath;
if (typeof navPath === "string") return navPath;
return path;
}
+33
View File
@@ -0,0 +1,33 @@
import { ref, watchEffect } from "vue";
export type Theme = "dark" | "light";
const STORAGE_KEY = "archie.theme";
function stored(): Theme | null {
try {
const value = localStorage.getItem(STORAGE_KEY);
return value === "dark" || value === "light" ? value : null;
} catch {
return null;
}
}
export const theme = ref<Theme>(stored() ?? "dark");
watchEffect(() => {
const root = document.documentElement;
root.classList.toggle("dark", theme.value === "dark");
// Binds the UA's own painting (form controls, scrollbars, the canvas behind
// an overscroll) to the theme.
root.style.colorScheme = theme.value;
try {
localStorage.setItem(STORAGE_KEY, theme.value);
} catch {
// A blocked store costs persistence, not the toggle.
}
});
export function toggleTheme() {
theme.value = theme.value === "dark" ? "light" : "dark";
}
+30 -14
View File
@@ -2,23 +2,39 @@ import { createRouter, createWebHistory } from "vue-router";
import Placeholder from "@/views/Placeholder.vue";
// internal/gateway/dashboard_tools.go mirrors this table; its test parses this file.
// internal/gateway/dashboard_tools.go mirrors this table; its test parses this
// file, so keep one route per line with `path: "..."` on a single line, and
// `nav: false` on any entry the registry should skip.
//
// meta:
// label the navigation label, short because its group carries the context
// description one line, shown as the item's tooltip and mirrored in the registry
// section the capability from GET /api/capabilities this route needs; a
// route with no section is served in every composition
// navPath the navigation entry this route keeps current
// soon visible, greyed and non-navigable
const routes = [
{ path: "/", name: "dashboard", label: "Dashboard", component: Placeholder },
{ path: "/tasks", name: "tasks", label: "Tasks", component: Placeholder },
{ path: "/tasks/:id", name: "task-detail", label: "Task run", component: Placeholder, nav: false },
{ path: "/logs", name: "logs", label: "Logs", component: Placeholder, section: "logs" },
{ path: "/captures", name: "captures", label: "Event inspector", component: Placeholder, section: "captures" },
{ path: "/mappings", name: "mappings", label: "Field mappings", component: Placeholder, section: "mappings" },
{ path: "/bindings", name: "bindings", label: "Playbook bindings", component: Placeholder, section: "bindings" },
{ path: "/skills", name: "skills", label: "Skills", component: Placeholder, section: "skills" },
{ path: "/workflows", name: "workflows", label: "Workflows", component: Placeholder, section: "workflows" },
{ path: "/curators", name: "curators", label: "Curators", component: Placeholder, section: "curators" },
{ path: "/channels", name: "channels", label: "Channels", component: Placeholder, section: "channels" },
{ path: "/settings", name: "settings", label: "Configuration", component: Placeholder, section: "settings" },
{ path: "/", name: "dashboard", component: Placeholder, meta: { label: "Dashboard", description: "What Archie is working on, what needs you, and token spend." } },
{ path: "/tasks", name: "tasks", component: Placeholder, meta: { label: "Tasks", description: "Issues Archie has picked up, and where each one stands." } },
{ path: "/tasks/:id", name: "task-detail", component: Placeholder, meta: { label: "Task run", nav: false, navPath: "/tasks" } },
{ path: "/workflows", name: "workflows", component: Placeholder, meta: { label: "Workflows", description: "The routed workflows and their run history.", section: "workflows" } },
{ path: "/skills", name: "skills", component: Placeholder, meta: { label: "Skills", description: "The SKILL.md capabilities Archie can activate.", section: "skills" } },
{ path: "/curators", name: "curators", component: Placeholder, meta: { label: "Curators", description: "Scheduled passes that curate Archie's memory and captures.", section: "curators" } },
{ path: "/captures", name: "captures", component: Placeholder, meta: { label: "Inspector", description: "Captured inbound events, as they were received.", section: "captures" } },
{ path: "/mappings", name: "mappings", component: Placeholder, meta: { label: "Mappings", description: "How inbound event fields map onto internal ones.", section: "mappings" } },
{ path: "/bindings", name: "bindings", component: Placeholder, meta: { label: "Bindings", description: "Which workflow a captured event starts.", section: "bindings" } },
{ path: "/system/status", name: "system-status", component: Placeholder, meta: { label: "Status", description: "Update state, configuration sources, and the listen address.", section: "settings" } },
{ path: "/logs", name: "logs", component: Placeholder, meta: { label: "Logs", description: "The daemon log stream, filterable by level and component.", section: "logs" } },
{ path: "/system/appearance", name: "system-appearance", component: Placeholder, meta: { label: "Appearance", description: "Theme and display preferences." } },
{ path: "/system/tasks", name: "system-tasks", component: Placeholder, meta: { label: "Task settings", description: "Work lifecycle: statuses, operator actions, and budgets.", section: "settings" } },
{ path: "/system/models", name: "system-models", component: Placeholder, meta: { label: "Models", description: "Model roles and the providers backing them.", section: "settings" } },
{ path: "/system/repos", name: "system-repos", component: Placeholder, meta: { label: "Repositories", description: "Repositories Archie watches, and their per-repo gate overrides.", section: "settings" } },
{ path: "/channels", name: "channels", component: Placeholder, meta: { label: "Channels", description: "Inbound chat and notification channels, and their state.", section: "channels" } },
{ path: "/system/advanced", name: "system-advanced", component: Placeholder, meta: { label: "Advanced", description: "Identity, storage, sandboxing, and dangerous actions.", section: "settings" } },
{ path: "/settings", redirect: "/system/status", meta: { nav: false } },
];
export const dashboardRoutes = routes;
export { routes };
export const router = createRouter({
history: createWebHistory(),
+2
View File
@@ -1,4 +1,6 @@
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap');
@import "@fontsource-variable/geist";
@import "tailwindcss";