@latticecms/admin 0.0.0 → 0.1.0
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/README.md +156 -2
- package/dist/admin.css +2 -0
- package/dist/admin.d.ts +18 -0
- package/dist/admin.d.ts.map +1 -0
- package/dist/admin.js +92 -0
- package/dist/admin.js.map +1 -0
- package/dist/catalog.d.ts +45 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +147 -0
- package/dist/catalog.js.map +1 -0
- package/dist/collections.d.ts +54 -0
- package/dist/collections.d.ts.map +1 -0
- package/dist/collections.js +103 -0
- package/dist/collections.js.map +1 -0
- package/dist/confirm.d.ts +16 -0
- package/dist/confirm.d.ts.map +1 -0
- package/dist/confirm.js +10 -0
- package/dist/confirm.js.map +1 -0
- package/dist/data.d.ts +28 -0
- package/dist/data.d.ts.map +1 -0
- package/dist/data.js +55 -0
- package/dist/data.js.map +1 -0
- package/dist/delete-action.d.ts +10 -0
- package/dist/delete-action.d.ts.map +1 -0
- package/dist/delete-action.js +44 -0
- package/dist/delete-action.js.map +1 -0
- package/dist/detail-page.d.ts +12 -0
- package/dist/detail-page.d.ts.map +1 -0
- package/dist/detail-page.js +65 -0
- package/dist/detail-page.js.map +1 -0
- package/dist/document-table.d.ts +17 -0
- package/dist/document-table.d.ts.map +1 -0
- package/dist/document-table.js +41 -0
- package/dist/document-table.js.map +1 -0
- package/dist/filters.d.ts +18 -0
- package/dist/filters.d.ts.map +1 -0
- package/dist/filters.js +147 -0
- package/dist/filters.js.map +1 -0
- package/dist/form.d.ts +80 -0
- package/dist/form.d.ts.map +1 -0
- package/dist/form.js +318 -0
- package/dist/form.js.map +1 -0
- package/dist/index-page.d.ts +3 -0
- package/dist/index-page.d.ts.map +1 -0
- package/dist/index-page.js +11 -0
- package/dist/index-page.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/labels.d.ts +13 -0
- package/dist/labels.d.ts.map +1 -0
- package/dist/labels.js +33 -0
- package/dist/labels.js.map +1 -0
- package/dist/list-page.d.ts +25 -0
- package/dist/list-page.d.ts.map +1 -0
- package/dist/list-page.js +82 -0
- package/dist/list-page.js.map +1 -0
- package/dist/list-state.d.ts +17 -0
- package/dist/list-state.d.ts.map +1 -0
- package/dist/list-state.js +39 -0
- package/dist/list-state.js.map +1 -0
- package/dist/method-action.d.ts +16 -0
- package/dist/method-action.d.ts.map +1 -0
- package/dist/method-action.js +78 -0
- package/dist/method-action.js.map +1 -0
- package/dist/model.d.ts +11 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/model.js +16 -0
- package/dist/model.js.map +1 -0
- package/dist/ref-picker.d.ts +24 -0
- package/dist/ref-picker.d.ts.map +1 -0
- package/dist/ref-picker.js +77 -0
- package/dist/ref-picker.js.map +1 -0
- package/dist/refusal-alert.d.ts +12 -0
- package/dist/refusal-alert.d.ts.map +1 -0
- package/dist/refusal-alert.js +87 -0
- package/dist/refusal-alert.js.map +1 -0
- package/dist/refusal.d.ts +20 -0
- package/dist/refusal.d.ts.map +1 -0
- package/dist/refusal.js +40 -0
- package/dist/refusal.js.map +1 -0
- package/dist/relation-tab.d.ts +14 -0
- package/dist/relation-tab.d.ts.map +1 -0
- package/dist/relation-tab.js +205 -0
- package/dist/relation-tab.js.map +1 -0
- package/dist/router.d.ts +50 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/router.js +121 -0
- package/dist/router.js.map +1 -0
- package/dist/schema.d.ts +39 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +113 -0
- package/dist/schema.js.map +1 -0
- package/dist/states.d.ts +18 -0
- package/dist/states.d.ts.map +1 -0
- package/dist/states.js +21 -0
- package/dist/states.js.map +1 -0
- package/dist/value.d.ts +33 -0
- package/dist/value.d.ts.map +1 -0
- package/dist/value.js +96 -0
- package/dist/value.js.map +1 -0
- package/dist/write-pages.d.ts +15 -0
- package/dist/write-pages.d.ts.map +1 -0
- package/dist/write-pages.js +70 -0
- package/dist/write-pages.js.map +1 -0
- package/package.json +77 -2
- package/src/admin.css +14 -0
- package/src/admin.tsx +171 -0
- package/src/catalog.ts +192 -0
- package/src/collections.ts +147 -0
- package/src/confirm.tsx +57 -0
- package/src/data.tsx +94 -0
- package/src/delete-action.tsx +65 -0
- package/src/detail-page.tsx +189 -0
- package/src/document-table.tsx +129 -0
- package/src/filters.tsx +346 -0
- package/src/form.tsx +605 -0
- package/src/index-page.tsx +26 -0
- package/src/index.ts +1 -0
- package/src/labels.ts +41 -0
- package/src/list-page.tsx +191 -0
- package/src/list-state.ts +53 -0
- package/src/method-action.tsx +162 -0
- package/src/model.tsx +29 -0
- package/src/ref-picker.tsx +227 -0
- package/src/refusal-alert.tsx +146 -0
- package/src/refusal.ts +67 -0
- package/src/relation-tab.tsx +440 -0
- package/src/router.tsx +186 -0
- package/src/schema.ts +151 -0
- package/src/states.tsx +67 -0
- package/src/value.tsx +171 -0
- package/src/write-pages.tsx +146 -0
package/README.md
CHANGED
|
@@ -1,5 +1,159 @@
|
|
|
1
1
|
# @latticecms/admin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An admin for a [Lattice](../core) app. It renders a collection index, list views and detail views for every collection, from the catalog the app serves. There is no per-collection code: what a page shows comes from the procedures' JSON Schema and their `lattice` meta.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Status: before 1.0, not yet published.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @latticecms/admin react react-dom @ts-pf/client-http @ts-pf/protocol
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`react` and `react-dom` 19, and `@ts-pf/client-http` and `@ts-pf/protocol` 1, are peer dependencies, shared with the app. The admin imports no server code and no app contract. `swr` 2 and `@shadalaya/react` are its own dependencies; `@shadalaya/react` is pinned to `0.1.0`, the version its stylesheet, `@latticecms/admin/admin.css`, was built against.
|
|
14
|
+
|
|
15
|
+
The admin is a React component for a page the app bundles, such as with Vite. A bundler warns that `swr` and Base UI mark modules `"use client"`. A browser bundle drops the directive, which is what it wants. Filter `MODULE_LEVEL_DIRECTIVE` in `build.rolldownOptions.onwarn`, as the root README's [Getting started](../../README.md#5-the-admin-page) does.
|
|
16
|
+
|
|
17
|
+
**Bundle size.** The crm's page, with React, is about 132 kB gzipped, JavaScript and CSS. The admin's own share, without React's chunk, is about 56 kB. The crm's [`bundle.test.ts`](../../examples/crm/src/web/bundle.test.ts) holds both to a budget.
|
|
18
|
+
|
|
19
|
+
## A one-page admin with a token
|
|
20
|
+
|
|
21
|
+
The root README's [Getting started](../../README.md#5-the-admin-page) has the smallest page: a token form kept in `sessionStorage`, a `fetch` that adds the token and the organization, and `<Admin>`. A test builds and drives it. The crm's [admin page](../../examples/crm/src/web/app.tsx), quoted below, adds sign-in with a password, an organization switcher and sign-out.
|
|
22
|
+
|
|
23
|
+
## Serve the catalog
|
|
24
|
+
|
|
25
|
+
The admin cannot import an app's contract: the contract imports server code. The app serves the contract's `catalog()` as JSON instead, behind its session, beside its RPC endpoint:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
// examples/crm/src/servers/rpc/catalog.ts
|
|
29
|
+
export function catalogDocument() {
|
|
30
|
+
return catalog(contract, { prefix: '/rpc' });
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
// examples/crm/src/servers/http/handler.ts
|
|
36
|
+
if (request.method === 'GET' && pathname === '/catalog.json') {
|
|
37
|
+
return forSignedIn(request, 'catalog', () => {
|
|
38
|
+
catalog ??= catalogDocument();
|
|
39
|
+
return catalog;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`prefix` is where the app serves its procedures. The admin calls each procedure there, by path. The catalog says which fields are masked, so serve it to signed-in users only. Any signed-in user may read it: it needs no organization.
|
|
45
|
+
|
|
46
|
+
## Mount it
|
|
47
|
+
|
|
48
|
+
Mount `<Admin>` on a catch-all route, and import its stylesheet once. The crm's page:
|
|
49
|
+
|
|
50
|
+
```tsx
|
|
51
|
+
// examples/crm/src/web/app.tsx
|
|
52
|
+
<Admin
|
|
53
|
+
// A new organization is a new admin, with an empty cache.
|
|
54
|
+
key={current?.id ?? 'support'}
|
|
55
|
+
fetch={fetch}
|
|
56
|
+
catalogUrl="/catalog.json"
|
|
57
|
+
basePath="/admin"
|
|
58
|
+
header={
|
|
59
|
+
current === undefined ? undefined : (
|
|
60
|
+
<Header
|
|
61
|
+
organizations={organizations}
|
|
62
|
+
picked={current.id}
|
|
63
|
+
onPick={(id) => {
|
|
64
|
+
session.pick(id);
|
|
65
|
+
setPicked(id);
|
|
66
|
+
}}
|
|
67
|
+
onSignOut={signOut}
|
|
68
|
+
/>
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
/>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Its `fetch` adds the session token and the organization to every call, and signs the user out on a 401:
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
// examples/crm/src/web/session.ts
|
|
78
|
+
export function sessionFetch(
|
|
79
|
+
token: string,
|
|
80
|
+
organizationId: string | undefined,
|
|
81
|
+
onUnauthorized: () => void,
|
|
82
|
+
): typeof fetch {
|
|
83
|
+
return async (input, init) => {
|
|
84
|
+
const request = new Request(input, init);
|
|
85
|
+
request.headers.set('authorization', `Bearer ${token}`);
|
|
86
|
+
if (organizationId !== undefined) {
|
|
87
|
+
request.headers.set(organizationHeader, organizationId);
|
|
88
|
+
}
|
|
89
|
+
const response = await fetch(request);
|
|
90
|
+
if (response.status === 401) onUnauthorized();
|
|
91
|
+
return response;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
| Prop | What it is |
|
|
97
|
+
| --- | --- |
|
|
98
|
+
| `fetch` | The app's `fetch`. It adds the session token and the organization header to each request. The admin uses it for the catalog and for every call. |
|
|
99
|
+
| `catalogUrl` | Where the app serves the catalog JSON. |
|
|
100
|
+
| `basePath` | The path the admin is mounted under. Its pages live below it, on the History API. The app serves its page for every path under it, so a reload on a deep link renders. |
|
|
101
|
+
| `header` | Optional. The app's part of the top bar, such as an organization switcher and sign-out. |
|
|
102
|
+
|
|
103
|
+
The admin follows the browser's back and forward, and its own links. It does not see the app's `history.pushState`: to send the user to an admin page from app code, follow a link to it, or push the URL and dispatch a `popstate` event. A list keeps its filters, sort and page in its URL, so back, forward and reload return to it.
|
|
104
|
+
|
|
105
|
+
The admin has no sign-in and no auth code. The app owns its session: on a 401, its `fetch` can clear the session and show its sign-in page.
|
|
106
|
+
|
|
107
|
+
**Key it by organization.** `key={organizationId}` remounts the admin when the user switches organization. Each mount has its own cache, so one organization's rows never show under another's. Cache keys do not include the organization header, so without the key a switch would show stale rows until they refetch.
|
|
108
|
+
|
|
109
|
+
The stylesheet is compiled at the admin's build, with Tailwind's preflight and the shadalaya tokens. The app needs no Tailwind. Preflight resets element styles, so serve the admin on its own page.
|
|
110
|
+
|
|
111
|
+
## What it renders
|
|
112
|
+
|
|
113
|
+
- **The index:** every collection, by its label (`collection(slug, { label })`, or one from the slug).
|
|
114
|
+
- **A list:**
|
|
115
|
+
- Columns: the title field, then the required scalar fields in schema order, up to six in all, then `updatedAt`. The title field is the first required string among `name`, `title`, `label` and `email`, never a maskable one. A ref shows its target's title, from `find`'s `populate`.
|
|
116
|
+
- Filters: at most one condition per field, ANDed. Each field offers the operators its `where` schema allows: `is`, `is one of`, `>`, `contains`, `exists` and the rest.
|
|
117
|
+
- Sort: one column, by clicking its header, for the keys `find`'s sort enum lists.
|
|
118
|
+
- Pages: Next and Back over cursors. There are no page numbers ([0008](../../docs/decisions/0008-cursor-pagination.md)).
|
|
119
|
+
- A count of what the filters match, from `count` with the same `where`.
|
|
120
|
+
- A refused call is not retried: it would be refused again. Data refetches when the window regains focus.
|
|
121
|
+
- **A document:** `get` with every field `populate` takes.
|
|
122
|
+
- A populated ref links to its document, labelled by the target's title field. A ref the caller may not read shows its id and "no access".
|
|
123
|
+
- Each relation has a tab, at `/<collection>/<id>/relations/<relation>`: its links page by page, with their fields, each linking to its target, and how many there are.
|
|
124
|
+
- The system fields (`id`, `createdAt`, `updatedAt`) and the tenant field (`x-lattice-tenant`) are shown apart, read-only.
|
|
125
|
+
- **Labels:** a field's label is its schema `title` (`.meta({ title })`), or its name in words: `companyId` reads "Company id".
|
|
126
|
+
|
|
127
|
+
## What it writes
|
|
128
|
+
|
|
129
|
+
Every write uses one form renderer, built from the procedure's input JSON Schema:
|
|
130
|
+
|
|
131
|
+
| Schema | Input |
|
|
132
|
+
| --- | --- |
|
|
133
|
+
| `string` | A text box. `format: date-time` is a date and time, sent as ISO. An `enum` is a select. |
|
|
134
|
+
| `number`, `integer` | A number box, with `minimum` and `maximum`. |
|
|
135
|
+
| `boolean` | A checkbox, or a select of yes, no and none when null is allowed. |
|
|
136
|
+
| A ref (`x-lattice-ref`) | A search over the target's title field (`contains`, through its `find`; Enter picks the first match), or an id box when the target has no title field. |
|
|
137
|
+
| An array of strings, enums or refs | One string per line, a checkbox per value, or a list of picked documents. Empty is `null` when null is allowed. |
|
|
138
|
+
| Anything else, such as an object | JSON text. |
|
|
139
|
+
|
|
140
|
+
A default fills the input. A form sends only the fields the user changed, so an untouched field keeps its default on create and its value on edit. Clearing a field sends `null` where its input takes it: a nullable field stores `null`, and on edit an optional field is removed. Clearing a required or defaulted field says "This field is required." at the field and sends nothing. No input takes the system fields or the tenant field.
|
|
141
|
+
|
|
142
|
+
- **Create** (`/<collection>/new`) renders `create`'s input, then opens the new document.
|
|
143
|
+
- **Edit** (`/<collection>/<id>/edit`) renders `update`'s input, filled from `get`, and sends only the fields that changed from what the form opened with, even if the document refetches meanwhile. A field the caller did not receive is not in the form, so a withheld value is never sent back.
|
|
144
|
+
- **Delete** asks first, then shows the list. A `REFERENCED` refusal says what still refers to the document, such as "Deals still refer to this company (Company id).", and links to that list filtered to those documents. When a relation's links refer to it, it names the relation, such as "Deals still list this contact (Contacts).", and links to the parents' list, which cannot be filtered to the ones that do.
|
|
145
|
+
- **Methods.** A method whose input has an `id` is an action on its document's page; one without is an action on its collection's list. Each is labelled by its name in words, with its summary beside it. Its form is its input but `id`. With no other field it is a button: a read runs at once, and a write asks first. A destructive method always asks. When it returns the page's document, the page refreshes; anything else is shown read-only.
|
|
146
|
+
- **Relations.** A relation's tab edits its `set`: it loads every link, up to the 1000 one set takes, and says so when there are more. Add a target, remove one, or change a link's fields, then save the whole set after a confirmation. A refusal keeps the edits.
|
|
147
|
+
|
|
148
|
+
After a write, the admin refetches what the write could have changed: the collection's documents, lists and counts, and a relation's target, where they stand on screen. A delete empties the collection's cached lists instead, so the list it opens fetches fresh and never shows the deleted document.
|
|
149
|
+
|
|
150
|
+
The server decides what a caller sees, and the admin shows what it is sent:
|
|
151
|
+
|
|
152
|
+
- A field withheld from the caller is absent from the document and from the list's columns. A field rule is per caller, not per document, so a maskable field that no loaded document carries is withheld from this caller.
|
|
153
|
+
- A filter or sort on a withheld field is refused as `VALIDATION`. The admin shows the server's message at that filter or column.
|
|
154
|
+
- A `VALIDATION` on a write shows each issue at the field its path names, and any other issue in the form's alert. The admin does not validate before the server does.
|
|
155
|
+
- Any other refusal, such as `FORBIDDEN`, `NOT_FOUND`, `CONFLICT` or an app's declared error, shows its code and message. A missing document shows not-found.
|
|
156
|
+
|
|
157
|
+
## What it leaves out
|
|
158
|
+
|
|
159
|
+
Bulk actions and bulk edits, OR groups, multi-column sort, CSV import and export, saved views, dashboards, audit history, i18n, client-side validation, and per-collection custom pages, forms or field renderers.
|
package/dist/admin.css
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) 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-border-style:solid;--tw-leading:initial;--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-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-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:0px;--scroll-fade-b:0px;--scroll-fade-s:0px;--scroll-fade-e:0px;--scroll-fade-mask:initial;--shimmer-image:initial;--shimmer-text-fill:initial}}}@layer theme{:root,:host{--font-sans:-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-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-black:#000;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-2xl:42rem;--container-6xl:72rem;--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-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--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;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-md:calc(var(--radius) * .8);--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-xs:4px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}body{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{.\@container\/card-header{container:card-header/inline-size}.\@container\/field-group{container:field-group/inline-size}.pointer-events-none{pointer-events:none}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.right-2{right:calc(var(--spacing) * 2)}.right-2\.5{right:calc(var(--spacing) * 2.5)}.left-1\/2{left:50%}.isolate{isolation:isolate}.z-50{z-index:50}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.mx-auto{margin-inline:auto}.-my-2{margin-block:calc(var(--spacing) * -2)}.mt-4{margin-top:calc(var(--spacing) * 4)}.-mb-4{margin-bottom:calc(var(--spacing) * -4)}.-mb-px{margin-bottom:-1px}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.ml-4{margin-left:calc(var(--spacing) * 4)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.field-sizing-content{field-sizing:content}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-screen{min-height:100vh}.w-2\/3{width:66.6667%}.w-32{width:calc(var(--spacing) * 32)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.animate-pulse{animation:var(--animate-pulse)}.list-disc{list-style-type:disc}.appearance-none{appearance:none}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-\[12rem_1fr\]{grid-template-columns:12rem 1fr}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-\(--card-spacing\){gap:var(--card-spacing)}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded-4xl{border-radius:calc(var(--radius) * 2.6)}.rounded-\[min\(var\(--radius-md\)\,10px\)\]{border-radius:min(var(--radius-md), 10px)}.rounded-\[min\(var\(--radius-md\)\,12px\)\]{border-radius:min(var(--radius-md), 12px)}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) * .8)}.rounded-xl{border-radius:calc(var(--radius) * 1.4)}.rounded-t-xl{border-top-left-radius:calc(var(--radius) * 1.4);border-top-right-radius:calc(var(--radius) * 1.4)}.rounded-b-xl{border-bottom-right-radius:calc(var(--radius) * 1.4);border-bottom-left-radius:calc(var(--radius) * 1.4)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-border{border-color:var(--border)}.border-input{border-color:var(--input)}.border-transparent{border-color:#0000}.bg-\[Canvas\]{background-color:canvas}.bg-background{background-color:var(--background)}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.bg-black\/10{background-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.bg-muted,.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/50{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.bg-clip-padding{background-clip:padding-box}.p-\(--card-spacing\){padding:var(--card-spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-\(--card-spacing\){padding-inline:var(--card-spacing)}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-\(--card-spacing\){padding-block:var(--card-spacing)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pl-2\.5{padding-left:calc(var(--spacing) * 2.5)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-sm\/relaxed{font-size:var(--text-sm);line-height:var(--leading-relaxed)}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.8rem\]{font-size:.8rem}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.text-balance{text-wrap:balance}.whitespace-nowrap{white-space:nowrap}.text-\[CanvasText\]{color:canvastext}.text-card-foreground{color:var(--card-foreground)}.text-destructive{color:var(--destructive)}.text-foreground{color:var(--foreground)}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-secondary-foreground{color:var(--secondary-foreground)}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.accent-primary{accent-color:var(--primary)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-foreground\/10{--tw-ring-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.ring-foreground\/10{--tw-ring-color:color-mix(in oklab, var(--foreground) 10%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[--card-spacing\:--spacing\(4\)\]{--card-spacing:calc(var(--spacing) * 4)}:is(.\*\:w-full>*){width:100%}:is(:where(.group\/field):has(:where([data-orientation=horizontal])) .group-has-data-horizontal\/field\:text-balance){text-wrap:balance}:is(:where(.group\/alert):has(>svg) .group-has-\[\>svg\]\/alert\:col-start-2){grid-column-start:2}:is(:where(.group)[data-disabled=true] .group-data-\[disabled\=true\]\:pointer-events-none){pointer-events:none}:is(:where(.group)[data-disabled=true] .group-data-\[disabled\=true\]\:opacity-50),:is(:where(.group\/field)[data-disabled=true] .group-data-\[disabled\=true\]\/field\:opacity-50){opacity:.5}:is(:where(.group\/alert-dialog-content)[data-size=sm] .group-data-\[size\=sm\]\/alert-dialog-content\:grid){display:grid}:is(:where(.group\/alert-dialog-content)[data-size=sm] .group-data-\[size\=sm\]\/alert-dialog-content\:grid-cols-2){grid-template-columns:repeat(2,minmax(0,1fr))}:is(:where(.group\/card)[data-size=sm] .group-data-\[size\=sm\]\/card\:text-sm){font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}:is(:where(.group\/field-group)[data-variant=outline] .group-data-\[variant\=outline\]\/field-group\:-mb-2){margin-bottom:calc(var(--spacing) * -2)}:is(:where(.peer):disabled~.peer-disabled\:cursor-not-allowed){cursor:not-allowed}:is(:where(.peer):disabled~.peer-disabled\:opacity-50){opacity:.5}.selection\:bg-primary ::selection{background-color:var(--primary)}.selection\:bg-primary::selection{background-color:var(--primary)}.selection\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-6::file-selector-button{height:calc(var(--spacing) * 6)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.last\:mt-0:last-child{margin-top:0}@media (hover:hover){.hover\:bg-\[color-mix\(in_oklch\,var\(--secondary\)\,var\(--foreground\)_5\%\)\]:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-\[color-mix\(in_oklch\,var\(--secondary\)\,var\(--foreground\)_5\%\)\]:hover{background-color:color-mix(in oklch,var(--secondary),var(--foreground) 5%)}}.hover\:bg-destructive\/20:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/20:hover{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.hover\:bg-muted:hover,.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab, var(--primary) 80%, transparent)}}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:underline:hover{text-decoration-line:underline}}.focus-visible\:border-destructive\/40:focus-visible{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:border-destructive\/40:focus-visible{border-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-3:focus-visible,.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.active\:not-aria-\[haspopup\]\:translate-y-px:active:not([aria-haspopup]){--tw-translate-y:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-input\/50:disabled{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.disabled\:bg-input\/50:disabled{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.disabled\:opacity-50:disabled{opacity:.5}:where([data-slot=button-group]) .in-data-\[slot\=button-group\]\:rounded-lg{border-radius:var(--radius)}.has-aria-expanded\:bg-muted\/50:has([aria-expanded=true]){background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.has-aria-expanded\:bg-muted\/50:has([aria-expanded=true]){background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.has-data-\[icon\=inline-end\]\:pr-1\.5:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 1.5)}.has-data-\[icon\=inline-end\]\:pr-2:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 2)}.has-data-\[icon\=inline-start\]\:pl-1\.5:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 1.5)}.has-data-\[icon\=inline-start\]\:pl-2:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 2)}.has-data-\[slot\=alert-action\]\:relative:has([data-slot=alert-action]){position:relative}.has-data-\[slot\=alert-action\]\:pr-18:has([data-slot=alert-action]){padding-right:calc(var(--spacing) * 18)}.has-data-\[slot\=alert-dialog-media\]\:grid-rows-\[auto_auto_1fr\]:has([data-slot=alert-dialog-media]){grid-template-rows:auto auto 1fr}.has-data-\[slot\=alert-dialog-media\]\:gap-x-4:has([data-slot=alert-dialog-media]){column-gap:calc(var(--spacing) * 4)}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-data-\[slot\=card-description\]\:grid-rows-\[auto_auto\]:has([data-slot=card-description]){grid-template-rows:auto auto}.has-data-\[slot\=card-footer\]\:pb-0:has([data-slot=card-footer]){padding-bottom:0}.has-data-checked\:border-primary\/30:has(:where([data-state=checked]),:where([data-checked]:not([data-checked=false]))){border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.has-data-checked\:border-primary\/30:has(:where([data-state=checked]),:where([data-checked]:not([data-checked=false]))){border-color:color-mix(in oklab, var(--primary) 30%, transparent)}}.has-data-checked\:bg-primary\/5:has(:where([data-state=checked]),:where([data-checked]:not([data-checked=false]))){background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.has-data-checked\:bg-primary\/5:has(:where([data-state=checked]),:where([data-checked]:not([data-checked=false]))){background-color:color-mix(in oklab, var(--primary) 5%, transparent)}}.has-\[select\:disabled\]\:opacity-50:has(:is(select:disabled)){opacity:.5}.has-\[\>\[data-slot\=checkbox-group\]\]\:gap-3:has(>[data-slot=checkbox-group]){gap:calc(var(--spacing) * 3)}.has-\[\>\[data-slot\=field-content\]\]\:items-start:has(>[data-slot=field-content]){align-items:flex-start}.has-\[\>\[data-slot\=field\]\]\:w-full:has(>[data-slot=field]){width:100%}.has-\[\>\[data-slot\=field\]\]\:flex-col:has(>[data-slot=field]){flex-direction:column}.has-\[\>\[data-slot\=field\]\]\:rounded-lg:has(>[data-slot=field]){border-radius:var(--radius)}.has-\[\>\[data-slot\=field\]\]\:border:has(>[data-slot=field]){border-style:var(--tw-border-style);border-width:1px}@media (hover:hover){.has-\[\>\[data-slot\=field\]\]\:not-has-\[\:disabled\,\[data-disabled\]\]\:hover\:bg-muted\/50:has(>[data-slot=field]):not(:has(:is(:disabled,[data-disabled]))):hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.has-\[\>\[data-slot\=field\]\]\:not-has-\[\:disabled\,\[data-disabled\]\]\:hover\:bg-muted\/50:has(>[data-slot=field]):not(:has(:is(:disabled,[data-disabled]))):hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}}.has-\[\>\[data-slot\=field\]\]\:has-\[\:focus-visible\]\:border-ring:has(>[data-slot=field]):has(:focus-visible){border-color:var(--ring)}.has-\[\>\[data-slot\=field\]\]\:has-\[\:focus-visible\]\:ring-3:has(>[data-slot=field]):has(:focus-visible){--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.has-\[\>\[data-slot\=field\]\]\:has-\[\:focus-visible\]\:ring-ring\/50:has(>[data-slot=field]):has(:focus-visible){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.has-\[\>\[data-slot\=field\]\]\:has-\[\:focus-visible\]\:ring-ring\/50:has(>[data-slot=field]):has(:focus-visible){--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.has-\[\>\[data-slot\=radio-group\]\]\:gap-3:has(>[data-slot=radio-group]){gap:calc(var(--spacing) * 3)}.has-\[\>img\:first-child\]\:pt-0:has(>img:first-child){padding-top:0}.has-\[\>svg\]\:grid-cols-\[auto_1fr\]:has(>svg){grid-template-columns:auto 1fr}.has-\[\>svg\]\:gap-x-2:has(>svg){column-gap:calc(var(--spacing) * 2)}.aria-expanded\:bg-muted[aria-expanded=true]{background-color:var(--muted)}.aria-expanded\:bg-secondary[aria-expanded=true]{background-color:var(--secondary)}.aria-expanded\:text-foreground[aria-expanded=true]{color:var(--foreground)}.aria-expanded\:text-secondary-foreground[aria-expanded=true]{color:var(--secondary-foreground)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-3[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.aria-\[current\=page\]\:border-foreground[aria-current=page]{border-color:var(--foreground)}.data-\[invalid\=true\]\:text-destructive[data-invalid=true]{color:var(--destructive)}.data-\[size\=default\]\:max-w-xs[data-size=default]{max-width:var(--container-xs)}.data-\[size\=sm\]\:h-7[data-size=sm]{height:calc(var(--spacing) * 7)}.data-\[size\=sm\]\:max-w-xs[data-size=sm]{max-width:var(--container-xs)}.data-\[size\=sm\]\:rounded-\[min\(var\(--radius-md\)\,10px\)\][data-size=sm]{border-radius:min(var(--radius-md), 10px)}.data-\[size\=sm\]\:py-0\.5[data-size=sm]{padding-block:calc(var(--spacing) * .5)}.data-\[size\=sm\]\:\[--card-spacing\:--spacing\(3\)\][data-size=sm]{--card-spacing:calc(var(--spacing) * 3)}.data-\[size\=sm\]\:has-data-\[slot\=card-footer\]\:pb-0[data-size=sm]:has([data-slot=card-footer]){padding-bottom:0}:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:color-mix(in oklab, var(--destructive) 90%, transparent)}}.data-\[slot\=checkbox-group\]\:gap-3[data-slot=checkbox-group]{gap:calc(var(--spacing) * 3)}:is(.\*\:data-\[slot\=field\]\:p-2\.5>*)[data-slot=field]{padding:calc(var(--spacing) * 2.5)}:is(.\*\:data-\[slot\=field-group\]\:gap-4>*)[data-slot=field-group]{gap:calc(var(--spacing) * 4)}:is(.\*\:data-\[slot\=field-label\]\:flex-auto>*)[data-slot=field-label]{flex:auto}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}.data-\[variant\=label\]\:text-sm[data-variant=label]{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.data-\[variant\=legend\]\:text-base[data-variant=legend]{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.nth-last-2\:-mt-1:nth-last-child(2){margin-top:calc(var(--spacing) * -1)}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.supports-backdrop-filter\:backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}}@media (min-width:40rem){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}:is(:where(.group\/alert-dialog-content)[data-size=default] .sm\:group-data-\[size\=default\]\/alert-dialog-content\:row-span-2){grid-row:span 2/span 2}:is(:where(.group\/alert-dialog-content)[data-size=default] .sm\:group-data-\[size\=default\]\/alert-dialog-content\:place-items-start){place-items:start}:is(:where(.group\/alert-dialog-content)[data-size=default] .sm\:group-data-\[size\=default\]\/alert-dialog-content\:text-left){text-align:left}:is(:where(.group\/alert-dialog-content):has([data-slot=alert-dialog-media]) :is(:where(.group\/alert-dialog-content)[data-size=default] .sm\:group-data-\[size\=default\]\/alert-dialog-content\:group-has-data-\[slot\=alert-dialog-media\]\/alert-dialog-content\:col-start-2)){grid-column-start:2}:is(:where(.group\/alert-dialog-content)[data-size=default] .sm\:group-data-\[size\=default\]\/alert-dialog-content\:has-data-\[slot\=alert-dialog-media\]\:grid-rows-\[auto_1fr\]):has([data-slot=alert-dialog-media]){grid-template-rows:auto 1fr}.data-\[size\=default\]\:sm\:max-w-sm[data-size=default]{max-width:var(--container-sm)}}@media (min-width:48rem){.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.md\:text-pretty{text-wrap:pretty}}@media (min-width:64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@container field-group (min-width:28rem){.\@md\/field-group\:flex-row{flex-direction:row}.\@md\/field-group\:items-center{align-items:center}:is(.\@md\/field-group\:\*\:w-auto>*){width:auto}.\@md\/field-group\:has-\[\>\[data-slot\=field-content\]\]\:items-start:has(>[data-slot=field-content]){align-items:flex-start}:is(.\@md\/field-group\:\*\:data-\[slot\=field-label\]\:flex-auto>*)[data-slot=field-label]{flex:auto}}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:bg-destructive\/20:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-destructive\/20:is(.dark *){background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}@media (hover:hover){.dark\:hover\:bg-destructive\/30:is(.dark *):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-destructive\/30:is(.dark *):hover{background-color:color-mix(in oklab, var(--destructive) 30%, transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:disabled\:bg-input\/80:is(.dark *):disabled{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:disabled\:bg-input\/80:is(.dark *):disabled{background-color:color-mix(in oklab, var(--input) 80%, transparent)}}.dark\:has-data-checked\:border-primary\/20:is(.dark *):has(:where([data-state=checked]),:where([data-checked]:not([data-checked=false]))){border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.dark\:has-data-checked\:border-primary\/20:is(.dark *):has(:where([data-state=checked]),:where([data-checked]:not([data-checked=false]))){border-color:color-mix(in oklab, var(--primary) 20%, transparent)}}.dark\:has-data-checked\:bg-primary\/10:is(.dark *):has(:where([data-state=checked]),:where([data-checked]:not([data-checked=false]))){background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.dark\:has-data-checked\:bg-primary\/10:is(.dark *):has(:where([data-state=checked]),:where([data-checked]:not([data-checked=false]))){background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.dark\:aria-invalid\:border-destructive\/50:is(.dark *)[aria-invalid=true]{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:border-destructive\/50:is(.dark *)[aria-invalid=true]{border-color:color-mix(in oklab, var(--destructive) 50%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.data-open\:animate-in:where([data-state=open]),.data-open\:animate-in:where([data-open]:not([data-open=false])){animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-open\:fade-in-0:where([data-state=open]),.data-open\:fade-in-0:where([data-open]:not([data-open=false])){--tw-enter-opacity:0}.data-open\:zoom-in-95:where([data-state=open]),.data-open\:zoom-in-95:where([data-open]:not([data-open=false])){--tw-enter-scale:.95}.data-closed\:animate-out:where([data-state=closed]),.data-closed\:animate-out:where([data-closed]:not([data-closed=false])){animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-closed\:fade-out-0:where([data-state=closed]),.data-closed\:fade-out-0:where([data-closed]:not([data-closed=false])){--tw-exit-opacity:0}.data-closed\:zoom-out-95:where([data-state=closed]),.data-closed\:zoom-out-95:where([data-closed]:not([data-closed=false])){--tw-exit-scale:.95}.data-horizontal\:h-px:where([data-orientation=horizontal]){height:1px}.data-horizontal\:w-full:where([data-orientation=horizontal]){width:100%}.data-vertical\:w-px:where([data-orientation=vertical]){width:1px}.data-vertical\:self-stretch:where([data-orientation=vertical]){align-self:stretch}.\[\&_a\]\:underline a{text-decoration-line:underline}.\[\&_a\]\:underline-offset-3 a{text-underline-offset:3px}@media (hover:hover){.\[\&_a\]\:hover\:text-foreground a:hover{color:var(--foreground)}}.\[\&_p\:not\(\:last-child\)\]\:mb-4 p:not(:last-child){margin-bottom:calc(var(--spacing) * 4)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3\.5 svg:not([class*=size-]){width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\.border-b\]\:pb-\(--card-spacing\).border-b{padding-bottom:var(--card-spacing)}:is(.\*\:\[a\]\:underline>*):is(a){text-decoration-line:underline}:is(.\*\:\[a\]\:underline-offset-3>*):is(a){text-underline-offset:3px}@media (hover:hover){.\[a\]\:hover\:bg-destructive\/20:is(a):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.\[a\]\:hover\:bg-destructive\/20:is(a):hover{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.\[a\]\:hover\:bg-muted:is(a):hover{background-color:var(--muted)}.\[a\]\:hover\:bg-primary\/80:is(a):hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.\[a\]\:hover\:bg-primary\/80:is(a):hover{background-color:color-mix(in oklab, var(--primary) 80%, transparent)}}.\[a\]\:hover\:bg-secondary\/80:is(a):hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.\[a\]\:hover\:bg-secondary\/80:is(a):hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.\[a\]\:hover\:text-muted-foreground:is(a):hover{color:var(--muted-foreground)}:is(.\*\:\[a\]\:hover\:text-foreground>*):is(a):hover{color:var(--foreground)}}:is(.\*\:\[img\:first-child\]\:rounded-t-xl>*):is(img:first-child){border-top-left-radius:calc(var(--radius) * 1.4);border-top-right-radius:calc(var(--radius) * 1.4)}:is(.\*\:\[img\:last-child\]\:rounded-b-xl>*):is(img:last-child){border-bottom-right-radius:calc(var(--radius) * 1.4);border-bottom-left-radius:calc(var(--radius) * 1.4)}:is(.\*\:\[svg\]\:row-span-2>*):is(svg){grid-row:span 2/span 2}:is(.\*\:\[svg\]\:translate-y-0\.5>*):is(svg){--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}:is(.\*\:\[svg\]\:text-current>*):is(svg){color:currentColor}:is(.\*\:\[svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4>*):is(svg:not([class*=size-])){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}:is(.\*\:\[svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-6>*):is(svg:not([class*=size-])){width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.\[\&\>\.sr-only\]\:w-auto>.sr-only{width:auto}.has-\[\>\[data-slot\=field-content\]\]\:\[\&\>\[role\=checkbox\]\,\[role\=radio\]\]\:mt-px:has(>[data-slot=field-content])>[role=checkbox],.has-\[\>\[data-slot\=field-content\]\]\:\[\&\>\[role\=checkbox\]\,\[role\=radio\]\]\:mt-px:has(>[data-slot=field-content]) [role=radio]{margin-top:1px}@container field-group (min-width:28rem){.\@md\/field-group\:has-\[\>\[data-slot\=field-content\]\]\:\[\&\>\[role\=checkbox\]\,\[role\=radio\]\]\:mt-px:has(>[data-slot=field-content])>[role=checkbox],.\@md\/field-group\:has-\[\>\[data-slot\=field-content\]\]\:\[\&\>\[role\=checkbox\]\,\[role\=radio\]\]\:mt-px:has(>[data-slot=field-content]) [role=radio]{margin-top:1px}}.\[\&\>a\]\:underline>a{text-decoration-line:underline}.\[\&\>a\]\:underline-offset-4>a{text-underline-offset:4px}.\[\&\>a\:hover\]\:text-primary>a:hover{color:var(--primary)}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-3\!>svg{width:calc(var(--spacing) * 3)!important;height:calc(var(--spacing) * 3)!important}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}[data-variant=legend]+.\[\[data-variant\=legend\]\+\&\]\:-mt-1\.5{margin-top:calc(var(--spacing) * -1.5)}}:root{color-scheme:light;--radius:.625rem;--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:oklch(20.5% 0 0);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0)}.dark,[data-theme=dark]{color-scheme:dark;--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:oklch(55.6% 0 0)}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@property --scroll-fade-t{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-b{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-s{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-e{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-mask{syntax:"*";inherits:false}@property --shimmer-angle{syntax:"<angle>";inherits:true;initial-value:20deg}@property --shimmer-image{syntax:"*";inherits:false}@property --shimmer-text-fill{syntax:"*";inherits:false}@media (prefers-reduced-motion:reduce){.shimmer{-webkit-text-fill-color:currentColor;background-image:none;animation:none}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}
|
package/dist/admin.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* An admin for a Lattice app, rendered from the catalog the app serves.
|
|
4
|
+
* The app supplies `fetch`, which adds its session and organization to each
|
|
5
|
+
* request, and mounts it on a catch-all route under `basePath`. Key it by
|
|
6
|
+
* organization, so a switch remounts it with an empty cache.
|
|
7
|
+
*/
|
|
8
|
+
export declare function Admin({ fetch, catalogUrl, basePath, header, }: {
|
|
9
|
+
/** Calls the app's server as the signed-in user: the catalog and every procedure. */
|
|
10
|
+
readonly fetch: typeof globalThis.fetch;
|
|
11
|
+
/** Where the app serves `catalog(contract)` as JSON. */
|
|
12
|
+
readonly catalogUrl: string;
|
|
13
|
+
/** The path the admin is mounted under, such as `/admin`. */
|
|
14
|
+
readonly basePath: string;
|
|
15
|
+
/** The app's part of the top bar, such as an organization switcher. */
|
|
16
|
+
readonly header?: ReactNode;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=admin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../src/admin.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAyIhD;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,UAAU,EACV,QAAQ,EACR,MAAM,GACP,EAAE;IACD,qFAAqF;IACrF,QAAQ,CAAC,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IACxC,wDAAwD;IACxD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,6DAA6D;IAC7D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,uEAAuE;IACvE,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;CAC7B,+BAaA"}
|
package/dist/admin.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import useSWR, { SWRConfig } from 'swr';
|
|
4
|
+
import { readCatalog } from './catalog.js';
|
|
5
|
+
import { collectionsOf } from './collections.js';
|
|
6
|
+
import { LinkProvider } from './data.js';
|
|
7
|
+
import { DetailPage } from './detail-page.js';
|
|
8
|
+
import { IndexPage } from './index-page.js';
|
|
9
|
+
import { ListPage } from './list-page.js';
|
|
10
|
+
import { CollectionsProvider, useCollection } from './model.js';
|
|
11
|
+
import { refusalOf } from './refusal.js';
|
|
12
|
+
import { Link, RouterProvider, useRouter } from './router.js';
|
|
13
|
+
import { ErrorAlert, Loading, NotFound } from './states.js';
|
|
14
|
+
import { CreatePage, EditPage } from './write-pages.js';
|
|
15
|
+
/** The catalog at `url`, read with the app's fetch, or a throw saying why not. */
|
|
16
|
+
async function loadCatalog(fetch, url) {
|
|
17
|
+
const response = await fetch(url);
|
|
18
|
+
if (!response.ok) {
|
|
19
|
+
throw new Error(`The catalog at ${url} answered ${response.status}.`);
|
|
20
|
+
}
|
|
21
|
+
const read = readCatalog(await response.json());
|
|
22
|
+
if (!read.ok) {
|
|
23
|
+
throw new Error(`The catalog at ${url} cannot be read. ${read.reason}`);
|
|
24
|
+
}
|
|
25
|
+
return read.catalog;
|
|
26
|
+
}
|
|
27
|
+
/** The page the route names. */
|
|
28
|
+
function Page() {
|
|
29
|
+
const { route } = useRouter();
|
|
30
|
+
const collection = useCollection(route.page === 'index' || route.page === 'not-found'
|
|
31
|
+
? undefined
|
|
32
|
+
: route.collection);
|
|
33
|
+
if (route.page === 'index')
|
|
34
|
+
return _jsx(IndexPage, {});
|
|
35
|
+
if (route.page === 'not-found')
|
|
36
|
+
return _jsx(NotFound, { what: "No page here." });
|
|
37
|
+
if (collection === undefined) {
|
|
38
|
+
return _jsx(NotFound, { what: `No collection "${route.collection}".` });
|
|
39
|
+
}
|
|
40
|
+
if (route.page === 'list') {
|
|
41
|
+
return (_jsx(ListPage, { collection: collection, query: route.query }, collection.slug));
|
|
42
|
+
}
|
|
43
|
+
if (route.page === 'create') {
|
|
44
|
+
return _jsx(CreatePage, { collection: collection }, collection.slug);
|
|
45
|
+
}
|
|
46
|
+
if (route.page === 'edit') {
|
|
47
|
+
return (_jsx(EditPage, { collection: collection, id: route.id }, `${collection.slug}/${route.id}`));
|
|
48
|
+
}
|
|
49
|
+
return (_jsx(DetailPage, { collection: collection, id: route.id, tab: route.tab, query: route.query }, `${collection.slug}/${route.id}`));
|
|
50
|
+
}
|
|
51
|
+
/** The pages, once the catalog has loaded. */
|
|
52
|
+
function Catalog({ fetch, catalogUrl, }) {
|
|
53
|
+
// The catalog changes only with a deploy, so it is read once per mount.
|
|
54
|
+
const { data, error } = useSWR(['lattice-admin:catalog', catalogUrl], ([, url]) => loadCatalog(fetch, url), {
|
|
55
|
+
revalidateOnFocus: false,
|
|
56
|
+
revalidateIfStale: false,
|
|
57
|
+
revalidateOnReconnect: false,
|
|
58
|
+
});
|
|
59
|
+
// Once per catalog, not per render: pages keep the same field objects.
|
|
60
|
+
const collections = useMemo(() => (data === undefined ? [] : collectionsOf(data)), [data]);
|
|
61
|
+
if (error !== undefined) {
|
|
62
|
+
return (_jsx(ErrorAlert, { title: "The admin cannot start", message: refusalOf(error).message }));
|
|
63
|
+
}
|
|
64
|
+
if (data === undefined)
|
|
65
|
+
return _jsx(Loading, {});
|
|
66
|
+
return (_jsx(CollectionsProvider, { collections: collections, children: _jsx(LinkProvider, { prefix: data.prefix, fetch: fetch, children: _jsx(Page, {}) }) }));
|
|
67
|
+
}
|
|
68
|
+
function TopBar({ header }) {
|
|
69
|
+
const { href } = useRouter();
|
|
70
|
+
return (_jsxs("header", { className: "flex items-center justify-between border-b px-6 py-3", children: [_jsx(Link, { className: "font-semibold", href: href(), children: "Admin" }), _jsx("div", { children: header })] }));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Each mount has its own cache. Data refetches when the window regains
|
|
74
|
+
* focus; a refusal is not retried, since it would answer the same again.
|
|
75
|
+
* A list keeps its rows on screen while the next page or sort loads.
|
|
76
|
+
*/
|
|
77
|
+
const swrConfig = {
|
|
78
|
+
provider: () => new Map(),
|
|
79
|
+
revalidateOnFocus: true,
|
|
80
|
+
shouldRetryOnError: false,
|
|
81
|
+
keepPreviousData: true,
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* An admin for a Lattice app, rendered from the catalog the app serves.
|
|
85
|
+
* The app supplies `fetch`, which adds its session and organization to each
|
|
86
|
+
* request, and mounts it on a catch-all route under `basePath`. Key it by
|
|
87
|
+
* organization, so a switch remounts it with an empty cache.
|
|
88
|
+
*/
|
|
89
|
+
export function Admin({ fetch, catalogUrl, basePath, header, }) {
|
|
90
|
+
return (_jsx(SWRConfig, { value: swrConfig, children: _jsx(RouterProvider, { basePath: basePath, children: _jsxs("div", { className: "min-h-screen bg-background text-foreground", children: [_jsx(TopBar, { header: header }), _jsx("main", { className: "mx-auto max-w-6xl p-6", children: _jsx(Catalog, { fetch: fetch, catalogUrl: catalogUrl }) })] }) }) }));
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=admin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../src/admin.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,OAAO,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,M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EAAC,sDAAsD,aACtE,KAAC,IAAI,IAAC,SAAS,EAAC,eAAe,EAAC,IAAI,EAAE,IAAI,EAAE,sBAErC,EACP,wBAAM,MAAM,GAAO,IACZ,CACV,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,SAAS,GAAG;IAChB,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,GAAG,EAAE;IACzB,iBAAiB,EAAE,IAAI;IACvB,kBAAkB,EAAE,KAAK;IACzB,gBAAgB,EAAE,IAAI;CACvB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,KAAK,CAAC,EACpB,KAAK,EACL,UAAU,EACV,QAAQ,EACR,MAAM,GAUP;IACC,OAAO,CACL,KAAC,SAAS,IAAC,KAAK,EAAE,SAAS,YACzB,KAAC,cAAc,IAAC,QAAQ,EAAE,QAAQ,YAChC,eAAK,SAAS,EAAC,4CAA4C,aACzD,KAAC,MAAM,IAAC,MAAM,EAAE,MAAM,GAAI,EAC1B,eAAM,SAAS,EAAC,uBAAuB,YACrC,KAAC,OAAO,IAAC,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,GAAI,GAC5C,IACH,GACS,GACP,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { LatticeMeta } from '@latticecms/core';
|
|
2
|
+
import type { JsonSchema } from '@ts-pf/docs';
|
|
3
|
+
/** What a procedure does to data, from its `mcp` meta. */
|
|
4
|
+
export type Effect = 'read' | 'write' | 'destructive';
|
|
5
|
+
/** A procedure's docs, as far as the admin reads them. */
|
|
6
|
+
export type Docs = {
|
|
7
|
+
readonly summary: string | undefined;
|
|
8
|
+
readonly description: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
/** A Lattice procedure, as the admin reads it from the served catalog. */
|
|
11
|
+
export type Procedure = {
|
|
12
|
+
readonly path: readonly string[];
|
|
13
|
+
readonly lattice: LatticeMeta;
|
|
14
|
+
readonly docs: Docs | undefined;
|
|
15
|
+
/** Its MCP effect: whether it reads, writes, or destroys. */
|
|
16
|
+
readonly effect: Effect | undefined;
|
|
17
|
+
readonly input: JsonSchema | undefined;
|
|
18
|
+
readonly output: JsonSchema | undefined;
|
|
19
|
+
/** The fields `populate` may name, when the procedure populates. */
|
|
20
|
+
readonly expand: readonly string[];
|
|
21
|
+
readonly errors: readonly {
|
|
22
|
+
readonly code: string;
|
|
23
|
+
}[];
|
|
24
|
+
};
|
|
25
|
+
/** The catalog the app serves, narrowed to what the admin reads. */
|
|
26
|
+
export type Catalog = {
|
|
27
|
+
/** Where procedures are served, such as `/rpc`. */
|
|
28
|
+
readonly prefix: string;
|
|
29
|
+
readonly procedures: readonly Procedure[];
|
|
30
|
+
};
|
|
31
|
+
/** A catalog, or what made it unreadable. */
|
|
32
|
+
export type CatalogRead = {
|
|
33
|
+
readonly ok: true;
|
|
34
|
+
readonly catalog: Catalog;
|
|
35
|
+
} | {
|
|
36
|
+
readonly ok: false;
|
|
37
|
+
readonly reason: string;
|
|
38
|
+
};
|
|
39
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
40
|
+
/**
|
|
41
|
+
* Narrows the JSON the app serves to the catalog the admin reads. It checks
|
|
42
|
+
* only what the admin uses, and says why the first unreadable part fails.
|
|
43
|
+
*/
|
|
44
|
+
export declare function readCatalog(value: unknown): CatalogRead;
|
|
45
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,0DAA0D;AAC1D,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,CAAC;AAStD,0DAA0D;AAC1D,MAAM,MAAM,IAAI,GAAG;IACjB,QAAQ,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AAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAuBvD"}
|
package/dist/catalog.js
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
const effects = ['read', 'write', 'destructive'];
|
|
2
|
+
function effectOf(mcp) {
|
|
3
|
+
if (!isRecord(mcp))
|
|
4
|
+
return undefined;
|
|
5
|
+
return effects.find((effect) => effect === mcp.effect);
|
|
6
|
+
}
|
|
7
|
+
export function isRecord(value) {
|
|
8
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
9
|
+
}
|
|
10
|
+
function isStringArray(value) {
|
|
11
|
+
return (Array.isArray(value) && value.every((item) => typeof item === 'string'));
|
|
12
|
+
}
|
|
13
|
+
const operations = ['find', 'count', 'get', 'create', 'update', 'delete'];
|
|
14
|
+
function isLabel(value) {
|
|
15
|
+
return (isRecord(value) &&
|
|
16
|
+
typeof value.singular === 'string' &&
|
|
17
|
+
typeof value.plural === 'string');
|
|
18
|
+
}
|
|
19
|
+
function isLatticeMeta(value) {
|
|
20
|
+
if (!isRecord(value) ||
|
|
21
|
+
typeof value.collection !== 'string' ||
|
|
22
|
+
!isLabel(value.label)) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
const { operation } = value;
|
|
26
|
+
if (typeof operation !== 'string')
|
|
27
|
+
return false;
|
|
28
|
+
if (operation === 'list' || operation === 'set') {
|
|
29
|
+
return (typeof value.relation === 'string' && typeof value.target === 'string');
|
|
30
|
+
}
|
|
31
|
+
if (operation === 'method')
|
|
32
|
+
return typeof value.method === 'string';
|
|
33
|
+
return operations.includes(operation);
|
|
34
|
+
}
|
|
35
|
+
function optionalString(value) {
|
|
36
|
+
if (value === undefined || typeof value === 'string')
|
|
37
|
+
return value;
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
/** The summary and description of a docs entry, or null when unreadable. */
|
|
41
|
+
function docsOf(value) {
|
|
42
|
+
if (!isRecord(value))
|
|
43
|
+
return null;
|
|
44
|
+
const summary = optionalString(value.summary);
|
|
45
|
+
const description = optionalString(value.description);
|
|
46
|
+
if (summary === null || description === null)
|
|
47
|
+
return null;
|
|
48
|
+
return { summary, description };
|
|
49
|
+
}
|
|
50
|
+
/** The JSON Schema of a catalog schema entry, when it has one. */
|
|
51
|
+
function jsonSchemaOf(value) {
|
|
52
|
+
if (!isRecord(value) || value.kind !== 'json')
|
|
53
|
+
return undefined;
|
|
54
|
+
return isRecord(value.jsonSchema) ? value.jsonSchema : undefined;
|
|
55
|
+
}
|
|
56
|
+
function expandOf(value) {
|
|
57
|
+
if (value === undefined)
|
|
58
|
+
return [];
|
|
59
|
+
if (!isRecord(value) || !isRecord(value.fields))
|
|
60
|
+
return undefined;
|
|
61
|
+
return Object.keys(value.fields);
|
|
62
|
+
}
|
|
63
|
+
function errorsOf(value) {
|
|
64
|
+
if (!Array.isArray(value))
|
|
65
|
+
return undefined;
|
|
66
|
+
const errors = [];
|
|
67
|
+
for (const error of value) {
|
|
68
|
+
if (!isRecord(error) || typeof error.code !== 'string')
|
|
69
|
+
return undefined;
|
|
70
|
+
errors.push({ code: error.code });
|
|
71
|
+
}
|
|
72
|
+
return errors;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* A procedure entry, or why it cannot be read. An entry without a `lattice`
|
|
76
|
+
* meta key is not a Lattice procedure, and is skipped.
|
|
77
|
+
*/
|
|
78
|
+
function procedureOf(value, at) {
|
|
79
|
+
const named = `The catalog's ${at}`;
|
|
80
|
+
if (!isRecord(value))
|
|
81
|
+
return { reason: `${named} is not an object.` };
|
|
82
|
+
if (!isStringArray(value.path))
|
|
83
|
+
return { reason: `${named} has no path.` };
|
|
84
|
+
if (!isRecord(value.meta))
|
|
85
|
+
return { reason: `${named} has no meta.` };
|
|
86
|
+
const { lattice } = value.meta;
|
|
87
|
+
if (lattice === undefined)
|
|
88
|
+
return null;
|
|
89
|
+
if (!isLatticeMeta(lattice)) {
|
|
90
|
+
return { reason: `${named}.meta.lattice is not Lattice's procedure meta.` };
|
|
91
|
+
}
|
|
92
|
+
const docs = value.meta.docs === undefined ? undefined : docsOf(value.meta.docs);
|
|
93
|
+
if (docs === null) {
|
|
94
|
+
return {
|
|
95
|
+
reason: `${named}.meta.docs has a summary or description that is not text.`,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
const expand = expandOf(value.expand);
|
|
99
|
+
if (expand === undefined) {
|
|
100
|
+
return { reason: `${named}.expand has no fields.` };
|
|
101
|
+
}
|
|
102
|
+
const errors = errorsOf(value.errors);
|
|
103
|
+
if (errors === undefined) {
|
|
104
|
+
return { reason: `${named}.errors is not a list of errors with codes.` };
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
path: value.path,
|
|
108
|
+
lattice,
|
|
109
|
+
docs,
|
|
110
|
+
effect: effectOf(value.meta.mcp),
|
|
111
|
+
input: jsonSchemaOf(value.input),
|
|
112
|
+
output: jsonSchemaOf(value.output),
|
|
113
|
+
expand,
|
|
114
|
+
errors,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Narrows the JSON the app serves to the catalog the admin reads. It checks
|
|
119
|
+
* only what the admin uses, and says why the first unreadable part fails.
|
|
120
|
+
*/
|
|
121
|
+
export function readCatalog(value) {
|
|
122
|
+
if (!isRecord(value))
|
|
123
|
+
return { ok: false, reason: 'It is not a JSON object.' };
|
|
124
|
+
if (value.catalogVersion !== 1) {
|
|
125
|
+
return { ok: false, reason: 'Its catalogVersion is not 1.' };
|
|
126
|
+
}
|
|
127
|
+
if (typeof value.prefix !== 'string') {
|
|
128
|
+
return { ok: false, reason: 'It has no prefix.' };
|
|
129
|
+
}
|
|
130
|
+
if (!Array.isArray(value.procedures)) {
|
|
131
|
+
return { ok: false, reason: 'It has no procedures.' };
|
|
132
|
+
}
|
|
133
|
+
const procedures = [];
|
|
134
|
+
for (const [index, entry] of value.procedures.entries()) {
|
|
135
|
+
const read = procedureOf(entry, `procedures[${index}]`);
|
|
136
|
+
if (read === null)
|
|
137
|
+
continue;
|
|
138
|
+
if ('reason' in read)
|
|
139
|
+
return { ok: false, reason: read.reason };
|
|
140
|
+
procedures.push(read);
|
|
141
|
+
}
|
|
142
|
+
if (procedures.length === 0) {
|
|
143
|
+
return { ok: false, reason: 'None of its procedures has Lattice meta.' };
|
|
144
|
+
}
|
|
145
|
+
return { ok: true, catalog: { prefix: value.prefix, procedures } };
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAMA,MAAM,OAAO,GAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;AAEpE,SAAS,QAAQ,CAAC,GAAY;IAC5B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IACrC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,CAAC,CAAC;AACzD,CAAC;AAkCD,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,CACL,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CACxE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAE1E,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,CACL,QAAQ,CAAC,KAAK,C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