diff --git a/.ci/coverage/admin b/.ci/coverage/admin
index ba526327..620c7091 100644
--- a/.ci/coverage/admin
+++ b/.ci/coverage/admin
@@ -1 +1 @@
-99.87% of lines, 7 not covered
+99.88% of lines, 7 not covered
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c47e17f3..6c22d859 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,10 @@ All notable changes are listed here. The format follows [Keep a Changelog](https
- Every source file starts with the Atrium copyright header. Pint adds it to PHP (`header_comment` in pint.json), `php scripts/copyright-header.php --fix` to Blade, Vue, JS, CSS, shell and YAML, and `tests/Unit/CopyrightHeaderTest.php` fails without it.
- Docs module (`alveby/atrium-docs`): documentation pages made from the Markdown of a repository, the README, `docs/`, the changelog and every package's README, at `/docs/{version}/{page}` and `/{lang}/docs/…`. A sidebar, a contents list, GitHub's heading anchors, code coloured on the server by Phiki with light and dark themes at 4.5:1 or more, search in the language of the page with suggestions as you type, "Edit this page on GitHub". A page without a translation is shown in English with a notice, its canonical pointing to the English page and its hreflang listing only real translations. `atrium:docs:pull v0.2.0` copies a release out of git as one more version; the newest release is the default and older ones say so. Interface in 15 languages.
- Module settings: a module names a `settings` class in its manifest (`extra.atrium.settings`), extending `Atrium\Admin\Modules\ModuleSettings`, with fields of the admin's own types, their rules and defaults, for all sites or for each (`$perSite`). The panel gets a **Modules** screen listing the installed modules and a settings screen for each; the `{key}.settings` permission is in the module's row of the role form. Values are read with `Setting::get('shop.currency')` (the current site's value, else the field's default) and kept in `admin_module_settings`. The manifest may set the module's `key` and `title`. The catalog has the first one: products on a page of a section, per site.
+- Record cache: public pages stay fast with dozens of properties, relations, pictures and translations per record. A model that `implements Cacheable` and `use CachesRecords` gets a card per record, a plain cached array built from its admin fields (every language, the relations of its link fields, SEO, pictures with thumbnails, the public URL, and what extenders add). `Model::cached($id)` and `Model::cachedMany($ids)` read cards in one multi-get and build the missing ones together in a few queries. Lists ask only for IDs: `->cachedIds()` keeps the IDs and the total of a page under a hash of the SQL, the page, the site and the language, `->cachedPaginate()` and `->cachedCards()` return cards; `RecordCache::remember()` keeps any other value under the models it reads. Catalog, news, pages, brands, stores, FAQ and reviews read through it, and the theme keeps its ready record view in the card. A save, delete or restore through Eloquent drops the record's cards in every site and language and the cards of same-model records that show it, and bumps a version counter for its lists and for cards that depend on the model, so the admin's change is on the site at once; `bulk()` drops once at the end of an import (the Bitrix commands drop everything once). Works on every Laravel store: tags on Redis and Memcached, version keys on the file and database stores; Redis is recommended. Module settings are kept in it too. The `atrium.cache.stats` filter gives monitoring the hits and misses of the finished request. On a warm cache a list or product page runs no query.
+- Page cache for visitors without a login (`ATRIUM_PAGE_CACHE=true`, off by default): whole pages keyed by the URL and the site, never for a signed-in admin, the CSRF token swapped for the visitor's on the way out, dropped by the same saves as the cards; `ETag`, `Last-Modified`, `304` and `Cache-Control` with `s-maxage` for a CDN (`private` when the page holds a form token).
+- `atrium:cache:warm` opens the home page and the first page of every list of every site and language (`--records` also builds every card). **Admin → Cache** shows the hit rate, the store and its size, and clears one module, one site or everything. In local mode with `APP_DEBUG` a line under public pages and an `X-Atrium-Debug` header count queries and cache hits.
+- A cache benchmark (`ATRIUM_BENCHMARK=1 vendor/bin/phpunit packages/theme/tests/CacheBenchmarkTest.php`): 10 000 products with 40 properties, list and product pages with the cache off, cold, warm and with the page cache. Guide: [docs/cache.md](docs/cache.md).
- AI module (`alveby/atrium-ai`, on the Laravel AI SDK): a **Generate** link under text fields marked `->ai()` writes a description, a preview, the SEO title, description and keywords, or a picture's alt text, and **Translate** fills a translatable field's other languages. The text is offered in a dialog to edit or drop; nothing is saved until the editor saves. The SEO fields of `HasAdminSeo` have it already. Providers come in chains per kind of work (text, vision, embeddings) with fallback on a limit or a timeout; the defaults are free tiers (Gemini, Groq, OpenRouter) or a local Ollama, keys only from `.env`, and no key means no buttons. The provider is called after the response or by a queue worker, so the form never waits; prompts are Blade views; `ai_usage` logs task, provider, tokens and time without the texts; `atrium:ai:status` shows the chains and the usage. The same over `POST /api/v1/ai/generate` and the `generate_text` MCP tool. A module adds its own MCP tools through `atrium.mcp.tools`.
- The AI module's helper: the Atrium arch in the corner of every admin page, animated, opens a chat that answers in the administrator's language from the guides and the module READMEs, and reads the records of the modules the administrator may view (tools `list_modules`, `describe_module`, `list_records`, `get_record`, `search_docs`), with links into the admin. It only reads. Other packages add tools in `atrium-ai.help.tools`; `ATRIUM_AI_HELP=false` turns it off. Interface in 15 languages.
- `DisplayField`: read-only HTML on the edit form, drawn from the record by the server (`->html(fn (Model $record): string => …)`), for order lines, summaries and links. It is not on the create form and nothing is taken from the request for it.
diff --git a/README.md b/README.md
index 2c6c46c6..2e7afb52 100644
--- a/README.md
+++ b/README.md
@@ -119,6 +119,7 @@ The Bitrix database is only read. The tabs, field order and list columns come ou
- [SEO: titles, hreflang, sitemaps, schema.org, redirects, the SEO check](docs/seo.md)
- [Your own module: fields, columns, tabs, permissions, languages, tests, a package](docs/modules.md)
- [Custom fields: add fields to any module from the admin, filters and facets on 100 000 records](docs/custom-fields.md)
+- [Cache: fast pages with dozens of properties, Redis, the page cache, CDN headers](docs/cache.md)
- [Moving from 1C-Bitrix, step by step](docs/bitrix.md)
- [Backups: databases and files to several places, schedules, health checks, restore](docs/backup.md)
- [CDN: pictures, resized copies and WebP/AVIF, cache purge, uploads to S3](docs/cdn.md)
diff --git a/config/atrium.php b/config/atrium.php
index d0fd93a8..17292057 100644
--- a/config/atrium.php
+++ b/config/atrium.php
@@ -11,6 +11,7 @@
use Atrium\Admin\Dashboard\Gadgets\PerformanceGadget;
use Atrium\Admin\Dashboard\Gadgets\SiteSpeedGadget;
use Atrium\Admin\Models\AdminUser;
+use Atrium\Admin\Models\PageTiming;
return [
/*
@@ -209,6 +210,11 @@
'route' => 'admin.api-tokens.index',
'icon' => 'settings',
],
+ [
+ 'label' => 'atrium::menu.cache',
+ 'route' => 'admin.cache.index',
+ 'icon' => 'settings',
+ ],
],
/*
@@ -441,4 +447,51 @@
'enabled' => (bool) env('ATRIUM_MCP_ENABLED', true),
'path' => 'mcp',
],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Cache
+ |--------------------------------------------------------------------------
+ |
+ | The record cache (docs/cache.md): lists answer with ids, records come
+ | from cards built once per language, and saving a record in the admin
+ | drops what showed it. Works on every Laravel store; Redis is the one to
+ | use in production (one MGET per list, tags free memory at once).
+ |
+ | store a store of config/cache.php, the default one when null
+ | strategy auto: tags where the store has them (Redis, Memcached),
+ | version keys elsewhere; versions: version keys everywhere
+ | ttl seconds: cards, lists of ids, full pages
+ | time_step lists that compare with "now" (active from/to) see time in
+ | steps of this many seconds, so their keys stay the same
+ | ignore models whose saves never touch the cache
+ | pages full-page cache for visitors who are not logged in to the
+ | admin; off by default (see docs/cache.md before turning on)
+ | debug a line under public pages with queries and cache hits, in
+ | the local environment with APP_DEBUG on
+ |
+ */
+ 'cache' => [
+ 'enabled' => (bool) env('ATRIUM_CACHE_ENABLED', true),
+ 'store' => env('ATRIUM_CACHE_STORE'),
+ 'strategy' => env('ATRIUM_CACHE_STRATEGY', 'auto'),
+ 'ttl' => [
+ 'cards' => (int) env('ATRIUM_CACHE_TTL_CARDS', 86400),
+ 'lists' => (int) env('ATRIUM_CACHE_TTL_LISTS', 3600),
+ 'pages' => (int) env('ATRIUM_CACHE_TTL_PAGES', 600),
+ ],
+ 'time_step' => 60,
+ 'stats' => true,
+ 'ignore' => [
+ PageTiming::class,
+ ],
+ 'pages' => [
+ 'enabled' => (bool) env('ATRIUM_PAGE_CACHE', false),
+ // Seconds a CDN may keep a page without the session's form token.
+ 'shared_max_age' => (int) env('ATRIUM_PAGE_CACHE_SHARED_MAX_AGE', 60),
+ // Paths never cached, as Request::is() patterns.
+ 'except' => [],
+ ],
+ 'debug' => (bool) env('ATRIUM_CACHE_DEBUG', true),
+ ],
];
diff --git a/docs/cache.md b/docs/cache.md
new file mode 100644
index 00000000..ce990dd7
--- /dev/null
+++ b/docs/cache.md
@@ -0,0 +1,273 @@
+# Cache
+
+Atrium keeps public pages fast even when a record has dozens of properties, relations, pictures and translations. The idea:
+
+- a list or a filter asks the database **only for IDs** (and the total), and keeps that answer;
+- each record is drawn from its own **card**, a cached array with everything a page shows; the cards of a page come in **one multi-get**, and the missing ones are built together, in a few queries, whatever their number;
+- a save drops exactly the cards and lists it touches, so an editor sees the change at once.
+
+On a warm cache a product page or a list page runs no query at all. A page cache for anonymous visitors (off by default) skips PHP's view work too.
+
+The cache works on every Laravel store. **Redis is recommended**.
+
+## Contents
+
+- [Stores](#stores)
+- [Making a module cacheable](#making-a-module-cacheable)
+- [Lists](#lists)
+- [Reading cards](#reading-cards)
+- [Other values: remember()](#other-values-remember)
+- [When the cache is dropped](#when-the-cache-is-dropped)
+- [Imports](#imports)
+- [Page cache](#page-cache)
+- [CDN](#cdn)
+- [Warming, the admin screen and the debug line](#warming-the-admin-screen-and-the-debug-line)
+- [Configuration](#configuration)
+- [Benchmark](#benchmark)
+
+## Stores
+
+| Store | How a group is dropped | Notes |
+|---|---|---|
+| `redis` | tags | Recommended: fast multi-get, tags, sizes in the admin. |
+| `memcached` | tags | Fine as well. |
+| `file`, `database` | version keys | Works; each card is a file or a row. |
+| `array` | tags | Tests only: lives one request. |
+
+The record cache uses the app's default store. To give it its own, set `ATRIUM_CACHE_STORE=redis` (a store from `config/cache.php`). For Redis:
+
+```dotenv
+CACHE_STORE=redis
+REDIS_CLIENT=phpredis
+REDIS_HOST=127.0.0.1
+```
+
+A store without tags gets **version keys** instead: every key carries a stamp made of a few counters (`all`, `site:{id}`, `card:{Class}`, `list:{Class}`), and dropping a group means bumping its counter. Old entries are never read again and expire with their TTL. `ATRIUM_CACHE_STRATEGY=versions` forces this on Redis too.
+
+## Making a module cacheable
+
+Add the `Cacheable` interface and the `CachesRecords` trait to the model:
+
+```php
+use Atrium\Admin\Cache\CachesRecords;
+use Atrium\Admin\Contracts\Cacheable;
+
+class Product extends Model implements Administrable, Cacheable
+{
+ use CachesRecords, HasAdminSeo, InteractsWithAdmin, Translatable;
+}
+```
+
+That is all for most models. The card is built from the model's admin fields:
+
+- every column, with translations as they are (the card holds the record in every language);
+- the relations behind `BelongsToField`, `BelongsToManyField` and the like, loaded for all missing cards at once;
+- SEO meta, pictures and galleries (with thumbnails), the public URL;
+- what extenders add (the theme puts in the ready view of the record).
+
+To name the relations yourself, override `cacheRelations()`:
+
+```php
+public function cacheRelations(): array
+{
+ return ['brand', 'stores', 'section'];
+}
+```
+
+A related model whose saves must reach the card is a **dependency**: the card stamp includes its list counter, so a brand renamed in the admin rebuilds the product cards that show it the next time they are read, not before. Relations to the same model (related products, a parent page) are not dependencies: a save drops the cards of the records that show it, found with one query.
+
+A row that belongs to another record through a morph pair (SEO meta, a slug) should use the `TouchesOwner` trait, so saving it drops the owner's cards. A model may also list owners in `cacheTouches()`.
+
+## Lists
+
+Ask for IDs, keep them, and draw the records from cards:
+
+```php
+// IDs and the total of one page: one query on a miss, none on a hit.
+$page = Product::query()->where('active', true)->orderBy('sort')->cachedIds(perPage: 20, page: 2);
+$page->ids; // [12, 7, 31, …]
+$page->total; // 4310
+
+// The same, as a paginator of cards.
+$products = Product::query()->where('active', true)->orderBy('sort')->cachedPaginate(20);
+
+// Every matching record, as cards (no paging).
+$questions = Question::query()->where('category_id', $id)->orderBy('sort')->cachedCards(dependsOn: [Category::class]);
+```
+
+The list key is a hash of the SQL with its bindings, the page, the site and the language. It is dropped when any record of the model is saved, deleted or restored, and when a model listed in `dependsOn` changes (use it when the query joins or filters by another table).
+
+Times in a list query are rounded down to a minute (`RecordCache::now()`), so `active_from <= now()` gives the same key for 60 seconds. Use it instead of `now()` in public queries:
+
+```php
+->where('active_from', '<=', app(RecordCache::class)->now())
+```
+
+## Reading cards
+
+```php
+$card = Product::cached(42); // one card, or null
+$cards = Product::cachedMany([42, 7, 31]); // in the given order, missing ones left out
+
+$card->name; // in the current language, with fallback
+$card->get('price');
+$card->relation('brand'); // a model or a collection, built from the card
+$card->seo('title');
+$card->picture('preview_picture', 'detail_picture');
+$card->media('photos'); // [['url' => …, 'thumbnails' => …], …]
+$card->url();
+$card->extra('theme'); // what an extender put in
+$card->model(); // a model filled from the card, with its relations (no query)
+```
+
+The locale defaults to the current one; pass another as the second argument.
+
+Use `model()` where a view expects a model. It is never saved: it is built from the cache.
+
+## Other values: remember()
+
+For anything else drawn from the database (a menu, a tree, a summary of ratings), use `remember()` and name the models it reads:
+
+```php
+$tree = app(RecordCache::class)->remember(Page::class, 'page-tree', fn () => $this->buildTree());
+$summary = app(RecordCache::class)->remember([Review::class, Product::class], 'summary:'.$id, fn () => …);
+```
+
+The value is dropped when any of those models changes. It is kept per site unless `perSite: false`. Keep values plain (arrays, scalars): models in a cache are slow to unpack and easy to get stale.
+
+A name that is not a model works too: `remember(Settings::class, 'settings:'.$module, …)` is dropped by `flushClass(Settings::class)`. Module settings are read this way, so a warm page asks the database nothing.
+
+## When the cache is dropped
+
+Saving, deleting or restoring a cacheable model through Eloquent (the admin, the API, MCP, your own code):
+
+- drops the record's cards in every site and language;
+- drops the cards of records of the same model that show it (a related product, a child page);
+- bumps the model's list counter: its lists, the `remember()` values naming it, and the cards that depend on it are rebuilt the next time they are read.
+
+Saving a site drops its cards (its domains are in every URL), saving a language drops everything. When a save runs inside a transaction, the cards are dropped once more after the commit, so a request in between cannot keep the old row.
+
+Code that writes past Eloquent (`DB::table()->update()`, `insert()`) must say so:
+
+```php
+app(RecordCache::class)->flushClass(Product::class); // one model
+app(RecordCache::class)->flushSite($siteId); // one site
+app(RecordCache::class)->flushAll(); // everything
+```
+
+Cards also expire with their TTL (a day by default), so a missed drop heals itself.
+
+## Imports
+
+Thousands of saves in a row should not drop the cache thousands of times. Wrap the import:
+
+```php
+app(RecordCache::class)->bulk(function () {
+ foreach ($rows as $row) {
+ Product::updateOrCreate(['xml_id' => $row['id']], $row);
+ }
+});
+```
+
+Inside `bulk()` saves only note the models they touched; at the end each of them is dropped once. An import that writes with `DB::table()` passes `everything: true`, and the whole cache is dropped once at the end. The Bitrix migrator does that.
+
+## Page cache
+
+For visitors who are not logged in, a whole page can be kept: the second visitor gets it from the store without running the controller.
+
+```dotenv
+ATRIUM_PAGE_CACHE=true
+```
+
+- The key is the URL (scheme, host, path, sorted query) and the site; the language is in the URL.
+- Only `GET` and `HEAD`, only `200` HTML answers, never the admin, never a signed-in admin or user, never Inertia or ajax, never a page that set its own cookie or flashed errors or old input, never paths in `atrium.cache.pages.except`. A response with `Cache-Control: no-store` or the `X-Atrium-No-Cache` header is not kept.
+- **Form tokens**: the CSRF token in a kept page is swapped for the current visitor's on the way out, so forms keep working.
+- A kept page is valid while the cards, lists and models it read stay the same: a save drops it at once. Models read in other ways can be named in `atrium.cache.pages.depends_on`.
+- The answer carries `X-Atrium-Cache: HIT` or `MISS`.
+
+Turn it on after checking that no page shows something personal to a visitor without a login (a cart counter, "recently viewed"). Put such a page in `except`, or send the header from its controller:
+
+```php
+return response()->view('cart')->header('X-Atrium-No-Cache', '1');
+```
+
+A component that renders something for one visitor only, wherever it is placed, calls `app(RecordCache::class)->dontKeepPage()` instead. The built-in image captcha does: its question can be answered once, so a page that shows it is never kept.
+
+## CDN
+
+Kept pages are sent with `ETag` and `Last-Modified`; a request with a matching `If-None-Match` gets `304 Not Modified`.
+
+- A page without a form token: `Cache-Control: public, max-age=0, s-maxage=60`. A CDN may keep it for `ATRIUM_PAGE_CACHE_SHARED_MAX_AGE` seconds, the browser asks again every time.
+- A page with a form token: `Cache-Control: private, no-cache`. A shared copy would hand one visitor's token to the next.
+
+Laravel's `web` group starts a session for every visitor, so every answer carries `Set-Cookie`, and most CDNs do not keep an answer that sets a cookie. Either have the CDN ignore the session cookie on public paths, or send public pages without the session. Purging a CDN after a save is not done by Atrium. The short `s-maxage` is the bound on staleness.
+
+## Warming, the admin screen and the debug line
+
+After a deploy or a cleared cache:
+
+```bash
+php artisan atrium:cache:warm # home page and first page of every list, every site and language
+php artisan atrium:cache:warm --records # also the card of every record of every cached module
+php artisan atrium:cache:warm --site=main
+```
+
+A module adds its own pages with `app(RecordCache::class)->warmUsing(fn (string $language): iterable => [...])`.
+
+**Admin → Cache** (superadmins) shows the hit rate since the last reset, the store and whether it has tags, the number of entries and their size (Redis, file and database stores), and clears one module, one site or everything.
+
+In the local environment with `APP_DEBUG=true`, every public page gets an `X-Atrium-Debug` header and a line at the bottom of the screen:
+
+```
+queries=3 (2.1 ms); cache hits=21 misses=0; page cache=off; 18.4 ms
+```
+
+`ATRIUM_CACHE_DEBUG=false` hides it.
+
+## Configuration
+
+`config/atrium.php` → `cache`:
+
+| Key | Env | Default | |
+|---|---|---|---|
+| `enabled` | `ATRIUM_CACHE_ENABLED` | `true` | Off: cards are built on every read, nothing is kept. |
+| `store` | `ATRIUM_CACHE_STORE` | default store | A store from `config/cache.php`. |
+| `strategy` | `ATRIUM_CACHE_STRATEGY` | `auto` | `auto` (tags where the store has them) or `versions`. |
+| `ttl.cards` | `ATRIUM_CACHE_TTL_CARDS` | `86400` | Seconds. |
+| `ttl.lists` | `ATRIUM_CACHE_TTL_LISTS` | `3600` | Seconds; also for `remember()`. |
+| `ttl.pages` | `ATRIUM_CACHE_TTL_PAGES` | `600` | Seconds. |
+| `time_step` | | `60` | Seconds `RecordCache::now()` is rounded to. |
+| `stats` | | `true` | Count hits and misses for the admin screen. |
+| `ignore` | | | Models whose saves never touch the cache. |
+| `pages.enabled` | `ATRIUM_PAGE_CACHE` | `false` | The page cache. |
+| `pages.shared_max_age` | `ATRIUM_PAGE_CACHE_SHARED_MAX_AGE` | `60` | `s-maxage` for a CDN. |
+| `pages.except` | | `[]` | Paths never kept, as `Request::is()` patterns. |
+| `pages.depends_on` | | `[]` | Models whose saves drop every kept page. |
+| `debug` | `ATRIUM_CACHE_DEBUG` | `true` | The debug line (local, with `APP_DEBUG`). |
+
+## Benchmark
+
+`packages/theme/tests/CacheBenchmarkTest.php` fills a catalog of 10 000 products with 40 properties each (16 lines, 10 numbers, 6 lists, 4 flags, 2 texts, 2 brand links), a translated name, code and text, three related products, three pictures and SEO, and opens a list page and a product page through the theme with the cache off, cold, warm and with the page cache:
+
+```bash
+ATRIUM_BENCHMARK=1 vendor/bin/phpunit packages/theme/tests/CacheBenchmarkTest.php
+```
+
+`DB_CONNECTION` picks the database as for the rest of the suite, `ATRIUM_BENCHMARK_STORE` the store, `ATRIUM_BENCHMARK_PRODUCTS` the number of products. It fails if a list page costs more queries on page 250 than on page 1, a warm list or product page runs more than two queries, or a kept page runs any.
+
+Results on 2026-11-17 (PHP 8.4, MySQL 8.4 and PostgreSQL 17 in Docker, Redis 7, median of five requests; queries, then PHP CPU time):
+
+| Page | Cache off | Cold cache | Warm cache | Page cache |
+|---|---|---|---|---|
+| MySQL, list page 1 | 3 q, 6.8 ms | 7 q, 39.0 ms | **0 q**, 7.6 ms | **0 q**, 1.2 ms |
+| MySQL, list page 250 | 3 q, 6.0 ms | 7 q, 38.9 ms | **0 q**, 8.2 ms | **0 q**, 1.2 ms |
+| MySQL, product page | 6 q, 7.7 ms | 6 q, 11.0 ms | **0 q**, 4.9 ms | **0 q**, 1.4 ms |
+| PostgreSQL, list page 1 | 3 q, 7.3 ms | 7 q, 48.3 ms | **0 q**, 12.1 ms | **0 q**, 1.3 ms |
+| PostgreSQL, list page 250 | 3 q, 7.3 ms | 7 q, 46.9 ms | **0 q**, 15.7 ms | **0 q**, 1.7 ms |
+| PostgreSQL, product page | 6 q, 13.7 ms | 6 q, 17.0 ms | **0 q**, 7.7 ms | **0 q**, 1.7 ms |
+
+"Cache off" is the theme reading the database directly, as before the cache. A cold list costs more queries than that because it builds the whole card (brands, related products, SEO), which the product page then reads for free. The count stays the same on page 1 and page 250. With the file store the counts are the same and CPU time is about twice as high.
+
+How to read it: the cache removes the database round trips. On a warm cache a page asks the database nothing, so the time no longer depends on the database's load or distance. A cold card costs about 2 ms of PHP per record, once. A warm list unpacks 20 cards and costs about the same PHP time as reading 20 rows. The page cache skips the controller and the views: about 1 ms.
+
+The test prints wall times too. They include the database and the store, so they move with the machine's load and are only comparable within one run.
diff --git a/docs/cache.ru.md b/docs/cache.ru.md
new file mode 100644
index 00000000..cc11b077
--- /dev/null
+++ b/docs/cache.ru.md
@@ -0,0 +1,273 @@
+# Кеш
+
+Atrium держит публичные страницы быстрыми, даже когда у записи десятки свойств, связей, картинок и переводов. Идея:
+
+- список или фильтр спрашивает у базы **только ID** (и общее число) и запоминает ответ;
+- каждая запись рисуется из своей **карточки** — закешированного массива со всем, что показывает страница; карточки страницы приходят **одним multi-get**, а недостающие собираются вместе, за несколько запросов, сколько бы их ни было;
+- сохранение сбрасывает ровно те карточки и списки, которых оно касается, поэтому редактор видит правку сразу.
+
+На тёплом кеше страница товара и страница списка не делают ни одного запроса. Кеш целых страниц для анонимных посетителей (по умолчанию выключен) пропускает ещё и работу шаблонов.
+
+Кеш работает на любом хранилище Laravel. **Рекомендуется Redis**.
+
+## Содержание
+
+- [Хранилища](#хранилища)
+- [Как подключить модуль](#как-подключить-модуль)
+- [Списки](#списки)
+- [Чтение карточек](#чтение-карточек)
+- [Другие значения: remember()](#другие-значения-remember)
+- [Когда кеш сбрасывается](#когда-кеш-сбрасывается)
+- [Импорт](#импорт)
+- [Кеш страниц](#кеш-страниц)
+- [CDN](#cdn)
+- [Прогрев, экран в админке и строка отладки](#прогрев-экран-в-админке-и-строка-отладки)
+- [Настройки](#настройки)
+- [Замер](#замер)
+
+## Хранилища
+
+| Хранилище | Как сбрасывается группа | Заметки |
+|---|---|---|
+| `redis` | теги | Рекомендуется: быстрый multi-get, теги, размер в админке. |
+| `memcached` | теги | Тоже подходит. |
+| `file`, `database` | ключи версий | Работает; каждая карточка — файл или строка. |
+| `array` | теги | Только для тестов: живёт один запрос. |
+
+Кеш записей берёт хранилище приложения по умолчанию. Чтобы дать ему своё, задайте `ATRIUM_CACHE_STORE=redis` (хранилище из `config/cache.php`). Для Redis:
+
+```dotenv
+CACHE_STORE=redis
+REDIS_CLIENT=phpredis
+REDIS_HOST=127.0.0.1
+```
+
+Хранилище без тегов получает **ключи версий**: в каждый ключ входит отметка из нескольких счётчиков (`all`, `site:{id}`, `card:{Class}`, `list:{Class}`), а сбросить группу — значит увеличить её счётчик. Старые записи больше не читаются и истекают по TTL. `ATRIUM_CACHE_STRATEGY=versions` включает этот способ и на Redis.
+
+## Как подключить модуль
+
+Добавьте модели интерфейс `Cacheable` и трейт `CachesRecords`:
+
+```php
+use Atrium\Admin\Cache\CachesRecords;
+use Atrium\Admin\Contracts\Cacheable;
+
+class Product extends Model implements Administrable, Cacheable
+{
+ use CachesRecords, HasAdminSeo, InteractsWithAdmin, Translatable;
+}
+```
+
+Для большинства моделей этого достаточно. Карточка собирается по полям админки:
+
+- все колонки, переводы как есть (в карточке запись на всех языках);
+- связи за `BelongsToField`, `BelongsToManyField` и похожими полями, загруженные сразу для всех недостающих карточек;
+- SEO, картинки и галереи (с уменьшенными копиями), публичный адрес;
+- то, что добавляют расширения (тема кладёт готовое представление записи).
+
+Чтобы назвать связи самому, переопределите `cacheRelations()`:
+
+```php
+public function cacheRelations(): array
+{
+ return ['brand', 'stores', 'section'];
+}
+```
+
+Связанная модель, сохранения которой должны доходить до карточки, — **зависимость**: в отметку карточки входит её счётчик списков, поэтому бренд, переименованный в админке, пересобирает карточки товаров с ним при следующем чтении, не раньше. Связи с той же моделью (похожие товары, родительская страница) зависимостями не считаются: сохранение сбрасывает карточки записей, которые её показывают, — их находит один запрос.
+
+Строке, которая принадлежит другой записи через morph-пару (SEO, slug), нужен трейт `TouchesOwner`: её сохранение сбросит карточки владельца. Модель может и сама перечислить владельцев в `cacheTouches()`.
+
+## Списки
+
+Спросите ID, запомните их и рисуйте записи из карточек:
+
+```php
+// ID и общее число одной страницы: один запрос при промахе, ни одного при попадании.
+$page = Product::query()->where('active', true)->orderBy('sort')->cachedIds(perPage: 20, page: 2);
+$page->ids; // [12, 7, 31, …]
+$page->total; // 4310
+
+// То же самое пагинатором из карточек.
+$products = Product::query()->where('active', true)->orderBy('sort')->cachedPaginate(20);
+
+// Все подходящие записи карточками (без страниц).
+$questions = Question::query()->where('category_id', $id)->orderBy('sort')->cachedCards(dependsOn: [Category::class]);
+```
+
+Ключ списка — хеш SQL с параметрами, страницы, сайта и языка. Он сбрасывается, когда сохраняется, удаляется или восстанавливается любая запись модели, а также когда меняется модель из `dependsOn` (укажите её, если запрос соединяет или фильтрует по другой таблице).
+
+Время в запросе списка округляется вниз до минуты (`RecordCache::now()`), поэтому `active_from <= now()` даёт один ключ 60 секунд. Используйте его вместо `now()` в публичных запросах:
+
+```php
+->where('active_from', '<=', app(RecordCache::class)->now())
+```
+
+## Чтение карточек
+
+```php
+$card = Product::cached(42); // одна карточка или null
+$cards = Product::cachedMany([42, 7, 31]); // в заданном порядке, ненайденные пропущены
+
+$card->name; // на текущем языке, с запасным
+$card->get('price');
+$card->relation('brand'); // модель или коллекция, собранная из карточки
+$card->seo('title');
+$card->picture('preview_picture', 'detail_picture');
+$card->media('photos'); // [['url' => …, 'thumbnails' => …], …]
+$card->url();
+$card->extra('theme'); // то, что положило расширение
+$card->model(); // модель, заполненная из карточки, со связями (без запроса)
+```
+
+Язык по умолчанию — текущий; другой передаётся вторым аргументом.
+
+`model()` нужна там, где шаблон ждёт модель. Её не сохраняют: она собрана из кеша.
+
+## Другие значения: remember()
+
+Для всего остального, что берётся из базы (меню, дерево, сводка оценок), используйте `remember()` и назовите модели, которые оно читает:
+
+```php
+$tree = app(RecordCache::class)->remember(Page::class, 'page-tree', fn () => $this->buildTree());
+$summary = app(RecordCache::class)->remember([Review::class, Product::class], 'summary:'.$id, fn () => …);
+```
+
+Значение сбрасывается, когда меняется любая из этих моделей. Оно хранится отдельно для каждого сайта, если не передать `perSite: false`. Храните простые значения (массивы, скаляры): модели в кеше медленно распаковываются и легко устаревают.
+
+Вместо модели можно назвать что угодно: `remember(Settings::class, 'settings:'.$module, …)` сбрасывается вызовом `flushClass(Settings::class)`. Так читаются настройки модулей, поэтому прогретая страница вообще не обращается к базе.
+
+## Когда кеш сбрасывается
+
+Сохранение, удаление или восстановление кешируемой модели через Eloquent (админка, API, MCP, ваш код):
+
+- сбрасывает карточки записи на всех сайтах и языках;
+- сбрасывает карточки записей той же модели, которые её показывают (похожий товар, дочерняя страница);
+- увеличивает счётчик списков модели: её списки, значения `remember()` с ней и зависящие от неё карточки пересоберутся при следующем чтении.
+
+Сохранение сайта сбрасывает его карточки (его домены есть в каждом адресе), сохранение языка — всё. Если сохранение идёт внутри транзакции, карточки сбрасываются ещё раз после коммита, чтобы запрос посередине не оставил старую строку.
+
+Код, который пишет в обход Eloquent (`DB::table()->update()`, `insert()`), должен сказать об этом сам:
+
+```php
+app(RecordCache::class)->flushClass(Product::class); // одна модель
+app(RecordCache::class)->flushSite($siteId); // один сайт
+app(RecordCache::class)->flushAll(); // всё
+```
+
+Кроме того, карточки истекают по TTL (по умолчанию сутки), так что пропущенный сброс со временем исправляется сам.
+
+## Импорт
+
+Тысячи сохранений подряд не должны тысячи раз сбрасывать кеш. Оберните импорт:
+
+```php
+app(RecordCache::class)->bulk(function () {
+ foreach ($rows as $row) {
+ Product::updateOrCreate(['xml_id' => $row['id']], $row);
+ }
+});
+```
+
+Внутри `bulk()` сохранения только отмечают затронутые модели; в конце каждая сбрасывается один раз. Импорт, который пишет через `DB::table()`, передаёт `everything: true`, и в конце один раз сбрасывается весь кеш. Так делает мигратор из Битрикса.
+
+## Кеш страниц
+
+Для посетителей без входа можно хранить страницу целиком: второй посетитель получает её из хранилища, контроллер не запускается.
+
+```dotenv
+ATRIUM_PAGE_CACHE=true
+```
+
+- Ключ — адрес (схема, хост, путь, отсортированные параметры) и сайт; язык входит в адрес.
+- Только `GET` и `HEAD`, только HTML-ответы `200`; никогда — админка, вошедший администратор или пользователь, Inertia и ajax, страница, поставившая свою куку или передавшая ошибки или старый ввод, пути из `atrium.cache.pages.except`. Ответ с `Cache-Control: no-store` или заголовком `X-Atrium-No-Cache` не хранится.
+- **Токены форм**: CSRF-токен в сохранённой странице на выходе заменяется на токен текущего посетителя, формы продолжают работать.
+- Сохранённая страница действительна, пока не изменились карточки, списки и модели, которые она читала: сохранение сбрасывает её сразу. Модели, прочитанные иначе, перечисляются в `atrium.cache.pages.depends_on`.
+- В ответе есть `X-Atrium-Cache: HIT` или `MISS`.
+
+Включайте, проверив, что ни одна страница не показывает посетителю без входа что-то личное (счётчик корзины, «вы смотрели»). Такую страницу внесите в `except` или отправьте заголовок из её контроллера:
+
+```php
+return response()->view('cart')->header('X-Atrium-No-Cache', '1');
+```
+
+Компонент, который рисует что-то для одного посетителя, где бы он ни стоял, вызывает вместо этого `app(RecordCache::class)->dontKeepPage()`. Так делает встроенная капча-картинка: на её вопрос можно ответить один раз, поэтому страница с ней не сохраняется.
+
+## CDN
+
+Сохранённые страницы отдаются с `ETag` и `Last-Modified`; на запрос с совпавшим `If-None-Match` приходит `304 Not Modified`.
+
+- Страница без токена формы: `Cache-Control: public, max-age=0, s-maxage=60`. CDN может держать её `ATRIUM_PAGE_CACHE_SHARED_MAX_AGE` секунд, браузер каждый раз спрашивает заново.
+- Страница с токеном формы: `Cache-Control: private, no-cache`. Общая копия отдала бы токен одного посетителя другому.
+
+Группа `web` в Laravel открывает сессию каждому посетителю, поэтому в каждом ответе есть `Set-Cookie`, а большинство CDN не хранят ответ, ставящий куку. Либо настройте CDN не обращать внимания на куку сессии на публичных путях, либо отдавайте публичные страницы без сессии. Atrium не очищает CDN после сохранения: границу устаревания задаёт короткий `s-maxage`.
+
+## Прогрев, экран в админке и строка отладки
+
+После выкладки или очистки кеша:
+
+```bash
+php artisan atrium:cache:warm # главная и первая страница каждого списка, все сайты и языки
+php artisan atrium:cache:warm --records # плюс карточка каждой записи каждого кешируемого модуля
+php artisan atrium:cache:warm --site=main
+```
+
+Модуль добавляет свои страницы через `app(RecordCache::class)->warmUsing(fn (string $language): iterable => [...])`.
+
+**Админка → Кеш** (для суперадминов) показывает долю попаданий с последнего сброса, хранилище и есть ли у него теги, число записей и их размер (Redis, файлы и база) и очищает один модуль, один сайт или всё.
+
+В локальном окружении с `APP_DEBUG=true` у каждой публичной страницы есть заголовок `X-Atrium-Debug` и строка внизу экрана:
+
+```
+queries=3 (2.1 ms); cache hits=21 misses=0; page cache=off; 18.4 ms
+```
+
+`ATRIUM_CACHE_DEBUG=false` её скрывает.
+
+## Настройки
+
+`config/atrium.php` → `cache`:
+
+| Ключ | Env | По умолчанию | |
+|---|---|---|---|
+| `enabled` | `ATRIUM_CACHE_ENABLED` | `true` | Выключен: карточки собираются при каждом чтении, ничего не хранится. |
+| `store` | `ATRIUM_CACHE_STORE` | хранилище по умолчанию | Хранилище из `config/cache.php`. |
+| `strategy` | `ATRIUM_CACHE_STRATEGY` | `auto` | `auto` (теги, где они есть) или `versions`. |
+| `ttl.cards` | `ATRIUM_CACHE_TTL_CARDS` | `86400` | Секунды. |
+| `ttl.lists` | `ATRIUM_CACHE_TTL_LISTS` | `3600` | Секунды; и для `remember()`. |
+| `ttl.pages` | `ATRIUM_CACHE_TTL_PAGES` | `600` | Секунды. |
+| `time_step` | | `60` | До скольких секунд округляется `RecordCache::now()`. |
+| `stats` | | `true` | Считать попадания и промахи для экрана в админке. |
+| `ignore` | | | Модели, сохранения которых не трогают кеш. |
+| `pages.enabled` | `ATRIUM_PAGE_CACHE` | `false` | Кеш страниц. |
+| `pages.shared_max_age` | `ATRIUM_PAGE_CACHE_SHARED_MAX_AGE` | `60` | `s-maxage` для CDN. |
+| `pages.except` | | `[]` | Пути, которые не хранятся, в виде шаблонов `Request::is()`. |
+| `pages.depends_on` | | `[]` | Модели, сохранение которых сбрасывает все страницы. |
+| `debug` | `ATRIUM_CACHE_DEBUG` | `true` | Строка отладки (локально, с `APP_DEBUG`). |
+
+## Замер
+
+`packages/theme/tests/CacheBenchmarkTest.php` заполняет каталог из 10 000 товаров по 40 свойств (16 строк, 10 чисел, 6 списков, 4 флажка, 2 текста, 2 ссылки на бренд), с переведёнными названием, кодом и текстом, тремя похожими товарами, тремя картинками и SEO, и открывает через тему страницу списка и страницу товара с выключенным, холодным и тёплым кешем и с кешем страниц:
+
+```bash
+ATRIUM_BENCHMARK=1 vendor/bin/phpunit packages/theme/tests/CacheBenchmarkTest.php
+```
+
+`DB_CONNECTION` выбирает базу, как и для остальных тестов, `ATRIUM_BENCHMARK_STORE` — хранилище, `ATRIUM_BENCHMARK_PRODUCTS` — число товаров. Тест падает, если страница списка на 250-й странице стоит больше запросов, чем на первой, тёплая страница списка или товара делает больше двух запросов, а сохранённая страница — хотя бы один.
+
+Результаты на 17.11.2026 (PHP 8.4, MySQL 8.4 и PostgreSQL 17 в Docker, Redis 7, медиана пяти запросов; число запросов, затем процессорное время PHP):
+
+| Страница | Кеш выключен | Холодный кеш | Тёплый кеш | Кеш страниц |
+|---|---|---|---|---|
+| MySQL, список, стр. 1 | 3 запр., 6,8 мс | 7 запр., 39,0 мс | **0 запр.**, 7,6 мс | **0 запр.**, 1,2 мс |
+| MySQL, список, стр. 250 | 3 запр., 6,0 мс | 7 запр., 38,9 мс | **0 запр.**, 8,2 мс | **0 запр.**, 1,2 мс |
+| MySQL, товар | 6 запр., 7,7 мс | 6 запр., 11,0 мс | **0 запр.**, 4,9 мс | **0 запр.**, 1,4 мс |
+| PostgreSQL, список, стр. 1 | 3 запр., 7,3 мс | 7 запр., 48,3 мс | **0 запр.**, 12,1 мс | **0 запр.**, 1,3 мс |
+| PostgreSQL, список, стр. 250 | 3 запр., 7,3 мс | 7 запр., 46,9 мс | **0 запр.**, 15,7 мс | **0 запр.**, 1,7 мс |
+| PostgreSQL, товар | 6 запр., 13,7 мс | 6 запр., 17,0 мс | **0 запр.**, 7,7 мс | **0 запр.**, 1,7 мс |
+
+«Кеш выключен» — это тема, которая читает базу напрямую, как до кеша. Холодный список стоит больше запросов, потому что собирает карточку целиком (бренды, похожие товары, SEO). Страница товара потом читает её даром. На 1-й и 250-й странице запросов столько же. С файловым хранилищем запросов столько же, а процессорного времени примерно вдвое больше.
+
+Как читать: кеш убирает походы в базу. На тёплом кеше страница не спрашивает у базы ничего, и время перестаёт зависеть от нагрузки на базу и от расстояния до неё. Холодная карточка стоит около 2 мс PHP на запись, один раз. Тёплый список распаковывает 20 карточек и тратит на PHP примерно столько же, сколько чтение 20 строк. Кеш страниц пропускает контроллер и шаблоны: около 1 мс.
+
+Тест печатает и полное время. В него входят база и хранилище, поэтому оно зависит от нагрузки на машину и сравнимо только внутри одного прогона.
diff --git a/docs/modules.md b/docs/modules.md
index e4efbe8c..638bb6da 100644
--- a/docs/modules.md
+++ b/docs/modules.md
@@ -236,6 +236,10 @@ $request->validate([
Leave the captcha's fields out of what goes back into the form: `->withInput($request->except(CaptchaManager::INPUTS))`. A captcha of another kind (Cloudflare Turnstile, hCaptcha, your own) is a class with `widget()` and `verify($request)` (`Atrium\Admin\Captcha\CaptchaDriver`), added with `app(CaptchaManager::class)->extend('turnstile', fn () => new Turnstile(...))` and chosen with `ATRIUM_CAPTCHA=turnstile`.
+## Cache
+
+Public pages draw records from the record cache. Add `implements Cacheable` and `use CachesRecords` to the model, and read lists through `->cachedIds()` / `->cachedPaginate()` / `->cachedCards()` instead of `->get()`: a list then asks the database only for IDs, and each record comes from its card, one multi-get for a whole page. Saves through Eloquent drop what they touch; code that writes with `DB::table()` calls `app(RecordCache::class)->flushClass(Article::class)`, and an import runs inside `bulk()`. Everything else, step by step: [cache.md](cache.md).
+
## Interface translations
Labels may be plain text or translation keys. For a module that is used in more than one language, keep them in `lang/{language}/admin.php` and write `->label(__('admin.articles.name'))`.
diff --git a/docs/modules.ru.md b/docs/modules.ru.md
index 29e77c39..25793219 100644
--- a/docs/modules.ru.md
+++ b/docs/modules.ru.md
@@ -236,6 +236,10 @@ $request->validate([
Поля капчи не возвращайте в форму: `->withInput($request->except(CaptchaManager::INPUTS))`. Капча другого вида (Cloudflare Turnstile, hCaptcha, своя) — класс с `widget()` и `verify($request)` (`Atrium\Admin\Captcha\CaptchaDriver`), который добавляют через `app(CaptchaManager::class)->extend('turnstile', fn () => new Turnstile(...))` и выбирают `ATRIUM_CAPTCHA=turnstile`.
+## Кеш
+
+Публичные страницы берут записи из кеша записей. Добавьте модели `implements Cacheable` и `use CachesRecords`, а списки читайте через `->cachedIds()` / `->cachedPaginate()` / `->cachedCards()` вместо `->get()`: тогда список спрашивает у базы только ID, а каждая запись приходит из своей карточки, одним multi-get на всю страницу. Сохранения через Eloquent сбрасывают то, чего касаются; код, который пишет через `DB::table()`, вызывает `app(RecordCache::class)->flushClass(Article::class)`, а импорт идёт внутри `bulk()`. Всё остальное по шагам: [cache.ru.md](cache.ru.md).
+
## Переводы интерфейса
Подписи могут быть обычным текстом или ключами перевода. Для модуля, которым пользуются на нескольких языках, держите их в `lang/{язык}/admin.php` и пишите `->label(__('admin.articles.name'))`.
diff --git a/docs/readme/README.be.md b/docs/readme/README.be.md
index 028f20c0..3b8de5e9 100644
--- a/docs/readme/README.be.md
+++ b/docs/readme/README.be.md
@@ -120,6 +120,7 @@ php artisan atrium:bitrix:parity
- [ШІ-памочнік для тэкстаў: бясплатныя і платныя правайдары, апісанні, SEO, alt, пераклады](../ai.md)
- [Свой модуль: палі, калонкі, укладкі, правы, мовы, тэсты, пакет](../modules.md)
- [Свае палі: дадаць поле ў любы модуль з адмінкі, фільтры і фасеты на 100 000 запісаў](../custom-fields.md)
+- [Кэш: хуткія старонкі з дзясяткамі ўласцівасцей, Redis, кэш старонак, загалоўкі для CDN](../cache.md)
- [Пераезд з 1С-Бітрыкс крок за крокам](../bitrix.md)
- [Рэзервовыя копіі: базы і файлы ў некалькі месцаў, расклад, праверкі, аднаўленне](../backup.md)
- [CDN: выявы, паменшаныя копіі і WebP/AVIF, ачыстка кэша, загрузкі ў S3](../cdn.md)
diff --git a/docs/readme/README.de.md b/docs/readme/README.de.md
index 4eb3b841..52f1fb85 100644
--- a/docs/readme/README.de.md
+++ b/docs/readme/README.de.md
@@ -120,6 +120,7 @@ Die Bitrix-Datenbank wird nur gelesen. Tabs, Feldreihenfolge und Listenspalten k
- [KI-Schreibhilfe: kostenlose und bezahlte Anbieter, Beschreibungen, SEO, Alt-Texte, Übersetzungen](../ai.md)
- [Eigenes Modul: Felder, Spalten, Tabs, Rechte, Sprachen, Tests, als Paket](../modules.md)
- [Eigene Felder: Felder für jedes Modul im Admin-Bereich anlegen, Filter und Facetten bei 100 000 Einträgen](../custom-fields.md)
+- [Cache: schnelle Seiten mit Dutzenden Eigenschaften, Redis, Seiten-Cache, CDN-Header](../cache.md)
- [Umzug von 1C-Bitrix, Schritt für Schritt](../bitrix.md)
- [Backups: Datenbanken und Dateien an mehrere Orte, Zeitpläne, Prüfungen, Wiederherstellung](../backup.md)
- [CDN: Bilder, verkleinerte Kopien und WebP/AVIF, Cache leeren, Uploads zu S3](../cdn.md)
diff --git a/docs/readme/README.es.md b/docs/readme/README.es.md
index 199e6a11..d085b75b 100644
--- a/docs/readme/README.es.md
+++ b/docs/readme/README.es.md
@@ -120,6 +120,7 @@ La base de datos de Bitrix solo se lee. Las pestañas, el orden de los campos y
- [Ayuda de redacción con IA: proveedores gratuitos y de pago, descripciones, SEO, textos alt, traducciones](../ai.md)
- [Tu propio módulo: campos, columnas, pestañas, permisos, idiomas, pruebas, paquete](../modules.md)
- [Campos propios: añadir campos a cualquier módulo desde el panel, filtros y facetas con 100 000 registros](../custom-fields.md)
+- [Caché: páginas rápidas con decenas de propiedades, Redis, caché de páginas, cabeceras para CDN](../cache.md)
- [Migrar desde 1C-Bitrix, paso a paso](../bitrix.md)
- [Copias de seguridad: bases de datos y archivos en varios destinos, horarios, comprobaciones, restauración](../backup.md)
- [CDN: imágenes, copias redimensionadas y WebP/AVIF, purga de caché, subidas a S3](../cdn.md)
diff --git a/docs/readme/README.fr.md b/docs/readme/README.fr.md
index 541101f6..ae7ffd1f 100644
--- a/docs/readme/README.fr.md
+++ b/docs/readme/README.fr.md
@@ -120,6 +120,7 @@ La base de données Bitrix est uniquement lue. Les onglets, l'ordre des champs e
- [Aide à la rédaction par IA : fournisseurs gratuits et payants, descriptions, SEO, textes alt, traductions](../ai.md)
- [Votre module : champs, colonnes, onglets, droits, langues, tests, paquet](../modules.md)
- [Champs personnalisés : ajouter des champs à tout module depuis l'administration, filtres et facettes sur 100 000 fiches](../custom-fields.md)
+- [Cache : des pages rapides avec des dizaines de propriétés, Redis, cache de pages, en-têtes CDN](../cache.md)
- [Migrer depuis 1C-Bitrix, pas à pas](../bitrix.md)
- [Sauvegardes : bases de données et fichiers vers plusieurs destinations, planification, contrôles, restauration](../backup.md)
- [CDN : images, copies redimensionnées et WebP/AVIF, purge du cache, envois vers S3](../cdn.md)
diff --git a/docs/readme/README.it.md b/docs/readme/README.it.md
index d49972ab..eaca51df 100644
--- a/docs/readme/README.it.md
+++ b/docs/readme/README.it.md
@@ -120,6 +120,7 @@ Il database di Bitrix viene solo letto. Le schede, l'ordine dei campi e le colon
- [Aiuto alla scrittura con IA: fornitori gratuiti e a pagamento, descrizioni, SEO, testi alt, traduzioni](../ai.md)
- [Il tuo modulo: campi, colonne, schede, permessi, lingue, test, pacchetto](../modules.md)
- [Campi personalizzati: aggiungere campi a qualsiasi modulo dal pannello, filtri e faccette su 100 000 record](../custom-fields.md)
+- [Cache: pagine veloci con decine di proprietà, Redis, cache delle pagine, intestazioni per CDN](../cache.md)
- [Migrare da 1C-Bitrix, passo per passo](../bitrix.md)
- [Backup: database e file in più destinazioni, pianificazione, controlli, ripristino](../backup.md)
- [CDN: immagini, copie ridimensionate e WebP/AVIF, svuotamento della cache, caricamenti su S3](../cdn.md)
diff --git a/docs/readme/README.ja.md b/docs/readme/README.ja.md
index e33d16f7..2fc1a5b9 100644
--- a/docs/readme/README.ja.md
+++ b/docs/readme/README.ja.md
@@ -120,6 +120,7 @@ Bitrix のデータベースは読み取るだけです。タブ、フィール
- [AI 文章アシスタント:無料・有料のプロバイダー、説明文、SEO、alt テキスト、翻訳](../ai.md)
- [独自モジュール:フィールド、列、タブ、権限、言語、テスト、パッケージ化](../modules.md)
- [カスタムフィールド:管理画面から任意のモジュールにフィールドを追加、10 万件でのフィルターとファセット](../custom-fields.md)
+- [キャッシュ:数十のプロパティでも速いページ、Redis、ページキャッシュ、CDN ヘッダー](../cache.md)
- [1C-Bitrix からの移行(手順)](../bitrix.md)
- [バックアップ:データベースとファイルを複数の保存先へ、スケジュール、ヘルスチェック、復元](../backup.md)
- [CDN:画像、リサイズしたコピーと WebP/AVIF、キャッシュの削除、S3 へのアップロード](../cdn.md)
diff --git a/docs/readme/README.kk.md b/docs/readme/README.kk.md
index 37ca91e1..fb3d80d7 100644
--- a/docs/readme/README.kk.md
+++ b/docs/readme/README.kk.md
@@ -120,6 +120,7 @@ php artisan atrium:bitrix:parity
- [Мәтіндерге арналған ЖИ-көмекші: тегін және ақылы провайдерлер, сипаттамалар, SEO, alt, аудармалар](../ai.md)
- [Өз модуліңіз: өрістер, бағандар, қойындылар, құқықтар, тілдер, тесттер, пакет](../modules.md)
- [Өз өрістеріңіз: кез келген модульге әкімшілік панельден өріс қосу, 100 000 жазбадағы сүзгілер мен фасеттер](../custom-fields.md)
+- [Кэш: ондаған қасиеті бар жылдам беттер, Redis, беттер кэші, CDN тақырыптары](../cache.md)
- [1С-Битрикстен көшу, қадам-қадаммен](../bitrix.md)
- [Сақтық көшірмелер: дерекқорлар мен файлдар бірнеше орынға, кесте, тексерулер, қалпына келтіру](../backup.md)
- [CDN: суреттер, кішірейтілген көшірмелер және WebP/AVIF, кэшті тазалау, S3-ке жүктеу](../cdn.md)
diff --git a/docs/readme/README.pl.md b/docs/readme/README.pl.md
index bbb37d9e..ab332e4e 100644
--- a/docs/readme/README.pl.md
+++ b/docs/readme/README.pl.md
@@ -120,6 +120,7 @@ Baza danych Bitrixa jest tylko odczytywana. Karty, kolejność pól i kolumny li
- [Pomoc AI w pisaniu: darmowi i płatni dostawcy, opisy, SEO, teksty alt, tłumaczenia](../ai.md)
- [Własny moduł: pola, kolumny, zakładki, uprawnienia, języki, testy, pakiet](../modules.md)
- [Własne pola: dodawanie pól do dowolnego modułu z panelu, filtry i fasety na 100 000 rekordów](../custom-fields.md)
+- [Cache: szybkie strony z dziesiątkami właściwości, Redis, cache stron, nagłówki dla CDN](../cache.md)
- [Przeprowadzka z 1C-Bitrix krok po kroku](../bitrix.md)
- [Kopie zapasowe: bazy danych i pliki w kilku miejscach, harmonogram, kontrole, przywracanie](../backup.md)
- [CDN: obrazy, pomniejszone kopie i WebP/AVIF, czyszczenie pamięci podręcznej, przesyłanie do S3](../cdn.md)
diff --git a/docs/readme/README.pt-BR.md b/docs/readme/README.pt-BR.md
index bca20643..6a9001b0 100644
--- a/docs/readme/README.pt-BR.md
+++ b/docs/readme/README.pt-BR.md
@@ -120,6 +120,7 @@ O banco de dados do Bitrix é apenas lido. As abas, a ordem dos campos e as colu
- [Ajuda de redação com IA: provedores gratuitos e pagos, descrições, SEO, textos alt, traduções](../ai.md)
- [Seu próprio módulo: campos, colunas, abas, permissões, idiomas, testes, pacote](../modules.md)
- [Campos personalizados: adicionar campos a qualquer módulo pelo painel, filtros e facetas com 100 000 registros](../custom-fields.md)
+- [Cache: páginas rápidas com dezenas de propriedades, Redis, cache de páginas, cabeçalhos para CDN](../cache.md)
- [Migrar do 1C-Bitrix, passo a passo](../bitrix.md)
- [Backups: bancos de dados e arquivos em vários destinos, agendamento, verificações, restauração](../backup.md)
- [CDN: imagens, cópias redimensionadas e WebP/AVIF, limpeza de cache, uploads para S3](../cdn.md)
diff --git a/docs/readme/README.ru.md b/docs/readme/README.ru.md
index 9f498383..61cec146 100644
--- a/docs/readme/README.ru.md
+++ b/docs/readme/README.ru.md
@@ -118,6 +118,7 @@ php artisan atrium:bitrix:parity
- [ИИ-помощник для текстов: бесплатные и платные провайдеры, описания, SEO, alt, переводы](../ai.ru.md)
- [Свой модуль: поля, колонки, вкладки, права, языки, тесты, пакет](../modules.ru.md)
- [Свои поля: добавить поле в любой модуль из админки, фильтры и фасеты на 100 000 записей](../custom-fields.ru.md)
+- [Кеш: быстрые страницы с десятками свойств, Redis, кеш страниц, заголовки для CDN](../cache.ru.md)
- [Переезд с 1С-Битрикс по шагам](../bitrix.ru.md)
- [Резервные копии: базы и файлы в несколько мест, расписание, проверки, восстановление](../backup.ru.md)
- [CDN: картинки, уменьшенные копии и WebP/AVIF, сброс кеша, загрузки в S3](../cdn.ru.md)
diff --git a/docs/readme/README.tr.md b/docs/readme/README.tr.md
index 0feb9305..0eb437c6 100644
--- a/docs/readme/README.tr.md
+++ b/docs/readme/README.tr.md
@@ -120,6 +120,7 @@ Bitrix veritabanından yalnızca okuma yapılır. Sekmeler, alan sırası ve lis
- [Yapay zekâ yazım yardımı: ücretsiz ve ücretli sağlayıcılar, açıklamalar, SEO, alt metinleri, çeviriler](../ai.md)
- [Kendi modülünüz: alanlar, sütunlar, sekmeler, yetkiler, diller, testler, paket](../modules.md)
- [Özel alanlar: yönetim panelinden her modüle alan ekleme, 100 000 kayıtta filtreler ve faset sayıları](../custom-fields.md)
+- [Önbellek: onlarca özellikli hızlı sayfalar, Redis, sayfa önbelleği, CDN başlıkları](../cache.md)
- [1C-Bitrix’ten adım adım taşınma](../bitrix.md)
- [Yedekler: veritabanları ve dosyalar birden çok yere, zamanlama, sağlık kontrolleri, geri yükleme](../backup.md)
- [CDN: görseller, küçültülmüş kopyalar ve WebP/AVIF, önbellek temizleme, S3'e yükleme](../cdn.md)
diff --git a/docs/readme/README.uk.md b/docs/readme/README.uk.md
index 8e496faf..1cdeb7a6 100644
--- a/docs/readme/README.uk.md
+++ b/docs/readme/README.uk.md
@@ -120,6 +120,7 @@ php artisan atrium:bitrix:parity
- [ШІ-помічник для текстів: безкоштовні й платні провайдери, описи, SEO, alt, переклади](../ai.md)
- [Власний модуль: поля, колонки, вкладки, права, мови, тести, пакет](../modules.md)
- [Власні поля: додати поле в будь-який модуль з адмінки, фільтри й фасети на 100 000 записів](../custom-fields.md)
+- [Кеш: швидкі сторінки з десятками властивостей, Redis, кеш сторінок, заголовки для CDN](../cache.md)
- [Переїзд з 1С-Бітрікс крок за кроком](../bitrix.md)
- [Резервні копії: бази й файли в кілька місць, розклад, перевірки, відновлення](../backup.md)
- [CDN: зображення, зменшені копії й WebP/AVIF, очищення кешу, завантаження в S3](../cdn.md)
diff --git a/docs/readme/README.uz.md b/docs/readme/README.uz.md
index 8b2e8fc4..869393de 100644
--- a/docs/readme/README.uz.md
+++ b/docs/readme/README.uz.md
@@ -120,6 +120,7 @@ Bitrix maʼlumotlar bazasi faqat oʻqiladi. Yorliqlar, maydonlar tartibi va roʻ
- [Matnlar uchun SI-yordamchi: bepul va pullik provayderlar, tavsiflar, SEO, alt, tarjimalar](../ai.md)
- [Oʻz modulingiz: maydonlar, ustunlar, yorliqlar, huquqlar, tillar, testlar, paket](../modules.md)
- [Oʻz maydonlaringiz: istalgan modulga admin paneldan maydon qoʻshish, 100 000 yozuvda filtrlar va fasetlar](../custom-fields.md)
+- [Kesh: oʻnlab xususiyatli tez sahifalar, Redis, sahifalar keshi, CDN sarlavhalari](../cache.md)
- [1C-Bitrixdan koʻchish, qadamma-qadam](../bitrix.md)
- [Zaxira nusxalar: bazalar va fayllar bir nechta joyga, jadval, tekshiruvlar, tiklash](../backup.md)
- [CDN: rasmlar, kichraytirilgan nusxalar va WebP/AVIF, keshni tozalash, S3 ga yuklash](../cdn.md)
diff --git a/docs/readme/README.zh-CN.md b/docs/readme/README.zh-CN.md
index c4ec1873..19436d84 100644
--- a/docs/readme/README.zh-CN.md
+++ b/docs/readme/README.zh-CN.md
@@ -120,6 +120,7 @@ Bitrix 数据库只读不写。标签页、字段顺序和列表列会保持编
- [AI 写作助手:免费与付费服务商、描述、SEO、alt 文本、翻译](../ai.md)
- [自定义模块:字段、列、标签页、权限、语言、测试、打包](../modules.md)
- [自定义字段:在后台为任意模块添加字段,10 万条记录上的筛选与分面](../custom-fields.md)
+- [缓存:带几十个属性也很快的页面、Redis、页面缓存、CDN 头](../cache.md)
- [从 1C-Bitrix 迁移,分步说明](../bitrix.md)
- [备份:数据库和文件同时存到多个位置、计划任务、健康检查、恢复](../backup.md)
- [CDN:图片、缩放副本与 WebP/AVIF、清除缓存、上传到 S3](../cdn.md)
diff --git a/packages/admin/config/atrium.php b/packages/admin/config/atrium.php
index b87a5ac2..4211de6f 100644
--- a/packages/admin/config/atrium.php
+++ b/packages/admin/config/atrium.php
@@ -10,6 +10,7 @@
use Atrium\Admin\Dashboard\Gadgets\PerformanceGadget;
use Atrium\Admin\Dashboard\Gadgets\SiteSpeedGadget;
use Atrium\Admin\Models\AdminUser;
+use Atrium\Admin\Models\PageTiming;
return [
/*
@@ -213,6 +214,11 @@
'route' => 'admin.api-tokens.index',
'icon' => 'settings',
],
+ [
+ 'label' => 'atrium::menu.cache',
+ 'route' => 'admin.cache.index',
+ 'icon' => 'settings',
+ ],
],
/*
@@ -520,4 +526,51 @@
'enabled' => (bool) env('ATRIUM_MCP_ENABLED', true),
'path' => 'mcp',
],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Cache
+ |--------------------------------------------------------------------------
+ |
+ | The record cache (docs/cache.md): lists answer with ids, records come
+ | from cards built once per language, and saving a record in the admin
+ | drops what showed it. Works on every Laravel store; Redis is the one to
+ | use in production (one MGET per list, tags free memory at once).
+ |
+ | store a store of config/cache.php, the default one when null
+ | strategy auto: tags where the store has them (Redis, Memcached),
+ | version keys elsewhere; versions: version keys everywhere
+ | ttl seconds: cards, lists of ids, full pages
+ | time_step lists that compare with "now" (active from/to) see time in
+ | steps of this many seconds, so their keys stay the same
+ | ignore models whose saves never touch the cache
+ | pages full-page cache for visitors who are not logged in to the
+ | admin; off by default (see docs/cache.md before turning on)
+ | debug a line under public pages with queries and cache hits, in
+ | the local environment with APP_DEBUG on
+ |
+ */
+ 'cache' => [
+ 'enabled' => (bool) env('ATRIUM_CACHE_ENABLED', true),
+ 'store' => env('ATRIUM_CACHE_STORE'),
+ 'strategy' => env('ATRIUM_CACHE_STRATEGY', 'auto'),
+ 'ttl' => [
+ 'cards' => (int) env('ATRIUM_CACHE_TTL_CARDS', 86400),
+ 'lists' => (int) env('ATRIUM_CACHE_TTL_LISTS', 3600),
+ 'pages' => (int) env('ATRIUM_CACHE_TTL_PAGES', 600),
+ ],
+ 'time_step' => 60,
+ 'stats' => true,
+ 'ignore' => [
+ PageTiming::class,
+ ],
+ 'pages' => [
+ 'enabled' => (bool) env('ATRIUM_PAGE_CACHE', false),
+ // Seconds a CDN may keep a page without the session's form token.
+ 'shared_max_age' => (int) env('ATRIUM_PAGE_CACHE_SHARED_MAX_AGE', 60),
+ // Paths never cached, as Request::is() patterns.
+ 'except' => [],
+ ],
+ 'debug' => (bool) env('ATRIUM_CACHE_DEBUG', true),
+ ],
];
diff --git a/packages/admin/dist/assets/AdminLayout-I1QMPYpW.js b/packages/admin/dist/assets/AdminLayout--RXJFj9t.js
similarity index 99%
rename from packages/admin/dist/assets/AdminLayout-I1QMPYpW.js
rename to packages/admin/dist/assets/AdminLayout--RXJFj9t.js
index 28492410..72f26aa9 100644
--- a/packages/admin/dist/assets/AdminLayout-I1QMPYpW.js
+++ b/packages/admin/dist/assets/AdminLayout--RXJFj9t.js
@@ -1 +1 @@
-import{C as e,E as t,F as n,G as r,H as i,I as a,M as o,P as s,Q as c,R as l,S as u,T as d,W as f,Y as p,Z as m,_ as h,b as g,c as _,et as v,h as y,i as b,m as x,o as S,r as C,s as w,v as T,w as E,x as D,z as O}from"./dist-MY__znoP.js";import{n as k,r as A,t as j}from"./LocaleSwitcher-DdLJ9WTE.js";import{n as M,t as N}from"./app-lI4VKCmX.js";var P=[`aria-expanded`,`title`],F={class:`flex items-center`},I=[`innerHTML`],L={key:0},R=[`innerHTML`],z={key:0,class:`mt-1 ml-4 space-y-1 border-l border-sidebar-line pl-3`},B=[`innerHTML`],V={key:0},H=`flex items-center px-3 py-2 text-sm rounded-lg transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-accent`,U=`bg-sidebar-active text-sidebar-active-fg font-semibold shadow-[inset_3px_0_0_var(--atrium-sidebar-accent)]`,W=`text-sidebar-fg font-medium hover:bg-sidebar-hover`,G={__name:`AdminMenuItem`,props:{item:{type:Object,required:!0},collapsed:Boolean},setup(n){let i=n,o=S(),s=p(!1),h=g(()=>i.item.children&&i.item.children.length>0),_=e=>{let t=route(e,void 0,!1),n=o.url.split(`?`)[0];return n===t||t!==route(`admin.dashboard`,void 0,!1)&&n.startsWith(t+`/`)},x=g(()=>!!i.item.route&&_(i.item.route)),C=g(()=>h.value?i.item.children.some(e=>e.route&&_(e.route)):!1),w=()=>{h.value&&(s.value=!s.value)};C.value&&(s.value=!0);let O={home:` `,users:` `,settings:` `,folder:` `,document:` `,chart:` `,"file-text":` `,package:` `,"help-circle":` `,briefcase:` `,star:` `,tool:` `,info:` `,image:` `,inbox:` `,"shopping-cart":` `,globe:` `,shield:` `,chevronDown:` `,default:` `},k=e=>_(e.route),A=g(()=>O[i.item.icon]||O.default);return(i,o)=>(a(),E(`li`,null,[h.value?(a(),E(T,{key:0},[D(`button`,{onClick:w,class:c([`w-full flex items-center px-3 py-2 text-sm rounded-lg transition-colors duration-200 hover:bg-sidebar-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-accent`,[C.value?`text-sidebar-fg font-semibold`:`text-sidebar-fg font-medium`,n.collapsed?`justify-center`:`justify-between`]]),"aria-expanded":s.value?`true`:`false`,title:n.collapsed?n.item.label:``},[D(`span`,F,[(a(),E(`svg`,{class:c([`w-5 h-5 flex-shrink-0 text-sidebar-muted`,n.collapsed?``:`mr-3`]),fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"aria-hidden":`true`,innerHTML:A.value},null,10,I)),n.collapsed?e(``,!0):(a(),E(`span`,L,v(n.item.label),1))]),n.collapsed?e(``,!0):(a(),E(`svg`,{key:0,class:c([`w-4 h-4 text-sidebar-muted transition-transform duration-200`,{"rotate-180":s.value}]),"aria-hidden":`true`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,innerHTML:O.chevronDown},null,10,R))],10,P),n.collapsed?e(``,!0):r((a(),E(`ul`,z,[(a(!0),E(T,null,l(n.item.children,e=>(a(),E(`li`,{key:e.route},[t(m(b),{"data-menu-route":e.route,href:i.route(e.route),class:c([H,k(e)?U:W]),"aria-current":k(e)?`page`:void 0},{default:f(()=>[d(v(e.label),1)]),_:2},1032,[`data-menu-route`,`href`,`class`,`aria-current`])]))),128))],512)),[[y,s.value]])],64)):(a(),u(m(b),{key:1,"data-menu-route":n.item.route,href:i.route(n.item.route),class:c([H,x.value?U:W,n.collapsed?`justify-center`:``]),"aria-current":x.value?`page`:void 0,title:n.collapsed?n.item.label:``},{default:f(()=>[(a(),E(`svg`,{class:c([`w-5 h-5 flex-shrink-0`,[n.collapsed?``:`mr-3`,x.value?``:`text-sidebar-muted`]]),fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"aria-hidden":`true`,innerHTML:A.value},null,10,B)),n.collapsed?e(``,!0):(a(),E(`span`,V,v(n.item.label),1))]),_:1},8,[`data-menu-route`,`href`,`class`,`aria-current`,`title`]))]))}},K={class:`h-16 flex items-center justify-between px-4 border-b border-sidebar-line`},q=[`src`,`alt`],J={key:1,class:`text-xl font-bold truncate`},Y={class:`flex-1 overflow-y-auto py-4 px-3`},ee={class:`space-y-1`},te={class:`lg:hidden border-t border-sidebar-line p-4`},ne={class:`flex items-center space-x-3`},re={class:`w-10 h-10 rounded-full bg-sidebar-active text-sidebar-active-fg flex items-center justify-center`},ie={class:`text-lg font-medium`},ae={key:0},oe={class:`text-sm font-medium`},se={class:`text-xs text-sidebar-muted`},ce={__name:`AdminSidebar`,props:{open:Boolean,collapsed:Boolean,menu:{type:Array,default:()=>[]},branding:{type:Object,default:()=>({})}},emits:[`close`],setup(n,{emit:r}){let i=S();return g(()=>i.url),(r,i)=>(a(),E(`aside`,{class:c([`fixed inset-y-0 left-0 z-50 flex flex-col bg-sidebar text-sidebar-fg border-r border-sidebar-line transform transition-transform duration-300 lg:translate-x-0`,[n.open?`translate-x-0`:`-translate-x-full`,n.collapsed?`lg:w-20`:`lg:w-64`,`w-64`]])},[D(`div`,K,[t(m(b),{href:r.route(`admin.dashboard`),"data-sidebar-brand":``,class:`flex min-w-0 items-center space-x-3 rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-accent`},{default:f(()=>[n.branding.logo?(a(),E(`img`,{key:0,src:n.branding.logo,alt:n.branding.name,class:`h-8 w-auto`},null,8,q)):e(``,!0),n.branding.logo&&!n.collapsed?(a(),E(`span`,J,v(n.branding.name||r.$t(`layout.brand_short`)),1)):e(``,!0),n.branding.logo?e(``,!0):(a(),u(A,{key:2,name:n.branding.name||`Atrium`,wordmark:!n.collapsed,size:28},null,8,[`name`,`wordmark`]))]),_:1},8,[`href`]),D(`button`,{onClick:i[0]||=e=>r.$emit(`close`),class:`lg:hidden p-2 rounded-md text-sidebar-muted hover:text-sidebar-fg hover:bg-sidebar-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-accent`},[...i[1]||=[D(`svg`,{class:`w-6 h-6`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M6 18L18 6M6 6l12 12`})],-1)]])]),D(`nav`,Y,[D(`ul`,ee,[(a(!0),E(T,null,l(n.menu,e=>(a(),u(G,{key:e.route,item:e,collapsed:n.collapsed},null,8,[`item`,`collapsed`]))),128))])]),D(`div`,te,[D(`div`,ne,[D(`div`,re,[D(`span`,ie,v(r.$page.props.auth?.user?.name?.charAt(0)||`A`),1)]),n.collapsed?e(``,!0):(a(),E(`div`,ae,[D(`p`,oe,v(r.$page.props.auth?.user?.name),1),D(`p`,se,v(r.$page.props.auth?.user?.email),1)]))])]),t(k,{on:`sidebar`,compact:n.collapsed,class:c([`border-t border-sidebar-line px-4 py-3`,n.collapsed?`lg:px-2 lg:text-center`:``])},null,8,[`compact`,`class`])],2))}},le=[`aria-expanded`],ue={class:`w-8 h-8 rounded-full bg-accent-soft flex items-center justify-center text-accent-soft-fg font-semibold`},de={class:`hidden md:block text-left`},fe={class:`text-sm font-medium text-fg`},pe={class:`text-xs text-muted`},me={key:0,class:`absolute right-0 mt-2 w-56 bg-surface rounded-lg shadow-lg border border-line py-1 z-50`},he={class:`px-4 py-3 border-b border-line`},ge={class:`text-sm font-medium text-fg`},_e={class:`text-xs text-muted truncate`},ve={class:`py-1`},ye=[`aria-label`],be={class:`px-4 pt-2 pb-1 text-xs font-semibold uppercase tracking-wide text-muted`},xe=[`aria-checked`,`data-theme-option`,`onClick`],Se=[`data-theme`],Ce={key:1,class:`flex h-4 w-6 flex-none overflow-hidden rounded-sm ring-1 ring-field`,"aria-hidden":`true`},we={class:`flex-1 text-left`},Te={key:2,class:`h-4 w-4 flex-none text-accent`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"aria-hidden":`true`},Ee={class:`border-t border-line py-1`},De={__name:`AdminUserDropdown`,props:{user:{type:Object,default:()=>({})}},setup(r){let i=p(!1),o=p(null),u=()=>{i.value=!i.value},h=()=>{i.value=!1},y=S(),x=g(()=>y.props.themes||[]),C=g(()=>y.props.theme),O=e=>{N(e),w.put(route(`admin.profile.theme`),{theme:e},{preserveScroll:!0,preserveState:!0})},k=()=>{w.post(route(`admin.logout`))},A=e=>{o.value&&!o.value.contains(e.target)&&h()};return s(()=>{document.addEventListener(`click`,A)}),n(()=>{document.removeEventListener(`click`,A)}),(n,s)=>(a(),E(`div`,{ref_key:`dropdownRef`,ref:o,class:`relative`},[D(`button`,{"data-action":`user-menu`,onClick:u,"aria-expanded":i.value?`true`:`false`,class:`flex items-center gap-3 p-2 rounded-lg hover:bg-hover transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-focus`},[D(`div`,ue,v(r.user.name?.charAt(0)?.toUpperCase()||`A`),1),D(`div`,de,[D(`p`,fe,v(r.user.name),1),D(`p`,pe,v(r.user.email),1)]),s[0]||=D(`svg`,{class:`hidden sm:block w-4 h-4 text-muted`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M19 9l-7 7-7-7`})],-1)],8,le),t(_,{"enter-active-class":`transition ease-out duration-100`,"enter-from-class":`transform opacity-0 scale-95`,"enter-to-class":`transform opacity-100 scale-100`,"leave-active-class":`transition ease-in duration-75`,"leave-from-class":`transform opacity-100 scale-100`,"leave-to-class":`transform opacity-0 scale-95`},{default:f(()=>[i.value?(a(),E(`div`,me,[D(`div`,he,[D(`p`,ge,v(r.user.name),1),D(`p`,_e,v(r.user.email),1)]),D(`div`,ve,[t(m(b),{href:n.route(`admin.profile.edit`),class:`flex items-center px-4 py-2 text-sm text-fg hover:bg-hover`,onClick:h},{default:f(()=>[s[1]||=D(`svg`,{class:`w-4 h-4 mr-3 text-muted`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`})],-1),d(` `+v(n.$t(`layout.user_menu.profile`)),1)]),_:1},8,[`href`])]),D(`div`,{class:`border-t border-line py-1`,role:`radiogroup`,"aria-label":n.$t(`layout.theme.label`)},[D(`p`,be,v(n.$t(`layout.theme.label`)),1),(a(!0),E(T,null,l(x.value,t=>(a(),E(`button`,{key:t,type:`button`,role:`radio`,"aria-checked":t===C.value?`true`:`false`,"data-theme-option":t,class:c([`flex items-center w-full gap-3 px-4 py-2 text-sm text-fg hover:bg-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus`,t===C.value?`font-semibold`:``]),onClick:e=>O(t)},[t===`system`?(a(),E(`span`,Ce,[...s[3]||=[D(`span`,{"data-theme":`graphite`,class:`flex-1 bg-page`},null,-1),D(`span`,{"data-theme":`night`,class:`flex-1 bg-page`},null,-1)]])):(a(),E(`span`,{key:0,"data-theme":t,class:`flex h-4 w-6 flex-none overflow-hidden rounded-sm ring-1 ring-field`,"aria-hidden":`true`},[...s[2]||=[D(`span`,{class:`w-2 bg-sidebar`},null,-1),D(`span`,{class:`flex flex-1 items-center justify-center bg-page`},[D(`span`,{class:`h-1.5 w-1.5 rounded-full bg-accent`})],-1)]],8,Se)),D(`span`,we,v(n.$t(`layout.theme.${t}`)),1),t===C.value?(a(),E(`svg`,Te,[...s[4]||=[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2.5`,d:`M5 13l4 4L19 7`},null,-1)]])):e(``,!0)],10,xe))),128))],8,ye),D(`div`,Ee,[D(`button`,{"data-action":`logout`,onClick:k,class:`flex items-center w-full px-4 py-2 text-sm text-danger hover:bg-danger-soft`},[s[5]||=D(`svg`,{class:`w-4 h-4 mr-3`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1`})],-1),d(` `+v(n.$t(`layout.user_menu.logout`)),1)])])])):e(``,!0)]),_:1})],512))}},Oe={key:0,class:`relative flex min-w-0 items-center gap-1 rounded-lg px-1 py-1 text-muted hover:bg-hover hover:text-fg sm:gap-2 sm:px-2`},ke={class:`flex min-w-0 flex-col text-left leading-tight`,"aria-hidden":`true`},Ae={"data-switcher-caption":``,class:`truncate text-[11px] sm:text-xs`},je={class:`max-w-14 truncate text-sm font-medium text-fg sm:max-w-32 xl:max-w-48`},Me=[`aria-label`,`aria-description`,`title`,`value`],Ne=[`value`],Pe={__name:`SiteSwitcher`,setup(t){let n=S(),r=g(()=>n.props.sites||[]),i=g(()=>n.props.currentSite?.id),o=g(()=>n.props.currentSite?.name??``),s=e=>{w.post(route(`admin.site`),{site_id:e.target.value},{preserveScroll:!0,preserveState:!1})};return(t,n)=>r.value.length>1?(a(),E(`div`,Oe,[n[0]||=D(`svg`,{class:`h-5 w-5 shrink-0`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"aria-hidden":`true`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M3 8.25V18a2.25 2.25 0 002.25 2.25h13.5A2.25 2.25 0 0021 18V8.25m-18 0V6a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 6v2.25m-18 0h18M5.25 6h.008v.008H5.25V6zm2.25 0h.008v.008H7.5V6zm2.25 0h.008v.008H9.75V6z`})],-1),D(`span`,ke,[D(`span`,Ae,v(t.$t(`layout.site`)),1),D(`span`,je,v(o.value),1)]),n[1]||=D(`svg`,{class:`hidden h-4 w-4 shrink-0 sm:block`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"aria-hidden":`true`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M19 9l-7 7-7-7`})],-1),D(`select`,{"data-site-switcher":``,name:`site_id`,"aria-label":t.$t(`layout.site`),"aria-description":t.$t(`layout.site_hint`),title:t.$t(`layout.site_hint`),value:i.value,class:`absolute inset-0 h-full w-full cursor-pointer appearance-none rounded-lg bg-transparent text-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-focus`,onChange:s},[(a(!0),E(T,null,l(r.value,e=>(a(),E(`option`,{key:e.id,value:e.id,class:`bg-surface text-fg`},v(e.name),9,Ne))),128))],40,Me)])):e(``,!0)}},Fe={class:`sticky top-0 z-30 transform-gpu h-16 bg-surface border-b border-line flex items-center justify-between gap-1 px-3 sm:gap-2 sm:px-4 lg:px-6`},Ie={class:`flex shrink-0 items-center gap-1 sm:gap-4`},Le=[`href`,`title`],Re={class:`hidden sm:inline`},ze={class:`flex min-w-0 items-center gap-1 sm:gap-2 lg:gap-3`},Be={__name:`AdminHeader`,props:{user:{type:Object,default:()=>({})},branding:{type:Object,default:()=>({})}},emits:[`toggle-sidebar`,`toggle-collapse`],setup(e,{emit:n}){return(n,r)=>(a(),E(`header`,Fe,[D(`div`,Ie,[D(`button`,{onClick:r[0]||=e=>n.$emit(`toggle-sidebar`),class:`lg:hidden p-2 rounded-md text-muted hover:text-fg hover:bg-hover`},[...r[2]||=[D(`svg`,{class:`w-6 h-6`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 6h16M4 12h16M4 18h16`})],-1)]]),D(`button`,{"data-action":`collapse-sidebar`,onClick:r[1]||=e=>n.$emit(`toggle-collapse`),class:`hidden lg:block p-2 rounded-md text-muted hover:text-fg hover:bg-hover`},[...r[3]||=[D(`svg`,{class:`w-5 h-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 6h16M4 12h8m-8 6h16`})],-1)]]),D(`a`,{"data-action":`visit-site`,href:n.$page.props.currentSite?.url||`/`,target:`_blank`,rel:`noopener`,class:`flex items-center gap-2 rounded-md px-2 py-2 text-sm text-muted hover:bg-hover hover:text-fg`,title:n.$t(`layout.visit_site_hint`)},[r[4]||=D(`svg`,{class:`w-5 h-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M21 12a9 9 0 11-18 0 9 9 0 0118 0zM3.6 9h16.8M3.6 15h16.8M12 3a15 15 0 010 18M12 3a15 15 0 000 18`})],-1),D(`span`,Re,v(n.$t(`layout.visit_site`)),1)],8,Le)]),D(`div`,ze,[t(Pe),t(j),t(De,{user:e.user},null,8,[`user`])])]))}};function X(){return M(`fields.upload.session_expired`)}function Ve(e){let t=document.cookie.match(RegExp(`(?:^|;\\s*)`+e+`=([^;]*)`));if(!t)return null;try{return decodeURIComponent(t[1])}catch{return t[1]}}function He(){let e=Ve(`XSRF-TOKEN`);if(e)return{"X-XSRF-TOKEN":e};let t=document.querySelector(`meta[name="csrf-token"]`)?.getAttribute(`content`);return t?{"X-CSRF-TOKEN":t}:{}}function Z(e={}){return{Accept:`application/json`,"X-Requested-With":`XMLHttpRequest`,...He(),...e}}async function Q(e,t=M(`fields.upload.request_failed`)){return e.status===419?X():e.status===413?M(`fields.upload.too_large`):(await e.json().catch(()=>({}))).message||t}var Ue=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},We=[`aria-label`],Ge={class:`flex items-center justify-between gap-2 border-b border-line px-4 py-2.5`},Ke={class:`text-sm font-semibold`},qe={class:`flex items-center gap-3 text-xs`},Je=[`aria-label`],Ye={class:`rounded-lg bg-surface-alt px-3 py-2`},Xe={key:0,class:`max-w-[85%] whitespace-pre-wrap rounded-lg bg-accent-soft px-3 py-2 text-accent-soft-fg`,dusk:`ai-question`},Ze=[`dusk`,`innerHTML`],Qe={key:0,class:`text-muted`,dusk:`ai-thinking`},$e={class:`flex items-end gap-2`},et=[`placeholder`,`aria-label`],tt=[`disabled`],$={class:`mt-2 text-xs text-muted`},nt=[`aria-label`,`aria-expanded`,`title`],rt={viewBox:`0 0 48 52`,class:`h-full w-full overflow-visible`,"aria-hidden":`true`},it={class:`ai-mascot-body`},at={class:`ai-mascot-eyes`},ot=[`cx`,`cy`],st=[`cx`,`cy`],ct=Ue({__name:`AiHelper`,setup(t){let u=S(),d=g(()=>u.props.ai?.help||null),f=g(()=>d.value?.labels||{}),m=g(()=>u.props.ai?.url||``),_=g(()=>`atrium-ai-help:${u.props.auth?.user?.id??``}`),y=p(!1),b=p(!1),C=p(``),O=p([]),k=p(null),A=p(null),j=p({x:0,y:0}),M=p(null),N=null,P=0;s(()=>{try{O.value=JSON.parse(sessionStorage.getItem(_.value)||`[]`)}catch{O.value=[]}window.addEventListener(`pointermove`,F)}),n(()=>{I(),window.removeEventListener(`pointermove`,F)}),i(O,e=>{try{sessionStorage.setItem(_.value,JSON.stringify(e.slice(-20)))}catch{}},{deep:!0});function F(e){let t=M.value?.getBoundingClientRect();if(!t)return;let n=e.clientX-(t.left+t.width/2),r=e.clientY-(t.top+t.height/3),i=Math.hypot(n,r)||1;j.value={x:n/i*.9,y:r/i*.9}}function I(){clearTimeout(N),N=null,P++}async function L(){y.value=!y.value,y.value&&(await o(),z(),A.value?.focus())}function R(){I(),b.value=!1,O.value=[],A.value?.focus()}async function z(){await o(),k.value&&(k.value.scrollTop=k.value.scrollHeight)}async function B(){let e=C.value.trim();if(e===``||b.value)return;let t=O.value.filter(e=>!e.error).slice(-10).map(({role:e,text:t})=>({role:e,text:t}));O.value.push({role:`user`,text:e}),C.value=``,b.value=!0,z(),I();let n=P;try{let r=await fetch(d.value.url,{method:`POST`,credentials:`same-origin`,headers:Z({"Content-Type":`application/json`}),body:JSON.stringify({question:e,history:t})});if(!r.ok)throw Error(await Q(r,f.value.error));V(await r.json(),n)}catch(e){n===P&&U(e.message)}}function V(e,t){t===P&&(e.status===`done`?(b.value=!1,O.value.push({role:`assistant`,text:e.value||``}),z()):e.status===`failed`?U(e.message):N=setTimeout(()=>H(e.id,t),1500))}async function H(e,t){try{let n=await fetch(`${m.value}/${e}`,{credentials:`same-origin`,headers:Z()});if(!n.ok)throw Error(await Q(n,f.value.error));V(await n.json(),t)}catch(e){t===P&&U(e.message)}}function U(e){b.value=!1,O.value.push({role:`assistant`,text:e||f.value.error,error:!0}),z()}function W(e){e.key===`Enter`&&!e.shiftKey&&!e.isComposing&&(e.preventDefault(),B())}let G={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},K=e=>String(e).replace(/[&<>"']/g,e=>G[e]);function q(e){let t=e=>K(e).replace(/\*\*(.+?)\*\*/g,`$1 `).replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(e,t,n)=>n.startsWith(`/`)&&!n.startsWith(`//`)?`${t} `:t),n=[],r=[],i=()=>{r.length&&(n.push(`
${r.map(e=>`${e} `).join(``)} `),r=[])};for(let a of String(e).split(/\r?\n/)){let e=a.match(/^\s*[-*]\s+(.*)$/);e?r.push(t(e[1])):(i(),a.trim()!==``&&n.push(`${t(a)}
`))}return i(),n.join(``)}function J(e){let t=e.target.closest?.(`a[data-ai-link]`);t&&(e.preventDefault(),w.visit(t.getAttribute(`href`)))}function Y(e){e.key===`Escape`&&y.value&&(y.value=!1)}return(t,n)=>d.value?(a(),E(`div`,{key:0,class:`fixed bottom-4 right-4 z-40 flex flex-col items-end gap-3`,dusk:`ai-helper`,onKeydown:Y},[y.value?(a(),E(`section`,{key:0,class:`flex w-[22rem] max-w-[calc(100vw-2rem)] max-h-[min(36rem,calc(100vh-8rem))] flex-col rounded-lg border border-line bg-surface text-fg shadow-xl`,role:`dialog`,"aria-label":f.value.title,dusk:`ai-chat`},[D(`header`,Ge,[D(`h2`,Ke,v(f.value.title),1),D(`div`,qe,[O.value.length?(a(),E(`button`,{key:0,type:`button`,class:`text-muted hover:text-fg`,dusk:`ai-clear`,onClick:R},v(f.value.clear),1)):e(``,!0),D(`button`,{type:`button`,class:`text-muted hover:text-fg`,"aria-label":f.value.close,dusk:`ai-close`,onClick:n[0]||=e=>y.value=!1},[...n[2]||=[D(`svg`,{class:`h-4 w-4`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`},[D(`path`,{d:`M5.3 4.3 10 9l4.7-4.7 1 1L11 10l4.7 4.7-1 1L10 11l-4.7 4.7-1-1L9 10 4.3 5.3z`})],-1)]],8,Je)])]),D(`div`,{ref_key:`list`,ref:k,class:`flex-1 space-y-3 overflow-y-auto px-4 py-3 text-sm`,"aria-live":`polite`,onClick:J},[D(`p`,Ye,v(f.value.hello),1),(a(!0),E(T,null,l(O.value,(e,t)=>(a(),E(`div`,{key:t,class:c([`flex`,e.role===`user`?`justify-end`:`justify-start`])},[e.role===`user`?(a(),E(`p`,Xe,v(e.text),1)):(a(),E(`div`,{key:1,class:c([`max-w-[90%] space-y-2 rounded-lg px-3 py-2`,e.error?`border border-danger bg-danger-soft text-danger-soft-fg`:`bg-surface-alt`]),dusk:e.error?`ai-error`:`ai-answer`,innerHTML:q(e.text)},null,10,Ze))],2))),128)),b.value?(a(),E(`p`,Qe,v(f.value.thinking),1)):e(``,!0)],512),D(`form`,{class:`border-t border-line p-3`,onSubmit:h(B,[`prevent`])},[D(`div`,$e,[r(D(`textarea`,{ref_key:`input`,ref:A,"onUpdate:modelValue":n[1]||=e=>C.value=e,rows:`2`,maxlength:`2000`,class:`flex-1 resize-none rounded-md border border-field bg-surface px-3 py-2 text-sm text-fg focus:border-focus focus:outline-none focus:ring-1 focus:ring-focus`,placeholder:f.value.placeholder,"aria-label":f.value.placeholder,dusk:`ai-input`,onKeydown:W},null,40,et),[[x,C.value]]),D(`button`,{type:`submit`,class:`rounded-md bg-accent px-3 py-2 text-sm font-medium text-on-accent hover:bg-accent-hover disabled:opacity-50`,disabled:b.value||C.value.trim()===``,dusk:`ai-send`},v(f.value.send),9,tt)]),D(`p`,$,v(f.value.note),1)],32)],8,We)):e(``,!0),D(`button`,{ref_key:`mascot`,ref:M,type:`button`,class:c([`ai-mascot group relative h-16 w-16 rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-focus`,{"is-thinking":b.value,"is-open":y.value}]),"aria-label":f.value.open,"aria-expanded":y.value,title:f.value.open,dusk:`ai-mascot`,onClick:L},[(a(),E(`svg`,rt,[n[9]||=D(`ellipse`,{class:`ai-mascot-shadow fill-fg`,cx:`24`,cy:`49`,rx:`15`,ry:`2.2`,opacity:`0.15`},null,-1),D(`g`,it,[n[5]||=D(`path`,{class:`fill-fg`,d:`M6 42V22a18 18 0 0 1 36 0v20H32V22a8 8 0 0 0-16 0v20z`},null,-1),n[6]||=D(`rect`,{class:`ai-mascot-belt fill-accent`,x:`16`,y:`28`,width:`16`,height:`5`},null,-1),n[7]||=D(`rect`,{class:`fill-fg`,x:`4`,y:`41`,width:`13`,height:`3.5`,rx:`1.75`},null,-1),n[8]||=D(`rect`,{class:`fill-fg`,x:`31`,y:`41`,width:`13`,height:`3.5`,rx:`1.75`},null,-1),D(`g`,at,[n[3]||=D(`circle`,{class:`fill-surface`,cx:`19`,cy:`10.5`,r:`3`},null,-1),n[4]||=D(`circle`,{class:`fill-surface`,cx:`29`,cy:`10.5`,r:`3`},null,-1),D(`circle`,{class:`fill-fg`,cx:19+j.value.x,cy:10.5+j.value.y,r:`1.4`},null,8,ot),D(`circle`,{class:`fill-fg`,cx:29+j.value.x,cy:10.5+j.value.y,r:`1.4`},null,8,st)])])]))],10,nt)],32)):e(``,!0)}},[[`__scopeId`,`data-v-6928fa25`]]),lt={class:`min-h-screen bg-page`},ut={"data-page-content":`true`,class:`p-4 lg:p-6`},dt={key:0,"data-flash":`success`,class:`mb-4 p-4 bg-success-soft border border-success text-success-soft-fg rounded`},ft={key:1,"data-flash":`error`,class:`mb-4 p-4 bg-danger-soft border border-danger text-danger-soft-fg rounded`},pt={__name:`AdminLayout`,props:{title:{type:String,default:``}},setup(n){let r=S(),i=p(!1),o=p(!1),s=g(()=>r.props.branding||{}),l=g(()=>r.props.menu||[]),u=g(()=>r.props.auth?.user||{}),d=()=>{i.value=!i.value},f=()=>{o.value=!o.value},h=()=>{i.value=!1};return(r,p)=>(a(),E(T,null,[t(m(C),{title:n.title||``},null,8,[`title`]),D(`div`,lt,[i.value?(a(),E(`div`,{key:0,class:`fixed inset-0 z-40 bg-black/50 lg:hidden`,onClick:h})):e(``,!0),t(ce,{open:i.value,collapsed:o.value,menu:l.value,branding:s.value,onClose:h},null,8,[`open`,`collapsed`,`menu`,`branding`]),D(`div`,{class:c([`transition-all duration-300`,o.value?`lg:pl-20`:`lg:pl-64`])},[t(Be,{user:u.value,branding:s.value,onToggleSidebar:d,onToggleCollapse:f},null,8,[`user`,`branding`]),D(`main`,ut,[r.$page.props.flash?.success?(a(),E(`div`,dt,v(r.$page.props.flash.success),1)):e(``,!0),r.$page.props.flash?.error?(a(),E(`div`,ft,v(r.$page.props.flash.error),1)):e(``,!0),O(r.$slots,`default`)])],2),t(ct)])],64))}};export{X as i,Z as n,Q as r,pt as t};
\ No newline at end of file
+import{C as e,E as t,F as n,G as r,H as i,I as a,M as o,P as s,Q as c,R as l,S as u,T as d,W as f,Y as p,Z as m,_ as h,b as g,c as _,et as v,h as y,i as b,m as x,o as S,r as C,s as w,v as T,w as E,x as D,z as O}from"./dist-MY__znoP.js";import{n as k,r as A,t as j}from"./LocaleSwitcher-DdLJ9WTE.js";import{n as M,t as N}from"./app-BNjy5Z6H.js";var P=[`aria-expanded`,`title`],F={class:`flex items-center`},I=[`innerHTML`],L={key:0},R=[`innerHTML`],z={key:0,class:`mt-1 ml-4 space-y-1 border-l border-sidebar-line pl-3`},B=[`innerHTML`],V={key:0},H=`flex items-center px-3 py-2 text-sm rounded-lg transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-accent`,U=`bg-sidebar-active text-sidebar-active-fg font-semibold shadow-[inset_3px_0_0_var(--atrium-sidebar-accent)]`,W=`text-sidebar-fg font-medium hover:bg-sidebar-hover`,G={__name:`AdminMenuItem`,props:{item:{type:Object,required:!0},collapsed:Boolean},setup(n){let i=n,o=S(),s=p(!1),h=g(()=>i.item.children&&i.item.children.length>0),_=e=>{let t=route(e,void 0,!1),n=o.url.split(`?`)[0];return n===t||t!==route(`admin.dashboard`,void 0,!1)&&n.startsWith(t+`/`)},x=g(()=>!!i.item.route&&_(i.item.route)),C=g(()=>h.value?i.item.children.some(e=>e.route&&_(e.route)):!1),w=()=>{h.value&&(s.value=!s.value)};C.value&&(s.value=!0);let O={home:` `,users:` `,settings:` `,folder:` `,document:` `,chart:` `,"file-text":` `,package:` `,"help-circle":` `,briefcase:` `,star:` `,tool:` `,info:` `,image:` `,inbox:` `,"shopping-cart":` `,globe:` `,shield:` `,chevronDown:` `,default:` `},k=e=>_(e.route),A=g(()=>O[i.item.icon]||O.default);return(i,o)=>(a(),E(`li`,null,[h.value?(a(),E(T,{key:0},[D(`button`,{onClick:w,class:c([`w-full flex items-center px-3 py-2 text-sm rounded-lg transition-colors duration-200 hover:bg-sidebar-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-accent`,[C.value?`text-sidebar-fg font-semibold`:`text-sidebar-fg font-medium`,n.collapsed?`justify-center`:`justify-between`]]),"aria-expanded":s.value?`true`:`false`,title:n.collapsed?n.item.label:``},[D(`span`,F,[(a(),E(`svg`,{class:c([`w-5 h-5 flex-shrink-0 text-sidebar-muted`,n.collapsed?``:`mr-3`]),fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"aria-hidden":`true`,innerHTML:A.value},null,10,I)),n.collapsed?e(``,!0):(a(),E(`span`,L,v(n.item.label),1))]),n.collapsed?e(``,!0):(a(),E(`svg`,{key:0,class:c([`w-4 h-4 text-sidebar-muted transition-transform duration-200`,{"rotate-180":s.value}]),"aria-hidden":`true`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,innerHTML:O.chevronDown},null,10,R))],10,P),n.collapsed?e(``,!0):r((a(),E(`ul`,z,[(a(!0),E(T,null,l(n.item.children,e=>(a(),E(`li`,{key:e.route},[t(m(b),{"data-menu-route":e.route,href:i.route(e.route),class:c([H,k(e)?U:W]),"aria-current":k(e)?`page`:void 0},{default:f(()=>[d(v(e.label),1)]),_:2},1032,[`data-menu-route`,`href`,`class`,`aria-current`])]))),128))],512)),[[y,s.value]])],64)):(a(),u(m(b),{key:1,"data-menu-route":n.item.route,href:i.route(n.item.route),class:c([H,x.value?U:W,n.collapsed?`justify-center`:``]),"aria-current":x.value?`page`:void 0,title:n.collapsed?n.item.label:``},{default:f(()=>[(a(),E(`svg`,{class:c([`w-5 h-5 flex-shrink-0`,[n.collapsed?``:`mr-3`,x.value?``:`text-sidebar-muted`]]),fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"aria-hidden":`true`,innerHTML:A.value},null,10,B)),n.collapsed?e(``,!0):(a(),E(`span`,V,v(n.item.label),1))]),_:1},8,[`data-menu-route`,`href`,`class`,`aria-current`,`title`]))]))}},K={class:`h-16 flex items-center justify-between px-4 border-b border-sidebar-line`},q=[`src`,`alt`],J={key:1,class:`text-xl font-bold truncate`},Y={class:`flex-1 overflow-y-auto py-4 px-3`},ee={class:`space-y-1`},te={class:`lg:hidden border-t border-sidebar-line p-4`},ne={class:`flex items-center space-x-3`},re={class:`w-10 h-10 rounded-full bg-sidebar-active text-sidebar-active-fg flex items-center justify-center`},ie={class:`text-lg font-medium`},ae={key:0},oe={class:`text-sm font-medium`},se={class:`text-xs text-sidebar-muted`},ce={__name:`AdminSidebar`,props:{open:Boolean,collapsed:Boolean,menu:{type:Array,default:()=>[]},branding:{type:Object,default:()=>({})}},emits:[`close`],setup(n,{emit:r}){let i=S();return g(()=>i.url),(r,i)=>(a(),E(`aside`,{class:c([`fixed inset-y-0 left-0 z-50 flex flex-col bg-sidebar text-sidebar-fg border-r border-sidebar-line transform transition-transform duration-300 lg:translate-x-0`,[n.open?`translate-x-0`:`-translate-x-full`,n.collapsed?`lg:w-20`:`lg:w-64`,`w-64`]])},[D(`div`,K,[t(m(b),{href:r.route(`admin.dashboard`),"data-sidebar-brand":``,class:`flex min-w-0 items-center space-x-3 rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-accent`},{default:f(()=>[n.branding.logo?(a(),E(`img`,{key:0,src:n.branding.logo,alt:n.branding.name,class:`h-8 w-auto`},null,8,q)):e(``,!0),n.branding.logo&&!n.collapsed?(a(),E(`span`,J,v(n.branding.name||r.$t(`layout.brand_short`)),1)):e(``,!0),n.branding.logo?e(``,!0):(a(),u(A,{key:2,name:n.branding.name||`Atrium`,wordmark:!n.collapsed,size:28},null,8,[`name`,`wordmark`]))]),_:1},8,[`href`]),D(`button`,{onClick:i[0]||=e=>r.$emit(`close`),class:`lg:hidden p-2 rounded-md text-sidebar-muted hover:text-sidebar-fg hover:bg-sidebar-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-accent`},[...i[1]||=[D(`svg`,{class:`w-6 h-6`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M6 18L18 6M6 6l12 12`})],-1)]])]),D(`nav`,Y,[D(`ul`,ee,[(a(!0),E(T,null,l(n.menu,e=>(a(),u(G,{key:e.route,item:e,collapsed:n.collapsed},null,8,[`item`,`collapsed`]))),128))])]),D(`div`,te,[D(`div`,ne,[D(`div`,re,[D(`span`,ie,v(r.$page.props.auth?.user?.name?.charAt(0)||`A`),1)]),n.collapsed?e(``,!0):(a(),E(`div`,ae,[D(`p`,oe,v(r.$page.props.auth?.user?.name),1),D(`p`,se,v(r.$page.props.auth?.user?.email),1)]))])]),t(k,{on:`sidebar`,compact:n.collapsed,class:c([`border-t border-sidebar-line px-4 py-3`,n.collapsed?`lg:px-2 lg:text-center`:``])},null,8,[`compact`,`class`])],2))}},le=[`aria-expanded`],ue={class:`w-8 h-8 rounded-full bg-accent-soft flex items-center justify-center text-accent-soft-fg font-semibold`},de={class:`hidden md:block text-left`},fe={class:`text-sm font-medium text-fg`},pe={class:`text-xs text-muted`},me={key:0,class:`absolute right-0 mt-2 w-56 bg-surface rounded-lg shadow-lg border border-line py-1 z-50`},he={class:`px-4 py-3 border-b border-line`},ge={class:`text-sm font-medium text-fg`},_e={class:`text-xs text-muted truncate`},ve={class:`py-1`},ye=[`aria-label`],be={class:`px-4 pt-2 pb-1 text-xs font-semibold uppercase tracking-wide text-muted`},xe=[`aria-checked`,`data-theme-option`,`onClick`],Se=[`data-theme`],Ce={key:1,class:`flex h-4 w-6 flex-none overflow-hidden rounded-sm ring-1 ring-field`,"aria-hidden":`true`},we={class:`flex-1 text-left`},Te={key:2,class:`h-4 w-4 flex-none text-accent`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"aria-hidden":`true`},Ee={class:`border-t border-line py-1`},De={__name:`AdminUserDropdown`,props:{user:{type:Object,default:()=>({})}},setup(r){let i=p(!1),o=p(null),u=()=>{i.value=!i.value},h=()=>{i.value=!1},y=S(),x=g(()=>y.props.themes||[]),C=g(()=>y.props.theme),O=e=>{N(e),w.put(route(`admin.profile.theme`),{theme:e},{preserveScroll:!0,preserveState:!0})},k=()=>{w.post(route(`admin.logout`))},A=e=>{o.value&&!o.value.contains(e.target)&&h()};return s(()=>{document.addEventListener(`click`,A)}),n(()=>{document.removeEventListener(`click`,A)}),(n,s)=>(a(),E(`div`,{ref_key:`dropdownRef`,ref:o,class:`relative`},[D(`button`,{"data-action":`user-menu`,onClick:u,"aria-expanded":i.value?`true`:`false`,class:`flex items-center gap-3 p-2 rounded-lg hover:bg-hover transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-focus`},[D(`div`,ue,v(r.user.name?.charAt(0)?.toUpperCase()||`A`),1),D(`div`,de,[D(`p`,fe,v(r.user.name),1),D(`p`,pe,v(r.user.email),1)]),s[0]||=D(`svg`,{class:`hidden sm:block w-4 h-4 text-muted`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M19 9l-7 7-7-7`})],-1)],8,le),t(_,{"enter-active-class":`transition ease-out duration-100`,"enter-from-class":`transform opacity-0 scale-95`,"enter-to-class":`transform opacity-100 scale-100`,"leave-active-class":`transition ease-in duration-75`,"leave-from-class":`transform opacity-100 scale-100`,"leave-to-class":`transform opacity-0 scale-95`},{default:f(()=>[i.value?(a(),E(`div`,me,[D(`div`,he,[D(`p`,ge,v(r.user.name),1),D(`p`,_e,v(r.user.email),1)]),D(`div`,ve,[t(m(b),{href:n.route(`admin.profile.edit`),class:`flex items-center px-4 py-2 text-sm text-fg hover:bg-hover`,onClick:h},{default:f(()=>[s[1]||=D(`svg`,{class:`w-4 h-4 mr-3 text-muted`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`})],-1),d(` `+v(n.$t(`layout.user_menu.profile`)),1)]),_:1},8,[`href`])]),D(`div`,{class:`border-t border-line py-1`,role:`radiogroup`,"aria-label":n.$t(`layout.theme.label`)},[D(`p`,be,v(n.$t(`layout.theme.label`)),1),(a(!0),E(T,null,l(x.value,t=>(a(),E(`button`,{key:t,type:`button`,role:`radio`,"aria-checked":t===C.value?`true`:`false`,"data-theme-option":t,class:c([`flex items-center w-full gap-3 px-4 py-2 text-sm text-fg hover:bg-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus`,t===C.value?`font-semibold`:``]),onClick:e=>O(t)},[t===`system`?(a(),E(`span`,Ce,[...s[3]||=[D(`span`,{"data-theme":`graphite`,class:`flex-1 bg-page`},null,-1),D(`span`,{"data-theme":`night`,class:`flex-1 bg-page`},null,-1)]])):(a(),E(`span`,{key:0,"data-theme":t,class:`flex h-4 w-6 flex-none overflow-hidden rounded-sm ring-1 ring-field`,"aria-hidden":`true`},[...s[2]||=[D(`span`,{class:`w-2 bg-sidebar`},null,-1),D(`span`,{class:`flex flex-1 items-center justify-center bg-page`},[D(`span`,{class:`h-1.5 w-1.5 rounded-full bg-accent`})],-1)]],8,Se)),D(`span`,we,v(n.$t(`layout.theme.${t}`)),1),t===C.value?(a(),E(`svg`,Te,[...s[4]||=[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2.5`,d:`M5 13l4 4L19 7`},null,-1)]])):e(``,!0)],10,xe))),128))],8,ye),D(`div`,Ee,[D(`button`,{"data-action":`logout`,onClick:k,class:`flex items-center w-full px-4 py-2 text-sm text-danger hover:bg-danger-soft`},[s[5]||=D(`svg`,{class:`w-4 h-4 mr-3`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1`})],-1),d(` `+v(n.$t(`layout.user_menu.logout`)),1)])])])):e(``,!0)]),_:1})],512))}},Oe={key:0,class:`relative flex min-w-0 items-center gap-1 rounded-lg px-1 py-1 text-muted hover:bg-hover hover:text-fg sm:gap-2 sm:px-2`},ke={class:`flex min-w-0 flex-col text-left leading-tight`,"aria-hidden":`true`},Ae={"data-switcher-caption":``,class:`truncate text-[11px] sm:text-xs`},je={class:`max-w-14 truncate text-sm font-medium text-fg sm:max-w-32 xl:max-w-48`},Me=[`aria-label`,`aria-description`,`title`,`value`],Ne=[`value`],Pe={__name:`SiteSwitcher`,setup(t){let n=S(),r=g(()=>n.props.sites||[]),i=g(()=>n.props.currentSite?.id),o=g(()=>n.props.currentSite?.name??``),s=e=>{w.post(route(`admin.site`),{site_id:e.target.value},{preserveScroll:!0,preserveState:!1})};return(t,n)=>r.value.length>1?(a(),E(`div`,Oe,[n[0]||=D(`svg`,{class:`h-5 w-5 shrink-0`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"aria-hidden":`true`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M3 8.25V18a2.25 2.25 0 002.25 2.25h13.5A2.25 2.25 0 0021 18V8.25m-18 0V6a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 6v2.25m-18 0h18M5.25 6h.008v.008H5.25V6zm2.25 0h.008v.008H7.5V6zm2.25 0h.008v.008H9.75V6z`})],-1),D(`span`,ke,[D(`span`,Ae,v(t.$t(`layout.site`)),1),D(`span`,je,v(o.value),1)]),n[1]||=D(`svg`,{class:`hidden h-4 w-4 shrink-0 sm:block`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"aria-hidden":`true`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M19 9l-7 7-7-7`})],-1),D(`select`,{"data-site-switcher":``,name:`site_id`,"aria-label":t.$t(`layout.site`),"aria-description":t.$t(`layout.site_hint`),title:t.$t(`layout.site_hint`),value:i.value,class:`absolute inset-0 h-full w-full cursor-pointer appearance-none rounded-lg bg-transparent text-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-focus`,onChange:s},[(a(!0),E(T,null,l(r.value,e=>(a(),E(`option`,{key:e.id,value:e.id,class:`bg-surface text-fg`},v(e.name),9,Ne))),128))],40,Me)])):e(``,!0)}},Fe={class:`sticky top-0 z-30 transform-gpu h-16 bg-surface border-b border-line flex items-center justify-between gap-1 px-3 sm:gap-2 sm:px-4 lg:px-6`},Ie={class:`flex shrink-0 items-center gap-1 sm:gap-4`},Le=[`href`,`title`],Re={class:`hidden sm:inline`},ze={class:`flex min-w-0 items-center gap-1 sm:gap-2 lg:gap-3`},Be={__name:`AdminHeader`,props:{user:{type:Object,default:()=>({})},branding:{type:Object,default:()=>({})}},emits:[`toggle-sidebar`,`toggle-collapse`],setup(e,{emit:n}){return(n,r)=>(a(),E(`header`,Fe,[D(`div`,Ie,[D(`button`,{onClick:r[0]||=e=>n.$emit(`toggle-sidebar`),class:`lg:hidden p-2 rounded-md text-muted hover:text-fg hover:bg-hover`},[...r[2]||=[D(`svg`,{class:`w-6 h-6`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 6h16M4 12h16M4 18h16`})],-1)]]),D(`button`,{"data-action":`collapse-sidebar`,onClick:r[1]||=e=>n.$emit(`toggle-collapse`),class:`hidden lg:block p-2 rounded-md text-muted hover:text-fg hover:bg-hover`},[...r[3]||=[D(`svg`,{class:`w-5 h-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 6h16M4 12h8m-8 6h16`})],-1)]]),D(`a`,{"data-action":`visit-site`,href:n.$page.props.currentSite?.url||`/`,target:`_blank`,rel:`noopener`,class:`flex items-center gap-2 rounded-md px-2 py-2 text-sm text-muted hover:bg-hover hover:text-fg`,title:n.$t(`layout.visit_site_hint`)},[r[4]||=D(`svg`,{class:`w-5 h-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[D(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M21 12a9 9 0 11-18 0 9 9 0 0118 0zM3.6 9h16.8M3.6 15h16.8M12 3a15 15 0 010 18M12 3a15 15 0 000 18`})],-1),D(`span`,Re,v(n.$t(`layout.visit_site`)),1)],8,Le)]),D(`div`,ze,[t(Pe),t(j),t(De,{user:e.user},null,8,[`user`])])]))}};function X(){return M(`fields.upload.session_expired`)}function Ve(e){let t=document.cookie.match(RegExp(`(?:^|;\\s*)`+e+`=([^;]*)`));if(!t)return null;try{return decodeURIComponent(t[1])}catch{return t[1]}}function He(){let e=Ve(`XSRF-TOKEN`);if(e)return{"X-XSRF-TOKEN":e};let t=document.querySelector(`meta[name="csrf-token"]`)?.getAttribute(`content`);return t?{"X-CSRF-TOKEN":t}:{}}function Z(e={}){return{Accept:`application/json`,"X-Requested-With":`XMLHttpRequest`,...He(),...e}}async function Q(e,t=M(`fields.upload.request_failed`)){return e.status===419?X():e.status===413?M(`fields.upload.too_large`):(await e.json().catch(()=>({}))).message||t}var Ue=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},We=[`aria-label`],Ge={class:`flex items-center justify-between gap-2 border-b border-line px-4 py-2.5`},Ke={class:`text-sm font-semibold`},qe={class:`flex items-center gap-3 text-xs`},Je=[`aria-label`],Ye={class:`rounded-lg bg-surface-alt px-3 py-2`},Xe={key:0,class:`max-w-[85%] whitespace-pre-wrap rounded-lg bg-accent-soft px-3 py-2 text-accent-soft-fg`,dusk:`ai-question`},Ze=[`dusk`,`innerHTML`],Qe={key:0,class:`text-muted`,dusk:`ai-thinking`},$e={class:`flex items-end gap-2`},et=[`placeholder`,`aria-label`],tt=[`disabled`],$={class:`mt-2 text-xs text-muted`},nt=[`aria-label`,`aria-expanded`,`title`],rt={viewBox:`0 0 48 52`,class:`h-full w-full overflow-visible`,"aria-hidden":`true`},it={class:`ai-mascot-body`},at={class:`ai-mascot-eyes`},ot=[`cx`,`cy`],st=[`cx`,`cy`],ct=Ue({__name:`AiHelper`,setup(t){let u=S(),d=g(()=>u.props.ai?.help||null),f=g(()=>d.value?.labels||{}),m=g(()=>u.props.ai?.url||``),_=g(()=>`atrium-ai-help:${u.props.auth?.user?.id??``}`),y=p(!1),b=p(!1),C=p(``),O=p([]),k=p(null),A=p(null),j=p({x:0,y:0}),M=p(null),N=null,P=0;s(()=>{try{O.value=JSON.parse(sessionStorage.getItem(_.value)||`[]`)}catch{O.value=[]}window.addEventListener(`pointermove`,F)}),n(()=>{I(),window.removeEventListener(`pointermove`,F)}),i(O,e=>{try{sessionStorage.setItem(_.value,JSON.stringify(e.slice(-20)))}catch{}},{deep:!0});function F(e){let t=M.value?.getBoundingClientRect();if(!t)return;let n=e.clientX-(t.left+t.width/2),r=e.clientY-(t.top+t.height/3),i=Math.hypot(n,r)||1;j.value={x:n/i*.9,y:r/i*.9}}function I(){clearTimeout(N),N=null,P++}async function L(){y.value=!y.value,y.value&&(await o(),z(),A.value?.focus())}function R(){I(),b.value=!1,O.value=[],A.value?.focus()}async function z(){await o(),k.value&&(k.value.scrollTop=k.value.scrollHeight)}async function B(){let e=C.value.trim();if(e===``||b.value)return;let t=O.value.filter(e=>!e.error).slice(-10).map(({role:e,text:t})=>({role:e,text:t}));O.value.push({role:`user`,text:e}),C.value=``,b.value=!0,z(),I();let n=P;try{let r=await fetch(d.value.url,{method:`POST`,credentials:`same-origin`,headers:Z({"Content-Type":`application/json`}),body:JSON.stringify({question:e,history:t})});if(!r.ok)throw Error(await Q(r,f.value.error));V(await r.json(),n)}catch(e){n===P&&U(e.message)}}function V(e,t){t===P&&(e.status===`done`?(b.value=!1,O.value.push({role:`assistant`,text:e.value||``}),z()):e.status===`failed`?U(e.message):N=setTimeout(()=>H(e.id,t),1500))}async function H(e,t){try{let n=await fetch(`${m.value}/${e}`,{credentials:`same-origin`,headers:Z()});if(!n.ok)throw Error(await Q(n,f.value.error));V(await n.json(),t)}catch(e){t===P&&U(e.message)}}function U(e){b.value=!1,O.value.push({role:`assistant`,text:e||f.value.error,error:!0}),z()}function W(e){e.key===`Enter`&&!e.shiftKey&&!e.isComposing&&(e.preventDefault(),B())}let G={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},K=e=>String(e).replace(/[&<>"']/g,e=>G[e]);function q(e){let t=e=>K(e).replace(/\*\*(.+?)\*\*/g,`$1 `).replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(e,t,n)=>n.startsWith(`/`)&&!n.startsWith(`//`)?`${t} `:t),n=[],r=[],i=()=>{r.length&&(n.push(`${r.map(e=>`${e} `).join(``)} `),r=[])};for(let a of String(e).split(/\r?\n/)){let e=a.match(/^\s*[-*]\s+(.*)$/);e?r.push(t(e[1])):(i(),a.trim()!==``&&n.push(`${t(a)}
`))}return i(),n.join(``)}function J(e){let t=e.target.closest?.(`a[data-ai-link]`);t&&(e.preventDefault(),w.visit(t.getAttribute(`href`)))}function Y(e){e.key===`Escape`&&y.value&&(y.value=!1)}return(t,n)=>d.value?(a(),E(`div`,{key:0,class:`fixed bottom-4 right-4 z-40 flex flex-col items-end gap-3`,dusk:`ai-helper`,onKeydown:Y},[y.value?(a(),E(`section`,{key:0,class:`flex w-[22rem] max-w-[calc(100vw-2rem)] max-h-[min(36rem,calc(100vh-8rem))] flex-col rounded-lg border border-line bg-surface text-fg shadow-xl`,role:`dialog`,"aria-label":f.value.title,dusk:`ai-chat`},[D(`header`,Ge,[D(`h2`,Ke,v(f.value.title),1),D(`div`,qe,[O.value.length?(a(),E(`button`,{key:0,type:`button`,class:`text-muted hover:text-fg`,dusk:`ai-clear`,onClick:R},v(f.value.clear),1)):e(``,!0),D(`button`,{type:`button`,class:`text-muted hover:text-fg`,"aria-label":f.value.close,dusk:`ai-close`,onClick:n[0]||=e=>y.value=!1},[...n[2]||=[D(`svg`,{class:`h-4 w-4`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`},[D(`path`,{d:`M5.3 4.3 10 9l4.7-4.7 1 1L11 10l4.7 4.7-1 1L10 11l-4.7 4.7-1-1L9 10 4.3 5.3z`})],-1)]],8,Je)])]),D(`div`,{ref_key:`list`,ref:k,class:`flex-1 space-y-3 overflow-y-auto px-4 py-3 text-sm`,"aria-live":`polite`,onClick:J},[D(`p`,Ye,v(f.value.hello),1),(a(!0),E(T,null,l(O.value,(e,t)=>(a(),E(`div`,{key:t,class:c([`flex`,e.role===`user`?`justify-end`:`justify-start`])},[e.role===`user`?(a(),E(`p`,Xe,v(e.text),1)):(a(),E(`div`,{key:1,class:c([`max-w-[90%] space-y-2 rounded-lg px-3 py-2`,e.error?`border border-danger bg-danger-soft text-danger-soft-fg`:`bg-surface-alt`]),dusk:e.error?`ai-error`:`ai-answer`,innerHTML:q(e.text)},null,10,Ze))],2))),128)),b.value?(a(),E(`p`,Qe,v(f.value.thinking),1)):e(``,!0)],512),D(`form`,{class:`border-t border-line p-3`,onSubmit:h(B,[`prevent`])},[D(`div`,$e,[r(D(`textarea`,{ref_key:`input`,ref:A,"onUpdate:modelValue":n[1]||=e=>C.value=e,rows:`2`,maxlength:`2000`,class:`flex-1 resize-none rounded-md border border-field bg-surface px-3 py-2 text-sm text-fg focus:border-focus focus:outline-none focus:ring-1 focus:ring-focus`,placeholder:f.value.placeholder,"aria-label":f.value.placeholder,dusk:`ai-input`,onKeydown:W},null,40,et),[[x,C.value]]),D(`button`,{type:`submit`,class:`rounded-md bg-accent px-3 py-2 text-sm font-medium text-on-accent hover:bg-accent-hover disabled:opacity-50`,disabled:b.value||C.value.trim()===``,dusk:`ai-send`},v(f.value.send),9,tt)]),D(`p`,$,v(f.value.note),1)],32)],8,We)):e(``,!0),D(`button`,{ref_key:`mascot`,ref:M,type:`button`,class:c([`ai-mascot group relative h-16 w-16 rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-focus`,{"is-thinking":b.value,"is-open":y.value}]),"aria-label":f.value.open,"aria-expanded":y.value,title:f.value.open,dusk:`ai-mascot`,onClick:L},[(a(),E(`svg`,rt,[n[9]||=D(`ellipse`,{class:`ai-mascot-shadow fill-fg`,cx:`24`,cy:`49`,rx:`15`,ry:`2.2`,opacity:`0.15`},null,-1),D(`g`,it,[n[5]||=D(`path`,{class:`fill-fg`,d:`M6 42V22a18 18 0 0 1 36 0v20H32V22a8 8 0 0 0-16 0v20z`},null,-1),n[6]||=D(`rect`,{class:`ai-mascot-belt fill-accent`,x:`16`,y:`28`,width:`16`,height:`5`},null,-1),n[7]||=D(`rect`,{class:`fill-fg`,x:`4`,y:`41`,width:`13`,height:`3.5`,rx:`1.75`},null,-1),n[8]||=D(`rect`,{class:`fill-fg`,x:`31`,y:`41`,width:`13`,height:`3.5`,rx:`1.75`},null,-1),D(`g`,at,[n[3]||=D(`circle`,{class:`fill-surface`,cx:`19`,cy:`10.5`,r:`3`},null,-1),n[4]||=D(`circle`,{class:`fill-surface`,cx:`29`,cy:`10.5`,r:`3`},null,-1),D(`circle`,{class:`fill-fg`,cx:19+j.value.x,cy:10.5+j.value.y,r:`1.4`},null,8,ot),D(`circle`,{class:`fill-fg`,cx:29+j.value.x,cy:10.5+j.value.y,r:`1.4`},null,8,st)])])]))],10,nt)],32)):e(``,!0)}},[[`__scopeId`,`data-v-6928fa25`]]),lt={class:`min-h-screen bg-page`},ut={"data-page-content":`true`,class:`p-4 lg:p-6`},dt={key:0,"data-flash":`success`,class:`mb-4 p-4 bg-success-soft border border-success text-success-soft-fg rounded`},ft={key:1,"data-flash":`error`,class:`mb-4 p-4 bg-danger-soft border border-danger text-danger-soft-fg rounded`},pt={__name:`AdminLayout`,props:{title:{type:String,default:``}},setup(n){let r=S(),i=p(!1),o=p(!1),s=g(()=>r.props.branding||{}),l=g(()=>r.props.menu||[]),u=g(()=>r.props.auth?.user||{}),d=()=>{i.value=!i.value},f=()=>{o.value=!o.value},h=()=>{i.value=!1};return(r,p)=>(a(),E(T,null,[t(m(C),{title:n.title||``},null,8,[`title`]),D(`div`,lt,[i.value?(a(),E(`div`,{key:0,class:`fixed inset-0 z-40 bg-black/50 lg:hidden`,onClick:h})):e(``,!0),t(ce,{open:i.value,collapsed:o.value,menu:l.value,branding:s.value,onClose:h},null,8,[`open`,`collapsed`,`menu`,`branding`]),D(`div`,{class:c([`transition-all duration-300`,o.value?`lg:pl-20`:`lg:pl-64`])},[t(Be,{user:u.value,branding:s.value,onToggleSidebar:d,onToggleCollapse:f},null,8,[`user`,`branding`]),D(`main`,ut,[r.$page.props.flash?.success?(a(),E(`div`,dt,v(r.$page.props.flash.success),1)):e(``,!0),r.$page.props.flash?.error?(a(),E(`div`,ft,v(r.$page.props.flash.error),1)):e(``,!0),O(r.$slots,`default`)])],2),t(ct)])],64))}};export{X as i,Z as n,Q as r,pt as t};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/Create-B8v2keK9.js b/packages/admin/dist/assets/Create-BxhK0Jvn.js
similarity index 96%
rename from packages/admin/dist/assets/Create-B8v2keK9.js
rename to packages/admin/dist/assets/Create-BxhK0Jvn.js
index e665b8d4..8b4414b8 100644
--- a/packages/admin/dist/assets/Create-B8v2keK9.js
+++ b/packages/admin/dist/assets/Create-BxhK0Jvn.js
@@ -1 +1 @@
-import{C as e,E as t,I as n,L as r,R as i,S as a,T as o,W as s,Y as c,Z as l,_ as u,a as d,b as f,et as p,i as m,q as h,v as g,w as _,x as v}from"./dist-MY__znoP.js";import{t as y}from"./AdminLayout-I1QMPYpW.js";import{t as b}from"./AdminButton-Bx141Bs3.js";import{t as x}from"./AdminCard--HubMtUj.js";import{n as S,r as C,t as w}from"./ContentLocaleSwitcher-BJIieXK-.js";import{t as T}from"./FormField-BI8KmQxQ.js";import{n as E,r as D,t as O}from"./contentLocale-BtGD-iBF.js";var k={class:`mb-6`},A={class:`flex`,"aria-label":`Breadcrumb`},j={class:`inline-flex items-center space-x-1 md:space-x-3`},M={class:`inline-flex items-center`},N={class:`flex items-center`},P={class:`ml-1 text-muted`},F={class:`max-w-4xl`},I={class:`text-2xl font-bold text-fg mb-6`},L=[`data-resource`],R={class:`space-y-6`},z={key:0,class:`text-center py-12 text-muted`},B={key:2,class:`space-y-6`},V={class:`flex items-center justify-end space-x-3 pt-6 mt-6 border-t`},H={__name:`Create`,props:{routeName:String,createLabel:String,fields:Array,fieldsByTab:Object,tabs:Array,useTabs:Boolean,title:String,adminLabel:String},setup(H){let U=H,W=c(U.tabs?.[0]?.name||`main`),G={};U.useTabs&&U.fieldsByTab?Object.values(U.fieldsByTab).flat().forEach(e=>{G[e.name]=E(e,void 0)}):U.fields.forEach(e=>{G[e.name]=E(e,void 0)});let K=d(G),q=()=>(U.useTabs&&U.fieldsByTab?Object.values(U.fieldsByTab).flat():U.fields)||[],{locale:J,locales:Y,showSwitcher:X}=D(q),Z=f(()=>({...K.data()}));r(`formData`,Z),r(`aiModule`,U.routeName?.replace(/^admin\./,``)||null);let Q=()=>{K.submit(`post`,route(`${U.routeName}.store`))},$=e=>U.fieldsByTab?.[e]?U.fieldsByTab[e].filter(e=>O(K.errors,e)).length:0,ee=f(()=>U.tabs?U.tabs.map(e=>({...e,badge:$(e.name)>0?String($(e.name)):null})):[]);return(r,c)=>(n(),a(y,{title:H.title},{default:s(()=>[v(`div`,k,[v(`nav`,A,[v(`ol`,j,[v(`li`,M,[t(l(m),{href:r.route(`${U.routeName}.index`),class:`text-muted hover:text-accent`},{default:s(()=>[o(p(H.adminLabel),1)]),_:1},8,[`href`])]),v(`li`,null,[v(`div`,N,[c[2]||=v(`svg`,{class:`w-4 h-4 text-muted`,fill:`currentColor`,viewBox:`0 0 20 20`},[v(`path`,{"fill-rule":`evenodd`,d:`M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z`,"clip-rule":`evenodd`})],-1),v(`span`,P,p(r.$t(`resource.form.breadcrumb_create`)),1)])])])])]),v(`div`,F,[v(`h1`,I,p(H.title),1),t(x,null,{default:s(()=>[v(`form`,{onSubmit:u(Q,[`prevent`]),"data-admin-form":`true`,"data-resource":H.routeName,"data-context":`create`},[l(X)?(n(),a(w,{key:0,modelValue:l(J),"onUpdate:modelValue":c[0]||=e=>h(J)?J.value=e:null,locales:l(Y),fields:q(),errors:l(K).errors},null,8,[`modelValue`,`locales`,`fields`,`errors`])):e(``,!0),H.useTabs&&H.tabs&&H.fieldsByTab?(n(),a(C,{key:1,tabs:ee.value,modelValue:W.value,"onUpdate:modelValue":c[1]||=e=>W.value=e},{default:s(({activeTab:t})=>[(n(!0),_(g,null,i(H.tabs,o=>(n(),a(S,{key:o.name,name:o.name,activeTab:t},{default:s(()=>[v(`div`,R,[(n(!0),_(g,null,i(H.fieldsByTab[o.name],e=>(n(),a(T,{key:e.name,field:e,modelValue:l(K)[e.name],"onUpdate:modelValue":t=>l(K)[e.name]=t,errors:l(K).errors},null,8,[`field`,`modelValue`,`onUpdate:modelValue`,`errors`]))),128)),H.fieldsByTab[o.name]?.length?e(``,!0):(n(),_(`div`,z,[v(`p`,null,p(r.$t(`resource.form.empty_tab`)),1)]))])]),_:2},1032,[`name`,`activeTab`]))),128))]),_:1},8,[`tabs`,`modelValue`])):(n(),_(`div`,B,[(n(!0),_(g,null,i(H.fields,e=>(n(),a(T,{key:e.name,field:e,modelValue:l(K)[e.name],"onUpdate:modelValue":t=>l(K)[e.name]=t,errors:l(K).errors},null,8,[`field`,`modelValue`,`onUpdate:modelValue`,`errors`]))),128))])),v(`div`,V,[t(b,{"data-action":`cancel`,href:r.route(`${U.routeName}.index`),variant:`secondary`},{default:s(()=>[o(p(r.$t(`common.cancel`)),1)]),_:1},8,[`href`]),t(b,{"data-action":`save`,type:`submit`,loading:l(K).processing},{default:s(()=>[o(p(r.$t(`common.create`)),1)]),_:1},8,[`loading`])])],40,L)]),_:1})])]),_:1},8,[`title`]))}};export{H as default};
\ No newline at end of file
+import{C as e,E as t,I as n,L as r,R as i,S as a,T as o,W as s,Y as c,Z as l,_ as u,a as d,b as f,et as p,i as m,q as h,v as g,w as _,x as v}from"./dist-MY__znoP.js";import{t as y}from"./AdminLayout--RXJFj9t.js";import{t as b}from"./AdminButton-Bx141Bs3.js";import{t as x}from"./AdminCard--HubMtUj.js";import{n as S,r as C,t as w}from"./ContentLocaleSwitcher-BJIieXK-.js";import{t as T}from"./FormField-xD6LELDV.js";import{n as E,r as D,t as O}from"./contentLocale-BtGD-iBF.js";var k={class:`mb-6`},A={class:`flex`,"aria-label":`Breadcrumb`},j={class:`inline-flex items-center space-x-1 md:space-x-3`},M={class:`inline-flex items-center`},N={class:`flex items-center`},P={class:`ml-1 text-muted`},F={class:`max-w-4xl`},I={class:`text-2xl font-bold text-fg mb-6`},L=[`data-resource`],R={class:`space-y-6`},z={key:0,class:`text-center py-12 text-muted`},B={key:2,class:`space-y-6`},V={class:`flex items-center justify-end space-x-3 pt-6 mt-6 border-t`},H={__name:`Create`,props:{routeName:String,createLabel:String,fields:Array,fieldsByTab:Object,tabs:Array,useTabs:Boolean,title:String,adminLabel:String},setup(H){let U=H,W=c(U.tabs?.[0]?.name||`main`),G={};U.useTabs&&U.fieldsByTab?Object.values(U.fieldsByTab).flat().forEach(e=>{G[e.name]=E(e,void 0)}):U.fields.forEach(e=>{G[e.name]=E(e,void 0)});let K=d(G),q=()=>(U.useTabs&&U.fieldsByTab?Object.values(U.fieldsByTab).flat():U.fields)||[],{locale:J,locales:Y,showSwitcher:X}=D(q),Z=f(()=>({...K.data()}));r(`formData`,Z),r(`aiModule`,U.routeName?.replace(/^admin\./,``)||null);let Q=()=>{K.submit(`post`,route(`${U.routeName}.store`))},$=e=>U.fieldsByTab?.[e]?U.fieldsByTab[e].filter(e=>O(K.errors,e)).length:0,ee=f(()=>U.tabs?U.tabs.map(e=>({...e,badge:$(e.name)>0?String($(e.name)):null})):[]);return(r,c)=>(n(),a(y,{title:H.title},{default:s(()=>[v(`div`,k,[v(`nav`,A,[v(`ol`,j,[v(`li`,M,[t(l(m),{href:r.route(`${U.routeName}.index`),class:`text-muted hover:text-accent`},{default:s(()=>[o(p(H.adminLabel),1)]),_:1},8,[`href`])]),v(`li`,null,[v(`div`,N,[c[2]||=v(`svg`,{class:`w-4 h-4 text-muted`,fill:`currentColor`,viewBox:`0 0 20 20`},[v(`path`,{"fill-rule":`evenodd`,d:`M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z`,"clip-rule":`evenodd`})],-1),v(`span`,P,p(r.$t(`resource.form.breadcrumb_create`)),1)])])])])]),v(`div`,F,[v(`h1`,I,p(H.title),1),t(x,null,{default:s(()=>[v(`form`,{onSubmit:u(Q,[`prevent`]),"data-admin-form":`true`,"data-resource":H.routeName,"data-context":`create`},[l(X)?(n(),a(w,{key:0,modelValue:l(J),"onUpdate:modelValue":c[0]||=e=>h(J)?J.value=e:null,locales:l(Y),fields:q(),errors:l(K).errors},null,8,[`modelValue`,`locales`,`fields`,`errors`])):e(``,!0),H.useTabs&&H.tabs&&H.fieldsByTab?(n(),a(C,{key:1,tabs:ee.value,modelValue:W.value,"onUpdate:modelValue":c[1]||=e=>W.value=e},{default:s(({activeTab:t})=>[(n(!0),_(g,null,i(H.tabs,o=>(n(),a(S,{key:o.name,name:o.name,activeTab:t},{default:s(()=>[v(`div`,R,[(n(!0),_(g,null,i(H.fieldsByTab[o.name],e=>(n(),a(T,{key:e.name,field:e,modelValue:l(K)[e.name],"onUpdate:modelValue":t=>l(K)[e.name]=t,errors:l(K).errors},null,8,[`field`,`modelValue`,`onUpdate:modelValue`,`errors`]))),128)),H.fieldsByTab[o.name]?.length?e(``,!0):(n(),_(`div`,z,[v(`p`,null,p(r.$t(`resource.form.empty_tab`)),1)]))])]),_:2},1032,[`name`,`activeTab`]))),128))]),_:1},8,[`tabs`,`modelValue`])):(n(),_(`div`,B,[(n(!0),_(g,null,i(H.fields,e=>(n(),a(T,{key:e.name,field:e,modelValue:l(K)[e.name],"onUpdate:modelValue":t=>l(K)[e.name]=t,errors:l(K).errors},null,8,[`field`,`modelValue`,`onUpdate:modelValue`,`errors`]))),128))])),v(`div`,V,[t(b,{"data-action":`cancel`,href:r.route(`${U.routeName}.index`),variant:`secondary`},{default:s(()=>[o(p(r.$t(`common.cancel`)),1)]),_:1},8,[`href`]),t(b,{"data-action":`save`,type:`submit`,loading:l(K).processing},{default:s(()=>[o(p(r.$t(`common.create`)),1)]),_:1},8,[`loading`])])],40,L)]),_:1})])]),_:1},8,[`title`]))}};export{H as default};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/Create-DWM7DbLl.js b/packages/admin/dist/assets/Create-C61-lS2c.js
similarity index 96%
rename from packages/admin/dist/assets/Create-DWM7DbLl.js
rename to packages/admin/dist/assets/Create-C61-lS2c.js
index e1089530..276f1ff8 100644
--- a/packages/admin/dist/assets/Create-DWM7DbLl.js
+++ b/packages/admin/dist/assets/Create-C61-lS2c.js
@@ -1 +1 @@
-import{C as e,E as t,G as n,I as r,Q as i,R as a,S as o,T as s,W as c,Z as l,_ as u,a as d,d as f,et as p,i as m,u as h,v as g,w as _,x as v}from"./dist-MY__znoP.js";import{t as y}from"./AdminLayout-I1QMPYpW.js";import{t as b}from"./AdminButton-Bx141Bs3.js";import{t as x}from"./AdminCard--HubMtUj.js";import{t as S}from"./FormField-BI8KmQxQ.js";var C={class:`mb-6`},w={class:`flex`,"aria-label":`Breadcrumb`},T={class:`inline-flex items-center space-x-1 md:space-x-3`},E={class:`inline-flex items-center`},D={class:`flex items-center`},O={class:`ml-1 text-muted`},k={class:`max-w-2xl`},A={class:`text-2xl font-bold text-fg mb-6`},j={key:1},M={key:0,class:`flex items-center`},N=[`id`,`onUpdate:modelValue`],P=[`for`],F=[`for`],I={key:0,class:`text-danger`},L=[`id`,`onUpdate:modelValue`,`type`,`placeholder`,`required`],R={key:2,class:`mt-1 text-sm text-muted`},z={key:3,class:`mt-1 text-sm text-danger`},B={class:`flex items-center justify-end space-x-3 pt-4 border-t`},V={__name:`Create`,props:{fields:Array,title:String},setup(V){let H=V,U={};H.fields.forEach(e=>{U[e.name]=e.default??``});let W=d(U),G=()=>{W.post(route(`admin.users.store`))},K=e=>[`text`,`email`,`password`,`checkbox`].includes(e.type);return(d,H)=>(r(),o(y,{title:V.title},{default:c(()=>[v(`div`,C,[v(`nav`,w,[v(`ol`,T,[v(`li`,E,[t(l(m),{href:d.route(`admin.users.index`),class:`text-muted hover:text-accent`},{default:c(()=>[s(p(d.$t(`menu.administrators`)),1)]),_:1},8,[`href`])]),v(`li`,null,[v(`div`,D,[H[0]||=v(`svg`,{class:`w-4 h-4 text-muted`,fill:`currentColor`,viewBox:`0 0 20 20`},[v(`path`,{"fill-rule":`evenodd`,d:`M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z`,"clip-rule":`evenodd`})],-1),v(`span`,O,p(d.$t(`account.users.creating`)),1)])])])])]),v(`div`,k,[v(`h1`,A,p(V.title),1),t(x,null,{default:c(()=>[v(`form`,{onSubmit:u(G,[`prevent`]),class:`space-y-6`},[(r(!0),_(g,null,a(V.fields,t=>(r(),_(g,{key:t.name},[K(t)?(r(),_(`div`,j,[t.type===`checkbox`?(r(),_(`div`,M,[n(v(`input`,{id:t.name,"onUpdate:modelValue":e=>l(W)[t.name]=e,type:`checkbox`,class:`h-4 w-4 text-accent focus:ring-focus border-field rounded`},null,8,N),[[h,l(W)[t.name]]]),v(`label`,{for:t.name,class:`ml-2 text-sm text-fg`},p(t.label),9,P)])):(r(),_(g,{key:1},[v(`label`,{for:t.name,class:`block text-sm font-medium text-fg mb-1`},[s(p(t.label)+` `,1),t.required?(r(),_(`span`,I,`*`)):e(``,!0)],8,F),n(v(`input`,{id:t.name,"onUpdate:modelValue":e=>l(W)[t.name]=e,type:t.type===`password`?`password`:t.type===`email`?`email`:`text`,placeholder:t.placeholder,required:t.required,class:i([`w-full px-3 py-2 border border-field rounded-md shadow-sm focus:ring-focus focus:border-focus`,{"border-danger":l(W).errors[t.name]}])},null,10,L),[[f,l(W)[t.name]]])],64)),t.hint?(r(),_(`p`,R,p(t.hint),1)):e(``,!0),l(W).errors[t.name]?(r(),_(`p`,z,p(l(W).errors[t.name]),1)):e(``,!0)])):(r(),o(S,{key:0,field:t,modelValue:l(W)[t.name],"onUpdate:modelValue":e=>l(W)[t.name]=e,errors:l(W).errors},null,8,[`field`,`modelValue`,`onUpdate:modelValue`,`errors`]))],64))),128)),v(`div`,B,[t(b,{href:d.route(`admin.users.index`),variant:`secondary`},{default:c(()=>[s(p(d.$t(`common.cancel`)),1)]),_:1},8,[`href`]),t(b,{"data-action":`save`,type:`submit`,loading:l(W).processing},{default:c(()=>[s(p(d.$t(`common.create`)),1)]),_:1},8,[`loading`])])],32)]),_:1})])]),_:1},8,[`title`]))}};export{V as default};
\ No newline at end of file
+import{C as e,E as t,G as n,I as r,Q as i,R as a,S as o,T as s,W as c,Z as l,_ as u,a as d,d as f,et as p,i as m,u as h,v as g,w as _,x as v}from"./dist-MY__znoP.js";import{t as y}from"./AdminLayout--RXJFj9t.js";import{t as b}from"./AdminButton-Bx141Bs3.js";import{t as x}from"./AdminCard--HubMtUj.js";import{t as S}from"./FormField-xD6LELDV.js";var C={class:`mb-6`},w={class:`flex`,"aria-label":`Breadcrumb`},T={class:`inline-flex items-center space-x-1 md:space-x-3`},E={class:`inline-flex items-center`},D={class:`flex items-center`},O={class:`ml-1 text-muted`},k={class:`max-w-2xl`},A={class:`text-2xl font-bold text-fg mb-6`},j={key:1},M={key:0,class:`flex items-center`},N=[`id`,`onUpdate:modelValue`],P=[`for`],F=[`for`],I={key:0,class:`text-danger`},L=[`id`,`onUpdate:modelValue`,`type`,`placeholder`,`required`],R={key:2,class:`mt-1 text-sm text-muted`},z={key:3,class:`mt-1 text-sm text-danger`},B={class:`flex items-center justify-end space-x-3 pt-4 border-t`},V={__name:`Create`,props:{fields:Array,title:String},setup(V){let H=V,U={};H.fields.forEach(e=>{U[e.name]=e.default??``});let W=d(U),G=()=>{W.post(route(`admin.users.store`))},K=e=>[`text`,`email`,`password`,`checkbox`].includes(e.type);return(d,H)=>(r(),o(y,{title:V.title},{default:c(()=>[v(`div`,C,[v(`nav`,w,[v(`ol`,T,[v(`li`,E,[t(l(m),{href:d.route(`admin.users.index`),class:`text-muted hover:text-accent`},{default:c(()=>[s(p(d.$t(`menu.administrators`)),1)]),_:1},8,[`href`])]),v(`li`,null,[v(`div`,D,[H[0]||=v(`svg`,{class:`w-4 h-4 text-muted`,fill:`currentColor`,viewBox:`0 0 20 20`},[v(`path`,{"fill-rule":`evenodd`,d:`M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z`,"clip-rule":`evenodd`})],-1),v(`span`,O,p(d.$t(`account.users.creating`)),1)])])])])]),v(`div`,k,[v(`h1`,A,p(V.title),1),t(x,null,{default:c(()=>[v(`form`,{onSubmit:u(G,[`prevent`]),class:`space-y-6`},[(r(!0),_(g,null,a(V.fields,t=>(r(),_(g,{key:t.name},[K(t)?(r(),_(`div`,j,[t.type===`checkbox`?(r(),_(`div`,M,[n(v(`input`,{id:t.name,"onUpdate:modelValue":e=>l(W)[t.name]=e,type:`checkbox`,class:`h-4 w-4 text-accent focus:ring-focus border-field rounded`},null,8,N),[[h,l(W)[t.name]]]),v(`label`,{for:t.name,class:`ml-2 text-sm text-fg`},p(t.label),9,P)])):(r(),_(g,{key:1},[v(`label`,{for:t.name,class:`block text-sm font-medium text-fg mb-1`},[s(p(t.label)+` `,1),t.required?(r(),_(`span`,I,`*`)):e(``,!0)],8,F),n(v(`input`,{id:t.name,"onUpdate:modelValue":e=>l(W)[t.name]=e,type:t.type===`password`?`password`:t.type===`email`?`email`:`text`,placeholder:t.placeholder,required:t.required,class:i([`w-full px-3 py-2 border border-field rounded-md shadow-sm focus:ring-focus focus:border-focus`,{"border-danger":l(W).errors[t.name]}])},null,10,L),[[f,l(W)[t.name]]])],64)),t.hint?(r(),_(`p`,R,p(t.hint),1)):e(``,!0),l(W).errors[t.name]?(r(),_(`p`,z,p(l(W).errors[t.name]),1)):e(``,!0)])):(r(),o(S,{key:0,field:t,modelValue:l(W)[t.name],"onUpdate:modelValue":e=>l(W)[t.name]=e,errors:l(W).errors},null,8,[`field`,`modelValue`,`onUpdate:modelValue`,`errors`]))],64))),128)),v(`div`,B,[t(b,{href:d.route(`admin.users.index`),variant:`secondary`},{default:c(()=>[s(p(d.$t(`common.cancel`)),1)]),_:1},8,[`href`]),t(b,{"data-action":`save`,type:`submit`,loading:l(W).processing},{default:c(()=>[s(p(d.$t(`common.create`)),1)]),_:1},8,[`loading`])])],32)]),_:1})])]),_:1},8,[`title`]))}};export{V as default};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/Dashboard-BpfYcZ3c.js b/packages/admin/dist/assets/Dashboard-BU7gtvAo.js
similarity index 98%
rename from packages/admin/dist/assets/Dashboard-BpfYcZ3c.js
rename to packages/admin/dist/assets/Dashboard-BU7gtvAo.js
index 5c9f7882..21369017 100644
--- a/packages/admin/dist/assets/Dashboard-BpfYcZ3c.js
+++ b/packages/admin/dist/assets/Dashboard-BU7gtvAo.js
@@ -1 +1 @@
-import{$ as e,C as t,I as n,Q as r,R as i,S as a,T as o,V as s,W as c,Y as l,b as u,et as d,v as f,w as p,x as m}from"./dist-MY__znoP.js";import{t as h}from"./AdminLayout-I1QMPYpW.js";var g={class:`bg-surface rounded-lg shadow px-5 py-4`,"data-gadget":`site-speed`},_={class:`text-sm font-semibold text-fg`},v={class:`mt-3 flex items-baseline gap-2`},y={class:`text-3xl font-semibold text-fg tabular-nums`},b={class:`text-sm text-muted`},x={class:`mt-4`},S={class:`relative h-2 rounded-full bg-off overflow-hidden`},C={class:`mt-1.5 grid grid-cols-5 gap-1 text-xs text-muted`},w={class:`mt-1 flex justify-between text-xs text-muted tabular-nums`},T={class:`mt-3 text-xs text-muted`},E={__name:`SiteSpeedGadget`,props:{title:{type:String,default:``},data:{type:Object,required:!0}},setup(a){let s=a,c=u(()=>s.data.bands.indexOf(s.data.label));return(s,l)=>(n(),p(`div`,g,[m(`h2`,_,d(a.title||s.$t(`dashboard.site_speed.title`)),1),m(`div`,v,[a.data.seconds?(n(),p(f,{key:0},[m(`span`,y,d(a.data.seconds),1),m(`span`,b,d(a.data.unit),1)],64)):t(``,!0),m(`span`,{class:r([`text-sm font-medium text-fg`,{"ml-2":a.data.seconds}]),"data-speed-band":``},d(a.data.label),3)]),m(`div`,x,[m(`div`,S,[a.data.percent===null?t(``,!0):(n(),p(`div`,{key:0,class:`absolute inset-y-0 left-0 bg-accent`,style:e({width:a.data.percent+`%`})},null,4)),(n(),p(f,null,i([20,40,60,80],t=>m(`span`,{key:t,class:`absolute inset-y-0 w-0.5 bg-surface`,style:e({left:t+`%`})},null,4)),64))]),m(`div`,C,[(n(!0),p(f,null,i(a.data.bands,(e,t)=>(n(),p(`span`,{key:e,class:r([`text-center leading-tight`,{"font-semibold text-fg":t===c.value}])},d(e),3))),128))]),m(`div`,w,[l[0]||=m(`span`,null,`0`,-1),m(`span`,null,d(a.data.scaleSeconds)+` `+d(a.data.unit),1)])]),m(`p`,T,[a.data.samples?(n(),p(f,{key:0},[o(d(s.$t(`dashboard.site_speed.samples_note`,{samples:a.data.samples,days:a.data.windowDays})),1)],64)):(n(),p(f,{key:1},[o(d(s.$t(`dashboard.site_speed.no_samples`)),1)],64))])]))}},D={class:`bg-surface rounded-lg shadow px-5 py-4`,"data-gadget":`performance`},O={class:`flex items-start justify-between gap-4`},k={class:`text-sm font-semibold text-fg`},A=[`aria-expanded`],j={key:0,class:`mt-3`},M={class:`flex items-baseline gap-2`},N={class:`text-3xl font-semibold text-fg tabular-nums`},P={class:`text-sm text-muted`},F={class:`text-xs text-muted`},ee={key:1,class:`mt-3 text-sm text-muted`},I={key:2,class:`mt-3 text-xs text-muted`},L={key:3,class:`mt-3 border-t border-line pt-3`,"data-performance-details":``},R={class:`text-xs font-semibold text-fg`},z={class:`mt-1 divide-y divide-line text-sm`},B=[`title`],V={class:`whitespace-nowrap text-muted tabular-nums`},H={__name:`PerformanceGadget`,props:{title:{type:String,default:``},data:{type:Object,required:!0}},setup(e){let r=l(!1);return(a,o)=>(n(),p(`div`,D,[m(`div`,O,[m(`h2`,k,d(e.title||a.$t(`dashboard.performance.title`)),1),e.data.slowest.length?(n(),p(`button`,{key:0,type:`button`,class:`rounded-md border border-field bg-surface px-3 py-1 text-sm text-fg hover:bg-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-focus`,"aria-expanded":r.value?`true`:`false`,"data-action":`performance-details`,onClick:o[0]||=e=>r.value=!r.value},d(r.value?a.$t(`dashboard.performance.collapse`):a.$t(`dashboard.performance.details`)),9,A)):t(``,!0)]),e.data.rate?(n(),p(`div`,j,[m(`div`,M,[m(`span`,N,d(e.data.rate),1),m(`span`,P,d(e.data.unit),1)]),m(`div`,F,d(e.data.caption),1)])):(n(),p(`p`,ee,d(a.$t(`dashboard.performance.pending`)),1)),e.data.rate?(n(),p(`p`,I,d(a.$t(`dashboard.performance.note`,{seconds:e.data.averageSeconds,pages:e.data.samples,days:e.data.windowDays})),1)):t(``,!0),r.value?(n(),p(`div`,L,[m(`h3`,R,d(a.$t(`dashboard.performance.slowest_title`)),1),m(`ul`,z,[(n(!0),p(f,null,i(e.data.slowest,e=>(n(),p(`li`,{key:e.path,class:`flex justify-between gap-3 py-1.5`},[m(`span`,{class:`truncate text-fg`,title:e.path},d(e.path),9,B),m(`span`,V,d(a.$t(`dashboard.performance.slowest_row`,{ms:e.ms,hits:e.hits})),1)]))),128))])])):t(``,!0)]))}},U={class:`bg-surface rounded-lg shadow px-5 py-4`,"data-gadget":`recent`},W={class:`text-sm font-semibold text-fg`},G={key:0,class:`mt-3 divide-y divide-line`},K=[`src`],q={key:1,class:`h-12 w-12 flex-none rounded bg-off`},J={class:`min-w-0`},Y={key:0,class:`text-xs text-muted`},X=[`href`],Z={key:2,class:`text-sm text-fg line-clamp-2`},Q={key:1,class:`mt-3 text-sm text-muted`},$=[`href`],te={__name:`RecentElementsGadget`,props:{title:{type:String,default:``},data:{type:Object,required:!0}},setup(e){return(r,a)=>(n(),p(`div`,U,[m(`h2`,W,d(e.title||r.$t(`dashboard.recent.title`)),1),e.data.items.length?(n(),p(`ul`,G,[(n(!0),p(f,null,i(e.data.items,e=>(n(),p(`li`,{key:e.id,class:`flex gap-3 py-2`},[e.image?(n(),p(`img`,{key:0,src:e.image,alt:``,class:`h-12 w-12 flex-none rounded object-cover bg-off`},null,8,K)):(n(),p(`div`,q)),m(`div`,J,[e.date?(n(),p(`div`,Y,d(e.date),1)):t(``,!0),e.url?(n(),p(`a`,{key:1,href:e.url,class:`text-sm text-accent hover:underline line-clamp-2`},d(e.name),9,X)):(n(),p(`span`,Z,d(e.name),1))])]))),128))])):(n(),p(`p`,Q,d(r.$t(`dashboard.recent.empty`)),1)),e.data.allUrl?(n(),p(`a`,{key:2,href:e.data.allUrl,class:`mt-3 inline-block text-sm text-accent hover:underline`},d(e.data.allLabel),9,$)):t(``,!0)]))}},ne={class:`mb-6`},re={class:`text-2xl font-bold text-fg`},ie={class:`grid grid-cols-1 gap-6 lg:grid-cols-2`},ae={__name:`Dashboard`,props:{gadgets:{type:Array,default:()=>[]}},setup(e){let t={SiteSpeedGadget:E,PerformanceGadget:H,RecentElementsGadget:te},o=e,l=u(()=>o.gadgets.filter(e=>t[e.component]));return(e,o)=>(n(),a(h,{title:e.$t(`dashboard.title`)},{default:c(()=>[m(`div`,ne,[m(`h1`,re,d(e.$t(`dashboard.title`)),1)]),m(`div`,ie,[(n(!0),p(f,null,i(l.value,e=>(n(),a(s(t[e.component]),{key:e.key,title:e.title,data:e.data,class:r(e.width===`full`?`lg:col-span-2`:``)},null,8,[`title`,`data`,`class`]))),128))])]),_:1},8,[`title`]))}};export{ae as default};
\ No newline at end of file
+import{$ as e,C as t,I as n,Q as r,R as i,S as a,T as o,V as s,W as c,Y as l,b as u,et as d,v as f,w as p,x as m}from"./dist-MY__znoP.js";import{t as h}from"./AdminLayout--RXJFj9t.js";var g={class:`bg-surface rounded-lg shadow px-5 py-4`,"data-gadget":`site-speed`},_={class:`text-sm font-semibold text-fg`},v={class:`mt-3 flex items-baseline gap-2`},y={class:`text-3xl font-semibold text-fg tabular-nums`},b={class:`text-sm text-muted`},x={class:`mt-4`},S={class:`relative h-2 rounded-full bg-off overflow-hidden`},C={class:`mt-1.5 grid grid-cols-5 gap-1 text-xs text-muted`},w={class:`mt-1 flex justify-between text-xs text-muted tabular-nums`},T={class:`mt-3 text-xs text-muted`},E={__name:`SiteSpeedGadget`,props:{title:{type:String,default:``},data:{type:Object,required:!0}},setup(a){let s=a,c=u(()=>s.data.bands.indexOf(s.data.label));return(s,l)=>(n(),p(`div`,g,[m(`h2`,_,d(a.title||s.$t(`dashboard.site_speed.title`)),1),m(`div`,v,[a.data.seconds?(n(),p(f,{key:0},[m(`span`,y,d(a.data.seconds),1),m(`span`,b,d(a.data.unit),1)],64)):t(``,!0),m(`span`,{class:r([`text-sm font-medium text-fg`,{"ml-2":a.data.seconds}]),"data-speed-band":``},d(a.data.label),3)]),m(`div`,x,[m(`div`,S,[a.data.percent===null?t(``,!0):(n(),p(`div`,{key:0,class:`absolute inset-y-0 left-0 bg-accent`,style:e({width:a.data.percent+`%`})},null,4)),(n(),p(f,null,i([20,40,60,80],t=>m(`span`,{key:t,class:`absolute inset-y-0 w-0.5 bg-surface`,style:e({left:t+`%`})},null,4)),64))]),m(`div`,C,[(n(!0),p(f,null,i(a.data.bands,(e,t)=>(n(),p(`span`,{key:e,class:r([`text-center leading-tight`,{"font-semibold text-fg":t===c.value}])},d(e),3))),128))]),m(`div`,w,[l[0]||=m(`span`,null,`0`,-1),m(`span`,null,d(a.data.scaleSeconds)+` `+d(a.data.unit),1)])]),m(`p`,T,[a.data.samples?(n(),p(f,{key:0},[o(d(s.$t(`dashboard.site_speed.samples_note`,{samples:a.data.samples,days:a.data.windowDays})),1)],64)):(n(),p(f,{key:1},[o(d(s.$t(`dashboard.site_speed.no_samples`)),1)],64))])]))}},D={class:`bg-surface rounded-lg shadow px-5 py-4`,"data-gadget":`performance`},O={class:`flex items-start justify-between gap-4`},k={class:`text-sm font-semibold text-fg`},A=[`aria-expanded`],j={key:0,class:`mt-3`},M={class:`flex items-baseline gap-2`},N={class:`text-3xl font-semibold text-fg tabular-nums`},P={class:`text-sm text-muted`},F={class:`text-xs text-muted`},ee={key:1,class:`mt-3 text-sm text-muted`},I={key:2,class:`mt-3 text-xs text-muted`},L={key:3,class:`mt-3 border-t border-line pt-3`,"data-performance-details":``},R={class:`text-xs font-semibold text-fg`},z={class:`mt-1 divide-y divide-line text-sm`},B=[`title`],V={class:`whitespace-nowrap text-muted tabular-nums`},H={__name:`PerformanceGadget`,props:{title:{type:String,default:``},data:{type:Object,required:!0}},setup(e){let r=l(!1);return(a,o)=>(n(),p(`div`,D,[m(`div`,O,[m(`h2`,k,d(e.title||a.$t(`dashboard.performance.title`)),1),e.data.slowest.length?(n(),p(`button`,{key:0,type:`button`,class:`rounded-md border border-field bg-surface px-3 py-1 text-sm text-fg hover:bg-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-focus`,"aria-expanded":r.value?`true`:`false`,"data-action":`performance-details`,onClick:o[0]||=e=>r.value=!r.value},d(r.value?a.$t(`dashboard.performance.collapse`):a.$t(`dashboard.performance.details`)),9,A)):t(``,!0)]),e.data.rate?(n(),p(`div`,j,[m(`div`,M,[m(`span`,N,d(e.data.rate),1),m(`span`,P,d(e.data.unit),1)]),m(`div`,F,d(e.data.caption),1)])):(n(),p(`p`,ee,d(a.$t(`dashboard.performance.pending`)),1)),e.data.rate?(n(),p(`p`,I,d(a.$t(`dashboard.performance.note`,{seconds:e.data.averageSeconds,pages:e.data.samples,days:e.data.windowDays})),1)):t(``,!0),r.value?(n(),p(`div`,L,[m(`h3`,R,d(a.$t(`dashboard.performance.slowest_title`)),1),m(`ul`,z,[(n(!0),p(f,null,i(e.data.slowest,e=>(n(),p(`li`,{key:e.path,class:`flex justify-between gap-3 py-1.5`},[m(`span`,{class:`truncate text-fg`,title:e.path},d(e.path),9,B),m(`span`,V,d(a.$t(`dashboard.performance.slowest_row`,{ms:e.ms,hits:e.hits})),1)]))),128))])])):t(``,!0)]))}},U={class:`bg-surface rounded-lg shadow px-5 py-4`,"data-gadget":`recent`},W={class:`text-sm font-semibold text-fg`},G={key:0,class:`mt-3 divide-y divide-line`},K=[`src`],q={key:1,class:`h-12 w-12 flex-none rounded bg-off`},J={class:`min-w-0`},Y={key:0,class:`text-xs text-muted`},X=[`href`],Z={key:2,class:`text-sm text-fg line-clamp-2`},Q={key:1,class:`mt-3 text-sm text-muted`},$=[`href`],te={__name:`RecentElementsGadget`,props:{title:{type:String,default:``},data:{type:Object,required:!0}},setup(e){return(r,a)=>(n(),p(`div`,U,[m(`h2`,W,d(e.title||r.$t(`dashboard.recent.title`)),1),e.data.items.length?(n(),p(`ul`,G,[(n(!0),p(f,null,i(e.data.items,e=>(n(),p(`li`,{key:e.id,class:`flex gap-3 py-2`},[e.image?(n(),p(`img`,{key:0,src:e.image,alt:``,class:`h-12 w-12 flex-none rounded object-cover bg-off`},null,8,K)):(n(),p(`div`,q)),m(`div`,J,[e.date?(n(),p(`div`,Y,d(e.date),1)):t(``,!0),e.url?(n(),p(`a`,{key:1,href:e.url,class:`text-sm text-accent hover:underline line-clamp-2`},d(e.name),9,X)):(n(),p(`span`,Z,d(e.name),1))])]))),128))])):(n(),p(`p`,Q,d(r.$t(`dashboard.recent.empty`)),1)),e.data.allUrl?(n(),p(`a`,{key:2,href:e.data.allUrl,class:`mt-3 inline-block text-sm text-accent hover:underline`},d(e.data.allLabel),9,$)):t(``,!0)]))}},ne={class:`mb-6`},re={class:`text-2xl font-bold text-fg`},ie={class:`grid grid-cols-1 gap-6 lg:grid-cols-2`},ae={__name:`Dashboard`,props:{gadgets:{type:Array,default:()=>[]}},setup(e){let t={SiteSpeedGadget:E,PerformanceGadget:H,RecentElementsGadget:te},o=e,l=u(()=>o.gadgets.filter(e=>t[e.component]));return(e,o)=>(n(),a(h,{title:e.$t(`dashboard.title`)},{default:c(()=>[m(`div`,ne,[m(`h1`,re,d(e.$t(`dashboard.title`)),1)]),m(`div`,ie,[(n(!0),p(f,null,i(l.value,e=>(n(),a(s(t[e.component]),{key:e.key,title:e.title,data:e.data,class:r(e.width===`full`?`lg:col-span-2`:``)},null,8,[`title`,`data`,`class`]))),128))])]),_:1},8,[`title`]))}};export{ae as default};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/Edit-DKlRxfoE.js b/packages/admin/dist/assets/Edit-CHndUQJ2.js
similarity index 97%
rename from packages/admin/dist/assets/Edit-DKlRxfoE.js
rename to packages/admin/dist/assets/Edit-CHndUQJ2.js
index 5ff29b4e..42835efe 100644
--- a/packages/admin/dist/assets/Edit-DKlRxfoE.js
+++ b/packages/admin/dist/assets/Edit-CHndUQJ2.js
@@ -1 +1 @@
-import{C as e,E as t,I as n,L as r,R as i,S as a,T as o,W as s,Y as c,Z as l,_ as u,a as d,b as f,et as p,i as m,q as h,v as g,w as _,x as v}from"./dist-MY__znoP.js";import{t as y}from"./AdminLayout-I1QMPYpW.js";import{t as b}from"./AdminButton-Bx141Bs3.js";import{t as x}from"./AdminCard--HubMtUj.js";import{n as S,r as C,t as w}from"./ContentLocaleSwitcher-BJIieXK-.js";import{t as T}from"./FormField-BI8KmQxQ.js";import{n as E,r as ee,t as D}from"./contentLocale-BtGD-iBF.js";import{t as O}from"./recordActions-CtRs42tG.js";var k={class:`mb-6`},A={class:`flex`,"aria-label":`Breadcrumb`},j={class:`inline-flex items-center space-x-1 md:space-x-3`},M={class:`inline-flex items-center`},N={class:`flex items-center`},P={class:`ml-1 text-muted`},F={class:`max-w-4xl`},I={class:`mb-6 flex flex-wrap items-center justify-between gap-4`},L={class:`text-2xl font-bold text-fg`},R={key:0,class:`flex gap-2`},z={key:0,"data-read-only":``,class:`mb-6 rounded-md border border-field bg-surface-alt px-4 py-3 text-sm text-fg`},B=[`data-resource`,`data-item-id`],V=[`disabled`],H={class:`space-y-6`},te={key:0,class:`text-center py-12 text-muted`},U={key:2,class:`space-y-6`},W={class:`flex items-center justify-end space-x-3 pt-6 mt-6 border-t`},G={__name:`Edit`,props:{routeName:String,createLabel:String,item:Object,itemTitle:String,fields:Array,fieldsByTab:Object,tabs:Array,useTabs:Boolean,title:String,adminLabel:String,can:{type:Object,default:()=>({})},actions:{type:Array,default:()=>[]}},setup(G){let K=G,q=f(()=>K.can.update===!1),J=c(K.tabs?.[0]?.name||`main`),Y={};K.useTabs&&K.fieldsByTab?Object.values(K.fieldsByTab).flat().forEach(e=>{Y[e.name]=E(e,K.item[e.name])}):K.fields.forEach(e=>{Y[e.name]=E(e,K.item[e.name])});let X=d(Y),Z=()=>(K.useTabs&&K.fieldsByTab?Object.values(K.fieldsByTab).flat():K.fields)||[],{locale:Q,locales:ne,showSwitcher:re}=ee(Z),ie=f(()=>({...K.item,...X.data()}));r(`formData`,ie),r(`aiModule`,K.routeName?.replace(/^admin\./,``)||null);let ae=()=>{X.submit(`put`,route(`${K.routeName}.update`,K.item.id))},$=e=>K.fieldsByTab?.[e]?K.fieldsByTab[e].filter(e=>D(X.errors,e)).length:0,oe=f(()=>K.tabs?K.tabs.map(e=>({...e,badge:$(e.name)>0?String($(e.name)):null})):[]);return(r,c)=>(n(),a(y,{title:G.title},{default:s(()=>[v(`div`,k,[v(`nav`,A,[v(`ol`,j,[v(`li`,M,[t(l(m),{href:r.route(`${K.routeName}.index`),class:`text-muted hover:text-accent`},{default:s(()=>[o(p(G.adminLabel),1)]),_:1},8,[`href`])]),v(`li`,null,[v(`div`,N,[c[2]||=v(`svg`,{class:`w-4 h-4 text-muted`,fill:`currentColor`,viewBox:`0 0 20 20`},[v(`path`,{"fill-rule":`evenodd`,d:`M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z`,"clip-rule":`evenodd`})],-1),v(`span`,P,p(G.itemTitle||`#`+G.item.id),1)])])])])]),v(`div`,F,[v(`div`,I,[v(`h1`,L,p(G.title),1),G.actions.length?(n(),_(`div`,R,[(n(!0),_(g,null,i(G.actions,e=>(n(),a(b,{key:e.name,"data-action":e.name,variant:`secondary`,href:l(O)(G.routeName,e,G.item)},{default:s(()=>[o(p(e.label),1)]),_:2},1032,[`data-action`,`href`]))),128))])):e(``,!0)]),t(x,null,{default:s(()=>[q.value?(n(),_(`p`,z,p(r.$t(`resource.form.read_only`)),1)):e(``,!0),v(`form`,{onSubmit:u(ae,[`prevent`]),"data-admin-form":`true`,"data-resource":G.routeName,"data-context":`edit`,"data-item-id":G.item.id},[v(`fieldset`,{disabled:q.value,class:`contents`},[l(re)?(n(),a(w,{key:0,modelValue:l(Q),"onUpdate:modelValue":c[0]||=e=>h(Q)?Q.value=e:null,locales:l(ne),fields:Z(),errors:l(X).errors},null,8,[`modelValue`,`locales`,`fields`,`errors`])):e(``,!0),G.useTabs&&G.tabs&&G.fieldsByTab?(n(),a(C,{key:1,tabs:oe.value,modelValue:J.value,"onUpdate:modelValue":c[1]||=e=>J.value=e},{default:s(({activeTab:t})=>[(n(!0),_(g,null,i(G.tabs,o=>(n(),a(S,{key:o.name,name:o.name,activeTab:t},{default:s(()=>[v(`div`,H,[(n(!0),_(g,null,i(G.fieldsByTab[o.name],e=>(n(),a(T,{key:e.name,field:e,modelValue:l(X)[e.name],"onUpdate:modelValue":t=>l(X)[e.name]=t,errors:l(X).errors},null,8,[`field`,`modelValue`,`onUpdate:modelValue`,`errors`]))),128)),G.fieldsByTab[o.name]?.length?e(``,!0):(n(),_(`div`,te,[v(`p`,null,p(r.$t(`resource.form.empty_tab`)),1)]))])]),_:2},1032,[`name`,`activeTab`]))),128))]),_:1},8,[`tabs`,`modelValue`])):(n(),_(`div`,U,[(n(!0),_(g,null,i(G.fields,e=>(n(),a(T,{key:e.name,field:e,modelValue:l(X)[e.name],"onUpdate:modelValue":t=>l(X)[e.name]=t,errors:l(X).errors},null,8,[`field`,`modelValue`,`onUpdate:modelValue`,`errors`]))),128))]))],8,V),v(`div`,W,[t(b,{"data-action":`cancel`,href:r.route(`${K.routeName}.index`),variant:`secondary`},{default:s(()=>[o(p(q.value?r.$t(`common.back`):r.$t(`common.cancel`)),1)]),_:1},8,[`href`]),q.value?e(``,!0):(n(),a(b,{key:0,"data-action":`save`,type:`submit`,loading:l(X).processing},{default:s(()=>[o(p(r.$t(`common.save`)),1)]),_:1},8,[`loading`]))])],40,B)]),_:1})])]),_:1},8,[`title`]))}};export{G as default};
\ No newline at end of file
+import{C as e,E as t,I as n,L as r,R as i,S as a,T as o,W as s,Y as c,Z as l,_ as u,a as d,b as f,et as p,i as m,q as h,v as g,w as _,x as v}from"./dist-MY__znoP.js";import{t as y}from"./AdminLayout--RXJFj9t.js";import{t as b}from"./AdminButton-Bx141Bs3.js";import{t as x}from"./AdminCard--HubMtUj.js";import{n as S,r as C,t as w}from"./ContentLocaleSwitcher-BJIieXK-.js";import{t as T}from"./FormField-xD6LELDV.js";import{n as E,r as ee,t as D}from"./contentLocale-BtGD-iBF.js";import{t as O}from"./recordActions-CtRs42tG.js";var k={class:`mb-6`},A={class:`flex`,"aria-label":`Breadcrumb`},j={class:`inline-flex items-center space-x-1 md:space-x-3`},M={class:`inline-flex items-center`},N={class:`flex items-center`},P={class:`ml-1 text-muted`},F={class:`max-w-4xl`},I={class:`mb-6 flex flex-wrap items-center justify-between gap-4`},L={class:`text-2xl font-bold text-fg`},R={key:0,class:`flex gap-2`},z={key:0,"data-read-only":``,class:`mb-6 rounded-md border border-field bg-surface-alt px-4 py-3 text-sm text-fg`},B=[`data-resource`,`data-item-id`],V=[`disabled`],H={class:`space-y-6`},te={key:0,class:`text-center py-12 text-muted`},U={key:2,class:`space-y-6`},W={class:`flex items-center justify-end space-x-3 pt-6 mt-6 border-t`},G={__name:`Edit`,props:{routeName:String,createLabel:String,item:Object,itemTitle:String,fields:Array,fieldsByTab:Object,tabs:Array,useTabs:Boolean,title:String,adminLabel:String,can:{type:Object,default:()=>({})},actions:{type:Array,default:()=>[]}},setup(G){let K=G,q=f(()=>K.can.update===!1),J=c(K.tabs?.[0]?.name||`main`),Y={};K.useTabs&&K.fieldsByTab?Object.values(K.fieldsByTab).flat().forEach(e=>{Y[e.name]=E(e,K.item[e.name])}):K.fields.forEach(e=>{Y[e.name]=E(e,K.item[e.name])});let X=d(Y),Z=()=>(K.useTabs&&K.fieldsByTab?Object.values(K.fieldsByTab).flat():K.fields)||[],{locale:Q,locales:ne,showSwitcher:re}=ee(Z),ie=f(()=>({...K.item,...X.data()}));r(`formData`,ie),r(`aiModule`,K.routeName?.replace(/^admin\./,``)||null);let ae=()=>{X.submit(`put`,route(`${K.routeName}.update`,K.item.id))},$=e=>K.fieldsByTab?.[e]?K.fieldsByTab[e].filter(e=>D(X.errors,e)).length:0,oe=f(()=>K.tabs?K.tabs.map(e=>({...e,badge:$(e.name)>0?String($(e.name)):null})):[]);return(r,c)=>(n(),a(y,{title:G.title},{default:s(()=>[v(`div`,k,[v(`nav`,A,[v(`ol`,j,[v(`li`,M,[t(l(m),{href:r.route(`${K.routeName}.index`),class:`text-muted hover:text-accent`},{default:s(()=>[o(p(G.adminLabel),1)]),_:1},8,[`href`])]),v(`li`,null,[v(`div`,N,[c[2]||=v(`svg`,{class:`w-4 h-4 text-muted`,fill:`currentColor`,viewBox:`0 0 20 20`},[v(`path`,{"fill-rule":`evenodd`,d:`M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z`,"clip-rule":`evenodd`})],-1),v(`span`,P,p(G.itemTitle||`#`+G.item.id),1)])])])])]),v(`div`,F,[v(`div`,I,[v(`h1`,L,p(G.title),1),G.actions.length?(n(),_(`div`,R,[(n(!0),_(g,null,i(G.actions,e=>(n(),a(b,{key:e.name,"data-action":e.name,variant:`secondary`,href:l(O)(G.routeName,e,G.item)},{default:s(()=>[o(p(e.label),1)]),_:2},1032,[`data-action`,`href`]))),128))])):e(``,!0)]),t(x,null,{default:s(()=>[q.value?(n(),_(`p`,z,p(r.$t(`resource.form.read_only`)),1)):e(``,!0),v(`form`,{onSubmit:u(ae,[`prevent`]),"data-admin-form":`true`,"data-resource":G.routeName,"data-context":`edit`,"data-item-id":G.item.id},[v(`fieldset`,{disabled:q.value,class:`contents`},[l(re)?(n(),a(w,{key:0,modelValue:l(Q),"onUpdate:modelValue":c[0]||=e=>h(Q)?Q.value=e:null,locales:l(ne),fields:Z(),errors:l(X).errors},null,8,[`modelValue`,`locales`,`fields`,`errors`])):e(``,!0),G.useTabs&&G.tabs&&G.fieldsByTab?(n(),a(C,{key:1,tabs:oe.value,modelValue:J.value,"onUpdate:modelValue":c[1]||=e=>J.value=e},{default:s(({activeTab:t})=>[(n(!0),_(g,null,i(G.tabs,o=>(n(),a(S,{key:o.name,name:o.name,activeTab:t},{default:s(()=>[v(`div`,H,[(n(!0),_(g,null,i(G.fieldsByTab[o.name],e=>(n(),a(T,{key:e.name,field:e,modelValue:l(X)[e.name],"onUpdate:modelValue":t=>l(X)[e.name]=t,errors:l(X).errors},null,8,[`field`,`modelValue`,`onUpdate:modelValue`,`errors`]))),128)),G.fieldsByTab[o.name]?.length?e(``,!0):(n(),_(`div`,te,[v(`p`,null,p(r.$t(`resource.form.empty_tab`)),1)]))])]),_:2},1032,[`name`,`activeTab`]))),128))]),_:1},8,[`tabs`,`modelValue`])):(n(),_(`div`,U,[(n(!0),_(g,null,i(G.fields,e=>(n(),a(T,{key:e.name,field:e,modelValue:l(X)[e.name],"onUpdate:modelValue":t=>l(X)[e.name]=t,errors:l(X).errors},null,8,[`field`,`modelValue`,`onUpdate:modelValue`,`errors`]))),128))]))],8,V),v(`div`,W,[t(b,{"data-action":`cancel`,href:r.route(`${K.routeName}.index`),variant:`secondary`},{default:s(()=>[o(p(q.value?r.$t(`common.back`):r.$t(`common.cancel`)),1)]),_:1},8,[`href`]),q.value?e(``,!0):(n(),a(b,{key:0,"data-action":`save`,type:`submit`,loading:l(X).processing},{default:s(()=>[o(p(r.$t(`common.save`)),1)]),_:1},8,[`loading`]))])],40,B)]),_:1})])]),_:1},8,[`title`]))}};export{G as default};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/Edit-D7McI_eD.js b/packages/admin/dist/assets/Edit-D-yhP5A2.js
similarity index 98%
rename from packages/admin/dist/assets/Edit-D7McI_eD.js
rename to packages/admin/dist/assets/Edit-D-yhP5A2.js
index 88bba40f..1a7d4f85 100644
--- a/packages/admin/dist/assets/Edit-D7McI_eD.js
+++ b/packages/admin/dist/assets/Edit-D-yhP5A2.js
@@ -1 +1 @@
-import{C as e,G as t,I as n,Q as r,S as i,W as a,Z as o,_ as s,a as c,et as l,m as u,w as d,x as f}from"./dist-MY__znoP.js";import{t as p}from"./AdminLayout-I1QMPYpW.js";var m={class:`mb-8`},h={class:`text-2xl font-bold text-fg`},g={class:`mt-1 text-sm text-muted`},_={class:`max-w-2xl space-y-6`},v={class:`bg-surface rounded-lg shadow`},y={class:`p-6 border-b border-line`},b={class:`text-lg font-medium text-fg`},x={class:`mt-1 text-sm text-muted`},S={for:`name`,class:`block text-sm font-medium text-fg`},C={key:0,class:`mt-1 text-sm text-danger`},w={for:`email`,class:`block text-sm font-medium text-fg`},T={key:0,class:`mt-1 text-sm text-danger`},E={class:`flex justify-end`},D=[`disabled`],O={class:`bg-surface rounded-lg shadow`},k={class:`p-6 border-b border-line`},A={class:`text-lg font-medium text-fg`},j={class:`mt-1 text-sm text-muted`},M={for:`current_password`,class:`block text-sm font-medium text-fg`},N={key:0,class:`mt-1 text-sm text-danger`},P={for:`password`,class:`block text-sm font-medium text-fg`},F={key:0,class:`mt-1 text-sm text-danger`},I={for:`password_confirmation`,class:`block text-sm font-medium text-fg`},L={class:`flex justify-end`},R=[`disabled`],z={__name:`Edit`,props:{user:{type:Object,required:!0}},setup(z){let B=z,V=c({name:B.user.name,email:B.user.email}),H=c({current_password:``,password:``,password_confirmation:``}),U=()=>{V.put(route(`admin.profile.update`),{preserveScroll:!0})},W=()=>{H.put(route(`admin.profile.password`),{preserveScroll:!0,onSuccess:()=>H.reset()})};return(c,z)=>(n(),i(p,{title:c.$t(`account.profile.title`)},{default:a(()=>[f(`div`,m,[f(`h1`,h,l(c.$t(`account.profile.title`)),1),f(`p`,g,l(c.$t(`account.profile.subtitle`)),1)]),f(`div`,_,[f(`div`,v,[f(`div`,y,[f(`h2`,b,l(c.$t(`account.profile.info_title`)),1),f(`p`,x,l(c.$t(`account.profile.info_subtitle`)),1)]),f(`form`,{onSubmit:s(U,[`prevent`]),class:`p-6 space-y-4`},[f(`div`,null,[f(`label`,S,l(c.$t(`account.profile.name`)),1),t(f(`input`,{id:`name`,"onUpdate:modelValue":z[0]||=e=>o(V).name=e,type:`text`,class:r([`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus sm:text-sm`,{"border-danger":o(V).errors.name}])},null,2),[[u,o(V).name]]),o(V).errors.name?(n(),d(`p`,C,l(o(V).errors.name),1)):e(``,!0)]),f(`div`,null,[f(`label`,w,l(c.$t(`account.profile.email`)),1),t(f(`input`,{id:`email`,"onUpdate:modelValue":z[1]||=e=>o(V).email=e,type:`email`,class:r([`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus sm:text-sm`,{"border-danger":o(V).errors.email}])},null,2),[[u,o(V).email]]),o(V).errors.email?(n(),d(`p`,T,l(o(V).errors.email),1)):e(``,!0)]),f(`div`,E,[f(`button`,{type:`submit`,disabled:o(V).processing,class:`px-4 py-2 bg-accent text-on-accent text-sm font-medium rounded-md hover:bg-accent-hover focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-focus disabled:opacity-50`},l(o(V).processing?c.$t(`common.saving`):c.$t(`common.save`)),9,D)])],32)]),f(`div`,O,[f(`div`,k,[f(`h2`,A,l(c.$t(`account.profile.password_title`)),1),f(`p`,j,l(c.$t(`account.profile.password_subtitle`)),1)]),f(`form`,{onSubmit:s(W,[`prevent`]),class:`p-6 space-y-4`},[f(`div`,null,[f(`label`,M,l(c.$t(`account.profile.current_password`)),1),t(f(`input`,{id:`current_password`,"onUpdate:modelValue":z[2]||=e=>o(H).current_password=e,type:`password`,class:r([`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus sm:text-sm`,{"border-danger":o(H).errors.current_password}])},null,2),[[u,o(H).current_password]]),o(H).errors.current_password?(n(),d(`p`,N,l(o(H).errors.current_password),1)):e(``,!0)]),f(`div`,null,[f(`label`,P,l(c.$t(`account.profile.new_password`)),1),t(f(`input`,{id:`password`,"onUpdate:modelValue":z[3]||=e=>o(H).password=e,type:`password`,class:r([`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus sm:text-sm`,{"border-danger":o(H).errors.password}])},null,2),[[u,o(H).password]]),o(H).errors.password?(n(),d(`p`,F,l(o(H).errors.password),1)):e(``,!0)]),f(`div`,null,[f(`label`,I,l(c.$t(`account.profile.password_confirmation`)),1),t(f(`input`,{id:`password_confirmation`,"onUpdate:modelValue":z[4]||=e=>o(H).password_confirmation=e,type:`password`,class:`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus sm:text-sm`},null,512),[[u,o(H).password_confirmation]])]),f(`div`,L,[f(`button`,{type:`submit`,disabled:o(H).processing,class:`px-4 py-2 bg-accent text-on-accent text-sm font-medium rounded-md hover:bg-accent-hover focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-focus disabled:opacity-50`},l(o(H).processing?c.$t(`common.saving`):c.$t(`account.profile.change_password`)),9,R)])],32)])])]),_:1},8,[`title`]))}};export{z as default};
\ No newline at end of file
+import{C as e,G as t,I as n,Q as r,S as i,W as a,Z as o,_ as s,a as c,et as l,m as u,w as d,x as f}from"./dist-MY__znoP.js";import{t as p}from"./AdminLayout--RXJFj9t.js";var m={class:`mb-8`},h={class:`text-2xl font-bold text-fg`},g={class:`mt-1 text-sm text-muted`},_={class:`max-w-2xl space-y-6`},v={class:`bg-surface rounded-lg shadow`},y={class:`p-6 border-b border-line`},b={class:`text-lg font-medium text-fg`},x={class:`mt-1 text-sm text-muted`},S={for:`name`,class:`block text-sm font-medium text-fg`},C={key:0,class:`mt-1 text-sm text-danger`},w={for:`email`,class:`block text-sm font-medium text-fg`},T={key:0,class:`mt-1 text-sm text-danger`},E={class:`flex justify-end`},D=[`disabled`],O={class:`bg-surface rounded-lg shadow`},k={class:`p-6 border-b border-line`},A={class:`text-lg font-medium text-fg`},j={class:`mt-1 text-sm text-muted`},M={for:`current_password`,class:`block text-sm font-medium text-fg`},N={key:0,class:`mt-1 text-sm text-danger`},P={for:`password`,class:`block text-sm font-medium text-fg`},F={key:0,class:`mt-1 text-sm text-danger`},I={for:`password_confirmation`,class:`block text-sm font-medium text-fg`},L={class:`flex justify-end`},R=[`disabled`],z={__name:`Edit`,props:{user:{type:Object,required:!0}},setup(z){let B=z,V=c({name:B.user.name,email:B.user.email}),H=c({current_password:``,password:``,password_confirmation:``}),U=()=>{V.put(route(`admin.profile.update`),{preserveScroll:!0})},W=()=>{H.put(route(`admin.profile.password`),{preserveScroll:!0,onSuccess:()=>H.reset()})};return(c,z)=>(n(),i(p,{title:c.$t(`account.profile.title`)},{default:a(()=>[f(`div`,m,[f(`h1`,h,l(c.$t(`account.profile.title`)),1),f(`p`,g,l(c.$t(`account.profile.subtitle`)),1)]),f(`div`,_,[f(`div`,v,[f(`div`,y,[f(`h2`,b,l(c.$t(`account.profile.info_title`)),1),f(`p`,x,l(c.$t(`account.profile.info_subtitle`)),1)]),f(`form`,{onSubmit:s(U,[`prevent`]),class:`p-6 space-y-4`},[f(`div`,null,[f(`label`,S,l(c.$t(`account.profile.name`)),1),t(f(`input`,{id:`name`,"onUpdate:modelValue":z[0]||=e=>o(V).name=e,type:`text`,class:r([`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus sm:text-sm`,{"border-danger":o(V).errors.name}])},null,2),[[u,o(V).name]]),o(V).errors.name?(n(),d(`p`,C,l(o(V).errors.name),1)):e(``,!0)]),f(`div`,null,[f(`label`,w,l(c.$t(`account.profile.email`)),1),t(f(`input`,{id:`email`,"onUpdate:modelValue":z[1]||=e=>o(V).email=e,type:`email`,class:r([`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus sm:text-sm`,{"border-danger":o(V).errors.email}])},null,2),[[u,o(V).email]]),o(V).errors.email?(n(),d(`p`,T,l(o(V).errors.email),1)):e(``,!0)]),f(`div`,E,[f(`button`,{type:`submit`,disabled:o(V).processing,class:`px-4 py-2 bg-accent text-on-accent text-sm font-medium rounded-md hover:bg-accent-hover focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-focus disabled:opacity-50`},l(o(V).processing?c.$t(`common.saving`):c.$t(`common.save`)),9,D)])],32)]),f(`div`,O,[f(`div`,k,[f(`h2`,A,l(c.$t(`account.profile.password_title`)),1),f(`p`,j,l(c.$t(`account.profile.password_subtitle`)),1)]),f(`form`,{onSubmit:s(W,[`prevent`]),class:`p-6 space-y-4`},[f(`div`,null,[f(`label`,M,l(c.$t(`account.profile.current_password`)),1),t(f(`input`,{id:`current_password`,"onUpdate:modelValue":z[2]||=e=>o(H).current_password=e,type:`password`,class:r([`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus sm:text-sm`,{"border-danger":o(H).errors.current_password}])},null,2),[[u,o(H).current_password]]),o(H).errors.current_password?(n(),d(`p`,N,l(o(H).errors.current_password),1)):e(``,!0)]),f(`div`,null,[f(`label`,P,l(c.$t(`account.profile.new_password`)),1),t(f(`input`,{id:`password`,"onUpdate:modelValue":z[3]||=e=>o(H).password=e,type:`password`,class:r([`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus sm:text-sm`,{"border-danger":o(H).errors.password}])},null,2),[[u,o(H).password]]),o(H).errors.password?(n(),d(`p`,F,l(o(H).errors.password),1)):e(``,!0)]),f(`div`,null,[f(`label`,I,l(c.$t(`account.profile.password_confirmation`)),1),t(f(`input`,{id:`password_confirmation`,"onUpdate:modelValue":z[4]||=e=>o(H).password_confirmation=e,type:`password`,class:`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus sm:text-sm`},null,512),[[u,o(H).password_confirmation]])]),f(`div`,L,[f(`button`,{type:`submit`,disabled:o(H).processing,class:`px-4 py-2 bg-accent text-on-accent text-sm font-medium rounded-md hover:bg-accent-hover focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-focus disabled:opacity-50`},l(o(H).processing?c.$t(`common.saving`):c.$t(`account.profile.change_password`)),9,R)])],32)])])]),_:1},8,[`title`]))}};export{z as default};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/Edit-BEiwW1oN.js b/packages/admin/dist/assets/Edit-DGjzU-uC.js
similarity index 96%
rename from packages/admin/dist/assets/Edit-BEiwW1oN.js
rename to packages/admin/dist/assets/Edit-DGjzU-uC.js
index dc750c8d..6ca4030c 100644
--- a/packages/admin/dist/assets/Edit-BEiwW1oN.js
+++ b/packages/admin/dist/assets/Edit-DGjzU-uC.js
@@ -1 +1 @@
-import{C as e,E as t,G as n,I as r,L as i,Q as a,R as o,S as s,T as c,W as l,Z as u,_ as d,a as f,b as p,d as m,et as h,i as g,u as _,v,w as y,x as b}from"./dist-MY__znoP.js";import{t as x}from"./AdminLayout-I1QMPYpW.js";import{t as S}from"./AdminButton-Bx141Bs3.js";import{t as C}from"./AdminCard--HubMtUj.js";import{t as w}from"./FormField-BI8KmQxQ.js";var T={class:`mb-6`},E={class:`flex`,"aria-label":`Breadcrumb`},D={class:`inline-flex items-center space-x-1 md:space-x-3`},O={class:`inline-flex items-center`},k={class:`flex items-center`},A={class:`ml-1 text-muted`},j={class:`max-w-2xl`},M={class:`text-2xl font-bold text-fg mb-6`},N={key:0,"data-read-only":``,class:`mb-6 rounded-md border border-field bg-surface-alt px-4 py-3 text-sm text-fg`},P=[`disabled`],F={key:1},I=[`for`],L={key:0,class:`text-danger`},R={key:0,class:`flex items-center`},z=[`id`,`onUpdate:modelValue`],B=[`for`],V=[`id`,`onUpdate:modelValue`,`type`,`placeholder`,`required`],H={key:2,class:`mt-1 text-sm text-muted`},U={key:3,class:`mt-1 text-sm text-muted`},W={key:4,class:`mt-1 text-sm text-danger`},G={class:`flex items-center justify-end space-x-3 pt-4 border-t`},K={__name:`Edit`,props:{item:Object,fields:Array,title:String,can:{type:Object,default:()=>({})}},setup(K){let q=K,J=e=>[`text`,`email`,`password`,`checkbox`].includes(e.type),Y=p(()=>q.can.update===!1),X={};q.fields.forEach(e=>{X[e.name]=q.item[e.name]??e.default??``}),X.password=``,X.password_confirmation=``;let Z=f(X),Q=p(()=>({...q.item,...Z.data()}));i(`formData`,Q);let $=()=>{Z.put(route(`admin.users.update`,q.item.id))};return(i,f)=>(r(),s(x,{title:K.title},{default:l(()=>[b(`div`,T,[b(`nav`,E,[b(`ol`,D,[b(`li`,O,[t(u(g),{href:i.route(`admin.users.index`),class:`text-muted hover:text-accent`},{default:l(()=>[c(h(i.$t(`menu.administrators`)),1)]),_:1},8,[`href`])]),b(`li`,null,[b(`div`,k,[f[0]||=b(`svg`,{class:`w-4 h-4 text-muted`,fill:`currentColor`,viewBox:`0 0 20 20`},[b(`path`,{"fill-rule":`evenodd`,d:`M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z`,"clip-rule":`evenodd`})],-1),b(`span`,A,h(K.item.name),1)])])])])]),b(`div`,j,[b(`h1`,M,h(K.title),1),t(C,null,{default:l(()=>[Y.value?(r(),y(`p`,N,h(i.$t(`resource.form.read_only`)),1)):e(``,!0),b(`form`,{onSubmit:d($,[`prevent`]),class:`space-y-6`},[b(`fieldset`,{disabled:Y.value,class:`space-y-6`},[(r(!0),y(v,null,o(K.fields,t=>(r(),y(v,{key:t.name},[J(t)?(r(),y(`div`,F,[b(`label`,{for:t.name,class:`block text-sm font-medium text-fg mb-1`},[c(h(t.label)+` `,1),t.required&&t.type!==`password`?(r(),y(`span`,L,`*`)):e(``,!0)],8,I),t.type===`checkbox`?(r(),y(`div`,R,[n(b(`input`,{id:t.name,"onUpdate:modelValue":e=>u(Z)[t.name]=e,type:`checkbox`,class:`h-4 w-4 text-accent focus:ring-focus border-field rounded`},null,8,z),[[_,u(Z)[t.name]]]),b(`label`,{for:t.name,class:`ml-2 text-sm text-fg`},h(t.label),9,B)])):n((r(),y(`input`,{key:1,id:t.name,"onUpdate:modelValue":e=>u(Z)[t.name]=e,type:t.type===`password`?`password`:t.type===`email`?`email`:`text`,placeholder:t.type===`password`?i.$t(`account.users.password_keep_placeholder`):t.placeholder,required:t.required&&t.type!==`password`,class:a([`w-full px-3 py-2 border border-field rounded-md shadow-sm focus:ring-focus focus:border-focus`,{"border-danger":u(Z).errors[t.name]}])},null,10,V)),[[m,u(Z)[t.name]]]),t.hint?(r(),y(`p`,H,h(t.hint),1)):e(``,!0),t.type===`password`&&t.name===`password`?(r(),y(`p`,U,h(i.$t(`account.users.password_keep_hint`)),1)):e(``,!0),u(Z).errors[t.name]?(r(),y(`p`,W,h(u(Z).errors[t.name]),1)):e(``,!0)])):(r(),s(w,{key:0,field:t,modelValue:u(Z)[t.name],"onUpdate:modelValue":e=>u(Z)[t.name]=e,errors:u(Z).errors},null,8,[`field`,`modelValue`,`onUpdate:modelValue`,`errors`]))],64))),128))],8,P),b(`div`,G,[t(S,{href:i.route(`admin.users.index`),variant:`secondary`},{default:l(()=>[c(h(Y.value?i.$t(`common.back`):i.$t(`common.cancel`)),1)]),_:1},8,[`href`]),Y.value?e(``,!0):(r(),s(S,{key:0,"data-action":`save`,type:`submit`,loading:u(Z).processing},{default:l(()=>[c(h(i.$t(`common.save`)),1)]),_:1},8,[`loading`]))])],32)]),_:1})])]),_:1},8,[`title`]))}};export{K as default};
\ No newline at end of file
+import{C as e,E as t,G as n,I as r,L as i,Q as a,R as o,S as s,T as c,W as l,Z as u,_ as d,a as f,b as p,d as m,et as h,i as g,u as _,v,w as y,x as b}from"./dist-MY__znoP.js";import{t as x}from"./AdminLayout--RXJFj9t.js";import{t as S}from"./AdminButton-Bx141Bs3.js";import{t as C}from"./AdminCard--HubMtUj.js";import{t as w}from"./FormField-xD6LELDV.js";var T={class:`mb-6`},E={class:`flex`,"aria-label":`Breadcrumb`},D={class:`inline-flex items-center space-x-1 md:space-x-3`},O={class:`inline-flex items-center`},k={class:`flex items-center`},A={class:`ml-1 text-muted`},j={class:`max-w-2xl`},M={class:`text-2xl font-bold text-fg mb-6`},N={key:0,"data-read-only":``,class:`mb-6 rounded-md border border-field bg-surface-alt px-4 py-3 text-sm text-fg`},P=[`disabled`],F={key:1},I=[`for`],L={key:0,class:`text-danger`},R={key:0,class:`flex items-center`},z=[`id`,`onUpdate:modelValue`],B=[`for`],V=[`id`,`onUpdate:modelValue`,`type`,`placeholder`,`required`],H={key:2,class:`mt-1 text-sm text-muted`},U={key:3,class:`mt-1 text-sm text-muted`},W={key:4,class:`mt-1 text-sm text-danger`},G={class:`flex items-center justify-end space-x-3 pt-4 border-t`},K={__name:`Edit`,props:{item:Object,fields:Array,title:String,can:{type:Object,default:()=>({})}},setup(K){let q=K,J=e=>[`text`,`email`,`password`,`checkbox`].includes(e.type),Y=p(()=>q.can.update===!1),X={};q.fields.forEach(e=>{X[e.name]=q.item[e.name]??e.default??``}),X.password=``,X.password_confirmation=``;let Z=f(X),Q=p(()=>({...q.item,...Z.data()}));i(`formData`,Q);let $=()=>{Z.put(route(`admin.users.update`,q.item.id))};return(i,f)=>(r(),s(x,{title:K.title},{default:l(()=>[b(`div`,T,[b(`nav`,E,[b(`ol`,D,[b(`li`,O,[t(u(g),{href:i.route(`admin.users.index`),class:`text-muted hover:text-accent`},{default:l(()=>[c(h(i.$t(`menu.administrators`)),1)]),_:1},8,[`href`])]),b(`li`,null,[b(`div`,k,[f[0]||=b(`svg`,{class:`w-4 h-4 text-muted`,fill:`currentColor`,viewBox:`0 0 20 20`},[b(`path`,{"fill-rule":`evenodd`,d:`M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z`,"clip-rule":`evenodd`})],-1),b(`span`,A,h(K.item.name),1)])])])])]),b(`div`,j,[b(`h1`,M,h(K.title),1),t(C,null,{default:l(()=>[Y.value?(r(),y(`p`,N,h(i.$t(`resource.form.read_only`)),1)):e(``,!0),b(`form`,{onSubmit:d($,[`prevent`]),class:`space-y-6`},[b(`fieldset`,{disabled:Y.value,class:`space-y-6`},[(r(!0),y(v,null,o(K.fields,t=>(r(),y(v,{key:t.name},[J(t)?(r(),y(`div`,F,[b(`label`,{for:t.name,class:`block text-sm font-medium text-fg mb-1`},[c(h(t.label)+` `,1),t.required&&t.type!==`password`?(r(),y(`span`,L,`*`)):e(``,!0)],8,I),t.type===`checkbox`?(r(),y(`div`,R,[n(b(`input`,{id:t.name,"onUpdate:modelValue":e=>u(Z)[t.name]=e,type:`checkbox`,class:`h-4 w-4 text-accent focus:ring-focus border-field rounded`},null,8,z),[[_,u(Z)[t.name]]]),b(`label`,{for:t.name,class:`ml-2 text-sm text-fg`},h(t.label),9,B)])):n((r(),y(`input`,{key:1,id:t.name,"onUpdate:modelValue":e=>u(Z)[t.name]=e,type:t.type===`password`?`password`:t.type===`email`?`email`:`text`,placeholder:t.type===`password`?i.$t(`account.users.password_keep_placeholder`):t.placeholder,required:t.required&&t.type!==`password`,class:a([`w-full px-3 py-2 border border-field rounded-md shadow-sm focus:ring-focus focus:border-focus`,{"border-danger":u(Z).errors[t.name]}])},null,10,V)),[[m,u(Z)[t.name]]]),t.hint?(r(),y(`p`,H,h(t.hint),1)):e(``,!0),t.type===`password`&&t.name===`password`?(r(),y(`p`,U,h(i.$t(`account.users.password_keep_hint`)),1)):e(``,!0),u(Z).errors[t.name]?(r(),y(`p`,W,h(u(Z).errors[t.name]),1)):e(``,!0)])):(r(),s(w,{key:0,field:t,modelValue:u(Z)[t.name],"onUpdate:modelValue":e=>u(Z)[t.name]=e,errors:u(Z).errors},null,8,[`field`,`modelValue`,`onUpdate:modelValue`,`errors`]))],64))),128))],8,P),b(`div`,G,[t(S,{href:i.route(`admin.users.index`),variant:`secondary`},{default:l(()=>[c(h(Y.value?i.$t(`common.back`):i.$t(`common.cancel`)),1)]),_:1},8,[`href`]),Y.value?e(``,!0):(r(),s(S,{key:0,"data-action":`save`,type:`submit`,loading:u(Z).processing},{default:l(()=>[c(h(i.$t(`common.save`)),1)]),_:1},8,[`loading`]))])],32)]),_:1})])]),_:1},8,[`title`]))}};export{K as default};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/Edit-ppjiZjeT.js b/packages/admin/dist/assets/Edit-pGNJhUsL.js
similarity index 95%
rename from packages/admin/dist/assets/Edit-ppjiZjeT.js
rename to packages/admin/dist/assets/Edit-pGNJhUsL.js
index 4dcde530..3dce9a7b 100644
--- a/packages/admin/dist/assets/Edit-ppjiZjeT.js
+++ b/packages/admin/dist/assets/Edit-pGNJhUsL.js
@@ -1 +1 @@
-import{C as e,E as t,G as n,I as r,R as i,S as a,T as o,W as s,Z as c,_ as l,a as u,et as d,i as f,m as p,v as m,w as h,x as g}from"./dist-MY__znoP.js";import{t as _}from"./AdminLayout-I1QMPYpW.js";import{t as v}from"./AdminButton-Bx141Bs3.js";import{t as y}from"./AdminCard--HubMtUj.js";import{n as b}from"./app-lI4VKCmX.js";var x={class:`mb-6`},S={class:`max-w-4xl`},ee={class:`text-2xl font-bold text-fg mb-6`},te={for:`role-name`,class:`block text-sm font-medium text-fg mb-1`},ne={key:0,class:`mt-1 text-sm text-danger`},re={class:`flex flex-wrap items-center justify-between gap-2`},ie={class:`text-sm font-medium text-fg`},C={class:`flex gap-2`},w={class:`mt-1 text-sm text-muted`},T={key:0,class:`mt-1 text-sm text-danger`},E={class:`mt-2 overflow-x-auto border border-line rounded-md`},D={class:`min-w-full text-sm`},O={class:`bg-surface-alt`},k={class:`px-3 py-2 text-left font-medium text-fg`},A={key:0,class:`px-3 py-2 text-left font-medium text-fg`},j={class:`px-3 py-2 w-20 text-center font-medium text-fg`},M={class:`divide-y divide-line`},N=[`data-section`],P={class:`px-3 py-1.5`},F={class:`ml-1 text-xs text-muted font-mono`},I=[`data-permission`,`aria-label`,`checked`,`onChange`],L={key:0,class:`px-3 py-1.5`},ae=[`data-permission`,`checked`,`onChange`],R=[`colspan`],z=[`data-permission`,`checked`,`onChange`],B={class:`px-3 py-1.5 text-center`},V=[`aria-label`,`checked`,`onChange`],H={class:`flex items-center justify-end space-x-3 pt-4 border-t`},U={__name:`Edit`,props:{role:{type:Object,default:null},sections:{type:Array,required:!0},title:String},setup(U){let W=U,G=[`view`,`create`,`update`,`delete`],K=u({name:W.role?.name??``,permissions:[...W.role?.permissions??[]]}),q=(e,t)=>K.permissions.includes(`${e.key}.${t}`),J=e=>G.every(t=>e.actions.includes(t)),Y=e=>J(e)?e.actions.filter(e=>!G.includes(e)):[],X=W.sections.some(e=>Y(e).length>0),Z=(e,t)=>e.labels?.[t]??b(`permissions.actions.${t}`),Q=(e,t)=>{let n=new Set(K.permissions),r=`${e.key}.${t}`;n.has(r)?(n.delete(r),t===`view`&&G.forEach(t=>n.delete(`${e.key}.${t}`))):(n.add(r),J(e)&&G.includes(t)&&t!==`view`&&n.add(`${e.key}.view`)),K.permissions=[...n]},$=e=>e.actions.every(t=>q(e,t)),oe=e=>{let t=new Set(K.permissions),n=$(e);e.actions.forEach(r=>n?t.delete(`${e.key}.${r}`):t.add(`${e.key}.${r}`)),K.permissions=[...t]},se=()=>{K.permissions=W.sections.flatMap(e=>e.actions.map(t=>`${e.key}.${t}`))},ce=()=>{W.role?K.put(route(`admin.roles.update`,W.role.id)):K.post(route(`admin.roles.store`))};return(u,b)=>(r(),a(_,{title:U.title},{default:s(()=>[g(`div`,x,[t(c(f),{href:u.route(`admin.roles.index`),class:`text-muted hover:text-accent`},{default:s(()=>[o(d(u.$t(`menu.roles`)),1)]),_:1},8,[`href`])]),g(`div`,S,[g(`h1`,ee,d(U.title),1),t(y,null,{default:s(()=>[g(`form`,{class:`space-y-6`,"data-role-form":``,onSubmit:l(ce,[`prevent`])},[g(`div`,null,[g(`label`,te,[o(d(u.$t(`permissions.name`))+` `,1),b[2]||=g(`span`,{class:`text-danger`},`*`,-1)]),n(g(`input`,{id:`role-name`,"onUpdate:modelValue":b[0]||=e=>c(K).name=e,type:`text`,required:``,class:`w-full px-3 py-2 border border-field rounded-md shadow-sm focus:ring-focus focus:border-focus`},null,512),[[p,c(K).name]]),c(K).errors.name?(r(),h(`p`,ne,d(c(K).errors.name),1)):e(``,!0)]),g(`div`,null,[g(`div`,re,[g(`span`,ie,d(u.$t(`permissions.permissions`)),1),g(`div`,C,[t(v,{type:`button`,size:`sm`,variant:`outline`,onClick:se},{default:s(()=>[o(d(u.$t(`permissions.select_all`)),1)]),_:1}),t(v,{type:`button`,size:`sm`,variant:`outline`,onClick:b[1]||=e=>c(K).permissions=[]},{default:s(()=>[o(d(u.$t(`permissions.clear`)),1)]),_:1})])]),g(`p`,w,d(u.$t(`permissions.matrix_hint`)),1),c(K).errors.permissions?(r(),h(`p`,T,d(c(K).errors.permissions),1)):e(``,!0),g(`div`,E,[g(`table`,D,[g(`thead`,O,[g(`tr`,null,[g(`th`,k,d(u.$t(`permissions.section`)),1),(r(),h(m,null,i(G,e=>g(`th`,{key:e,class:`px-3 py-2 w-24 text-center font-medium text-fg`},d(u.$t(`permissions.actions.${e}`)),1)),64)),c(X)?(r(),h(`th`,A,d(u.$t(`permissions.other`)),1)):e(``,!0),g(`th`,j,d(u.$t(`permissions.all`)),1)])]),g(`tbody`,M,[(r(!0),h(m,null,i(U.sections,t=>(r(),h(`tr`,{key:t.key,"data-section":t.key},[g(`td`,P,[o(d(t.label)+` `,1),g(`span`,F,d(t.key),1)]),J(t)?(r(),h(m,{key:0},[(r(),h(m,null,i(G,e=>g(`td`,{key:e,class:`px-3 py-1.5 text-center`},[g(`input`,{type:`checkbox`,class:`h-4 w-4`,"data-permission":`${t.key}.${e}`,"aria-label":`${t.label}: ${u.$t(`permissions.actions.${e}`)}`,checked:q(t,e),onChange:n=>Q(t,e)},null,40,I)])),64)),c(X)?(r(),h(`td`,L,[(r(!0),h(m,null,i(Y(t),e=>(r(),h(`label`,{key:e,class:`inline-flex items-center gap-2 mr-3`},[g(`input`,{type:`checkbox`,class:`h-4 w-4`,"data-permission":`${t.key}.${e}`,checked:q(t,e),onChange:n=>Q(t,e)},null,40,ae),o(` `+d(Z(t,e)),1)]))),128))])):e(``,!0)],64)):(r(),h(`td`,{key:1,colspan:c(X)?5:4,class:`px-3 py-1.5`},[(r(!0),h(m,null,i(t.actions,e=>(r(),h(`label`,{key:e,class:`inline-flex items-center gap-2 mr-3`},[g(`input`,{type:`checkbox`,class:`h-4 w-4`,"data-permission":`${t.key}.${e}`,checked:q(t,e),onChange:n=>Q(t,e)},null,40,z),o(` `+d(Z(t,e)),1)]))),128))],8,R)),g(`td`,B,[g(`input`,{type:`checkbox`,class:`h-4 w-4`,"aria-label":`${t.label}: ${u.$t(`permissions.all`)}`,checked:$(t),onChange:e=>oe(t)},null,40,V)])],8,N))),128))])])])]),g(`div`,H,[t(v,{href:u.route(`admin.roles.index`),variant:`secondary`},{default:s(()=>[o(d(u.$t(`common.cancel`)),1)]),_:1},8,[`href`]),t(v,{"data-action":`save`,type:`submit`,loading:c(K).processing},{default:s(()=>[o(d(u.$t(`common.save`)),1)]),_:1},8,[`loading`])])],32)]),_:1})])]),_:1},8,[`title`]))}};export{U as default};
\ No newline at end of file
+import{C as e,E as t,G as n,I as r,R as i,S as a,T as o,W as s,Z as c,_ as l,a as u,et as d,i as f,m as p,v as m,w as h,x as g}from"./dist-MY__znoP.js";import{t as _}from"./AdminLayout--RXJFj9t.js";import{t as v}from"./AdminButton-Bx141Bs3.js";import{t as y}from"./AdminCard--HubMtUj.js";import{n as b}from"./app-BNjy5Z6H.js";var x={class:`mb-6`},S={class:`max-w-4xl`},ee={class:`text-2xl font-bold text-fg mb-6`},te={for:`role-name`,class:`block text-sm font-medium text-fg mb-1`},ne={key:0,class:`mt-1 text-sm text-danger`},re={class:`flex flex-wrap items-center justify-between gap-2`},ie={class:`text-sm font-medium text-fg`},C={class:`flex gap-2`},w={class:`mt-1 text-sm text-muted`},T={key:0,class:`mt-1 text-sm text-danger`},E={class:`mt-2 overflow-x-auto border border-line rounded-md`},D={class:`min-w-full text-sm`},O={class:`bg-surface-alt`},k={class:`px-3 py-2 text-left font-medium text-fg`},A={key:0,class:`px-3 py-2 text-left font-medium text-fg`},j={class:`px-3 py-2 w-20 text-center font-medium text-fg`},M={class:`divide-y divide-line`},N=[`data-section`],P={class:`px-3 py-1.5`},F={class:`ml-1 text-xs text-muted font-mono`},I=[`data-permission`,`aria-label`,`checked`,`onChange`],L={key:0,class:`px-3 py-1.5`},ae=[`data-permission`,`checked`,`onChange`],R=[`colspan`],z=[`data-permission`,`checked`,`onChange`],B={class:`px-3 py-1.5 text-center`},V=[`aria-label`,`checked`,`onChange`],H={class:`flex items-center justify-end space-x-3 pt-4 border-t`},U={__name:`Edit`,props:{role:{type:Object,default:null},sections:{type:Array,required:!0},title:String},setup(U){let W=U,G=[`view`,`create`,`update`,`delete`],K=u({name:W.role?.name??``,permissions:[...W.role?.permissions??[]]}),q=(e,t)=>K.permissions.includes(`${e.key}.${t}`),J=e=>G.every(t=>e.actions.includes(t)),Y=e=>J(e)?e.actions.filter(e=>!G.includes(e)):[],X=W.sections.some(e=>Y(e).length>0),Z=(e,t)=>e.labels?.[t]??b(`permissions.actions.${t}`),Q=(e,t)=>{let n=new Set(K.permissions),r=`${e.key}.${t}`;n.has(r)?(n.delete(r),t===`view`&&G.forEach(t=>n.delete(`${e.key}.${t}`))):(n.add(r),J(e)&&G.includes(t)&&t!==`view`&&n.add(`${e.key}.view`)),K.permissions=[...n]},$=e=>e.actions.every(t=>q(e,t)),oe=e=>{let t=new Set(K.permissions),n=$(e);e.actions.forEach(r=>n?t.delete(`${e.key}.${r}`):t.add(`${e.key}.${r}`)),K.permissions=[...t]},se=()=>{K.permissions=W.sections.flatMap(e=>e.actions.map(t=>`${e.key}.${t}`))},ce=()=>{W.role?K.put(route(`admin.roles.update`,W.role.id)):K.post(route(`admin.roles.store`))};return(u,b)=>(r(),a(_,{title:U.title},{default:s(()=>[g(`div`,x,[t(c(f),{href:u.route(`admin.roles.index`),class:`text-muted hover:text-accent`},{default:s(()=>[o(d(u.$t(`menu.roles`)),1)]),_:1},8,[`href`])]),g(`div`,S,[g(`h1`,ee,d(U.title),1),t(y,null,{default:s(()=>[g(`form`,{class:`space-y-6`,"data-role-form":``,onSubmit:l(ce,[`prevent`])},[g(`div`,null,[g(`label`,te,[o(d(u.$t(`permissions.name`))+` `,1),b[2]||=g(`span`,{class:`text-danger`},`*`,-1)]),n(g(`input`,{id:`role-name`,"onUpdate:modelValue":b[0]||=e=>c(K).name=e,type:`text`,required:``,class:`w-full px-3 py-2 border border-field rounded-md shadow-sm focus:ring-focus focus:border-focus`},null,512),[[p,c(K).name]]),c(K).errors.name?(r(),h(`p`,ne,d(c(K).errors.name),1)):e(``,!0)]),g(`div`,null,[g(`div`,re,[g(`span`,ie,d(u.$t(`permissions.permissions`)),1),g(`div`,C,[t(v,{type:`button`,size:`sm`,variant:`outline`,onClick:se},{default:s(()=>[o(d(u.$t(`permissions.select_all`)),1)]),_:1}),t(v,{type:`button`,size:`sm`,variant:`outline`,onClick:b[1]||=e=>c(K).permissions=[]},{default:s(()=>[o(d(u.$t(`permissions.clear`)),1)]),_:1})])]),g(`p`,w,d(u.$t(`permissions.matrix_hint`)),1),c(K).errors.permissions?(r(),h(`p`,T,d(c(K).errors.permissions),1)):e(``,!0),g(`div`,E,[g(`table`,D,[g(`thead`,O,[g(`tr`,null,[g(`th`,k,d(u.$t(`permissions.section`)),1),(r(),h(m,null,i(G,e=>g(`th`,{key:e,class:`px-3 py-2 w-24 text-center font-medium text-fg`},d(u.$t(`permissions.actions.${e}`)),1)),64)),c(X)?(r(),h(`th`,A,d(u.$t(`permissions.other`)),1)):e(``,!0),g(`th`,j,d(u.$t(`permissions.all`)),1)])]),g(`tbody`,M,[(r(!0),h(m,null,i(U.sections,t=>(r(),h(`tr`,{key:t.key,"data-section":t.key},[g(`td`,P,[o(d(t.label)+` `,1),g(`span`,F,d(t.key),1)]),J(t)?(r(),h(m,{key:0},[(r(),h(m,null,i(G,e=>g(`td`,{key:e,class:`px-3 py-1.5 text-center`},[g(`input`,{type:`checkbox`,class:`h-4 w-4`,"data-permission":`${t.key}.${e}`,"aria-label":`${t.label}: ${u.$t(`permissions.actions.${e}`)}`,checked:q(t,e),onChange:n=>Q(t,e)},null,40,I)])),64)),c(X)?(r(),h(`td`,L,[(r(!0),h(m,null,i(Y(t),e=>(r(),h(`label`,{key:e,class:`inline-flex items-center gap-2 mr-3`},[g(`input`,{type:`checkbox`,class:`h-4 w-4`,"data-permission":`${t.key}.${e}`,checked:q(t,e),onChange:n=>Q(t,e)},null,40,ae),o(` `+d(Z(t,e)),1)]))),128))])):e(``,!0)],64)):(r(),h(`td`,{key:1,colspan:c(X)?5:4,class:`px-3 py-1.5`},[(r(!0),h(m,null,i(t.actions,e=>(r(),h(`label`,{key:e,class:`inline-flex items-center gap-2 mr-3`},[g(`input`,{type:`checkbox`,class:`h-4 w-4`,"data-permission":`${t.key}.${e}`,checked:q(t,e),onChange:n=>Q(t,e)},null,40,z),o(` `+d(Z(t,e)),1)]))),128))],8,R)),g(`td`,B,[g(`input`,{type:`checkbox`,class:`h-4 w-4`,"aria-label":`${t.label}: ${u.$t(`permissions.all`)}`,checked:$(t),onChange:e=>oe(t)},null,40,V)])],8,N))),128))])])])]),g(`div`,H,[t(v,{href:u.route(`admin.roles.index`),variant:`secondary`},{default:s(()=>[o(d(u.$t(`common.cancel`)),1)]),_:1},8,[`href`]),t(v,{"data-action":`save`,type:`submit`,loading:c(K).processing},{default:s(()=>[o(d(u.$t(`common.save`)),1)]),_:1},8,[`loading`])])],32)]),_:1})])]),_:1},8,[`title`]))}};export{U as default};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/FormField-BI8KmQxQ.js b/packages/admin/dist/assets/FormField-xD6LELDV.js
similarity index 99%
rename from packages/admin/dist/assets/FormField-BI8KmQxQ.js
rename to packages/admin/dist/assets/FormField-xD6LELDV.js
index f2b52e53..9e944d07 100644
--- a/packages/admin/dist/assets/FormField-BI8KmQxQ.js
+++ b/packages/admin/dist/assets/FormField-xD6LELDV.js
@@ -1,4 +1,4 @@
-import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,M as f,N as p,O as m,P as h,Q as g,R as _,S as v,T as y,U as b,V as x,W as S,X as C,Y as w,Z as T,_ as E,b as D,c as ee,d as te,et as O,f as ne,g as k,h as re,j as ie,k as ae,m as oe,o as se,p as ce,u as le,v as A,w as j,x as M,y as ue,z as N}from"./dist-MY__znoP.js";import{n as P}from"./app-lI4VKCmX.js";import{i as de,n as fe,r as pe}from"./AdminLayout-I1QMPYpW.js";import{t as me}from"./AdminModal-DNJ_V4iq.js";import{t as he}from"./AdminButton-Bx141Bs3.js";var ge=Object.defineProperty,_e=(e,t)=>{let n={};for(var r in e)ge(n,r,{get:e[r],enumerable:!0});return t||ge(n,Symbol.toStringTag,{value:`Module`}),n};function ve(e){this.content=e}ve.prototype={constructor:ve,find:function(e){for(var t=0;t>1}},ve.from=function(e){if(e instanceof ve)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new ve(t)};function ye(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a)n+=i.nodeSize;else{if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){let e=i.text,t=a.text,r=0;for(;e[r]==t[r];r++)n++;return r&&r0&&a>0&&e[i-1]==t[a-1];)i--,a--,n--,r--;return i&&a&&i=56320&&e<57344}function Se(e){return e>=55296&&e<56320}var F=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;te&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);at)for(let e=0,a=0;at&&((an)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?we(t+1,i):we(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;ethis.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;te.type.rank-t.type.rank),n}};I.none=[];var Ee=class extends Error{},L=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Oe(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(De(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(F.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};L.empty=new L(F.empty,0,0);function De(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(De(a.content,t-i-1,n-i-1)))}function Oe(e,t,n,r,i,a){let{index:o,offset:s}=e.findIndex(t),c=e.maybeChild(o);if(s==t||c.isText)return a&&r<=0&&i<=0&&!a.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=Oe(c.content,t-s-1,n,o==0?r-1:0,o==e.childCount-1?i-1:0,c);return l&&e.replaceChild(o,c.copy(l))}function ke(e,t,n){if(n.openStart>e.depth)throw new Ee(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Ee(`Inconsistent open depths`);return Ae(e,t,n,0)}function Ae(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Pe(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(Ne(e.nodeAfter,r),a++));for(let e=a;ei&&Me(e,t,i+1),o=r.depth>i&&Me(n,r,i+1),s=[];return Pe(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(je(a,o),Ne(Fe(a,Ie(e,t,n,r,i+1)),s)):(a&&Ne(Fe(a,Le(e,t,i+1)),s),Pe(t,n,i,s),o&&Ne(Fe(o,Le(n,r,i+1)),s)),Pe(r,null,i,s),new F(s)}function Le(e,t,n){let r=[];return Pe(null,e,n,r),e.depth>n&&Ne(Fe(Me(e,t,n+1),Le(e,t,n+1)),r),Pe(t,null,n,r),new F(r)}function Re(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(F.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var ze=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new Ue(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=He.get(t);if(r)for(let e=0;ee&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),Je(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=F.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;ee.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=F.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}};Ge.prototype.text=void 0;var Ke=(()=>{let{stack:e}=Error(`/`);if(!e||!/\n\s*at\s/.test(e))return e=>e;let t=Object.create(null);return e=>(t[e],e)})(),qe=class e extends Ge{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Je(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return Ke(this.text.slice(e,t))}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(Ke(this.text.slice(e,t)))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function Je(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}function Ye(e,t,n,r){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in e)e[n].validate&&e[n].validate(t[n])}var Xe=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Ze(t,n);if(r.next==null)return e.empty;let i=Qe(r);r.next&&r.err(`Unexpected trailing text`);let a=ct(at(i));return lt(a,r),a}matchType(e){for(let t=0;te.createAndFill()));for(let e=0;e=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n`+e.indexOf(t.next[n].next);return r}).join(`
+import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,M as f,N as p,O as m,P as h,Q as g,R as _,S as v,T as y,U as b,V as x,W as S,X as C,Y as w,Z as T,_ as E,b as D,c as ee,d as te,et as O,f as ne,g as k,h as re,j as ie,k as ae,m as oe,o as se,p as ce,u as le,v as A,w as j,x as M,y as ue,z as N}from"./dist-MY__znoP.js";import{n as P}from"./app-BNjy5Z6H.js";import{i as de,n as fe,r as pe}from"./AdminLayout--RXJFj9t.js";import{t as me}from"./AdminModal-DNJ_V4iq.js";import{t as he}from"./AdminButton-Bx141Bs3.js";var ge=Object.defineProperty,_e=(e,t)=>{let n={};for(var r in e)ge(n,r,{get:e[r],enumerable:!0});return t||ge(n,Symbol.toStringTag,{value:`Module`}),n};function ve(e){this.content=e}ve.prototype={constructor:ve,find:function(e){for(var t=0;t>1}},ve.from=function(e){if(e instanceof ve)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new ve(t)};function ye(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a)n+=i.nodeSize;else{if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){let e=i.text,t=a.text,r=0;for(;e[r]==t[r];r++)n++;return r&&r0&&a>0&&e[i-1]==t[a-1];)i--,a--,n--,r--;return i&&a&&i=56320&&e<57344}function Se(e){return e>=55296&&e<56320}var F=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;te&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);at)for(let e=0,a=0;at&&((an)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?we(t+1,i):we(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;ethis.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;te.type.rank-t.type.rank),n}};I.none=[];var Ee=class extends Error{},L=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Oe(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(De(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(F.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};L.empty=new L(F.empty,0,0);function De(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(De(a.content,t-i-1,n-i-1)))}function Oe(e,t,n,r,i,a){let{index:o,offset:s}=e.findIndex(t),c=e.maybeChild(o);if(s==t||c.isText)return a&&r<=0&&i<=0&&!a.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=Oe(c.content,t-s-1,n,o==0?r-1:0,o==e.childCount-1?i-1:0,c);return l&&e.replaceChild(o,c.copy(l))}function ke(e,t,n){if(n.openStart>e.depth)throw new Ee(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Ee(`Inconsistent open depths`);return Ae(e,t,n,0)}function Ae(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Pe(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(Ne(e.nodeAfter,r),a++));for(let e=a;ei&&Me(e,t,i+1),o=r.depth>i&&Me(n,r,i+1),s=[];return Pe(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(je(a,o),Ne(Fe(a,Ie(e,t,n,r,i+1)),s)):(a&&Ne(Fe(a,Le(e,t,i+1)),s),Pe(t,n,i,s),o&&Ne(Fe(o,Le(n,r,i+1)),s)),Pe(r,null,i,s),new F(s)}function Le(e,t,n){let r=[];return Pe(null,e,n,r),e.depth>n&&Ne(Fe(Me(e,t,n+1),Le(e,t,n+1)),r),Pe(t,null,n,r),new F(r)}function Re(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(F.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var ze=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new Ue(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=He.get(t);if(r)for(let e=0;ee&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),Je(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=F.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;ee.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=F.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}};Ge.prototype.text=void 0;var Ke=(()=>{let{stack:e}=Error(`/`);if(!e||!/\n\s*at\s/.test(e))return e=>e;let t=Object.create(null);return e=>(t[e],e)})(),qe=class e extends Ge{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Je(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return Ke(this.text.slice(e,t))}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(Ke(this.text.slice(e,t)))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function Je(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}function Ye(e,t,n,r){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in e)e[n].validate&&e[n].validate(t[n])}var Xe=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Ze(t,n);if(r.next==null)return e.empty;let i=Qe(r);r.next&&r.err(`Unexpected trailing text`);let a=ct(at(i));return lt(a,r),a}matchType(e){for(let t=0;te.createAndFill()));for(let e=0;e=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n`+e.indexOf(t.next[n].next);return r}).join(`
`)}};Xe.empty=new Xe(!0);var Ze=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==``&&this.tokens.pop(),this.tokens[0]==``&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+` (in content expression '`+this.string+`')`)}};function Qe(e){let t=[];do t.push($e(e));while(e.eat(`|`));return t.length==1?t[0]:{type:`choice`,exprs:t}}function $e(e){let t=[];do t.push(et(e));while(e.next&&e.next!=`)`&&e.next!=`|`);return t.length==1?t[0]:{type:`seq`,exprs:t}}function et(e){let t=it(e);for(;;)if(e.eat(`+`))t={type:`plus`,expr:t};else if(e.eat(`*`))t={type:`star`,expr:t};else if(e.eat(`?`))t={type:`opt`,expr:t};else if(e.eat(`{`))t=nt(e,t);else break;return t}function tt(e){/\D/.test(e.next)&&e.err(`Expected number, got '`+e.next+`'`);let t=Number(e.next);return e.pos++,t}function nt(e,t){let n=tt(e),r=n;return e.eat(`,`)&&(r=e.next==`}`?-1:tt(e)),e.eat(`}`)||e.err(`Unclosed braced range`),{type:`range`,min:n,max:r,expr:t}}function rt(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return i.length==0&&e.err(`No node type or group '`+t+`' found`),i}function it(e){if(e.eat(`(`)){let t=Qe(e);return e.eat(`)`)||e.err(`Missing closing paren`),t}if(/\W/.test(e.next))e.err(`Unexpected token '`+e.next+`'`);else{let t=rt(e,e.next).map(t=>(e.inline==null?e.inline=t.isInline:e.inline!=t.isInline&&e.err(`Mixing inline and block content`),{type:`name`,value:t}));return e.pos++,t.length==1?t[0]:{type:`choice`,exprs:t}}}function at(e){let t=[[]];return i(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function a(e,t){if(e.type==`choice`)return e.exprs.reduce((e,n)=>e.concat(a(n,t)),[]);if(e.type==`seq`)for(let r=0;;r++){let o=a(e.exprs[r],t);if(r==e.exprs.length-1)return o;i(o,t=n())}else if(e.type==`star`){let o=n();return r(t,o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`plus`){let o=n();return i(a(e.expr,t),o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`opt`)return[r(t)].concat(a(e.expr,t));else if(e.type==`range`){let o=t;for(let t=0;t{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e{r||i.push([t,r=[]]),r.indexOf(e)==-1&&r.push(e)})})});let a=t[r.join(`,`)]=new Xe(r.indexOf(e.length-1)>-1);for(let e=0;e-1}get whitespace(){return this.spec.whitespace||(this.spec.code?`pre`:`normal`)}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:dt(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error(`NodeType.create can't construct text nodes`);return new Ge(this,this.computeAttrs(e),F.from(t),I.setFrom(n))}createChecked(e=null,t,n){return t=F.from(t),this.checkContent(t),new Ge(this,this.computeAttrs(e),t,I.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=F.from(t),t.size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(F.empty,!0);return i?new Ge(this,e,t.append(i),I.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;tr[t]=new e(t,n,i));let i=n.spec.topNode||`doc`;if(!r[i])throw RangeError(`Schema is missing its top node type ('`+i+`')`);if(!r.text)throw RangeError(`Every schema needs a 'text' type`);for(let e in r.text.attrs)throw RangeError(`The text node type should not have attributes`);return r}};function mt(e,t,n){let r=n.split(`|`);return n=>{let i=n===null?`null`:typeof n;if(r.indexOf(i)<0)throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var ht=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,`default`),this.default=n.default,this.validate=typeof n.validate==`string`?mt(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},gt=class e{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=ft(e,r.attrs),this.excluded=null;let i=ut(this.attrs);this.instance=i?new I(this,i):null}create(e=null){return!e&&this.instance?this.instance:new I(this,dt(this.attrs,e))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((t,a)=>r[t]=new e(t,i++,n,a)),r}removeFromSet(e){for(var t=0;t-1}},_t=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=ve.from(e.nodes),t.marks=ve.from(e.marks||{}),this.nodes=pt.compile(this.spec.nodes,this),this.marks=gt.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+` can not be both a node and a mark`);let t=this.nodes[e],r=t.spec.content||``,i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=Xe.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError(`Multiple linebreak nodes defined`);if(!t.isInline||!t.isLeaf)throw RangeError(`Linebreak replacement nodes must be inline leaf nodes`);this.linebreakReplacement=t}t.markSet=i==`_`?null:i?vt(this,i.split(` `)):i==``||!t.inlineContent?[]:null}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=n==null?[t]:n==``?[]:vt(this,n.split(` `))}this.nodeFromJSON=e=>Ge.fromJSON(this,e),this.markFromJSON=e=>I.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||`doc`],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e==`string`)e=this.nodeType(e);else if(!(e instanceof pt))throw RangeError(`Invalid node type: `+e);else if(e.schema!=this)throw RangeError(`Node type from different schema used (`+e.name+`)`);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new qe(n,n.defaultAttrs,e,I.setFrom(t))}mark(e,t){return typeof e==`string`&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError(`Unknown node type: `+e);return t}};function vt(e,t){let n=[];for(let r=0;r-1)&&n.push(o=r)}if(!o)throw SyntaxError(`Unknown mark type: '`+t[r]+`'`)}return n}function yt(e){return e.tag!=null}function bt(e){return e.style!=null}var xt=class e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(yt(e))this.tags.push(e);else if(bt(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new At(this,t,!1);return n.addAll(e,I.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new At(this,t,!0);return n.addAll(e,I.none,t.from,t.to),L.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;re.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(e===!1)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=e.priority==null?50:e.priority,r=0;for(;r{n(e=Nt(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=Nt(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},St={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Ct={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},wt={ol:!0,ul:!0},Tt=1,Et=2,Dt=4;function Ot(e,t,n){return t==null?e&&e.whitespace==`pre`?3:n&-5:(t?Tt:0)|(t===`full`?Et:0)}var kt=class{constructor(e,t,n,r,i,a){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=a,this.content=[],this.activeMarks=I.none,this.match=i||(a&Dt?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(F.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Tt)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let t=F.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(F.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!St.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},At=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,a=Ot(null,t.preserveWhitespace,0)|(n?Dt:0);i=r?new kt(r.type,r.attrs,I.none,!0,t.topMatch||r.type.contentMatch,a):n?new kt(null,null,I.none,!0,null,a):new kt(e.schema.topNodeType,null,I.none,!0,null,a),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=r.options&Et?`full`:this.localPreserveWS||(r.options&Tt)>0,{schema:a}=this.parser;if(i===`full`||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(!i){if(n=n.replace(/[ \t\r\n\u000c]+/g,` `),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&i.nodeName==`BR`||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}}else if(i===`full`)n=n.replace(/\r\n?/g,`
`);else if(a.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(a.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),n.consuming===!1)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,a;if(t.node){if(a=this.parser.schema.nodes[t.node],a.isLeaf)this.insertNode(a.create(t.attrs),n,e.nodeName==`BR`)||this.leafFallback(e,n);else{let e=this.enter(a,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(a&&a.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;typeof t.contentElement==`string`?r=e.querySelector(t.contentElement):typeof t.contentElement==`function`?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let a=n?e.childNodes[n]:e.firstChild,o=r==null?null:e.childNodes[r];a!=o;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,a=0;t>=0;t--){let o=this.nodes[t],s=o.findWrapping(e);if(s&&(!r||r.length>s.length+a)&&(r=s,i=o,!s.length))break;if(o.solid){if(n)break;a+=2}}if(!r)return null;this.sync(i);for(let e=0;e!(a.type?a.type.allowsMarkType(t.type):Pt(t.type,e))||(s=t.addToSet(s),!1)),this.nodes.push(new kt(e,t,s,r,null,o)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=Tt);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split(`/`),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,a=(e,o)=>{for(;e>=0;e--){let s=t[e];if(s==``){if(e==t.length-1||e==0)continue;for(;o>=i;o--)if(a(e-1,o))return!0;return!1}{let e=o>0||o==0&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=s&&!e.isInGroup(s))return!1;o--}}return!0};return a(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}};function jt(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=t.nodeType==1?t.nodeName.toLowerCase():null;e&&wt.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):e==`li`?n=t:e&&(n=null)}}function Mt(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Nt(e){let t={};for(let n in e)t[n]=e[n];return t}function Pt(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let a=[],o=e=>{a.push(e);for(let n=0;n{if(i.length||e.marks.length){let n=0,a=0;for(;n=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&Vt(Lt(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return typeof t==`string`?{dom:e.createTextNode(t)}:Vt(e,t,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(e){let t=It(e.nodes);return t.text||=e=>e.text,t}static marksFromSchema(e){return It(e.marks)}};function It(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Lt(e){return e.document||window.document}var Rt=new WeakMap;function zt(e){let t=Rt.get(e);return t===void 0&&Rt.set(e,t=Bt(e)),t}function Bt(e){let t=null;function n(e){if(e&&typeof e==`object`){if(Array.isArray(e)){if(typeof e[0]==`string`)t||=[],t.push(e);else for(let t=0;t-1)throw RangeError(`Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.`);let o=i.indexOf(` `);o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s,c=n?e.createElementNS(n,i):e.createElement(i),l=t[1],u=1;if(l&&typeof l==`object`&&l.nodeType==null&&!Array.isArray(l)){u=2;for(let e in l)if(l[e]!=null){let t=e.indexOf(` `);t>0?c.setAttributeNS(e.slice(0,t),e.slice(t+1),l[e]):e==`style`&&c.style?c.style.cssText=l[e]:c.setAttribute(e,l[e])}}for(let i=u;iu)throw RangeError(`Content hole must be the only child of its parent node`);return{dom:c,contentDOM:c}}if(typeof a==`string`)c.appendChild(e.createTextNode(a));else{let{dom:t,contentDOM:i}=Vt(e,a,n,r);if(c.appendChild(t),i){if(s)throw RangeError(`Multiple content holes`);s=i}}}return{dom:c,contentDOM:s}}var Ht=65535,Ut=2**16;function Wt(e,t){return e+t*Ut}function Gt(e){return e&Ht}function Kt(e){return(e-(e&Ht))/Ut}var qt=1,Jt=2,Yt=4,Xt=8,Zt=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&Xt)>0}get deletedBefore(){return(this.delInfo&5)>0}get deletedAfter(){return(this.delInfo&6)>0}get deletedAcross(){return(this.delInfo&Yt)>0}},Qt=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){let t=0,n=Gt(e);if(!this.inverted)for(let e=0;ee)break;let c=this.ranges[o+i],l=this.ranges[o+a],u=s+c;if(e<=u){let i=c?e==s?-1:e==u?1:t:t,a=s+r+(i<0?0:l);if(n)return a;let d=e==(t<0?s:u)?null:Wt(o/3,e-s),f=0;return c&&(f|=e==s?Jt:e==u?qt:Yt,(t<0?e!=s:e!=u)&&(f|=Xt)),new Zt(a,f,d)}r+=l-c}return n?e+r:new Zt(e+r,0,null)}touches(e,t){let n=0,r=Gt(t),i=this.inverted?2:1,a=this.inverted?1:2;for(let t=0;te)break;let s=this.ranges[t+i];if(e<=o+s&&t==r*3)return!0;n+=this.ranges[t+a]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),r!=null&&r>t?n-r-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;nn&&t!e.isAtom||!t.type.allowsMarkType(this.mark.type)?e:e.mark(this.mark.addToSet(e.marks)),r),t.openStart,t.openEnd);return nn.fromReplace(e,this.from,this.to,i)}invert(t){let n=[];return t.nodesBetween(this.from,this.to,(t,r)=>{if(t.isInline&&t.isAtom){let i=this.mark.addToSet(t.marks);if(!I.sameSet(i,t.marks)){let a=Math.max(this.from,r),o=Math.min(this.to,r+t.nodeSize);sn(on,a,o,this.mark,n);for(let r of t.marks)r.isInSet(i)||sn(e,a,o,r,n)}}}),n.length==1?n[0]:new cn(n)}map(t){let n=t.map(this.from,1),r=t.map(this.to,-1);return n>=r?null:new e(n,r,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`addMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for AddMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};tn.jsonID(`addMark`,an);var on=class e extends tn{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new L(rn(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return nn.fromReplace(e,this.from,this.to,n)}invert(e){let t=[];return e.nodesBetween(this.from,this.to,(e,n)=>{e.isInline&&e.isAtom&&this.mark.isInSet(e.marks)&&sn(an,Math.max(this.from,n),Math.min(this.to,n+e.nodeSize),this.mark,t)}),t.length==1?t[0]:new cn(t)}map(t){let n=t.map(this.from,1),r=t.map(this.to,-1);return n>=r?null:new e(n,r,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`removeMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for RemoveMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};tn.jsonID(`removeMark`,on);function sn(e,t,n,r,i){let a=i.length?i[i.length-1]:null;a&&a instanceof e&&a.to==t&&a.mark.eq(r)?i[i.length-1]=new e(a.from,n,r):i.push(new e(t,n,r))}var cn=class e extends tn{constructor(e){super(),this.steps=e}apply(e){for(let t of this.steps){let n=t.apply(e);if(!n.doc)return n;e=n.doc}return new nn(e,null)}invert(t){return new e(this.steps.map(e=>e.invert(t)))}map(t){let n=[];for(let e of this.steps){let r=e.map(t);r&&n.push(r)}return n.length?new e(n):null}toJSON(){return{stepType:`markSet`,steps:this.steps.map(e=>e.toJSON())}}static fromJSON(t,n){if(!Array.isArray(n.steps)||!n.steps.every(e=>e.stepType==`addMark`||e.stepType==`removeMark`))throw RangeError(`Invalid JSON for MarkSetStep`);return new e(n.steps.map(e=>tn.fromJSON(t,e)))}};tn.jsonID(`markSet`,cn);var ln=class e extends tn{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return nn.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return nn.fromReplace(e,this.pos,this.pos+1,new L(F.from(n),0,+!t.isLeaf))}invert(t){let n=t.nodeAt(this.pos);if(n){let t=this.mark.addToSet(n.marks);if(t.length==n.marks.length){for(let r=0;rr.pos||i>a?null:new e(n.pos,r.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:`replaceAround`,from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`||typeof n.gapFrom!=`number`||typeof n.gapTo!=`number`||typeof n.insert!=`number`)throw RangeError(`Invalid input for ReplaceAroundStep.fromJSON`);return new e(n.from,n.to,n.gapFrom,n.gapTo,L.fromJSON(t,n.slice),n.insert,!!n.structure)}};tn.jsonID(`replaceAround`,fn);function pn(e,t,n){let r=e.resolve(t),i=n-t,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0){let e=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function mn(e,t,n,r){let i=[];e.doc.nodesBetween(t,n,(e,a,o)=>{if(!e.isInline)return;let s=e.marks;!r.isInSet(s)&&o.type.allowsMarkType(r.type)&&sn(an,Math.max(a,t),Math.min(a+e.nodeSize,n),r,i)}),i.forEach(t=>e.step(t))}function hn(e,t,n,r){let i=[],a=0;e.doc.nodesBetween(t,n,(e,o)=>{if(!e.isInline||!e.isAtom)return;a++;let s=null;if(r instanceof gt){let t=e.marks,n;for(;n=r.isInSet(t);)(s||=[]).push(n),t=n.removeFromSet(t)}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length){let r=Math.min(o+e.nodeSize,n);for(let e=0;ee.step(new on(t.from,t.to,t.style)))}function gn(e,t,n,r=n.contentMatch,i=!0){let a=e.doc.nodeAt(t),o=[],s=t+1;for(let t=0;t=0;t--)e.step(o[t])}function _n(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function vn(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let a=e.$from.node(n),o=e.$from.index(n)+r,s=e.$to.indexAfter(n)-i;if(nn;e--)t||r.index(e)>0?(t=!0,u=F.from(r.node(e).copy(u)),d++):c--;let f=F.empty,p=0;for(let e=a,t=!1;e>n;e--)t||i.after(e+1)=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw RangeError(`Wrapper type given to Transform.wrap does not form valid content of its parent wrapper`)}r=F.from(n[e].type.create(n[e].attrs,r))}let i=t.start,a=t.end;e.step(new fn(i,a,i,a,new L(r,0,0),n.length,!0))}function Tn(e,t,n,r,i){if(!r.isTextblock)throw RangeError(`Type given to setBlockType should be a textblock`);let a=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{let o=typeof i==`function`?i(t):i;if(t.isTextblock&&!t.hasMarkup(r,o)&&On(e.doc,e.mapping.slice(a).map(n),r)){let i=null;if(r.schema.linebreakReplacement){let e=r.whitespace==`pre`,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}i===!1&&Dn(e,t,n,a),gn(e,e.mapping.slice(a).map(n,1),r,void 0,i===null);let s=e.mapping.slice(a),c=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new fn(c,l,c+1,l-1,new L(F.from(r.create(o,null,t.marks)),0,0),1,!0)),i===!0&&En(e,t,n,a),!1}})}function En(e,t,n,r){t.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let i=e.mapping.slice(r).map(n+1+a+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function Dn(e,t,n,r){t.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text(`
diff --git a/packages/admin/dist/assets/Index-CVtF6Jho.js b/packages/admin/dist/assets/Index-1mD_GBWn.js
similarity index 98%
rename from packages/admin/dist/assets/Index-CVtF6Jho.js
rename to packages/admin/dist/assets/Index-1mD_GBWn.js
index 8bc14ee8..6539e871 100644
--- a/packages/admin/dist/assets/Index-CVtF6Jho.js
+++ b/packages/admin/dist/assets/Index-1mD_GBWn.js
@@ -1 +1 @@
-import{C as e,E as t,I as n,Q as r,R as i,S as a,T as o,W as s,Z as ee,et as c,n as l,s as u,v as d,w as f,x as p}from"./dist-MY__znoP.js";import{t as te}from"./AdminLayout-I1QMPYpW.js";import{t as m}from"./AdminButton-Bx141Bs3.js";var h={class:`mb-6`},g={"data-page-title":`admin.modules`,class:`text-2xl font-bold text-fg`},_={class:`mt-1 text-sm text-muted`},v={class:`bg-surface rounded-lg shadow overflow-hidden`},y={key:0,class:`p-6 text-sm text-muted`},b={key:1,class:`min-w-full text-sm`},x={class:`bg-surface-alt`},S={class:`px-4 py-2 text-left font-medium text-fg`},C={class:`px-4 py-2 text-left font-medium text-fg`},w={class:`divide-y divide-line`},T=[`data-module`,`data-parent`,`data-enabled`],E={key:0,"aria-hidden":`true`,class:`mr-1 text-muted`},D={key:1,class:`ml-2 rounded bg-surface-alt px-1.5 py-0.5 text-xs font-normal text-muted`},O={key:0,class:`text-muted`},k={class:`px-4 py-2 font-mono text-xs text-muted`},A={class:`px-4 py-2 text-right whitespace-nowrap space-x-2`},j={key:0,"data-section":`required`,class:`mt-8`},M={class:`text-lg font-semibold text-fg`},N={class:`mt-1 text-sm text-muted`},P={class:`mt-3 bg-surface rounded-lg shadow divide-y divide-line text-sm`},ne=[`data-required`],F={class:`font-medium text-fg`},I={key:0,class:`text-muted`},L={class:`mt-1 block font-mono text-xs text-fg select-all`},R={key:1,"data-section":`catalogue`,class:`mt-8`},z={class:`text-lg font-semibold text-fg`},B={class:`mt-1 text-sm text-muted`},V={class:`mt-3 text-sm text-muted`},H={key:0,"data-catalogue":`unavailable`,class:`mt-3 text-sm text-muted`},U={key:1,class:`mt-3 text-sm text-muted`},W={key:2,class:`mt-3 bg-surface rounded-lg shadow divide-y divide-line text-sm`},G=[`data-package`,`data-status`],K={class:`flex flex-wrap items-baseline gap-x-3`},q=[`href`],J={key:0,class:`rounded bg-surface-alt px-1.5 py-0.5 text-xs text-muted`},Y={class:`text-xs text-muted`},X={key:0,class:`text-muted`},Z={key:0,class:`mt-1 block font-mono text-xs text-fg select-all`},re={class:`mt-1 block font-mono text-xs text-fg select-all`},Q={__name:`Index`,props:{modules:Array,required:Array,canManage:Boolean,catalogue:Object,title:String},setup(Q){let ie=e=>{u.post(route(e.enabled?`admin.modules.disable`:`admin.modules.enable`,e.key),{},{preserveScroll:!0})},$=e=>`php artisan atrium:module:install ${e}`;return(u,ae)=>(n(),a(te,{title:Q.title},{default:s(()=>[p(`div`,h,[p(`h1`,g,c(Q.title),1),p(`p`,_,c(u.$t(`modules.index_hint`)),1)]),p(`div`,v,[Q.modules.length===0?(n(),f(`p`,y,c(u.$t(`modules.empty`)),1)):(n(),f(`table`,b,[p(`thead`,x,[p(`tr`,null,[p(`th`,S,c(u.$t(`modules.module`)),1),p(`th`,C,c(u.$t(`modules.package`)),1),ae[0]||=p(`th`,{class:`px-4 py-2`},null,-1)])]),p(`tbody`,w,[(n(!0),f(d,null,i(Q.modules,t=>(n(),f(`tr`,{key:t.name,"data-module":t.name,"data-parent":t.parent,"data-enabled":t.enabled?`true`:`false`},[p(`td`,{class:r([`py-2 pr-4`,t.parent?`pl-10`:`pl-4`])},[p(`div`,{class:r([`font-medium`,t.enabled?`text-fg`:`text-muted`])},[t.parent?(n(),f(`span`,E,`↳`)):e(``,!0),o(c(t.label)+` `,1),t.enabled?e(``,!0):(n(),f(`span`,D,c(u.$t(`modules.status_disabled`)),1))],2),t.description?(n(),f(`div`,O,c(t.description),1)):e(``,!0)],2),p(`td`,k,c(t.name),1),p(`td`,A,[t.settings?(n(),a(m,{key:0,size:`sm`,variant:`outline`,"data-action":`settings`,href:u.route(`admin.modules.settings`,t.key)},{default:s(()=>[o(c(u.$t(`modules.settings`)),1)]),_:1},8,[`href`])):e(``,!0),Q.canManage?(n(),a(m,{key:1,size:`sm`,variant:t.enabled?`secondary`:`success`,"data-action":t.enabled?`disable`:`enable`,onClick:e=>ie(t)},{default:s(()=>[o(c(t.enabled?u.$t(`modules.disable`):u.$t(`modules.enable`)),1)]),_:2},1032,[`variant`,`data-action`,`onClick`])):e(``,!0)])],8,T))),128))])]))]),Q.canManage&&Q.required.length?(n(),f(`section`,j,[p(`h2`,M,c(u.$t(`modules.required_title`)),1),p(`p`,N,c(u.$t(`modules.required_hint`)),1),p(`ul`,P,[(n(!0),f(d,null,i(Q.required,t=>(n(),f(`li`,{key:t.name,"data-required":t.name,class:`px-4 py-3`},[p(`div`,F,c(t.label),1),t.description?(n(),f(`div`,I,c(t.description),1)):e(``,!0),p(`code`,L,c($(t.name)),1)],8,ne))),128))])])):e(``,!0),Q.canManage?(n(),f(`section`,R,[p(`h2`,z,c(u.$t(`modules.catalogue_title`)),1),p(`p`,B,c(u.$t(`modules.catalogue_hint`)),1),t(ee(l),{data:`catalogue`},{fallback:s(()=>[p(`p`,V,c(u.$t(`modules.catalogue_loading`)),1)]),default:s(()=>[Q.catalogue.packages===null?(n(),f(`p`,H,c(u.$t(`modules.catalogue_unavailable`)),1)):Q.catalogue.packages.length===0?(n(),f(`p`,U,c(u.$t(`modules.catalogue_empty`)),1)):(n(),f(`ul`,W,[(n(!0),f(d,null,i(Q.catalogue.packages,t=>(n(),f(`li`,{key:t.name,"data-package":t.name,"data-status":t.status,class:`px-4 py-3`},[p(`div`,K,[p(`a`,{href:t.url,target:`_blank`,rel:`noopener`,class:`font-mono text-sm font-medium text-fg hover:underline`},c(t.name),9,q),t.status===`available`?e(``,!0):(n(),f(`span`,J,c(u.$t(`modules.status_${t.status}`)),1)),p(`span`,Y,c(u.$t(`modules.downloads`,{count:t.downloads})),1)]),t.description?(n(),f(`div`,X,c(t.description),1)):e(``,!0),t.status===`available`||t.status===`required`?(n(),f(d,{key:1},[t.status===`available`?(n(),f(`code`,Z,`composer require `+c(t.name),1)):e(``,!0),p(`code`,re,c($(t.name)),1)],64)):e(``,!0)],8,G))),128))]))]),_:1})])):e(``,!0)]),_:1},8,[`title`]))}};export{Q as default};
\ No newline at end of file
+import{C as e,E as t,I as n,Q as r,R as i,S as a,T as o,W as s,Z as ee,et as c,n as l,s as u,v as d,w as f,x as p}from"./dist-MY__znoP.js";import{t as te}from"./AdminLayout--RXJFj9t.js";import{t as m}from"./AdminButton-Bx141Bs3.js";var h={class:`mb-6`},g={"data-page-title":`admin.modules`,class:`text-2xl font-bold text-fg`},_={class:`mt-1 text-sm text-muted`},v={class:`bg-surface rounded-lg shadow overflow-hidden`},y={key:0,class:`p-6 text-sm text-muted`},b={key:1,class:`min-w-full text-sm`},x={class:`bg-surface-alt`},S={class:`px-4 py-2 text-left font-medium text-fg`},C={class:`px-4 py-2 text-left font-medium text-fg`},w={class:`divide-y divide-line`},T=[`data-module`,`data-parent`,`data-enabled`],E={key:0,"aria-hidden":`true`,class:`mr-1 text-muted`},D={key:1,class:`ml-2 rounded bg-surface-alt px-1.5 py-0.5 text-xs font-normal text-muted`},O={key:0,class:`text-muted`},k={class:`px-4 py-2 font-mono text-xs text-muted`},A={class:`px-4 py-2 text-right whitespace-nowrap space-x-2`},j={key:0,"data-section":`required`,class:`mt-8`},M={class:`text-lg font-semibold text-fg`},N={class:`mt-1 text-sm text-muted`},P={class:`mt-3 bg-surface rounded-lg shadow divide-y divide-line text-sm`},ne=[`data-required`],F={class:`font-medium text-fg`},I={key:0,class:`text-muted`},L={class:`mt-1 block font-mono text-xs text-fg select-all`},R={key:1,"data-section":`catalogue`,class:`mt-8`},z={class:`text-lg font-semibold text-fg`},B={class:`mt-1 text-sm text-muted`},V={class:`mt-3 text-sm text-muted`},H={key:0,"data-catalogue":`unavailable`,class:`mt-3 text-sm text-muted`},U={key:1,class:`mt-3 text-sm text-muted`},W={key:2,class:`mt-3 bg-surface rounded-lg shadow divide-y divide-line text-sm`},G=[`data-package`,`data-status`],K={class:`flex flex-wrap items-baseline gap-x-3`},q=[`href`],J={key:0,class:`rounded bg-surface-alt px-1.5 py-0.5 text-xs text-muted`},Y={class:`text-xs text-muted`},X={key:0,class:`text-muted`},Z={key:0,class:`mt-1 block font-mono text-xs text-fg select-all`},re={class:`mt-1 block font-mono text-xs text-fg select-all`},Q={__name:`Index`,props:{modules:Array,required:Array,canManage:Boolean,catalogue:Object,title:String},setup(Q){let ie=e=>{u.post(route(e.enabled?`admin.modules.disable`:`admin.modules.enable`,e.key),{},{preserveScroll:!0})},$=e=>`php artisan atrium:module:install ${e}`;return(u,ae)=>(n(),a(te,{title:Q.title},{default:s(()=>[p(`div`,h,[p(`h1`,g,c(Q.title),1),p(`p`,_,c(u.$t(`modules.index_hint`)),1)]),p(`div`,v,[Q.modules.length===0?(n(),f(`p`,y,c(u.$t(`modules.empty`)),1)):(n(),f(`table`,b,[p(`thead`,x,[p(`tr`,null,[p(`th`,S,c(u.$t(`modules.module`)),1),p(`th`,C,c(u.$t(`modules.package`)),1),ae[0]||=p(`th`,{class:`px-4 py-2`},null,-1)])]),p(`tbody`,w,[(n(!0),f(d,null,i(Q.modules,t=>(n(),f(`tr`,{key:t.name,"data-module":t.name,"data-parent":t.parent,"data-enabled":t.enabled?`true`:`false`},[p(`td`,{class:r([`py-2 pr-4`,t.parent?`pl-10`:`pl-4`])},[p(`div`,{class:r([`font-medium`,t.enabled?`text-fg`:`text-muted`])},[t.parent?(n(),f(`span`,E,`↳`)):e(``,!0),o(c(t.label)+` `,1),t.enabled?e(``,!0):(n(),f(`span`,D,c(u.$t(`modules.status_disabled`)),1))],2),t.description?(n(),f(`div`,O,c(t.description),1)):e(``,!0)],2),p(`td`,k,c(t.name),1),p(`td`,A,[t.settings?(n(),a(m,{key:0,size:`sm`,variant:`outline`,"data-action":`settings`,href:u.route(`admin.modules.settings`,t.key)},{default:s(()=>[o(c(u.$t(`modules.settings`)),1)]),_:1},8,[`href`])):e(``,!0),Q.canManage?(n(),a(m,{key:1,size:`sm`,variant:t.enabled?`secondary`:`success`,"data-action":t.enabled?`disable`:`enable`,onClick:e=>ie(t)},{default:s(()=>[o(c(t.enabled?u.$t(`modules.disable`):u.$t(`modules.enable`)),1)]),_:2},1032,[`variant`,`data-action`,`onClick`])):e(``,!0)])],8,T))),128))])]))]),Q.canManage&&Q.required.length?(n(),f(`section`,j,[p(`h2`,M,c(u.$t(`modules.required_title`)),1),p(`p`,N,c(u.$t(`modules.required_hint`)),1),p(`ul`,P,[(n(!0),f(d,null,i(Q.required,t=>(n(),f(`li`,{key:t.name,"data-required":t.name,class:`px-4 py-3`},[p(`div`,F,c(t.label),1),t.description?(n(),f(`div`,I,c(t.description),1)):e(``,!0),p(`code`,L,c($(t.name)),1)],8,ne))),128))])])):e(``,!0),Q.canManage?(n(),f(`section`,R,[p(`h2`,z,c(u.$t(`modules.catalogue_title`)),1),p(`p`,B,c(u.$t(`modules.catalogue_hint`)),1),t(ee(l),{data:`catalogue`},{fallback:s(()=>[p(`p`,V,c(u.$t(`modules.catalogue_loading`)),1)]),default:s(()=>[Q.catalogue.packages===null?(n(),f(`p`,H,c(u.$t(`modules.catalogue_unavailable`)),1)):Q.catalogue.packages.length===0?(n(),f(`p`,U,c(u.$t(`modules.catalogue_empty`)),1)):(n(),f(`ul`,W,[(n(!0),f(d,null,i(Q.catalogue.packages,t=>(n(),f(`li`,{key:t.name,"data-package":t.name,"data-status":t.status,class:`px-4 py-3`},[p(`div`,K,[p(`a`,{href:t.url,target:`_blank`,rel:`noopener`,class:`font-mono text-sm font-medium text-fg hover:underline`},c(t.name),9,q),t.status===`available`?e(``,!0):(n(),f(`span`,J,c(u.$t(`modules.status_${t.status}`)),1)),p(`span`,Y,c(u.$t(`modules.downloads`,{count:t.downloads})),1)]),t.description?(n(),f(`div`,X,c(t.description),1)):e(``,!0),t.status===`available`||t.status===`required`?(n(),f(d,{key:1},[t.status===`available`?(n(),f(`code`,Z,`composer require `+c(t.name),1)):e(``,!0),p(`code`,re,c($(t.name)),1)],64)):e(``,!0)],8,G))),128))]))]),_:1})])):e(``,!0)]),_:1},8,[`title`]))}};export{Q as default};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/Index-B0DDRHtS.js b/packages/admin/dist/assets/Index-9-V30Hlc.js
similarity index 99%
rename from packages/admin/dist/assets/Index-B0DDRHtS.js
rename to packages/admin/dist/assets/Index-9-V30Hlc.js
index 223ab5a3..65fcb8cf 100644
--- a/packages/admin/dist/assets/Index-B0DDRHtS.js
+++ b/packages/admin/dist/assets/Index-9-V30Hlc.js
@@ -1 +1 @@
-import{C as e,E as t,G as n,H as r,I as i,N as a,Q as o,R as s,S as ee,T as c,W as l,Y as u,b as d,et as f,m as p,o as te,s as m,u as h,v as g,w as _,x as v}from"./dist-MY__znoP.js";import{n as y,r as ne,t as re}from"./AdminLayout-I1QMPYpW.js";import{t as b}from"./AdminButton-Bx141Bs3.js";import{t as x}from"./AdminCard--HubMtUj.js";import{t as S}from"./AdminModal-DNJ_V4iq.js";var ie={class:`mb-6 flex flex-wrap items-start justify-between gap-4`},ae={class:`text-2xl font-bold text-fg`},oe={class:`mt-1 text-sm text-muted`},se={class:`flex flex-wrap gap-2`},ce={key:0,dusk:`backup-running`,role:`status`,class:`mb-6 flex items-center gap-3 p-4 bg-accent-soft text-accent-soft-fg border border-line rounded-lg text-sm`},le={class:`space-y-6`},ue={key:0,class:`p-6 text-sm text-muted`},de={key:1,class:`overflow-x-auto`},fe={dusk:`backups`,class:`min-w-full text-sm`},pe={class:`bg-surface-alt`},me={class:`px-4 py-2 text-left font-medium text-fg`},he={class:`px-4 py-2 text-left font-medium text-fg`},ge={class:`px-4 py-2 text-left font-medium text-fg`},_e={class:`px-4 py-2 text-right font-medium text-fg`},ve={class:`divide-y divide-line`},ye=[`data-backup`],be={class:`px-4 py-2 font-mono text-fg`},xe={class:`px-4 py-2 text-fg`},C={class:`px-4 py-2 text-fg`},w={class:`px-4 py-2 text-right text-fg whitespace-nowrap`},T={class:`px-4 py-2 text-right whitespace-nowrap space-x-2`},E=[`href`],D=[`disabled`,`onClick`],O=[`onClick`],k={class:`grid gap-6 lg:grid-cols-2`},A={class:`space-y-4`},j=[`data-destination`,`dusk`],M={class:`flex flex-wrap items-center gap-2`},Se={class:`font-medium text-fg`},Ce={key:0,class:`mt-1 text-sm text-fg`},we={key:1,class:`mt-1 list-disc pl-5 text-sm text-danger`},Te={class:`grid grid-cols-1 sm:grid-cols-3 gap-x-4 gap-y-3 text-sm`},Ee={class:`font-medium text-fg`},De={class:`sm:col-span-2 text-fg`},Oe={class:`font-medium text-fg`},ke={class:`sm:col-span-2 text-fg break-all`},Ae={class:`font-medium text-fg`},je={class:`sm:col-span-2 text-fg`},Me={class:`font-medium text-fg`},Ne={class:`sm:col-span-2 text-fg`},Pe={key:0},Fe={class:`font-medium text-fg`},Ie={class:`sm:col-span-2 text-fg`},Le={class:`font-medium text-fg`},Re={class:`sm:col-span-2 text-fg`},ze={key:0,class:`p-6 text-sm text-muted`},Be={key:1,class:`overflow-x-auto`},Ve={dusk:`backup-log`,class:`min-w-full text-sm`},He={class:`bg-surface-alt`},Ue={class:`px-4 py-2 text-left font-medium text-fg`},We={class:`px-4 py-2 text-left font-medium text-fg`},Ge={class:`px-4 py-2 text-left font-medium text-fg`},Ke={class:`px-4 py-2 text-left font-medium text-fg`},qe={class:`divide-y divide-line`},Je={class:`px-4 py-2 text-fg whitespace-nowrap`},Ye={class:`px-4 py-2 text-fg`},Xe={class:`px-4 py-2`},Ze={class:`px-4 py-2 text-fg break-words`},Qe={class:`p-6`},$e={class:`text-fg`},et={class:`mt-6 flex justify-end gap-2`},tt={key:0,dusk:`restore-dialog`,class:`p-6 space-y-5 text-sm`},nt={class:`text-fg`},rt={class:`flex flex-wrap items-end gap-3`},it={class:`flex-1 min-w-48`},at={for:`backup-password`,class:`block font-medium text-fg`},ot={class:`mt-1 text-xs text-muted`},st={key:0,"data-error":``,class:`text-danger`,role:`alert`},ct={key:0,class:`text-fg`},lt={key:1,class:`overflow-x-auto border border-line rounded-md`},ut={dusk:`plan-databases`,class:`min-w-full`},dt={class:`bg-surface-alt`},ft={class:`px-3 py-2 text-left font-medium text-fg`},pt={class:`px-3 py-2 text-left font-medium text-fg`},mt={class:`px-3 py-2 text-right font-medium text-fg`},ht={class:`px-3 py-2 text-left font-medium text-fg`},gt={class:`divide-y divide-line`},_t={class:`px-3 py-1.5 text-fg`},vt={class:`px-3 py-1.5 text-fg`},yt={class:`px-3 py-1.5 text-right text-fg`},bt={class:`px-3 py-1.5 text-fg break-all`},xt={key:2,class:`overflow-x-auto border border-line rounded-md`},St={dusk:`plan-folders`,class:`min-w-full`},Ct={class:`bg-surface-alt`},N={class:`px-3 py-2 text-left font-medium text-fg`},wt={class:`px-3 py-2 text-right font-medium text-fg`},Tt={class:`px-3 py-2 text-right font-medium text-fg`},Et={class:`px-3 py-2 text-right font-medium text-fg`},Dt={class:`px-3 py-2 text-right font-medium text-fg`},Ot={class:`px-3 py-2 text-right font-medium text-fg`},kt={class:`divide-y divide-line`},At={class:`px-3 py-1.5 text-fg break-all`},jt={class:`px-3 py-1.5 text-right text-fg`},Mt={class:`px-3 py-1.5 text-right text-fg`},Nt={class:`px-3 py-1.5 text-right text-fg`},Pt={class:`px-3 py-1.5 text-right text-fg`},Ft={class:`px-3 py-1.5 text-right text-fg`},It={key:3,class:`list-disc pl-5 bg-warning-soft text-warning-soft-fg border border-line rounded-md p-3 space-y-1`},Lt={class:`space-y-2`},Rt={class:`flex items-center gap-2 text-fg`},zt={class:`flex items-center gap-2 text-fg`},Bt={class:`flex items-center gap-2 text-fg ml-6`},Vt=[`disabled`],Ht={class:`flex items-center gap-2 text-fg`},Ut={class:`p-4 bg-surface text-fg border-2 border-danger rounded-lg`},Wt={class:`font-medium`},Gt={class:`mt-2 list-disc pl-5 space-y-1`},Kt={key:0},qt={key:1},Jt={key:2},Yt={for:`backup-confirm`,class:`block font-medium text-fg`},Xt={key:0,"data-error":``,class:`mt-1 text-danger`},Zt={class:`flex justify-end gap-2`},P={__name:`Index`,props:{backups:Array,running:Object,log:Array,health:Array,settings:Object,labels:Object},setup(P){let F=P,Qt=te(),I=d(()=>String(Qt.props.locale||`en`).replace(`_`,`-`));function L(e,t={}){let n=F.labels?.[e]??e;for(let[e,r]of Object.entries(t))n=n.replaceAll(`:${e}`,String(r??``));return n}function R(e){let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=Number(e)||0,r=0;for(;n>=1024&&r1)})} ${t[r]}`}function z(e){return e?new Date(e).toLocaleString(I.value,{dateStyle:`medium`,timeStyle:`short`}):``}let B=u({backups:F.backups,running:F.running,log:F.log}),V=null;r(()=>[F.backups,F.running,F.log],()=>{B.value={backups:F.backups,running:F.running,log:F.log}});async function H(){let e=await fetch(route(`admin.backups.status`),{headers:y()}).catch(()=>null);if(e?.ok){let t=await e.json(),n=B.value.running&&!t.running;B.value=t,n&&m.reload({only:[`health`,`backups`,`running`,`log`]})}}r(()=>B.value.running,e=>{clearInterval(V),V=e?setInterval(H,3e3):null},{immediate:!0}),a(()=>clearInterval(V));let U=u(!1);function W(e=null){U.value=!0,m.post(route(`admin.backups.store`),{only:e},{preserveScroll:!0,onSuccess:()=>H(),onFinish:()=>{U.value=!1}})}let G=u(null);function $t(){m.delete(route(`admin.backups.destroy`,G.value.id),{preserveScroll:!0,onFinish:()=>{G.value=null}})}let K=u(null),q=u(null),J=u(``),Y=u(!1),X=u({}),Z=u({}),Q=u(!1);function en(e){K.value=e,q.value=null,J.value=``,Z.value={},X.value={password:``,database:!0,files:!0,delete_extra:!1,safety_backup:!0,confirm:``}}async function tn(){Y.value=!0,J.value=``;try{let e=await fetch(route(`admin.backups.plan`,K.value.id),{method:`POST`,headers:y({"Content-Type":`application/json`}),body:JSON.stringify({password:X.value.password||null})});if(!e.ok){J.value=await ne(e,L(`preview_failed`)),q.value=null;return}q.value=(await e.json()).plan}catch{J.value=L(`preview_failed`)}finally{Y.value=!1}}let nn=d(()=>q.value&&(X.value.database||X.value.files)&&X.value.confirm.trim()===K.value?.file);function rn(){Q.value=!0,m.post(route(`admin.backups.restore`,K.value.id),{...X.value,confirm:X.value.confirm.trim(),password:X.value.password||null},{preserveScroll:!0,onSuccess:()=>{K.value=null,H()},onError:e=>{Z.value=e},onFinish:()=>{Q.value=!1}})}let an=d(()=>{let e=F.settings?.schedule||{};return e.frequency===`daily`?L(`schedule_daily`,{time:e.time}):e.frequency===`weekly`?L(`schedule_weekly`,{weekday:F.settings.weekday,time:e.time}):L(`schedule_off`)}),on=d(()=>{let e=F.settings?.retention||{};return L(`retention_text`,{all:e.keep_all_days,daily:e.daily,weekly:e.weekly,monthly:e.monthly,yearly:e.yearly})}),$={ok:`bg-success-soft text-success-soft-fg`,partial:`bg-warning-soft text-warning-soft-fg`,failed:`bg-danger-soft text-danger-soft-fg`};function sn(e){let t=[];return e.trigger&&t.push(L(`trigger_${e.trigger}`)),e.by&&t.push(e.by),e.file&&t.push(e.disk?`${e.file} (${e.disk})`:e.file),e.disks?.length&&t.push(L(`copied_to`,{disks:e.disks.join(`, `)})),e.failed?.length&&t.push(L(`not_copied_to`,{disks:e.failed.map(e=>e.disk??e).join(`, `)})),e.action===`restore`&&e.status===`ok`&&t.push(L(`restored`,{databases:(e.databases||[]).join(`, `)||`—`,files:e.files??0,deleted:e.deleted??0})),e.seconds!==void 0&&t.push(L(`seconds`,{seconds:e.seconds})),e.message&&t.push(e.message),t.join(` · `)}return(r,a)=>(i(),ee(re,{title:L(`menu`)},{default:l(()=>[v(`div`,ie,[v(`div`,null,[v(`h1`,ae,f(P.labels.menu),1),v(`p`,oe,f(L(`subtitle`)),1)]),v(`div`,se,[t(b,{dusk:`backup-now`,loading:U.value,disabled:!!B.value.running,onClick:a[0]||=e=>W()},{default:l(()=>[c(f(L(`back_up_now`)),1)]),_:1},8,[`loading`,`disabled`]),t(b,{variant:`secondary`,disabled:U.value||!!B.value.running,onClick:a[1]||=e=>W(`database`)},{default:l(()=>[c(f(L(`only_database`)),1)]),_:1},8,[`disabled`]),t(b,{variant:`secondary`,disabled:U.value||!!B.value.running,onClick:a[2]||=e=>W(`files`)},{default:l(()=>[c(f(L(`only_files`)),1)]),_:1},8,[`disabled`])])]),B.value.running?(i(),_(`div`,ce,[a[13]||=v(`svg`,{class:`animate-spin h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,"aria-hidden":`true`},[v(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`}),v(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})],-1),c(` `+f(L(B.value.running.action===`restore`?`running_restore`:`running_backup`,{time:z(B.value.running.started_at)})),1)])):e(``,!0),v(`div`,le,[t(x,{title:L(`archives`),"no-padding":``},{default:l(()=>[B.value.backups.length?(i(),_(`div`,de,[v(`table`,fe,[v(`thead`,pe,[v(`tr`,null,[v(`th`,me,f(L(`file`)),1),v(`th`,he,f(L(`destination`)),1),v(`th`,ge,f(L(`date`)),1),v(`th`,_e,f(L(`size`)),1),a[14]||=v(`th`,{class:`px-4 py-2`},null,-1)])]),v(`tbody`,ve,[(i(!0),_(g,null,s(B.value.backups,e=>(i(),_(`tr`,{key:e.id,"data-backup":e.file,dusk:`backup`},[v(`td`,be,f(e.file),1),v(`td`,xe,f(e.disk),1),v(`td`,C,f(z(e.date)),1),v(`td`,w,f(R(e.size)),1),v(`td`,T,[v(`a`,{href:e.download_url,class:`text-accent underline`},f(L(`download`)),9,E),v(`button`,{type:`button`,dusk:`restore`,class:`text-accent underline`,disabled:!!B.value.running,onClick:t=>en(e)},f(L(`restore`)),9,D),v(`button`,{type:`button`,dusk:`delete`,class:`text-danger underline`,onClick:t=>G.value=e},f(L(`delete`)),9,O)])],8,ye))),128))])])])):(i(),_(`p`,ue,f(L(`empty`)),1))]),_:1},8,[`title`]),v(`div`,k,[t(x,{title:L(`destinations`)},{default:l(()=>[v(`ul`,A,[(i(!0),_(g,null,s(P.health,t=>(i(),_(`li`,{key:t.disk,"data-destination":t.disk,dusk:`destination-${t.disk}`},[v(`div`,M,[v(`span`,Se,f(t.disk),1),v(`span`,{class:o([`px-2 py-0.5 rounded text-xs font-medium`,!t.reachable||!t.healthy?$.failed:$.ok])},f(t.reachable?t.healthy?L(`healthy`):L(`unhealthy`):L(`unreachable`)),3)]),t.reachable?(i(),_(`p`,Ce,f(L(`stored`,{count:t.count,size:R(t.used)}))+` · `+f(t.newest?L(`newest`,{date:z(t.newest)}):L(`no_archive`)),1)):e(``,!0),t.problems.length?(i(),_(`ul`,we,[(i(!0),_(g,null,s(t.problems,e=>(i(),_(`li`,{key:e},f(e),1))),128))])):e(``,!0)],8,j))),128))])]),_:1},8,[`title`]),t(x,{title:L(`settings`),subtitle:L(`settings_note`)},{default:l(()=>[v(`dl`,Te,[v(`dt`,Ee,f(L(`databases`)),1),v(`dd`,De,f(P.settings.databases.map(e=>`${e.connection} (${e.driver})`).join(`, `)||L(`nothing`)),1),v(`dt`,Oe,f(L(`folders`)),1),v(`dd`,ke,f(P.settings.folders.join(`, `)||L(`nothing`)),1),v(`dt`,Ae,f(L(`destinations`)),1),v(`dd`,je,f(P.settings.destinations.join(`, `)),1),v(`dt`,Me,f(L(`schedule`)),1),v(`dd`,Ne,[c(f(an.value),1),P.settings.queue?(i(),_(`span`,Pe,`. `+f(L(`queue`,{queue:P.settings.queue})),1)):e(``,!0)]),v(`dt`,Fe,f(L(`retention`)),1),v(`dd`,Ie,f(on.value),1),v(`dt`,Le,f(L(`encryption`)),1),v(`dd`,Re,f(P.settings.encrypted?L(`encrypted`):L(`not_encrypted`)),1)])]),_:1},8,[`title`,`subtitle`])]),t(x,{title:L(`log`),"no-padding":``},{default:l(()=>[B.value.log.length?(i(),_(`div`,Be,[v(`table`,Ve,[v(`thead`,He,[v(`tr`,null,[v(`th`,Ue,f(L(`when`)),1),v(`th`,We,f(L(`what`)),1),v(`th`,Ge,f(L(`result`)),1),v(`th`,Ke,f(L(`details`)),1)])]),v(`tbody`,qe,[(i(!0),_(g,null,s(B.value.log,(e,t)=>(i(),_(`tr`,{key:t},[v(`td`,Je,f(z(e.at)),1),v(`td`,Ye,f(L(`action_${e.action}`)),1),v(`td`,Xe,[v(`span`,{class:o([`px-2 py-0.5 rounded text-xs font-medium`,$[e.status]||$.failed])},f(L(`status_${e.status}`)),3)]),v(`td`,Ze,f(sn(e)),1)]))),128))])])])):(i(),_(`p`,ze,f(L(`log_empty`)),1))]),_:1},8,[`title`])]),t(S,{show:!!G.value,title:L(`delete`),onClose:a[4]||=e=>G.value=null},{default:l(()=>[v(`div`,Qe,[v(`p`,$e,f(G.value?L(`delete_confirm`,{file:G.value.file,disk:G.value.disk}):``),1),v(`div`,et,[t(b,{variant:`secondary`,onClick:a[3]||=e=>G.value=null},{default:l(()=>[c(f(L(`cancel`)),1)]),_:1}),t(b,{dusk:`confirm-delete`,variant:`danger`,onClick:$t},{default:l(()=>[c(f(L(`delete`)),1)]),_:1})])])]),_:1},8,[`show`,`title`]),t(S,{show:!!K.value,"max-width":`2xl`,title:K.value?L(`restore_title`,{file:K.value.file}):``,onClose:a[12]||=e=>K.value=null},{default:l(()=>[K.value?(i(),_(`div`,tt,[v(`p`,nt,f(L(`restore_intro`)),1),v(`div`,rt,[v(`div`,it,[v(`label`,at,f(L(`password`)),1),n(v(`input`,{id:`backup-password`,"onUpdate:modelValue":a[5]||=e=>X.value.password=e,type:`password`,autocomplete:`off`,class:`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus`},null,512),[[p,X.value.password]]),v(`p`,ot,f(L(`password_hint`)),1)]),t(b,{dusk:`preview`,variant:`secondary`,loading:Y.value,onClick:tn},{default:l(()=>[c(f(L(`preview`)),1)]),_:1},8,[`loading`])]),J.value?(i(),_(`p`,st,f(J.value),1)):e(``,!0),q.value?(i(),_(g,{key:1},[q.value.created_at?(i(),_(`p`,ct,f(L(`made`,{date:z(q.value.created_at)})),1)):e(``,!0),q.value.databases.length?(i(),_(`div`,lt,[v(`table`,ut,[v(`thead`,dt,[v(`tr`,null,[v(`th`,ft,f(L(`connection`)),1),v(`th`,pt,f(L(`driver`)),1),v(`th`,mt,f(L(`dump`)),1),v(`th`,ht,f(L(`replaces`)),1)])]),v(`tbody`,gt,[(i(!0),_(g,null,s(q.value.databases,e=>(i(),_(`tr`,{key:e.connection},[v(`td`,_t,f(e.connection),1),v(`td`,vt,f(e.driver),1),v(`td`,yt,f(R(e.size)),1),v(`td`,bt,f(e.restorable?e.target:L(`skipped`)),1)]))),128))])])])):e(``,!0),q.value.folders.length?(i(),_(`div`,xt,[v(`table`,St,[v(`thead`,Ct,[v(`tr`,null,[v(`th`,N,f(L(`into`)),1),v(`th`,wt,f(L(`files`)),1),v(`th`,Tt,f(L(`new`)),1),v(`th`,Et,f(L(`changed`)),1),v(`th`,Dt,f(L(`unchanged`)),1),v(`th`,Ot,f(L(`extra`)),1)])]),v(`tbody`,kt,[(i(!0),_(g,null,s(q.value.folders,e=>(i(),_(`tr`,{key:e.prefix},[v(`td`,At,f(e.target),1),v(`td`,jt,f(e.files),1),v(`td`,Mt,f(e.new),1),v(`td`,Nt,f(e.changed),1),v(`td`,Pt,f(e.unchanged),1),v(`td`,Ft,f(e.extra),1)]))),128))])])])):e(``,!0),q.value.warnings.length?(i(),_(`ul`,It,[(i(!0),_(g,null,s(q.value.warnings,e=>(i(),_(`li`,{key:e,class:`ml-3`},f(e),1))),128))])):e(``,!0),v(`fieldset`,Lt,[v(`label`,Rt,[n(v(`input`,{"onUpdate:modelValue":a[6]||=e=>X.value.database=e,type:`checkbox`,class:`h-4 w-4 text-accent border-field rounded focus:ring-focus`},null,512),[[h,X.value.database]]),c(` `+f(L(`restore_database`)),1)]),v(`label`,zt,[n(v(`input`,{"onUpdate:modelValue":a[7]||=e=>X.value.files=e,type:`checkbox`,class:`h-4 w-4 text-accent border-field rounded focus:ring-focus`},null,512),[[h,X.value.files]]),c(` `+f(L(`restore_files`)),1)]),v(`label`,Bt,[n(v(`input`,{"onUpdate:modelValue":a[8]||=e=>X.value.delete_extra=e,type:`checkbox`,class:`h-4 w-4 text-accent border-field rounded focus:ring-focus`,disabled:!X.value.files},null,8,Vt),[[h,X.value.delete_extra]]),c(` `+f(L(`delete_extra`)),1)]),v(`label`,Ht,[n(v(`input`,{"onUpdate:modelValue":a[9]||=e=>X.value.safety_backup=e,type:`checkbox`,class:`h-4 w-4 text-accent border-field rounded focus:ring-focus`},null,512),[[h,X.value.safety_backup]]),c(` `+f(L(`safety_backup`)),1)])]),v(`div`,Ut,[v(`p`,Wt,f(L(`risks`)),1),v(`ul`,Gt,[X.value.database?(i(),_(`li`,Kt,f(L(`risk_database`,{date:z(q.value.created_at||K.value.date)})),1)):e(``,!0),X.value.database?(i(),_(`li`,qt,f(L(`risk_sessions`)),1)):e(``,!0),X.value.files?(i(),_(`li`,Jt,f(L(`risk_files`)),1)):e(``,!0),v(`li`,null,f(L(`risk_site`)),1)])]),v(`div`,null,[v(`label`,Yt,f(L(`confirm`,{file:K.value.file})),1),n(v(`input`,{id:`backup-confirm`,dusk:`restore-confirm`,"onUpdate:modelValue":a[10]||=e=>X.value.confirm=e,type:`text`,autocomplete:`off`,spellcheck:`false`,class:`mt-1 block w-full px-3 py-2 font-mono border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus`},null,512),[[p,X.value.confirm]]),Z.value.confirm?(i(),_(`p`,Xt,f(Z.value.confirm),1)):e(``,!0)])],64)):e(``,!0),v(`div`,Zt,[t(b,{dusk:`cancel-restore`,variant:`secondary`,onClick:a[11]||=e=>K.value=null},{default:l(()=>[c(f(L(`cancel`)),1)]),_:1}),t(b,{dusk:`start-restore`,variant:`danger`,loading:Q.value,disabled:!nn.value,onClick:rn},{default:l(()=>[c(f(L(`start_restore`)),1)]),_:1},8,[`loading`,`disabled`])])])):e(``,!0)]),_:1},8,[`show`,`title`])]),_:1},8,[`title`]))}};export{P as default};
\ No newline at end of file
+import{C as e,E as t,G as n,H as r,I as i,N as a,Q as o,R as s,S as ee,T as c,W as l,Y as u,b as d,et as f,m as p,o as te,s as m,u as h,v as g,w as _,x as v}from"./dist-MY__znoP.js";import{n as y,r as ne,t as re}from"./AdminLayout--RXJFj9t.js";import{t as b}from"./AdminButton-Bx141Bs3.js";import{t as x}from"./AdminCard--HubMtUj.js";import{t as S}from"./AdminModal-DNJ_V4iq.js";var ie={class:`mb-6 flex flex-wrap items-start justify-between gap-4`},ae={class:`text-2xl font-bold text-fg`},oe={class:`mt-1 text-sm text-muted`},se={class:`flex flex-wrap gap-2`},ce={key:0,dusk:`backup-running`,role:`status`,class:`mb-6 flex items-center gap-3 p-4 bg-accent-soft text-accent-soft-fg border border-line rounded-lg text-sm`},le={class:`space-y-6`},ue={key:0,class:`p-6 text-sm text-muted`},de={key:1,class:`overflow-x-auto`},fe={dusk:`backups`,class:`min-w-full text-sm`},pe={class:`bg-surface-alt`},me={class:`px-4 py-2 text-left font-medium text-fg`},he={class:`px-4 py-2 text-left font-medium text-fg`},ge={class:`px-4 py-2 text-left font-medium text-fg`},_e={class:`px-4 py-2 text-right font-medium text-fg`},ve={class:`divide-y divide-line`},ye=[`data-backup`],be={class:`px-4 py-2 font-mono text-fg`},xe={class:`px-4 py-2 text-fg`},C={class:`px-4 py-2 text-fg`},w={class:`px-4 py-2 text-right text-fg whitespace-nowrap`},T={class:`px-4 py-2 text-right whitespace-nowrap space-x-2`},E=[`href`],D=[`disabled`,`onClick`],O=[`onClick`],k={class:`grid gap-6 lg:grid-cols-2`},A={class:`space-y-4`},j=[`data-destination`,`dusk`],M={class:`flex flex-wrap items-center gap-2`},Se={class:`font-medium text-fg`},Ce={key:0,class:`mt-1 text-sm text-fg`},we={key:1,class:`mt-1 list-disc pl-5 text-sm text-danger`},Te={class:`grid grid-cols-1 sm:grid-cols-3 gap-x-4 gap-y-3 text-sm`},Ee={class:`font-medium text-fg`},De={class:`sm:col-span-2 text-fg`},Oe={class:`font-medium text-fg`},ke={class:`sm:col-span-2 text-fg break-all`},Ae={class:`font-medium text-fg`},je={class:`sm:col-span-2 text-fg`},Me={class:`font-medium text-fg`},Ne={class:`sm:col-span-2 text-fg`},Pe={key:0},Fe={class:`font-medium text-fg`},Ie={class:`sm:col-span-2 text-fg`},Le={class:`font-medium text-fg`},Re={class:`sm:col-span-2 text-fg`},ze={key:0,class:`p-6 text-sm text-muted`},Be={key:1,class:`overflow-x-auto`},Ve={dusk:`backup-log`,class:`min-w-full text-sm`},He={class:`bg-surface-alt`},Ue={class:`px-4 py-2 text-left font-medium text-fg`},We={class:`px-4 py-2 text-left font-medium text-fg`},Ge={class:`px-4 py-2 text-left font-medium text-fg`},Ke={class:`px-4 py-2 text-left font-medium text-fg`},qe={class:`divide-y divide-line`},Je={class:`px-4 py-2 text-fg whitespace-nowrap`},Ye={class:`px-4 py-2 text-fg`},Xe={class:`px-4 py-2`},Ze={class:`px-4 py-2 text-fg break-words`},Qe={class:`p-6`},$e={class:`text-fg`},et={class:`mt-6 flex justify-end gap-2`},tt={key:0,dusk:`restore-dialog`,class:`p-6 space-y-5 text-sm`},nt={class:`text-fg`},rt={class:`flex flex-wrap items-end gap-3`},it={class:`flex-1 min-w-48`},at={for:`backup-password`,class:`block font-medium text-fg`},ot={class:`mt-1 text-xs text-muted`},st={key:0,"data-error":``,class:`text-danger`,role:`alert`},ct={key:0,class:`text-fg`},lt={key:1,class:`overflow-x-auto border border-line rounded-md`},ut={dusk:`plan-databases`,class:`min-w-full`},dt={class:`bg-surface-alt`},ft={class:`px-3 py-2 text-left font-medium text-fg`},pt={class:`px-3 py-2 text-left font-medium text-fg`},mt={class:`px-3 py-2 text-right font-medium text-fg`},ht={class:`px-3 py-2 text-left font-medium text-fg`},gt={class:`divide-y divide-line`},_t={class:`px-3 py-1.5 text-fg`},vt={class:`px-3 py-1.5 text-fg`},yt={class:`px-3 py-1.5 text-right text-fg`},bt={class:`px-3 py-1.5 text-fg break-all`},xt={key:2,class:`overflow-x-auto border border-line rounded-md`},St={dusk:`plan-folders`,class:`min-w-full`},Ct={class:`bg-surface-alt`},N={class:`px-3 py-2 text-left font-medium text-fg`},wt={class:`px-3 py-2 text-right font-medium text-fg`},Tt={class:`px-3 py-2 text-right font-medium text-fg`},Et={class:`px-3 py-2 text-right font-medium text-fg`},Dt={class:`px-3 py-2 text-right font-medium text-fg`},Ot={class:`px-3 py-2 text-right font-medium text-fg`},kt={class:`divide-y divide-line`},At={class:`px-3 py-1.5 text-fg break-all`},jt={class:`px-3 py-1.5 text-right text-fg`},Mt={class:`px-3 py-1.5 text-right text-fg`},Nt={class:`px-3 py-1.5 text-right text-fg`},Pt={class:`px-3 py-1.5 text-right text-fg`},Ft={class:`px-3 py-1.5 text-right text-fg`},It={key:3,class:`list-disc pl-5 bg-warning-soft text-warning-soft-fg border border-line rounded-md p-3 space-y-1`},Lt={class:`space-y-2`},Rt={class:`flex items-center gap-2 text-fg`},zt={class:`flex items-center gap-2 text-fg`},Bt={class:`flex items-center gap-2 text-fg ml-6`},Vt=[`disabled`],Ht={class:`flex items-center gap-2 text-fg`},Ut={class:`p-4 bg-surface text-fg border-2 border-danger rounded-lg`},Wt={class:`font-medium`},Gt={class:`mt-2 list-disc pl-5 space-y-1`},Kt={key:0},qt={key:1},Jt={key:2},Yt={for:`backup-confirm`,class:`block font-medium text-fg`},Xt={key:0,"data-error":``,class:`mt-1 text-danger`},Zt={class:`flex justify-end gap-2`},P={__name:`Index`,props:{backups:Array,running:Object,log:Array,health:Array,settings:Object,labels:Object},setup(P){let F=P,Qt=te(),I=d(()=>String(Qt.props.locale||`en`).replace(`_`,`-`));function L(e,t={}){let n=F.labels?.[e]??e;for(let[e,r]of Object.entries(t))n=n.replaceAll(`:${e}`,String(r??``));return n}function R(e){let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=Number(e)||0,r=0;for(;n>=1024&&r1)})} ${t[r]}`}function z(e){return e?new Date(e).toLocaleString(I.value,{dateStyle:`medium`,timeStyle:`short`}):``}let B=u({backups:F.backups,running:F.running,log:F.log}),V=null;r(()=>[F.backups,F.running,F.log],()=>{B.value={backups:F.backups,running:F.running,log:F.log}});async function H(){let e=await fetch(route(`admin.backups.status`),{headers:y()}).catch(()=>null);if(e?.ok){let t=await e.json(),n=B.value.running&&!t.running;B.value=t,n&&m.reload({only:[`health`,`backups`,`running`,`log`]})}}r(()=>B.value.running,e=>{clearInterval(V),V=e?setInterval(H,3e3):null},{immediate:!0}),a(()=>clearInterval(V));let U=u(!1);function W(e=null){U.value=!0,m.post(route(`admin.backups.store`),{only:e},{preserveScroll:!0,onSuccess:()=>H(),onFinish:()=>{U.value=!1}})}let G=u(null);function $t(){m.delete(route(`admin.backups.destroy`,G.value.id),{preserveScroll:!0,onFinish:()=>{G.value=null}})}let K=u(null),q=u(null),J=u(``),Y=u(!1),X=u({}),Z=u({}),Q=u(!1);function en(e){K.value=e,q.value=null,J.value=``,Z.value={},X.value={password:``,database:!0,files:!0,delete_extra:!1,safety_backup:!0,confirm:``}}async function tn(){Y.value=!0,J.value=``;try{let e=await fetch(route(`admin.backups.plan`,K.value.id),{method:`POST`,headers:y({"Content-Type":`application/json`}),body:JSON.stringify({password:X.value.password||null})});if(!e.ok){J.value=await ne(e,L(`preview_failed`)),q.value=null;return}q.value=(await e.json()).plan}catch{J.value=L(`preview_failed`)}finally{Y.value=!1}}let nn=d(()=>q.value&&(X.value.database||X.value.files)&&X.value.confirm.trim()===K.value?.file);function rn(){Q.value=!0,m.post(route(`admin.backups.restore`,K.value.id),{...X.value,confirm:X.value.confirm.trim(),password:X.value.password||null},{preserveScroll:!0,onSuccess:()=>{K.value=null,H()},onError:e=>{Z.value=e},onFinish:()=>{Q.value=!1}})}let an=d(()=>{let e=F.settings?.schedule||{};return e.frequency===`daily`?L(`schedule_daily`,{time:e.time}):e.frequency===`weekly`?L(`schedule_weekly`,{weekday:F.settings.weekday,time:e.time}):L(`schedule_off`)}),on=d(()=>{let e=F.settings?.retention||{};return L(`retention_text`,{all:e.keep_all_days,daily:e.daily,weekly:e.weekly,monthly:e.monthly,yearly:e.yearly})}),$={ok:`bg-success-soft text-success-soft-fg`,partial:`bg-warning-soft text-warning-soft-fg`,failed:`bg-danger-soft text-danger-soft-fg`};function sn(e){let t=[];return e.trigger&&t.push(L(`trigger_${e.trigger}`)),e.by&&t.push(e.by),e.file&&t.push(e.disk?`${e.file} (${e.disk})`:e.file),e.disks?.length&&t.push(L(`copied_to`,{disks:e.disks.join(`, `)})),e.failed?.length&&t.push(L(`not_copied_to`,{disks:e.failed.map(e=>e.disk??e).join(`, `)})),e.action===`restore`&&e.status===`ok`&&t.push(L(`restored`,{databases:(e.databases||[]).join(`, `)||`—`,files:e.files??0,deleted:e.deleted??0})),e.seconds!==void 0&&t.push(L(`seconds`,{seconds:e.seconds})),e.message&&t.push(e.message),t.join(` · `)}return(r,a)=>(i(),ee(re,{title:L(`menu`)},{default:l(()=>[v(`div`,ie,[v(`div`,null,[v(`h1`,ae,f(P.labels.menu),1),v(`p`,oe,f(L(`subtitle`)),1)]),v(`div`,se,[t(b,{dusk:`backup-now`,loading:U.value,disabled:!!B.value.running,onClick:a[0]||=e=>W()},{default:l(()=>[c(f(L(`back_up_now`)),1)]),_:1},8,[`loading`,`disabled`]),t(b,{variant:`secondary`,disabled:U.value||!!B.value.running,onClick:a[1]||=e=>W(`database`)},{default:l(()=>[c(f(L(`only_database`)),1)]),_:1},8,[`disabled`]),t(b,{variant:`secondary`,disabled:U.value||!!B.value.running,onClick:a[2]||=e=>W(`files`)},{default:l(()=>[c(f(L(`only_files`)),1)]),_:1},8,[`disabled`])])]),B.value.running?(i(),_(`div`,ce,[a[13]||=v(`svg`,{class:`animate-spin h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,"aria-hidden":`true`},[v(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`}),v(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})],-1),c(` `+f(L(B.value.running.action===`restore`?`running_restore`:`running_backup`,{time:z(B.value.running.started_at)})),1)])):e(``,!0),v(`div`,le,[t(x,{title:L(`archives`),"no-padding":``},{default:l(()=>[B.value.backups.length?(i(),_(`div`,de,[v(`table`,fe,[v(`thead`,pe,[v(`tr`,null,[v(`th`,me,f(L(`file`)),1),v(`th`,he,f(L(`destination`)),1),v(`th`,ge,f(L(`date`)),1),v(`th`,_e,f(L(`size`)),1),a[14]||=v(`th`,{class:`px-4 py-2`},null,-1)])]),v(`tbody`,ve,[(i(!0),_(g,null,s(B.value.backups,e=>(i(),_(`tr`,{key:e.id,"data-backup":e.file,dusk:`backup`},[v(`td`,be,f(e.file),1),v(`td`,xe,f(e.disk),1),v(`td`,C,f(z(e.date)),1),v(`td`,w,f(R(e.size)),1),v(`td`,T,[v(`a`,{href:e.download_url,class:`text-accent underline`},f(L(`download`)),9,E),v(`button`,{type:`button`,dusk:`restore`,class:`text-accent underline`,disabled:!!B.value.running,onClick:t=>en(e)},f(L(`restore`)),9,D),v(`button`,{type:`button`,dusk:`delete`,class:`text-danger underline`,onClick:t=>G.value=e},f(L(`delete`)),9,O)])],8,ye))),128))])])])):(i(),_(`p`,ue,f(L(`empty`)),1))]),_:1},8,[`title`]),v(`div`,k,[t(x,{title:L(`destinations`)},{default:l(()=>[v(`ul`,A,[(i(!0),_(g,null,s(P.health,t=>(i(),_(`li`,{key:t.disk,"data-destination":t.disk,dusk:`destination-${t.disk}`},[v(`div`,M,[v(`span`,Se,f(t.disk),1),v(`span`,{class:o([`px-2 py-0.5 rounded text-xs font-medium`,!t.reachable||!t.healthy?$.failed:$.ok])},f(t.reachable?t.healthy?L(`healthy`):L(`unhealthy`):L(`unreachable`)),3)]),t.reachable?(i(),_(`p`,Ce,f(L(`stored`,{count:t.count,size:R(t.used)}))+` · `+f(t.newest?L(`newest`,{date:z(t.newest)}):L(`no_archive`)),1)):e(``,!0),t.problems.length?(i(),_(`ul`,we,[(i(!0),_(g,null,s(t.problems,e=>(i(),_(`li`,{key:e},f(e),1))),128))])):e(``,!0)],8,j))),128))])]),_:1},8,[`title`]),t(x,{title:L(`settings`),subtitle:L(`settings_note`)},{default:l(()=>[v(`dl`,Te,[v(`dt`,Ee,f(L(`databases`)),1),v(`dd`,De,f(P.settings.databases.map(e=>`${e.connection} (${e.driver})`).join(`, `)||L(`nothing`)),1),v(`dt`,Oe,f(L(`folders`)),1),v(`dd`,ke,f(P.settings.folders.join(`, `)||L(`nothing`)),1),v(`dt`,Ae,f(L(`destinations`)),1),v(`dd`,je,f(P.settings.destinations.join(`, `)),1),v(`dt`,Me,f(L(`schedule`)),1),v(`dd`,Ne,[c(f(an.value),1),P.settings.queue?(i(),_(`span`,Pe,`. `+f(L(`queue`,{queue:P.settings.queue})),1)):e(``,!0)]),v(`dt`,Fe,f(L(`retention`)),1),v(`dd`,Ie,f(on.value),1),v(`dt`,Le,f(L(`encryption`)),1),v(`dd`,Re,f(P.settings.encrypted?L(`encrypted`):L(`not_encrypted`)),1)])]),_:1},8,[`title`,`subtitle`])]),t(x,{title:L(`log`),"no-padding":``},{default:l(()=>[B.value.log.length?(i(),_(`div`,Be,[v(`table`,Ve,[v(`thead`,He,[v(`tr`,null,[v(`th`,Ue,f(L(`when`)),1),v(`th`,We,f(L(`what`)),1),v(`th`,Ge,f(L(`result`)),1),v(`th`,Ke,f(L(`details`)),1)])]),v(`tbody`,qe,[(i(!0),_(g,null,s(B.value.log,(e,t)=>(i(),_(`tr`,{key:t},[v(`td`,Je,f(z(e.at)),1),v(`td`,Ye,f(L(`action_${e.action}`)),1),v(`td`,Xe,[v(`span`,{class:o([`px-2 py-0.5 rounded text-xs font-medium`,$[e.status]||$.failed])},f(L(`status_${e.status}`)),3)]),v(`td`,Ze,f(sn(e)),1)]))),128))])])])):(i(),_(`p`,ze,f(L(`log_empty`)),1))]),_:1},8,[`title`])]),t(S,{show:!!G.value,title:L(`delete`),onClose:a[4]||=e=>G.value=null},{default:l(()=>[v(`div`,Qe,[v(`p`,$e,f(G.value?L(`delete_confirm`,{file:G.value.file,disk:G.value.disk}):``),1),v(`div`,et,[t(b,{variant:`secondary`,onClick:a[3]||=e=>G.value=null},{default:l(()=>[c(f(L(`cancel`)),1)]),_:1}),t(b,{dusk:`confirm-delete`,variant:`danger`,onClick:$t},{default:l(()=>[c(f(L(`delete`)),1)]),_:1})])])]),_:1},8,[`show`,`title`]),t(S,{show:!!K.value,"max-width":`2xl`,title:K.value?L(`restore_title`,{file:K.value.file}):``,onClose:a[12]||=e=>K.value=null},{default:l(()=>[K.value?(i(),_(`div`,tt,[v(`p`,nt,f(L(`restore_intro`)),1),v(`div`,rt,[v(`div`,it,[v(`label`,at,f(L(`password`)),1),n(v(`input`,{id:`backup-password`,"onUpdate:modelValue":a[5]||=e=>X.value.password=e,type:`password`,autocomplete:`off`,class:`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus`},null,512),[[p,X.value.password]]),v(`p`,ot,f(L(`password_hint`)),1)]),t(b,{dusk:`preview`,variant:`secondary`,loading:Y.value,onClick:tn},{default:l(()=>[c(f(L(`preview`)),1)]),_:1},8,[`loading`])]),J.value?(i(),_(`p`,st,f(J.value),1)):e(``,!0),q.value?(i(),_(g,{key:1},[q.value.created_at?(i(),_(`p`,ct,f(L(`made`,{date:z(q.value.created_at)})),1)):e(``,!0),q.value.databases.length?(i(),_(`div`,lt,[v(`table`,ut,[v(`thead`,dt,[v(`tr`,null,[v(`th`,ft,f(L(`connection`)),1),v(`th`,pt,f(L(`driver`)),1),v(`th`,mt,f(L(`dump`)),1),v(`th`,ht,f(L(`replaces`)),1)])]),v(`tbody`,gt,[(i(!0),_(g,null,s(q.value.databases,e=>(i(),_(`tr`,{key:e.connection},[v(`td`,_t,f(e.connection),1),v(`td`,vt,f(e.driver),1),v(`td`,yt,f(R(e.size)),1),v(`td`,bt,f(e.restorable?e.target:L(`skipped`)),1)]))),128))])])])):e(``,!0),q.value.folders.length?(i(),_(`div`,xt,[v(`table`,St,[v(`thead`,Ct,[v(`tr`,null,[v(`th`,N,f(L(`into`)),1),v(`th`,wt,f(L(`files`)),1),v(`th`,Tt,f(L(`new`)),1),v(`th`,Et,f(L(`changed`)),1),v(`th`,Dt,f(L(`unchanged`)),1),v(`th`,Ot,f(L(`extra`)),1)])]),v(`tbody`,kt,[(i(!0),_(g,null,s(q.value.folders,e=>(i(),_(`tr`,{key:e.prefix},[v(`td`,At,f(e.target),1),v(`td`,jt,f(e.files),1),v(`td`,Mt,f(e.new),1),v(`td`,Nt,f(e.changed),1),v(`td`,Pt,f(e.unchanged),1),v(`td`,Ft,f(e.extra),1)]))),128))])])])):e(``,!0),q.value.warnings.length?(i(),_(`ul`,It,[(i(!0),_(g,null,s(q.value.warnings,e=>(i(),_(`li`,{key:e,class:`ml-3`},f(e),1))),128))])):e(``,!0),v(`fieldset`,Lt,[v(`label`,Rt,[n(v(`input`,{"onUpdate:modelValue":a[6]||=e=>X.value.database=e,type:`checkbox`,class:`h-4 w-4 text-accent border-field rounded focus:ring-focus`},null,512),[[h,X.value.database]]),c(` `+f(L(`restore_database`)),1)]),v(`label`,zt,[n(v(`input`,{"onUpdate:modelValue":a[7]||=e=>X.value.files=e,type:`checkbox`,class:`h-4 w-4 text-accent border-field rounded focus:ring-focus`},null,512),[[h,X.value.files]]),c(` `+f(L(`restore_files`)),1)]),v(`label`,Bt,[n(v(`input`,{"onUpdate:modelValue":a[8]||=e=>X.value.delete_extra=e,type:`checkbox`,class:`h-4 w-4 text-accent border-field rounded focus:ring-focus`,disabled:!X.value.files},null,8,Vt),[[h,X.value.delete_extra]]),c(` `+f(L(`delete_extra`)),1)]),v(`label`,Ht,[n(v(`input`,{"onUpdate:modelValue":a[9]||=e=>X.value.safety_backup=e,type:`checkbox`,class:`h-4 w-4 text-accent border-field rounded focus:ring-focus`},null,512),[[h,X.value.safety_backup]]),c(` `+f(L(`safety_backup`)),1)])]),v(`div`,Ut,[v(`p`,Wt,f(L(`risks`)),1),v(`ul`,Gt,[X.value.database?(i(),_(`li`,Kt,f(L(`risk_database`,{date:z(q.value.created_at||K.value.date)})),1)):e(``,!0),X.value.database?(i(),_(`li`,qt,f(L(`risk_sessions`)),1)):e(``,!0),X.value.files?(i(),_(`li`,Jt,f(L(`risk_files`)),1)):e(``,!0),v(`li`,null,f(L(`risk_site`)),1)])]),v(`div`,null,[v(`label`,Yt,f(L(`confirm`,{file:K.value.file})),1),n(v(`input`,{id:`backup-confirm`,dusk:`restore-confirm`,"onUpdate:modelValue":a[10]||=e=>X.value.confirm=e,type:`text`,autocomplete:`off`,spellcheck:`false`,class:`mt-1 block w-full px-3 py-2 font-mono border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus`},null,512),[[p,X.value.confirm]]),Z.value.confirm?(i(),_(`p`,Xt,f(Z.value.confirm),1)):e(``,!0)])],64)):e(``,!0),v(`div`,Zt,[t(b,{dusk:`cancel-restore`,variant:`secondary`,onClick:a[11]||=e=>K.value=null},{default:l(()=>[c(f(L(`cancel`)),1)]),_:1}),t(b,{dusk:`start-restore`,variant:`danger`,loading:Q.value,disabled:!nn.value,onClick:rn},{default:l(()=>[c(f(L(`start_restore`)),1)]),_:1},8,[`loading`,`disabled`])])])):e(``,!0)]),_:1},8,[`show`,`title`])]),_:1},8,[`title`]))}};export{P as default};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/Index-BzuT6e6D.js b/packages/admin/dist/assets/Index-C_p9UH4T.js
similarity index 99%
rename from packages/admin/dist/assets/Index-BzuT6e6D.js
rename to packages/admin/dist/assets/Index-C_p9UH4T.js
index d5bac2c2..82fcf859 100644
--- a/packages/admin/dist/assets/Index-BzuT6e6D.js
+++ b/packages/admin/dist/assets/Index-C_p9UH4T.js
@@ -1 +1 @@
-import{C as e,E as t,G as n,I as r,R as i,S as a,T as o,W as s,Y as c,Z as l,_ as ee,a as u,et as d,m as f,s as te,v as p,w as m,x as h}from"./dist-MY__znoP.js";import{t as g}from"./AdminLayout-I1QMPYpW.js";import{n as ne}from"./app-lI4VKCmX.js";import{t as _}from"./AdminButton-Bx141Bs3.js";import{t as v}from"./AdminCard--HubMtUj.js";import{t as re}from"./AdminModal-DNJ_V4iq.js";var ie={class:`space-y-6`},ae={key:0,"data-api-token-plain":``,class:`p-4 bg-warning-soft border-2 border-warning-soft-fg rounded-lg`},oe={class:`font-medium text-fg`},y={class:`mt-3 flex flex-col sm:flex-row gap-2`},b={class:`flex-1 px-3 py-2 bg-surface border border-field rounded font-mono text-sm break-all`},x={class:`space-y-1 text-sm`},S=[`href`],C=[`href`],w={class:`grid gap-4 sm:grid-cols-2`},T={for:`token-name`,class:`block text-sm font-medium text-fg`},E=[`placeholder`],D={key:0,class:`mt-1 text-sm text-danger`},O={for:`token-expires`,class:`block text-sm font-medium text-fg`},k={key:0,class:`mt-1 text-sm text-danger`},A={class:`flex flex-wrap items-center justify-between gap-2`},j={class:`text-sm font-medium text-fg`},M={class:`flex gap-2`},N={key:0,class:`mt-1 text-sm text-danger`},P={class:`mt-2 max-h-96 overflow-y-auto border border-line rounded-md`},F={class:`min-w-full text-sm`},I={class:`bg-surface-alt sticky top-0`},L={class:`px-3 py-2 text-left font-medium text-fg`},R={class:`px-3 py-2 w-24 text-center font-medium text-fg`},z={class:`px-3 py-2 w-24 text-center font-medium text-fg`},B={class:`divide-y divide-line`},V={class:`px-3 py-1.5`},H={class:`ml-1 text-xs text-muted font-mono`},U={class:`px-3 py-1.5 text-center`},W=[`aria-label`,`checked`,`onChange`],G={class:`px-3 py-1.5 text-center`},K=[`aria-label`,`checked`,`onChange`],se={class:`flex justify-end`},ce={key:0,class:`p-6 text-sm text-muted`},le={key:1,class:`overflow-x-auto`},ue={class:`min-w-full text-sm`},de={class:`bg-surface-alt`},fe={class:`px-4 py-2 text-left font-medium text-fg`},pe={class:`px-4 py-2 text-left font-medium text-fg`},me={class:`px-4 py-2 text-left font-medium text-fg`},he={class:`px-4 py-2 text-left font-medium text-fg`},ge={class:`px-4 py-2 text-left font-medium text-fg`},_e={class:`divide-y divide-line`},ve={class:`px-4 py-2 font-medium text-fg`},ye={class:`px-4 py-2 text-fg`},be={class:`cursor-pointer`},xe={class:`mt-1 space-y-0.5`},Se={class:`px-4 py-2 text-fg`},Ce={class:`text-xs text-muted`},we={class:`px-4 py-2 text-fg`},Te={class:`px-4 py-2 text-fg`},Ee={key:0,class:`font-medium`},q={class:`px-4 py-2 text-right`},De={class:`text-muted`},J={__name:`ApiTokensManager`,props:{tokens:{type:Array,required:!0},modules:{type:Array,required:!0},plainToken:{type:String,default:null},docsUrl:{type:String,required:!0},openApiUrl:{type:String,required:!0}},setup(a){let g=a,J=u({name:``,abilities:[],expires_at:``}),Y=c(!1),X=c(null),Z=e=>J.abilities.includes(e),Q=(e,t)=>{let n=`${e}:${t}`,r=new Set(J.abilities);r.has(n)?(r.delete(n),t===`read`&&r.delete(`${e}:write`)):(r.add(n),t===`write`&&r.add(`${e}:read`)),J.abilities=[...r]},$=e=>{let t=new Set(J.abilities);for(let n of g.modules)t.add(`${n.key}:read`),e===`write`&&n.writable&&t.add(`${n.key}:write`);J.abilities=[...t]},Oe=()=>{J.post(route(`admin.api-tokens.store`),{onSuccess:()=>J.reset()})},ke=async()=>{await navigator.clipboard.writeText(g.plainToken),Y.value=!0},Ae=()=>{te.delete(route(`admin.api-tokens.destroy`,X.value.id),{preserveScroll:!0,onFinish:()=>{X.value=null}})},je=e=>{let[t,n]=e.split(`:`),r=g.modules.find(e=>e.key===t);return ne(n===`write`?`account.api_tokens.ability_write`:`account.api_tokens.ability_read`,{module:r?r.label:t})};return(c,u)=>(r(),m(`div`,ie,[a.plainToken?(r(),m(`div`,ae,[h(`p`,oe,d(c.$t(`account.api_tokens.plain_notice`)),1),h(`div`,y,[h(`code`,b,d(a.plainToken),1),t(_,{variant:`outline`,onClick:ke},{default:s(()=>[o(d(Y.value?c.$t(`common.copied`):c.$t(`common.copy`)),1)]),_:1})])])):e(``,!0),t(v,{title:c.$t(`account.api_tokens.docs_title`),subtitle:c.$t(`account.api_tokens.docs_subtitle`)},{default:s(()=>[h(`ul`,x,[h(`li`,null,[o(d(c.$t(`account.api_tokens.docs_page`))+` `,1),h(`a`,{href:a.docsUrl,target:`_blank`,class:`text-accent-hover underline break-all`},d(a.docsUrl),9,S)]),h(`li`,null,[o(d(c.$t(`account.api_tokens.openapi_schema`))+` `,1),h(`a`,{href:a.openApiUrl,target:`_blank`,class:`text-accent-hover underline break-all`},d(a.openApiUrl),9,C)])])]),_:1},8,[`title`,`subtitle`]),t(v,{title:c.$t(`account.api_tokens.create_title`)},{default:s(()=>[h(`form`,{class:`space-y-5`,onSubmit:ee(Oe,[`prevent`])},[h(`div`,w,[h(`div`,null,[h(`label`,T,d(c.$t(`account.api_tokens.name`)),1),n(h(`input`,{id:`token-name`,"onUpdate:modelValue":u[0]||=e=>l(J).name=e,type:`text`,placeholder:c.$t(`account.api_tokens.name_placeholder`),class:`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus sm:text-sm`},null,8,E),[[f,l(J).name]]),l(J).errors.name?(r(),m(`p`,D,d(l(J).errors.name),1)):e(``,!0)]),h(`div`,null,[h(`label`,O,d(c.$t(`account.api_tokens.expires_at`)),1),n(h(`input`,{id:`token-expires`,"onUpdate:modelValue":u[1]||=e=>l(J).expires_at=e,type:`date`,class:`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus sm:text-sm`},null,512),[[f,l(J).expires_at]]),l(J).errors.expires_at?(r(),m(`p`,k,d(l(J).errors.expires_at),1)):e(``,!0)])]),h(`div`,null,[h(`div`,A,[h(`span`,j,d(c.$t(`account.api_tokens.abilities`)),1),h(`div`,M,[t(_,{type:`button`,size:`sm`,variant:`outline`,onClick:u[2]||=e=>$(`read`)},{default:s(()=>[o(d(c.$t(`account.api_tokens.select_read_all`)),1)]),_:1}),t(_,{type:`button`,size:`sm`,variant:`outline`,onClick:u[3]||=e=>$(`write`)},{default:s(()=>[o(d(c.$t(`account.api_tokens.select_all`)),1)]),_:1}),t(_,{type:`button`,size:`sm`,variant:`outline`,onClick:u[4]||=e=>l(J).abilities=[]},{default:s(()=>[o(d(c.$t(`account.api_tokens.clear`)),1)]),_:1})])]),l(J).errors.abilities?(r(),m(`p`,N,d(l(J).errors.abilities),1)):e(``,!0),h(`div`,P,[h(`table`,F,[h(`thead`,I,[h(`tr`,null,[h(`th`,L,d(c.$t(`account.api_tokens.module`)),1),h(`th`,R,d(c.$t(`account.api_tokens.read`)),1),h(`th`,z,d(c.$t(`account.api_tokens.write`)),1)])]),h(`tbody`,B,[(r(!0),m(p,null,i(a.modules,t=>(r(),m(`tr`,{key:t.key},[h(`td`,V,[o(d(t.label)+` `,1),h(`span`,H,d(t.key),1)]),h(`td`,U,[h(`input`,{type:`checkbox`,class:`h-4 w-4`,"aria-label":c.$t(`account.api_tokens.ability_read`,{module:t.label}),checked:Z(`${t.key}:read`),onChange:e=>Q(t.key,`read`)},null,40,W)]),h(`td`,G,[t.writable?(r(),m(`input`,{key:0,type:`checkbox`,class:`h-4 w-4`,"aria-label":c.$t(`account.api_tokens.ability_write`,{module:t.label}),checked:Z(`${t.key}:write`),onChange:e=>Q(t.key,`write`)},null,40,K)):e(``,!0)])]))),128))])])])]),h(`div`,se,[t(_,{type:`submit`,loading:l(J).processing,disabled:l(J).processing},{default:s(()=>[o(d(c.$t(`account.api_tokens.submit`)),1)]),_:1},8,[`loading`,`disabled`])])],32)]),_:1},8,[`title`]),t(v,{title:c.$t(`account.api_tokens.list_title`),"no-padding":``},{default:s(()=>[a.tokens.length===0?(r(),m(`p`,ce,d(c.$t(`account.api_tokens.empty`)),1)):(r(),m(`div`,le,[h(`table`,ue,[h(`thead`,de,[h(`tr`,null,[h(`th`,fe,d(c.$t(`account.api_tokens.name`)),1),h(`th`,pe,d(c.$t(`account.api_tokens.abilities`)),1),h(`th`,me,d(c.$t(`account.api_tokens.owner`)),1),h(`th`,he,d(c.$t(`account.api_tokens.last_used`)),1),h(`th`,ge,d(c.$t(`account.api_tokens.expiry`)),1),u[7]||=h(`th`,{class:`px-4 py-2`},null,-1)])]),h(`tbody`,_e,[(r(!0),m(p,null,i(a.tokens,n=>(r(),m(`tr`,{key:n.id,"data-api-token-row":``},[h(`td`,ve,d(n.name),1),h(`td`,ye,[h(`details`,null,[h(`summary`,be,d(c.$tc(`account.api_tokens.abilities_count`,n.abilities.length)),1),h(`ul`,xe,[(r(!0),m(p,null,i(n.abilities,e=>(r(),m(`li`,{key:e},d(je(e)),1))),128))])])]),h(`td`,Se,[o(d(n.owner),1),h(`div`,Ce,d(n.created_at),1)]),h(`td`,we,d(n.last_used_at||c.$t(`account.api_tokens.never_used`)),1),h(`td`,Te,[n.expires_at?(r(),m(p,{key:0},[o(d(c.$t(`account.api_tokens.until`,{date:n.expires_at})),1),n.expired?(r(),m(`span`,Ee,d(c.$t(`account.api_tokens.expired`)),1)):e(``,!0)],64)):(r(),m(p,{key:1},[o(d(c.$t(`account.api_tokens.no_expiry`)),1)],64))]),h(`td`,q,[t(_,{size:`sm`,variant:`danger`,onClick:e=>X.value=n},{default:s(()=>[o(d(c.$t(`account.api_tokens.revoke`)),1)]),_:1},8,[`onClick`])])]))),128))])])]))]),_:1},8,[`title`]),t(re,{show:X.value!==null,title:c.$t(`account.api_tokens.revoke_title`),onClose:u[6]||=e=>X.value=null},{footer:s(()=>[t(_,{variant:`secondary`,onClick:u[5]||=e=>X.value=null},{default:s(()=>[o(d(c.$t(`common.cancel`)),1)]),_:1}),t(_,{variant:`danger`,onClick:Ae},{default:s(()=>[o(d(c.$t(`account.api_tokens.revoke`)),1)]),_:1})]),default:s(()=>[h(`p`,De,[o(d(c.$t(`account.api_tokens.revoke_confirm_before`))+` `,1),h(`strong`,null,d(X.value?.name),1),o(` `+d(c.$t(`account.api_tokens.revoke_confirm_after`)),1)])]),_:1},8,[`show`,`title`])]))}},Y={class:`mb-6`},X={class:`text-2xl font-bold text-fg`},Z={class:`mt-1 text-sm text-muted`},Q={__name:`Index`,props:{tokens:Array,modules:Array,plainToken:String,docsUrl:String,openApiUrl:String},setup(e){return(n,i)=>(r(),a(g,{title:n.$t(`menu.api_tokens`)},{default:s(()=>[h(`div`,Y,[h(`h1`,X,d(n.$t(`menu.api_tokens`)),1),h(`p`,Z,d(n.$t(`account.api_tokens.subtitle`)),1)]),t(J,{tokens:e.tokens,modules:e.modules,"plain-token":e.plainToken,"docs-url":e.docsUrl,"open-api-url":e.openApiUrl},null,8,[`tokens`,`modules`,`plain-token`,`docs-url`,`open-api-url`])]),_:1},8,[`title`]))}};export{Q as default};
\ No newline at end of file
+import{C as e,E as t,G as n,I as r,R as i,S as a,T as o,W as s,Y as c,Z as l,_ as ee,a as u,et as d,m as f,s as te,v as p,w as m,x as h}from"./dist-MY__znoP.js";import{t as g}from"./AdminLayout--RXJFj9t.js";import{n as ne}from"./app-BNjy5Z6H.js";import{t as _}from"./AdminButton-Bx141Bs3.js";import{t as v}from"./AdminCard--HubMtUj.js";import{t as re}from"./AdminModal-DNJ_V4iq.js";var ie={class:`space-y-6`},ae={key:0,"data-api-token-plain":``,class:`p-4 bg-warning-soft border-2 border-warning-soft-fg rounded-lg`},oe={class:`font-medium text-fg`},y={class:`mt-3 flex flex-col sm:flex-row gap-2`},b={class:`flex-1 px-3 py-2 bg-surface border border-field rounded font-mono text-sm break-all`},x={class:`space-y-1 text-sm`},S=[`href`],C=[`href`],w={class:`grid gap-4 sm:grid-cols-2`},T={for:`token-name`,class:`block text-sm font-medium text-fg`},E=[`placeholder`],D={key:0,class:`mt-1 text-sm text-danger`},O={for:`token-expires`,class:`block text-sm font-medium text-fg`},k={key:0,class:`mt-1 text-sm text-danger`},A={class:`flex flex-wrap items-center justify-between gap-2`},j={class:`text-sm font-medium text-fg`},M={class:`flex gap-2`},N={key:0,class:`mt-1 text-sm text-danger`},P={class:`mt-2 max-h-96 overflow-y-auto border border-line rounded-md`},F={class:`min-w-full text-sm`},I={class:`bg-surface-alt sticky top-0`},L={class:`px-3 py-2 text-left font-medium text-fg`},R={class:`px-3 py-2 w-24 text-center font-medium text-fg`},z={class:`px-3 py-2 w-24 text-center font-medium text-fg`},B={class:`divide-y divide-line`},V={class:`px-3 py-1.5`},H={class:`ml-1 text-xs text-muted font-mono`},U={class:`px-3 py-1.5 text-center`},W=[`aria-label`,`checked`,`onChange`],G={class:`px-3 py-1.5 text-center`},K=[`aria-label`,`checked`,`onChange`],se={class:`flex justify-end`},ce={key:0,class:`p-6 text-sm text-muted`},le={key:1,class:`overflow-x-auto`},ue={class:`min-w-full text-sm`},de={class:`bg-surface-alt`},fe={class:`px-4 py-2 text-left font-medium text-fg`},pe={class:`px-4 py-2 text-left font-medium text-fg`},me={class:`px-4 py-2 text-left font-medium text-fg`},he={class:`px-4 py-2 text-left font-medium text-fg`},ge={class:`px-4 py-2 text-left font-medium text-fg`},_e={class:`divide-y divide-line`},ve={class:`px-4 py-2 font-medium text-fg`},ye={class:`px-4 py-2 text-fg`},be={class:`cursor-pointer`},xe={class:`mt-1 space-y-0.5`},Se={class:`px-4 py-2 text-fg`},Ce={class:`text-xs text-muted`},we={class:`px-4 py-2 text-fg`},Te={class:`px-4 py-2 text-fg`},Ee={key:0,class:`font-medium`},q={class:`px-4 py-2 text-right`},De={class:`text-muted`},J={__name:`ApiTokensManager`,props:{tokens:{type:Array,required:!0},modules:{type:Array,required:!0},plainToken:{type:String,default:null},docsUrl:{type:String,required:!0},openApiUrl:{type:String,required:!0}},setup(a){let g=a,J=u({name:``,abilities:[],expires_at:``}),Y=c(!1),X=c(null),Z=e=>J.abilities.includes(e),Q=(e,t)=>{let n=`${e}:${t}`,r=new Set(J.abilities);r.has(n)?(r.delete(n),t===`read`&&r.delete(`${e}:write`)):(r.add(n),t===`write`&&r.add(`${e}:read`)),J.abilities=[...r]},$=e=>{let t=new Set(J.abilities);for(let n of g.modules)t.add(`${n.key}:read`),e===`write`&&n.writable&&t.add(`${n.key}:write`);J.abilities=[...t]},Oe=()=>{J.post(route(`admin.api-tokens.store`),{onSuccess:()=>J.reset()})},ke=async()=>{await navigator.clipboard.writeText(g.plainToken),Y.value=!0},Ae=()=>{te.delete(route(`admin.api-tokens.destroy`,X.value.id),{preserveScroll:!0,onFinish:()=>{X.value=null}})},je=e=>{let[t,n]=e.split(`:`),r=g.modules.find(e=>e.key===t);return ne(n===`write`?`account.api_tokens.ability_write`:`account.api_tokens.ability_read`,{module:r?r.label:t})};return(c,u)=>(r(),m(`div`,ie,[a.plainToken?(r(),m(`div`,ae,[h(`p`,oe,d(c.$t(`account.api_tokens.plain_notice`)),1),h(`div`,y,[h(`code`,b,d(a.plainToken),1),t(_,{variant:`outline`,onClick:ke},{default:s(()=>[o(d(Y.value?c.$t(`common.copied`):c.$t(`common.copy`)),1)]),_:1})])])):e(``,!0),t(v,{title:c.$t(`account.api_tokens.docs_title`),subtitle:c.$t(`account.api_tokens.docs_subtitle`)},{default:s(()=>[h(`ul`,x,[h(`li`,null,[o(d(c.$t(`account.api_tokens.docs_page`))+` `,1),h(`a`,{href:a.docsUrl,target:`_blank`,class:`text-accent-hover underline break-all`},d(a.docsUrl),9,S)]),h(`li`,null,[o(d(c.$t(`account.api_tokens.openapi_schema`))+` `,1),h(`a`,{href:a.openApiUrl,target:`_blank`,class:`text-accent-hover underline break-all`},d(a.openApiUrl),9,C)])])]),_:1},8,[`title`,`subtitle`]),t(v,{title:c.$t(`account.api_tokens.create_title`)},{default:s(()=>[h(`form`,{class:`space-y-5`,onSubmit:ee(Oe,[`prevent`])},[h(`div`,w,[h(`div`,null,[h(`label`,T,d(c.$t(`account.api_tokens.name`)),1),n(h(`input`,{id:`token-name`,"onUpdate:modelValue":u[0]||=e=>l(J).name=e,type:`text`,placeholder:c.$t(`account.api_tokens.name_placeholder`),class:`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus sm:text-sm`},null,8,E),[[f,l(J).name]]),l(J).errors.name?(r(),m(`p`,D,d(l(J).errors.name),1)):e(``,!0)]),h(`div`,null,[h(`label`,O,d(c.$t(`account.api_tokens.expires_at`)),1),n(h(`input`,{id:`token-expires`,"onUpdate:modelValue":u[1]||=e=>l(J).expires_at=e,type:`date`,class:`mt-1 block w-full px-3 py-2 border border-field rounded-md shadow-sm focus:outline-none focus:ring-focus focus:border-focus sm:text-sm`},null,512),[[f,l(J).expires_at]]),l(J).errors.expires_at?(r(),m(`p`,k,d(l(J).errors.expires_at),1)):e(``,!0)])]),h(`div`,null,[h(`div`,A,[h(`span`,j,d(c.$t(`account.api_tokens.abilities`)),1),h(`div`,M,[t(_,{type:`button`,size:`sm`,variant:`outline`,onClick:u[2]||=e=>$(`read`)},{default:s(()=>[o(d(c.$t(`account.api_tokens.select_read_all`)),1)]),_:1}),t(_,{type:`button`,size:`sm`,variant:`outline`,onClick:u[3]||=e=>$(`write`)},{default:s(()=>[o(d(c.$t(`account.api_tokens.select_all`)),1)]),_:1}),t(_,{type:`button`,size:`sm`,variant:`outline`,onClick:u[4]||=e=>l(J).abilities=[]},{default:s(()=>[o(d(c.$t(`account.api_tokens.clear`)),1)]),_:1})])]),l(J).errors.abilities?(r(),m(`p`,N,d(l(J).errors.abilities),1)):e(``,!0),h(`div`,P,[h(`table`,F,[h(`thead`,I,[h(`tr`,null,[h(`th`,L,d(c.$t(`account.api_tokens.module`)),1),h(`th`,R,d(c.$t(`account.api_tokens.read`)),1),h(`th`,z,d(c.$t(`account.api_tokens.write`)),1)])]),h(`tbody`,B,[(r(!0),m(p,null,i(a.modules,t=>(r(),m(`tr`,{key:t.key},[h(`td`,V,[o(d(t.label)+` `,1),h(`span`,H,d(t.key),1)]),h(`td`,U,[h(`input`,{type:`checkbox`,class:`h-4 w-4`,"aria-label":c.$t(`account.api_tokens.ability_read`,{module:t.label}),checked:Z(`${t.key}:read`),onChange:e=>Q(t.key,`read`)},null,40,W)]),h(`td`,G,[t.writable?(r(),m(`input`,{key:0,type:`checkbox`,class:`h-4 w-4`,"aria-label":c.$t(`account.api_tokens.ability_write`,{module:t.label}),checked:Z(`${t.key}:write`),onChange:e=>Q(t.key,`write`)},null,40,K)):e(``,!0)])]))),128))])])])]),h(`div`,se,[t(_,{type:`submit`,loading:l(J).processing,disabled:l(J).processing},{default:s(()=>[o(d(c.$t(`account.api_tokens.submit`)),1)]),_:1},8,[`loading`,`disabled`])])],32)]),_:1},8,[`title`]),t(v,{title:c.$t(`account.api_tokens.list_title`),"no-padding":``},{default:s(()=>[a.tokens.length===0?(r(),m(`p`,ce,d(c.$t(`account.api_tokens.empty`)),1)):(r(),m(`div`,le,[h(`table`,ue,[h(`thead`,de,[h(`tr`,null,[h(`th`,fe,d(c.$t(`account.api_tokens.name`)),1),h(`th`,pe,d(c.$t(`account.api_tokens.abilities`)),1),h(`th`,me,d(c.$t(`account.api_tokens.owner`)),1),h(`th`,he,d(c.$t(`account.api_tokens.last_used`)),1),h(`th`,ge,d(c.$t(`account.api_tokens.expiry`)),1),u[7]||=h(`th`,{class:`px-4 py-2`},null,-1)])]),h(`tbody`,_e,[(r(!0),m(p,null,i(a.tokens,n=>(r(),m(`tr`,{key:n.id,"data-api-token-row":``},[h(`td`,ve,d(n.name),1),h(`td`,ye,[h(`details`,null,[h(`summary`,be,d(c.$tc(`account.api_tokens.abilities_count`,n.abilities.length)),1),h(`ul`,xe,[(r(!0),m(p,null,i(n.abilities,e=>(r(),m(`li`,{key:e},d(je(e)),1))),128))])])]),h(`td`,Se,[o(d(n.owner),1),h(`div`,Ce,d(n.created_at),1)]),h(`td`,we,d(n.last_used_at||c.$t(`account.api_tokens.never_used`)),1),h(`td`,Te,[n.expires_at?(r(),m(p,{key:0},[o(d(c.$t(`account.api_tokens.until`,{date:n.expires_at})),1),n.expired?(r(),m(`span`,Ee,d(c.$t(`account.api_tokens.expired`)),1)):e(``,!0)],64)):(r(),m(p,{key:1},[o(d(c.$t(`account.api_tokens.no_expiry`)),1)],64))]),h(`td`,q,[t(_,{size:`sm`,variant:`danger`,onClick:e=>X.value=n},{default:s(()=>[o(d(c.$t(`account.api_tokens.revoke`)),1)]),_:1},8,[`onClick`])])]))),128))])])]))]),_:1},8,[`title`]),t(re,{show:X.value!==null,title:c.$t(`account.api_tokens.revoke_title`),onClose:u[6]||=e=>X.value=null},{footer:s(()=>[t(_,{variant:`secondary`,onClick:u[5]||=e=>X.value=null},{default:s(()=>[o(d(c.$t(`common.cancel`)),1)]),_:1}),t(_,{variant:`danger`,onClick:Ae},{default:s(()=>[o(d(c.$t(`account.api_tokens.revoke`)),1)]),_:1})]),default:s(()=>[h(`p`,De,[o(d(c.$t(`account.api_tokens.revoke_confirm_before`))+` `,1),h(`strong`,null,d(X.value?.name),1),o(` `+d(c.$t(`account.api_tokens.revoke_confirm_after`)),1)])]),_:1},8,[`show`,`title`])]))}},Y={class:`mb-6`},X={class:`text-2xl font-bold text-fg`},Z={class:`mt-1 text-sm text-muted`},Q={__name:`Index`,props:{tokens:Array,modules:Array,plainToken:String,docsUrl:String,openApiUrl:String},setup(e){return(n,i)=>(r(),a(g,{title:n.$t(`menu.api_tokens`)},{default:s(()=>[h(`div`,Y,[h(`h1`,X,d(n.$t(`menu.api_tokens`)),1),h(`p`,Z,d(n.$t(`account.api_tokens.subtitle`)),1)]),t(J,{tokens:e.tokens,modules:e.modules,"plain-token":e.plainToken,"docs-url":e.docsUrl,"open-api-url":e.openApiUrl},null,8,[`tokens`,`modules`,`plain-token`,`docs-url`,`open-api-url`])]),_:1},8,[`title`]))}};export{Q as default};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/Index-By9Fq-LA.js b/packages/admin/dist/assets/Index-CjLWl74m.js
similarity index 96%
rename from packages/admin/dist/assets/Index-By9Fq-LA.js
rename to packages/admin/dist/assets/Index-CjLWl74m.js
index a5d82124..200de985 100644
--- a/packages/admin/dist/assets/Index-By9Fq-LA.js
+++ b/packages/admin/dist/assets/Index-CjLWl74m.js
@@ -1 +1 @@
-import{C as e,E as t,G as n,I as r,R as i,S as a,T as o,W as s,Y as c,Z as l,et as u,g as d,m as f,s as p,v as m,w as h,x as g}from"./dist-MY__znoP.js";import{t as _}from"./AdminLayout-I1QMPYpW.js";import{t as v}from"./AdminButton-Bx141Bs3.js";import{t as y}from"./AdminDataTable-BaQwb_6U.js";import{t as b}from"./AdminModal-DNJ_V4iq.js";import{t as x}from"./recordActions-CtRs42tG.js";var S={class:`mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4`},C=[`data-page-title`],w={class:`mt-1 text-sm text-muted`},T={class:`flex flex-wrap items-center gap-2`},E={class:`mb-6`},D={class:`flex gap-4`},O={class:`flex-1 max-w-md`},k=[`placeholder`],A={class:`text-muted`},j={__name:`Index`,props:{routeName:String,createLabel:String,items:Object,columns:Array,filters:Object,title:String,can:{type:Object,default:()=>({})},actions:{type:Array,default:()=>[]},links:{type:Array,default:()=>[]}},setup(j){let M=j,N=Object.fromEntries(Object.entries(M.filters||{}).filter(([e])=>![`search`,`sort`,`direction`].includes(e))),P=M.actions.map(e=>({...e,href:t=>x(M.routeName,e,t)})),F=c(M.filters.search||``),I=c(!1),L=c(null),R=()=>{p.get(route(`${M.routeName}.index`),{...N,search:F.value},{preserveState:!0,preserveScroll:!0})},z=({column:e,direction:t})=>{p.get(route(`${M.routeName}.index`),{...M.filters,sort:e,direction:t},{preserveState:!0,preserveScroll:!0})},B=e=>{p.visit(route(`${M.routeName}.edit`,e.id))},V=e=>{L.value=e,I.value=!0},H=()=>{L.value&&p.delete(route(`${M.routeName}.destroy`,L.value.id),{onSuccess:()=>{I.value=!1,L.value=null}})};return(c,p)=>(r(),a(_,{title:j.title},{default:s(()=>[g(`div`,S,[g(`div`,null,[g(`h1`,{"data-page-title":j.routeName,class:`text-2xl font-bold text-fg`},u(j.title),9,C),g(`p`,w,u(c.$t(`resource.index.total`,{count:j.items.total})),1)]),g(`div`,T,[(r(!0),h(m,null,i(j.links,e=>(r(),a(v,{key:e.name,"data-link":e.name,href:e.href,variant:`secondary`},{default:s(()=>[o(u(e.label),1)]),_:2},1032,[`data-link`,`href`]))),128)),j.can.create===!1?e(``,!0):(r(),a(v,{key:0,"data-action":`create`,href:c.route(`${M.routeName}.create`,l(N))},{default:s(()=>[p[3]||=g(`svg`,{class:`w-4 h-4 mr-2`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[g(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 4v16m8-8H4`})],-1),o(` `+u(c.$t(`common.create`)),1)]),_:1},8,[`href`]))])]),g(`div`,E,[g(`div`,D,[g(`div`,O,[n(g(`input`,{"onUpdate:modelValue":p[0]||=e=>F.value=e,type:`text`,placeholder:c.$t(`resource.index.search_placeholder`),"data-search-input":`true`,class:`w-full px-4 py-2 border border-field rounded-lg focus:ring-focus focus:border-focus`,onKeyup:d(R,[`enter`])},null,40,k),[[f,F.value]])]),t(v,{"data-action":`search`,onClick:R,variant:`secondary`},{default:s(()=>[o(u(c.$t(`resource.index.search_button`)),1)]),_:1})])]),t(y,{columns:j.columns,items:j.items,"sort-by":j.filters.sort,"sort-direction":j.filters.direction,"can-delete":j.can.delete!==!1,"row-actions":l(P),onSort:z,onEdit:B,onDelete:V},null,8,[`columns`,`items`,`sort-by`,`sort-direction`,`can-delete`,`row-actions`]),t(b,{show:I.value,title:c.$t(`resource.delete.title`),onClose:p[2]||=e=>I.value=!1},{footer:s(()=>[t(v,{"data-action":`delete-cancel`,variant:`secondary`,onClick:p[1]||=e=>I.value=!1},{default:s(()=>[o(u(c.$t(`common.cancel`)),1)]),_:1}),t(v,{"data-action":`delete-confirm`,variant:`danger`,onClick:H},{default:s(()=>[o(u(c.$t(`common.delete`)),1)]),_:1})]),default:s(()=>[g(`p`,A,u(c.$t(`resource.delete.confirm`)),1)]),_:1},8,[`show`,`title`])]),_:1},8,[`title`]))}};export{j as default};
\ No newline at end of file
+import{C as e,E as t,G as n,I as r,R as i,S as a,T as o,W as s,Y as c,Z as l,et as u,g as d,m as f,s as p,v as m,w as h,x as g}from"./dist-MY__znoP.js";import{t as _}from"./AdminLayout--RXJFj9t.js";import{t as v}from"./AdminButton-Bx141Bs3.js";import{t as y}from"./AdminDataTable-BaQwb_6U.js";import{t as b}from"./AdminModal-DNJ_V4iq.js";import{t as x}from"./recordActions-CtRs42tG.js";var S={class:`mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4`},C=[`data-page-title`],w={class:`mt-1 text-sm text-muted`},T={class:`flex flex-wrap items-center gap-2`},E={class:`mb-6`},D={class:`flex gap-4`},O={class:`flex-1 max-w-md`},k=[`placeholder`],A={class:`text-muted`},j={__name:`Index`,props:{routeName:String,createLabel:String,items:Object,columns:Array,filters:Object,title:String,can:{type:Object,default:()=>({})},actions:{type:Array,default:()=>[]},links:{type:Array,default:()=>[]}},setup(j){let M=j,N=Object.fromEntries(Object.entries(M.filters||{}).filter(([e])=>![`search`,`sort`,`direction`].includes(e))),P=M.actions.map(e=>({...e,href:t=>x(M.routeName,e,t)})),F=c(M.filters.search||``),I=c(!1),L=c(null),R=()=>{p.get(route(`${M.routeName}.index`),{...N,search:F.value},{preserveState:!0,preserveScroll:!0})},z=({column:e,direction:t})=>{p.get(route(`${M.routeName}.index`),{...M.filters,sort:e,direction:t},{preserveState:!0,preserveScroll:!0})},B=e=>{p.visit(route(`${M.routeName}.edit`,e.id))},V=e=>{L.value=e,I.value=!0},H=()=>{L.value&&p.delete(route(`${M.routeName}.destroy`,L.value.id),{onSuccess:()=>{I.value=!1,L.value=null}})};return(c,p)=>(r(),a(_,{title:j.title},{default:s(()=>[g(`div`,S,[g(`div`,null,[g(`h1`,{"data-page-title":j.routeName,class:`text-2xl font-bold text-fg`},u(j.title),9,C),g(`p`,w,u(c.$t(`resource.index.total`,{count:j.items.total})),1)]),g(`div`,T,[(r(!0),h(m,null,i(j.links,e=>(r(),a(v,{key:e.name,"data-link":e.name,href:e.href,variant:`secondary`},{default:s(()=>[o(u(e.label),1)]),_:2},1032,[`data-link`,`href`]))),128)),j.can.create===!1?e(``,!0):(r(),a(v,{key:0,"data-action":`create`,href:c.route(`${M.routeName}.create`,l(N))},{default:s(()=>[p[3]||=g(`svg`,{class:`w-4 h-4 mr-2`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[g(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 4v16m8-8H4`})],-1),o(` `+u(c.$t(`common.create`)),1)]),_:1},8,[`href`]))])]),g(`div`,E,[g(`div`,D,[g(`div`,O,[n(g(`input`,{"onUpdate:modelValue":p[0]||=e=>F.value=e,type:`text`,placeholder:c.$t(`resource.index.search_placeholder`),"data-search-input":`true`,class:`w-full px-4 py-2 border border-field rounded-lg focus:ring-focus focus:border-focus`,onKeyup:d(R,[`enter`])},null,40,k),[[f,F.value]])]),t(v,{"data-action":`search`,onClick:R,variant:`secondary`},{default:s(()=>[o(u(c.$t(`resource.index.search_button`)),1)]),_:1})])]),t(y,{columns:j.columns,items:j.items,"sort-by":j.filters.sort,"sort-direction":j.filters.direction,"can-delete":j.can.delete!==!1,"row-actions":l(P),onSort:z,onEdit:B,onDelete:V},null,8,[`columns`,`items`,`sort-by`,`sort-direction`,`can-delete`,`row-actions`]),t(b,{show:I.value,title:c.$t(`resource.delete.title`),onClose:p[2]||=e=>I.value=!1},{footer:s(()=>[t(v,{"data-action":`delete-cancel`,variant:`secondary`,onClick:p[1]||=e=>I.value=!1},{default:s(()=>[o(u(c.$t(`common.cancel`)),1)]),_:1}),t(v,{"data-action":`delete-confirm`,variant:`danger`,onClick:H},{default:s(()=>[o(u(c.$t(`common.delete`)),1)]),_:1})]),default:s(()=>[g(`p`,A,u(c.$t(`resource.delete.confirm`)),1)]),_:1},8,[`show`,`title`])]),_:1},8,[`title`]))}};export{j as default};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/Index-waO6UWa5.js b/packages/admin/dist/assets/Index-DEbfZBFs.js
similarity index 97%
rename from packages/admin/dist/assets/Index-waO6UWa5.js
rename to packages/admin/dist/assets/Index-DEbfZBFs.js
index 906e7c7d..003ae54d 100644
--- a/packages/admin/dist/assets/Index-waO6UWa5.js
+++ b/packages/admin/dist/assets/Index-DEbfZBFs.js
@@ -1 +1 @@
-import{C as e,E as t,G as n,I as r,S as i,T as a,W as o,Y as s,et as c,g as l,m as u,s as d,w as f,x as p}from"./dist-MY__znoP.js";import{t as m}from"./AdminLayout-I1QMPYpW.js";import{t as h}from"./AdminButton-Bx141Bs3.js";import{t as g}from"./AdminDataTable-BaQwb_6U.js";import{t as _}from"./AdminModal-DNJ_V4iq.js";var v={class:`mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4`},y={class:`text-2xl font-bold text-fg`},b={class:`mt-1 text-sm text-muted`},x={class:`mb-6`},S={class:`flex gap-4`},C={class:`flex-1 max-w-md`},w=[`placeholder`],T={class:`text-muted`},E={key:0},D={class:`mt-2 text-sm text-danger`},O={__name:`Index`,props:{items:Object,columns:Array,filters:Object,title:String,can:{type:Object,default:()=>({})}},setup(O){let k=O,A=s(k.filters.search||``),j=s(!1),M=s(null),N=()=>{d.get(route(`admin.users.index`),{search:A.value},{preserveState:!0,preserveScroll:!0})},P=({column:e,direction:t})=>{d.get(route(`admin.users.index`),{...k.filters,sort:e,direction:t},{preserveState:!0,preserveScroll:!0})},F=e=>{d.visit(route(`admin.users.edit`,e.id))},I=e=>{M.value=e,j.value=!0},L=()=>{M.value&&d.delete(route(`admin.users.destroy`,M.value.id),{onSuccess:()=>{j.value=!1,M.value=null}})};return(s,d)=>(r(),i(m,{title:O.title},{default:o(()=>[p(`div`,v,[p(`div`,null,[p(`h1`,y,c(O.title),1),p(`p`,b,c(s.$t(`account.users.total`,{count:O.items.total})),1)]),O.can.create===!1?e(``,!0):(r(),i(h,{key:0,"data-action":`create`,href:s.route(`admin.users.create`)},{default:o(()=>[d[3]||=p(`svg`,{class:`w-4 h-4 mr-2`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[p(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 4v16m8-8H4`})],-1),a(` `+c(s.$t(`common.create`)),1)]),_:1},8,[`href`]))]),p(`div`,x,[p(`div`,S,[p(`div`,C,[n(p(`input`,{"onUpdate:modelValue":d[0]||=e=>A.value=e,type:`text`,placeholder:s.$t(`account.users.search_placeholder`),class:`w-full px-4 py-2 border border-field rounded-lg focus:ring-focus focus:border-focus`,onKeyup:l(N,[`enter`])},null,40,w),[[u,A.value]])]),t(h,{onClick:N,variant:`secondary`},{default:o(()=>[a(c(s.$t(`common.search`)),1)]),_:1})])]),t(g,{columns:O.columns,items:O.items,"sort-by":O.filters.sort,"sort-direction":O.filters.direction,"can-delete":O.can.delete!==!1,onSort:P,onEdit:F,onDelete:I},null,8,[`columns`,`items`,`sort-by`,`sort-direction`,`can-delete`]),t(_,{show:j.value,title:s.$t(`account.users.delete_title`),onClose:d[2]||=e=>j.value=!1},{footer:o(()=>[t(h,{variant:`secondary`,onClick:d[1]||=e=>j.value=!1},{default:o(()=>[a(c(s.$t(`common.cancel`)),1)]),_:1}),t(h,{variant:`danger`,onClick:L},{default:o(()=>[a(c(s.$t(`common.delete`)),1)]),_:1})]),default:o(()=>[p(`p`,T,[a(c(s.$t(`account.users.delete_confirm`))+` `,1),M.value?(r(),f(`strong`,E,c(M.value.name),1)):e(``,!0)]),p(`p`,D,c(s.$t(`account.users.delete_irreversible`)),1)]),_:1},8,[`show`,`title`])]),_:1},8,[`title`]))}};export{O as default};
\ No newline at end of file
+import{C as e,E as t,G as n,I as r,S as i,T as a,W as o,Y as s,et as c,g as l,m as u,s as d,w as f,x as p}from"./dist-MY__znoP.js";import{t as m}from"./AdminLayout--RXJFj9t.js";import{t as h}from"./AdminButton-Bx141Bs3.js";import{t as g}from"./AdminDataTable-BaQwb_6U.js";import{t as _}from"./AdminModal-DNJ_V4iq.js";var v={class:`mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4`},y={class:`text-2xl font-bold text-fg`},b={class:`mt-1 text-sm text-muted`},x={class:`mb-6`},S={class:`flex gap-4`},C={class:`flex-1 max-w-md`},w=[`placeholder`],T={class:`text-muted`},E={key:0},D={class:`mt-2 text-sm text-danger`},O={__name:`Index`,props:{items:Object,columns:Array,filters:Object,title:String,can:{type:Object,default:()=>({})}},setup(O){let k=O,A=s(k.filters.search||``),j=s(!1),M=s(null),N=()=>{d.get(route(`admin.users.index`),{search:A.value},{preserveState:!0,preserveScroll:!0})},P=({column:e,direction:t})=>{d.get(route(`admin.users.index`),{...k.filters,sort:e,direction:t},{preserveState:!0,preserveScroll:!0})},F=e=>{d.visit(route(`admin.users.edit`,e.id))},I=e=>{M.value=e,j.value=!0},L=()=>{M.value&&d.delete(route(`admin.users.destroy`,M.value.id),{onSuccess:()=>{j.value=!1,M.value=null}})};return(s,d)=>(r(),i(m,{title:O.title},{default:o(()=>[p(`div`,v,[p(`div`,null,[p(`h1`,y,c(O.title),1),p(`p`,b,c(s.$t(`account.users.total`,{count:O.items.total})),1)]),O.can.create===!1?e(``,!0):(r(),i(h,{key:0,"data-action":`create`,href:s.route(`admin.users.create`)},{default:o(()=>[d[3]||=p(`svg`,{class:`w-4 h-4 mr-2`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[p(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 4v16m8-8H4`})],-1),a(` `+c(s.$t(`common.create`)),1)]),_:1},8,[`href`]))]),p(`div`,x,[p(`div`,S,[p(`div`,C,[n(p(`input`,{"onUpdate:modelValue":d[0]||=e=>A.value=e,type:`text`,placeholder:s.$t(`account.users.search_placeholder`),class:`w-full px-4 py-2 border border-field rounded-lg focus:ring-focus focus:border-focus`,onKeyup:l(N,[`enter`])},null,40,w),[[u,A.value]])]),t(h,{onClick:N,variant:`secondary`},{default:o(()=>[a(c(s.$t(`common.search`)),1)]),_:1})])]),t(g,{columns:O.columns,items:O.items,"sort-by":O.filters.sort,"sort-direction":O.filters.direction,"can-delete":O.can.delete!==!1,onSort:P,onEdit:F,onDelete:I},null,8,[`columns`,`items`,`sort-by`,`sort-direction`,`can-delete`]),t(_,{show:j.value,title:s.$t(`account.users.delete_title`),onClose:d[2]||=e=>j.value=!1},{footer:o(()=>[t(h,{variant:`secondary`,onClick:d[1]||=e=>j.value=!1},{default:o(()=>[a(c(s.$t(`common.cancel`)),1)]),_:1}),t(h,{variant:`danger`,onClick:L},{default:o(()=>[a(c(s.$t(`common.delete`)),1)]),_:1})]),default:o(()=>[p(`p`,T,[a(c(s.$t(`account.users.delete_confirm`))+` `,1),M.value?(r(),f(`strong`,E,c(M.value.name),1)):e(``,!0)]),p(`p`,D,c(s.$t(`account.users.delete_irreversible`)),1)]),_:1},8,[`show`,`title`])]),_:1},8,[`title`]))}};export{O as default};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/Index-CJcjrNaO.js b/packages/admin/dist/assets/Index-P5jX14JD.js
similarity index 97%
rename from packages/admin/dist/assets/Index-CJcjrNaO.js
rename to packages/admin/dist/assets/Index-P5jX14JD.js
index 928e82fa..c28e70cc 100644
--- a/packages/admin/dist/assets/Index-CJcjrNaO.js
+++ b/packages/admin/dist/assets/Index-P5jX14JD.js
@@ -1 +1 @@
-import{E as e,I as t,R as n,S as r,T as i,W as a,Y as o,et as s,s as c,v as l,w as u,x as d}from"./dist-MY__znoP.js";import{t as f}from"./AdminLayout-I1QMPYpW.js";import{t as p}from"./AdminButton-Bx141Bs3.js";import{t as m}from"./AdminModal-DNJ_V4iq.js";var h={class:`mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4`},g={"data-page-title":`admin.roles`,class:`text-2xl font-bold text-fg`},_={class:`mt-1 text-sm text-muted`},v={class:`bg-surface rounded-lg shadow overflow-hidden`},y={key:0,class:`p-6 text-sm text-muted`},b={key:1,class:`min-w-full text-sm`},x={class:`bg-surface-alt`},S={class:`px-4 py-2 text-left font-medium text-fg`},C={class:`px-4 py-2 text-left font-medium text-fg`},w={class:`px-4 py-2 text-left font-medium text-fg`},T={class:`divide-y divide-line`},E={class:`px-4 py-2 font-medium text-fg`},D={class:`px-4 py-2 text-fg`},O={class:`px-4 py-2 text-fg`},k={class:`px-4 py-2 text-right whitespace-nowrap`},A={class:`text-muted`},j={__name:`Index`,props:{roles:Array,title:String},setup(j){let M=o(null),N=()=>{c.delete(route(`admin.roles.destroy`,M.value.id),{preserveScroll:!0,onFinish:()=>{M.value=null}})};return(o,c)=>(t(),r(f,{title:j.title},{default:a(()=>[d(`div`,h,[d(`div`,null,[d(`h1`,g,s(j.title),1),d(`p`,_,s(o.$t(`permissions.index_hint`)),1)]),e(p,{"data-action":`create`,href:o.route(`admin.roles.create`)},{default:a(()=>[c[2]||=d(`svg`,{class:`w-4 h-4 mr-2`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[d(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 4v16m8-8H4`})],-1),i(` `+s(o.$t(`common.create`)),1)]),_:1},8,[`href`])]),d(`div`,v,[j.roles.length===0?(t(),u(`p`,y,s(o.$t(`permissions.empty`)),1)):(t(),u(`table`,b,[d(`thead`,x,[d(`tr`,null,[d(`th`,S,s(o.$t(`permissions.name`)),1),d(`th`,C,s(o.$t(`permissions.permissions_count`)),1),d(`th`,w,s(o.$t(`permissions.users_count`)),1),c[3]||=d(`th`,{class:`px-4 py-2`},null,-1)])]),d(`tbody`,T,[(t(!0),u(l,null,n(j.roles,n=>(t(),u(`tr`,{key:n.id,"data-role-row":``},[d(`td`,E,s(n.name),1),d(`td`,D,s(n.permissions_count),1),d(`td`,O,s(n.users_count),1),d(`td`,k,[e(p,{size:`sm`,variant:`outline`,"data-action":`edit`,href:o.route(`admin.roles.edit`,n.id)},{default:a(()=>[i(s(o.$t(`common.edit`)),1)]),_:1},8,[`href`]),e(p,{size:`sm`,variant:`danger`,"data-action":`delete`,class:`ml-2`,onClick:e=>M.value=n},{default:a(()=>[i(s(o.$t(`common.delete`)),1)]),_:1},8,[`onClick`])])]))),128))])]))]),e(m,{show:M.value!==null,title:o.$t(`permissions.delete_title`),onClose:c[1]||=e=>M.value=null},{footer:a(()=>[e(p,{variant:`secondary`,onClick:c[0]||=e=>M.value=null},{default:a(()=>[i(s(o.$t(`common.cancel`)),1)]),_:1}),e(p,{variant:`danger`,"data-action":`delete-confirm`,onClick:N},{default:a(()=>[i(s(o.$t(`common.delete`)),1)]),_:1})]),default:a(()=>[d(`p`,A,[d(`strong`,null,s(M.value?.name),1),i(` — `+s(o.$t(`permissions.delete_confirm`)),1)])]),_:1},8,[`show`,`title`])]),_:1},8,[`title`]))}};export{j as default};
\ No newline at end of file
+import{E as e,I as t,R as n,S as r,T as i,W as a,Y as o,et as s,s as c,v as l,w as u,x as d}from"./dist-MY__znoP.js";import{t as f}from"./AdminLayout--RXJFj9t.js";import{t as p}from"./AdminButton-Bx141Bs3.js";import{t as m}from"./AdminModal-DNJ_V4iq.js";var h={class:`mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4`},g={"data-page-title":`admin.roles`,class:`text-2xl font-bold text-fg`},_={class:`mt-1 text-sm text-muted`},v={class:`bg-surface rounded-lg shadow overflow-hidden`},y={key:0,class:`p-6 text-sm text-muted`},b={key:1,class:`min-w-full text-sm`},x={class:`bg-surface-alt`},S={class:`px-4 py-2 text-left font-medium text-fg`},C={class:`px-4 py-2 text-left font-medium text-fg`},w={class:`px-4 py-2 text-left font-medium text-fg`},T={class:`divide-y divide-line`},E={class:`px-4 py-2 font-medium text-fg`},D={class:`px-4 py-2 text-fg`},O={class:`px-4 py-2 text-fg`},k={class:`px-4 py-2 text-right whitespace-nowrap`},A={class:`text-muted`},j={__name:`Index`,props:{roles:Array,title:String},setup(j){let M=o(null),N=()=>{c.delete(route(`admin.roles.destroy`,M.value.id),{preserveScroll:!0,onFinish:()=>{M.value=null}})};return(o,c)=>(t(),r(f,{title:j.title},{default:a(()=>[d(`div`,h,[d(`div`,null,[d(`h1`,g,s(j.title),1),d(`p`,_,s(o.$t(`permissions.index_hint`)),1)]),e(p,{"data-action":`create`,href:o.route(`admin.roles.create`)},{default:a(()=>[c[2]||=d(`svg`,{class:`w-4 h-4 mr-2`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[d(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 4v16m8-8H4`})],-1),i(` `+s(o.$t(`common.create`)),1)]),_:1},8,[`href`])]),d(`div`,v,[j.roles.length===0?(t(),u(`p`,y,s(o.$t(`permissions.empty`)),1)):(t(),u(`table`,b,[d(`thead`,x,[d(`tr`,null,[d(`th`,S,s(o.$t(`permissions.name`)),1),d(`th`,C,s(o.$t(`permissions.permissions_count`)),1),d(`th`,w,s(o.$t(`permissions.users_count`)),1),c[3]||=d(`th`,{class:`px-4 py-2`},null,-1)])]),d(`tbody`,T,[(t(!0),u(l,null,n(j.roles,n=>(t(),u(`tr`,{key:n.id,"data-role-row":``},[d(`td`,E,s(n.name),1),d(`td`,D,s(n.permissions_count),1),d(`td`,O,s(n.users_count),1),d(`td`,k,[e(p,{size:`sm`,variant:`outline`,"data-action":`edit`,href:o.route(`admin.roles.edit`,n.id)},{default:a(()=>[i(s(o.$t(`common.edit`)),1)]),_:1},8,[`href`]),e(p,{size:`sm`,variant:`danger`,"data-action":`delete`,class:`ml-2`,onClick:e=>M.value=n},{default:a(()=>[i(s(o.$t(`common.delete`)),1)]),_:1},8,[`onClick`])])]))),128))])]))]),e(m,{show:M.value!==null,title:o.$t(`permissions.delete_title`),onClose:c[1]||=e=>M.value=null},{footer:a(()=>[e(p,{variant:`secondary`,onClick:c[0]||=e=>M.value=null},{default:a(()=>[i(s(o.$t(`common.cancel`)),1)]),_:1}),e(p,{variant:`danger`,"data-action":`delete-confirm`,onClick:N},{default:a(()=>[i(s(o.$t(`common.delete`)),1)]),_:1})]),default:a(()=>[d(`p`,A,[d(`strong`,null,s(M.value?.name),1),i(` — `+s(o.$t(`permissions.delete_confirm`)),1)])]),_:1},8,[`show`,`title`])]),_:1},8,[`title`]))}};export{j as default};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/Index-bqKVRXw8.js b/packages/admin/dist/assets/Index-bqKVRXw8.js
new file mode 100644
index 00000000..50e9d09c
--- /dev/null
+++ b/packages/admin/dist/assets/Index-bqKVRXw8.js
@@ -0,0 +1 @@
+import{C as e,E as t,G as n,I as r,Q as i,R as a,S as o,T as s,W as c,Y as l,et as u,p as d,s as f,v as p,w as m,x as h}from"./dist-MY__znoP.js";import{t as g}from"./AdminLayout--RXJFj9t.js";import{t as _}from"./AdminButton-Bx141Bs3.js";var v={class:`mb-6`},y={"data-page-title":`admin.cache`,class:`text-2xl font-bold text-gray-900`},b={class:`mt-1 text-sm text-gray-600`},x={class:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6`},S={class:`bg-white rounded-lg shadow p-4`,"data-cache-stat":`rate`},C={class:`text-sm text-gray-600`},w={class:`mt-1 text-2xl font-semibold text-gray-900`},T={class:`mt-1 text-xs text-gray-500`},E={class:`bg-white rounded-lg shadow p-4`,"data-cache-stat":`size`},D={class:`text-sm text-gray-600`},O={class:`mt-1 text-2xl font-semibold text-gray-900`},k={class:`mt-1 text-xs text-gray-500`},A={class:`bg-white rounded-lg shadow p-4`,"data-cache-stat":`store`},j={class:`text-sm text-gray-600`},M={class:`mt-1 text-2xl font-semibold text-gray-900`},N={class:`mt-1 text-xs text-gray-500`},P={class:`bg-white rounded-lg shadow p-4`,"data-cache-stat":`state`},F={class:`text-sm text-gray-600`},I={class:`mt-1 text-xs text-gray-500`},L={class:`bg-white rounded-lg shadow p-6 space-y-6`},R={class:`text-sm text-gray-600`},ee={key:0,class:`flex flex-col sm:flex-row sm:items-end gap-3`},z={class:`flex-1`},B={class:`block text-sm font-medium text-gray-700 mb-1`},V=[`value`],H={key:1,class:`flex flex-col sm:flex-row sm:items-end gap-3`},U={class:`flex-1`},W={class:`block text-sm font-medium text-gray-700 mb-1`},G=[`value`],K={class:`flex flex-wrap gap-3 pt-2 border-t border-gray-100`},q={__name:`Index`,props:{status:Object,modules:Array,sites:Array},setup(q){let J=q,Y=l(J.modules[0]?.key??``),X=l(J.sites[0]?.id??``),Z=l(!1),Q=(e,t={})=>{Z.value=!0,f.post(route(`admin.cache.clear`),{scope:e,...t},{preserveScroll:!0,onFinish:()=>{Z.value=!1}})},$=e=>e==null?`—`:new Intl.NumberFormat().format(e),te=e=>{if(e==null)return`—`;let t=[`B`,`KB`,`MB`,`GB`],n=e,r=0;for(;n>=1024&&r(r(),o(g,{title:l.$t(`menu.cache`)},{default:c(()=>[h(`div`,v,[h(`h1`,y,u(l.$t(`menu.cache`)),1),h(`p`,b,u(l.$t(`cache.subtitle`)),1)]),h(`div`,x,[h(`div`,S,[h(`div`,C,u(l.$t(`cache.hit_rate`)),1),h(`div`,w,u(q.status.rate===null?`—`:`${q.status.rate}%`),1),h(`div`,T,u(l.$t(`cache.hits`))+`: `+u($(q.status.hits))+` · `+u(l.$t(`cache.misses`))+`: `+u($(q.status.misses)),1)]),h(`div`,E,[h(`div`,D,u(l.$t(`cache.size`)),1),h(`div`,O,u(te(q.status.bytes)),1),h(`div`,k,u(l.$t(`cache.entries`))+`: `+u($(q.status.entries)),1)]),h(`div`,A,[h(`div`,j,u(l.$t(`cache.store`)),1),h(`div`,M,u(q.status.driver),1),h(`div`,N,u(q.status.tags?l.$t(`cache.with_tags`):l.$t(`cache.without_tags`)),1)]),h(`div`,P,[h(`div`,F,u(l.$t(`cache.records`)),1),h(`div`,{class:i([`mt-1 text-2xl font-semibold`,q.status.enabled?`text-green-700`:`text-gray-500`])},u(q.status.enabled?l.$t(`cache.on`):l.$t(`cache.off`)),3),h(`div`,I,u(l.$t(`cache.pages`))+`: `+u(q.status.pages?l.$t(`cache.on`):l.$t(`cache.off`)),1)])]),h(`div`,L,[h(`p`,R,u(l.$t(`cache.clear_hint`)),1),q.modules.length?(r(),m(`div`,ee,[h(`label`,z,[h(`span`,B,u(l.$t(`cache.module`)),1),n(h(`select`,{"onUpdate:modelValue":f[0]||=e=>Y.value=e,"data-cache-module":``,class:`w-full rounded-md border-gray-300 text-sm`},[(r(!0),m(p,null,a(q.modules,e=>(r(),m(`option`,{key:e.key,value:e.key},u(e.label),9,V))),128))],512),[[d,Y.value]])]),t(_,{variant:`outline`,"data-action":`clear-module`,disabled:Z.value,onClick:f[1]||=e=>Q(`module`,{module:Y.value})},{default:c(()=>[s(u(l.$t(`cache.clear_module`)),1)]),_:1},8,[`disabled`])])):e(``,!0),q.sites.length>1?(r(),m(`div`,H,[h(`label`,U,[h(`span`,W,u(l.$t(`cache.site`)),1),n(h(`select`,{"onUpdate:modelValue":f[2]||=e=>X.value=e,"data-cache-site":``,class:`w-full rounded-md border-gray-300 text-sm`},[(r(!0),m(p,null,a(q.sites,e=>(r(),m(`option`,{key:e.id,value:e.id},u(e.name),9,G))),128))],512),[[d,X.value]])]),t(_,{variant:`outline`,"data-action":`clear-site`,disabled:Z.value,onClick:f[3]||=e=>Q(`site`,{site:X.value})},{default:c(()=>[s(u(l.$t(`cache.clear_site`)),1)]),_:1},8,[`disabled`])])):e(``,!0),h(`div`,K,[t(_,{variant:`danger`,"data-action":`clear-all`,disabled:Z.value,onClick:f[4]||=e=>Q(`all`)},{default:c(()=>[s(u(l.$t(`cache.clear_all`)),1)]),_:1},8,[`disabled`]),t(_,{variant:`secondary`,"data-action":`reset-stats`,disabled:Z.value,onClick:f[5]||=e=>Q(`stats`)},{default:c(()=>[s(u(l.$t(`cache.reset_stats`)),1)]),_:1},8,[`disabled`])])])]),_:1},8,[`title`]))}};export{q as default};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/Settings-DiwVH39L.js b/packages/admin/dist/assets/Settings-C2VyFPrB.js
similarity index 88%
rename from packages/admin/dist/assets/Settings-DiwVH39L.js
rename to packages/admin/dist/assets/Settings-C2VyFPrB.js
index da199ea9..e04f9bea 100644
--- a/packages/admin/dist/assets/Settings-DiwVH39L.js
+++ b/packages/admin/dist/assets/Settings-C2VyFPrB.js
@@ -1 +1 @@
-import{C as e,E as t,I as n,L as r,R as i,S as a,T as o,W as s,Z as c,_ as l,a as u,b as d,et as f,i as p,v as m,w as h,x as g}from"./dist-MY__znoP.js";import{t as _}from"./AdminLayout-I1QMPYpW.js";import{t as v}from"./AdminButton-Bx141Bs3.js";import{t as y}from"./AdminCard--HubMtUj.js";import{t as b}from"./FormField-BI8KmQxQ.js";import{n as x}from"./contentLocale-BtGD-iBF.js";var S={class:`mb-6`},C={class:`max-w-4xl`},w={"data-page-title":`admin.modules.settings`,class:`text-2xl font-bold text-fg`},T={key:0,class:`mt-1 text-sm text-muted`},E={key:1,"data-settings-site":``,class:`mt-1 text-sm text-muted`},D=[`data-module`],O={class:`space-y-6`},k={class:`flex items-center justify-end space-x-3 pt-6 mt-6 border-t`},A={__name:`Settings`,props:{module:Object,description:String,fields:Array,values:Object,site:{type:Object,default:null},title:String},setup(A){let j=A,M={};j.fields.forEach(e=>{M[e.name]=x(e,j.values[e.name])});let N=u(M);r(`formData`,d(()=>N.data()));let P=()=>{N.submit(`put`,route(`admin.modules.settings.update`,j.module.key),{preserveScroll:!0})};return(r,u)=>(n(),a(_,{title:A.title},{default:s(()=>[g(`div`,S,[t(c(p),{href:r.route(`admin.modules.index`),class:`text-muted hover:text-accent`},{default:s(()=>[o(f(r.$t(`menu.modules`)),1)]),_:1},8,[`href`])]),g(`div`,C,[g(`h1`,w,f(A.title),1),A.description?(n(),h(`p`,T,f(A.description),1)):e(``,!0),A.site?(n(),h(`p`,E,f(r.$t(`modules.per_site`,{site:A.site.name})),1)):e(``,!0),t(y,{class:`mt-6`},{default:s(()=>[g(`form`,{"data-settings-form":``,"data-module":A.module.key,onSubmit:l(P,[`prevent`])},[g(`div`,O,[(n(!0),h(m,null,i(A.fields,e=>(n(),a(b,{key:e.name,field:e,modelValue:c(N)[e.name],"onUpdate:modelValue":t=>c(N)[e.name]=t,errors:c(N).errors},null,8,[`field`,`modelValue`,`onUpdate:modelValue`,`errors`]))),128))]),g(`div`,k,[t(v,{href:r.route(`admin.modules.index`),variant:`secondary`},{default:s(()=>[o(f(r.$t(`common.cancel`)),1)]),_:1},8,[`href`]),t(v,{"data-action":`save`,type:`submit`,loading:c(N).processing},{default:s(()=>[o(f(r.$t(`common.save`)),1)]),_:1},8,[`loading`])])],40,D)]),_:1})])]),_:1},8,[`title`]))}};export{A as default};
\ No newline at end of file
+import{C as e,E as t,I as n,L as r,R as i,S as a,T as o,W as s,Z as c,_ as l,a as u,b as d,et as f,i as p,v as m,w as h,x as g}from"./dist-MY__znoP.js";import{t as _}from"./AdminLayout--RXJFj9t.js";import{t as v}from"./AdminButton-Bx141Bs3.js";import{t as y}from"./AdminCard--HubMtUj.js";import{t as b}from"./FormField-xD6LELDV.js";import{n as x}from"./contentLocale-BtGD-iBF.js";var S={class:`mb-6`},C={class:`max-w-4xl`},w={"data-page-title":`admin.modules.settings`,class:`text-2xl font-bold text-fg`},T={key:0,class:`mt-1 text-sm text-muted`},E={key:1,"data-settings-site":``,class:`mt-1 text-sm text-muted`},D=[`data-module`],O={class:`space-y-6`},k={class:`flex items-center justify-end space-x-3 pt-6 mt-6 border-t`},A={__name:`Settings`,props:{module:Object,description:String,fields:Array,values:Object,site:{type:Object,default:null},title:String},setup(A){let j=A,M={};j.fields.forEach(e=>{M[e.name]=x(e,j.values[e.name])});let N=u(M);r(`formData`,d(()=>N.data()));let P=()=>{N.submit(`put`,route(`admin.modules.settings.update`,j.module.key),{preserveScroll:!0})};return(r,u)=>(n(),a(_,{title:A.title},{default:s(()=>[g(`div`,S,[t(c(p),{href:r.route(`admin.modules.index`),class:`text-muted hover:text-accent`},{default:s(()=>[o(f(r.$t(`menu.modules`)),1)]),_:1},8,[`href`])]),g(`div`,C,[g(`h1`,w,f(A.title),1),A.description?(n(),h(`p`,T,f(A.description),1)):e(``,!0),A.site?(n(),h(`p`,E,f(r.$t(`modules.per_site`,{site:A.site.name})),1)):e(``,!0),t(y,{class:`mt-6`},{default:s(()=>[g(`form`,{"data-settings-form":``,"data-module":A.module.key,onSubmit:l(P,[`prevent`])},[g(`div`,O,[(n(!0),h(m,null,i(A.fields,e=>(n(),a(b,{key:e.name,field:e,modelValue:c(N)[e.name],"onUpdate:modelValue":t=>c(N)[e.name]=t,errors:c(N).errors},null,8,[`field`,`modelValue`,`onUpdate:modelValue`,`errors`]))),128))]),g(`div`,k,[t(v,{href:r.route(`admin.modules.index`),variant:`secondary`},{default:s(()=>[o(f(r.$t(`common.cancel`)),1)]),_:1},8,[`href`]),t(v,{"data-action":`save`,type:`submit`,loading:c(N).processing},{default:s(()=>[o(f(r.$t(`common.save`)),1)]),_:1},8,[`loading`])])],40,D)]),_:1})])]),_:1},8,[`title`]))}};export{A as default};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/app-lI4VKCmX.js b/packages/admin/dist/assets/app-BNjy5Z6H.js
similarity index 88%
rename from packages/admin/dist/assets/app-lI4VKCmX.js
rename to packages/admin/dist/assets/app-BNjy5Z6H.js
index b92102cb..982986f2 100644
--- a/packages/admin/dist/assets/app-lI4VKCmX.js
+++ b/packages/admin/dist/assets/app-BNjy5Z6H.js
@@ -1,2 +1,2 @@
-const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Index-BzuT6e6D.js","assets/dist-MY__znoP.js","assets/AdminLayout-I1QMPYpW.js","assets/LocaleSwitcher-DdLJ9WTE.js","assets/AdminLayout-QfjingjX.css","assets/AdminButton-Bx141Bs3.js","assets/AdminCard--HubMtUj.js","assets/AdminModal-DNJ_V4iq.js","assets/Login-D_P0ceoZ.js","assets/Index-B0DDRHtS.js","assets/Dashboard-BpfYcZ3c.js","assets/Index-CVtF6Jho.js","assets/Settings-DiwVH39L.js","assets/FormField-BI8KmQxQ.js","assets/FormField-0qI8GE1v.css","assets/contentLocale-BtGD-iBF.js","assets/Edit-D7McI_eD.js","assets/Create-B8v2keK9.js","assets/ContentLocaleSwitcher-BJIieXK-.js","assets/Edit-DKlRxfoE.js","assets/recordActions-CtRs42tG.js","assets/Index-By9Fq-LA.js","assets/AdminDataTable-BaQwb_6U.js","assets/Edit-ppjiZjeT.js","assets/Index-CJcjrNaO.js","assets/Create-DWM7DbLl.js","assets/Edit-BEiwW1oN.js","assets/Index-waO6UWa5.js"])))=>i.map(i=>d[i]);
-import{k as e,l as t,o as n,s as r,t as i}from"./dist-MY__znoP.js";var a=`modulepreload`,o=function(e){return`/vendor/atrium/`+e},s={},c=function(e){return e.pathname.endsWith(`.css`)},l=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},u=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),u=i?.nonce||i?.getAttribute(`nonce`);function d(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function f(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=d(t.map(t=>{t=o(t,n);let r=f(t),i=c(r);return l(s,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:a,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,u&&t.setAttribute(`nonce`,u),document.head.appendChild(t),i)return new Promise((e,n)=>{let i=a=>{t.removeEventListener(`load`,i),t.removeEventListener(`error`,i),a.type===`error`?n(Error(`Unable to preload CSS for ${r}`)):e(a)};t.addEventListener(`load`,i),t.addEventListener(`error`,i)})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},d=String.prototype.replace,f=/%20/g,p={RFC1738:`RFC1738`,RFC3986:`RFC3986`},m={RFC1738:function(e){return d.call(e,f,`+`)},RFC3986:function(e){return String(e)}},h=p.RFC1738;p.RFC3986;var g=p.RFC3986,_=Object.prototype.hasOwnProperty,v=Array.isArray,y=new WeakMap,b=function(e,t){return y.set(e,t),e};function x(e){return y.has(e)}var S=function(e){return y.get(e)},C=function(e,t){y.set(e,t)},w=(function(){let e=[];for(let t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e})(),T=function(e){for(;e.length>1;){let t=e.pop(),n=t.obj[t.prop];if(v(n)){let e=[];for(let t=0;t=0&&e>S(t)&&C(t,e)}return t},l)},te=function(e){let t=e.replace(/\+/g,` `);try{return decodeURIComponent(t)}catch{return t}},D=1024,ne=function(e,t,n,r){if(e.length===0)return e;let i=e;typeof e==`symbol`?i=Symbol.prototype.toString.call(e):typeof e!=`string`&&(i=String(e));let a=``;for(let e=0;e=D?i.slice(e,e+D):i;if(e+D=55296&&n<=56319&&(t=t.slice(0,-1),--e)}let n=[];for(let e=0;e=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122||r===h&&(i===40||i===41)?n[n.length]=t.charAt(e):i<128?n[n.length]=w[i]:i<2048?n[n.length]=w[192|i>>6]+w[128|i&63]:i<55296||i>=57344?n[n.length]=w[224|i>>12]+w[128|i>>6&63]+w[128|i&63]:(e+=1,i=65536+((i&1023)<<10|t.charCodeAt(e)&1023),n[n.length]=w[240|i>>18]+w[128|i>>12&63]+w[128|i>>6&63]+w[128|i&63])}a+=n.join(``)}return a},re=function(e){let t=[{obj:{o:e},prop:`o`}],n=new WeakMap;for(let e=0;en?b(E(a,{plainObjects:r}),a.length-1):a},k=function(e,t){if(v(e)){let n=[];for(let r=0;r0?_.join(`,`)||null:void 0}];else if(j(l))S=l;else{let e=Object.keys(_);S=u?e.sort(u):e}let C=s?t.replace(/\./g,`%2E`):t,w=r&&j(_)&&_.length===1?C+`[]`:C;if(i&&j(_)&&_.length===0)return w+`[]`;for(let t=0;t0?d+u:``}var L=Object.prototype.hasOwnProperty,R=Array.isArray,z={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,comma:!1,decodeDotInKeys:!1,decoder:te,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},B=function(e,t){return e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1?e.split(`,`):e},fe=function(e,t){let n={__proto__:null},r=t.ignoreQueryPrefix?e.replace(/^\?/,``):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,a=r.split(t.delimiter,i),o=0;for(;o-1&&(c=R(c)?[c]:c),t.comma&&R(c)&&c.length>t.arrayLimit&&(c=O([],c,t.arrayLimit,t.plainObjects));let l=L.call(n,s);l&&t.duplicates===`combine`?n[s]=O(n[s],c,t.arrayLimit,t.plainObjects):l&&t.duplicates!==`last`||(n[s]=c)}return n},pe=function(e,t,n,r){let i=r?t:B(t,n);for(let t=e.length-1;t>=0;--t){let r,a=e[t];if(a===`[]`&&n.parseArrays)r=x(i)?i:n.allowEmptyArrays&&(i===``||n.strictNullHandling&&i===null)?[]:O([],i,n.arrayLimit,n.plainObjects);else{r=n.plainObjects?Object.create(null):{};let e=a.charAt(0)===`[`&&a.charAt(a.length-1)===`]`?a.slice(1,-1):a,t=n.decodeDotInKeys?e.replace(/%2E/g,`.`):e,o=parseInt(t,10),s=!isNaN(o)&&a!==t&&String(o)===t&&o>=0&&n.parseArrays;!n.parseArrays&&t===``?r={0:i}:s&&o<=n.arrayLimit?(r=[],r[o]=i):s?(r[o]=i,b(r,o)):t!==`__proto__`&&(r[t]=i)}i=r}return i},me=function(e,t,n,r){if(!e)return;let i=n.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e,a=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,s=n.depth>0&&a.exec(i),c=s?i.slice(0,s.index):i,l=[];if(c){if(!n.plainObjects&&L.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}let u=0;for(;n.depth>0&&(s=o.exec(i))!==null&&u{try{return decodeURIComponent(e)}catch{return e}})}var H=class{constructor(e,t,n){this.name=e,this.definition=t,this.bindings=t.bindings??{},this.wheres=t.wheres??{},this.config=n}get template(){let e=`${this.origin}/${this.definition.uri}`.replace(/\/+$/,``);return e===``?`/`:e}get origin(){return this.config.absolute?this.definition.domain?`${this.config.url.match(/^\w+:\/\//)[0]}${this.definition.domain}${this.config.port?`:${this.config.port}`:``}`:this.config.url:``}get parameterSegments(){return this.template.match(/{[^}?]+\??}/g)?.map(e=>({name:e.replace(/{|\??}/g,``),required:!/\?}$/.test(e)}))??[]}matchesUrl(e){if(!this.definition.methods.includes(`GET`))return!1;let t=this.template.replace(/[.*+$()[\]]/g,`\\$&`).replace(/(\/?){([^}?]*)(\??)}/g,(e,t,n,r)=>{let i=`(?<${n}>${this.wheres[n]?.replace(/(^\^)|(\$$)/g,``)||`[^/?]+`})`;return r?`(${t}${i})?`:`${t}${i}`}).replace(/^\w+:\/\//,``),[n,r]=e.replace(/^\w+:\/\//,``).split(`?`),i=RegExp(`^${t}/?$`).exec(n);if(!i)try{i=RegExp(`^${t}/?$`).exec(decodeURI(n))}catch{}if(i){for(let e in i.groups)typeof i.groups[e]==`string`&&(i.groups[e]=V(i.groups[e]));return{params:i.groups,query:ge(r)}}return!1}compile(e){return this.parameterSegments.length?this.template.replace(/{([^}?]+)(\??)}/g,(t,n,r)=>{if(!r&&[null,void 0].includes(e[n]))throw Error(`Ziggy error: '${n}' parameter is required for route '${this.name}'.`);if(this.wheres[n]&&!RegExp(`^${r?`(${this.wheres[n]})?`:this.wheres[n]}$`).test(e[n]??``))throw Error(`Ziggy error: '${n}' parameter '${e[n]}' does not match required format '${this.wheres[n]}' for route '${this.name}'.`);return encodeURI(e[n]??``).replace(/%7C/g,`|`).replace(/%25/g,`%`).replace(/\$/g,`%24`)}).replace(this.config.absolute?/(\.[^/]+?)(\/\/)/:/(^)(\/\/)/,`$1/`).replace(/\/+$/,``):this.template}};function U(e){"@babel/helpers - typeof";return U=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},U(e)}function _e(e,t){if(U(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(U(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ve(e){var t=_e(e,`string`);return U(t)==`symbol`?t:t+``}function ye(e,t,n){return(t=ve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function G(e){for(var t=1;t!this._route.parameterSegments.some(({name:t})=>t===e)).filter(e=>e!==`_query`).reduce((e,t)=>G(G({},e),{},{[t]:this._params[t]}),{});return this._route.compile(this._params)+de(G(G({},e),this._params._query),{addQueryPrefix:!0,arrayFormat:`indices`,encodeValuesOnly:!0,skipNulls:!0,encoder:(e,t)=>typeof e==`boolean`?Number(e):t(e)})}_unresolve(e){e?this._config.absolute&&e.startsWith(`/`)&&(e=this._location().host+e):e=this._currentUrl();let t={},[n,r]=Object.entries(this._config.routes).find(([n,r])=>t=new H(n,r,this._config).matchesUrl(e))||[void 0,void 0];return G(G({name:n},t),{},{route:r})}_currentUrl(){let{host:e,pathname:t,search:n}=this._location();return(this._config.absolute?e+t:t.replace(this._config.url.replace(/^\w*:\/\/[^/]+/,``),``).replace(/^\/+/,`/`))+n}current(e,t){let{name:n,params:r,query:i,route:a}=this._unresolve();if(!e)return n;let o=RegExp(`^${e.replace(/\./g,`\\.`).replace(/\*/g,`.*`)}$`).test(n);if([null,void 0].includes(t)||!o)return o;let s=new H(n,a,this._config);t=this._parse(t,s);let c=G(G({},r),i);if(Object.values(t).every(e=>!e)&&!Object.values(c).some(e=>e!==void 0))return!0;let l=(e,t)=>Object.entries(e).every(([e,n])=>Array.isArray(n)&&Array.isArray(t[e])?n.every(n=>t[e].includes(n)||t[e].includes(V(String(n)))):typeof n==`object`&&typeof t[e]==`object`&&n!==null&&t[e]!==null?l(n,t[e]):t[e]==n||t[e]==V(String(n)));return l(t,c)}_location(){let{host:e=``,pathname:t=``,search:n=``}=typeof window<`u`?window.location:{},r=typeof this._config.location==`string`?new URL(this._config.location):this._config.location;return{host:r?.host??e,pathname:r?.pathname??t,search:r?.search??n}}get params(){let{params:e,query:t}=this._unresolve();return G(G({},e),t)}get routeParams(){return this._unresolve().params}get queryParams(){return this._unresolve().query}has(e){return this._config.routes.hasOwnProperty(e)}_parse(e={},t=this._route){e??={},e=[`string`,`number`].includes(typeof e)?[e]:e;let n=t.parameterSegments.filter(({name:e})=>!this._config.defaults[e]);return Array.isArray(e)?e=e.reduce((e,t,r)=>n[r]?G(G({},e),{},{[n[r].name]:t}):typeof t==`object`?G(G({},e),t):G(G({},e),{},{[t]:``}),{}):n.length===1&&!e.hasOwnProperty(n[0].name)&&(e.hasOwnProperty(Object.values(t.bindings)[0])||e.hasOwnProperty(`id`))&&(e={[n[0].name]:e}),G(G({},this._defaults(t)),this._substituteBindings(e,t))}_defaults(e){return e.parameterSegments.filter(({name:e})=>this._config.defaults[e]).reduce((e,{name:t},n)=>G(G({},e),{},{[t]:this._config.defaults[t]}),{})}_substituteBindings(e,{bindings:t,parameterSegments:n}){return Object.entries(e).reduce((e,[r,i])=>{if(!i||typeof i!=`object`||Array.isArray(i)||!n.some(({name:e})=>e===r))return G(G({},e),{},{[r]:i});let a=i.hasOwnProperty(t[r])?t[r]:i.hasOwnProperty(`id`)?`id`:void 0;if(a===void 0)throw Error(`Ziggy error: object passed as '${r}' parameter is missing route model binding key '${t[r]}'.`);return G(G({},e),{},{[r]:i[a]})},{})}valueOf(){return this.toString()}};function xe(e,t,n,r){let i=new be(e,t,n,r);return e?i.toString():i}var Se={install(e,t){let n=(e,n,r,i=t)=>xe(e,n,r,typeof i==`function`?i():i);parseInt(e.version)>2?(e.config.globalProperties.route=n,e.provide(`route`,n)):e.mixin({methods:{route:n}})}};function Ce(e,t){let n=Math.trunc(t)%10,r=Math.trunc(t)%100;switch(e){case`ja`:case`zh_CN`:case`tr`:case`kk`:case`uz`:return 0;case`fr`:return t===0||t===1?0:1;case`ru`:case`uk`:case`be`:return n===1&&r!==11?0:n>=2&&n<=4&&(r<10||r>=20)?1:2;case`pl`:return t===1?0:n>=2&&n<=4&&(r<12||r>14)?1:2;default:return t===1?0:1}}function K(){return n().props.translations||{}}function we(){return n().props.locale||`en`}function q(e,t){return Object.entries(t).reduce((e,[t,n])=>e.replaceAll(`:${t}`,String(n??``)),e)}function J(e,t={}){let n=K()[e];return typeof n==`string`?q(n,t):e}function Te(e,t,n={}){let r=K()[e];if(typeof r!=`string`)return e;let i=r.split(`|`),a=i[Math.min(Ce(we(),t),i.length-1)];return q(a,{count:t,...n})}var Ee={install(e){e.config.globalProperties.$t=J,e.config.globalProperties.$tc=Te}},De=[`graphite`,`day`,`night`,`sand`,`contrast`],Y=typeof window<`u`&&window.matchMedia?window.matchMedia(`(prefers-color-scheme: dark)`):null,X=null,Oe=e=>e===`system`?Y?.matches?`night`:`graphite`:De.includes(e)?e:`graphite`;function Z(e){if(!e)return;X=e;let t=document.documentElement;t.dataset.themeChoice=e,t.dataset.theme=Oe(e)}Y?.addEventListener(`change`,()=>{X===`system`&&Z(X)});var Q=e=>{let t=e.detail.page.props.locale;t&&(document.documentElement.lang=t.replace(`_`,`-`))};r.on(`success`,Q),r.on(`navigate`,Q);var $=e=>Z(e.detail.page.props.theme);r.on(`success`,$),r.on(`navigate`,$);var ke=Object.assign({"./Pages/Admin/ApiTokens/Index.vue":()=>u(()=>import(`./Index-BzuT6e6D.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),"./Pages/Admin/Auth/Login.vue":()=>u(()=>import(`./Login-D_P0ceoZ.js`),__vite__mapDeps([8,1,3])),"./Pages/Admin/Backups/Index.vue":()=>u(()=>import(`./Index-B0DDRHtS.js`),__vite__mapDeps([9,1,2,3,4,5,6,7])),"./Pages/Admin/Dashboard.vue":()=>u(()=>import(`./Dashboard-BpfYcZ3c.js`),__vite__mapDeps([10,1,2,3,4])),"./Pages/Admin/Modules/Index.vue":()=>u(()=>import(`./Index-CVtF6Jho.js`),__vite__mapDeps([11,1,2,3,4,5])),"./Pages/Admin/Modules/Settings.vue":()=>u(()=>import(`./Settings-DiwVH39L.js`),__vite__mapDeps([12,1,2,3,4,5,6,13,7,14,15])),"./Pages/Admin/Profile/Edit.vue":()=>u(()=>import(`./Edit-D7McI_eD.js`),__vite__mapDeps([16,1,2,3,4])),"./Pages/Admin/Resource/Create.vue":()=>u(()=>import(`./Create-B8v2keK9.js`),__vite__mapDeps([17,1,2,3,4,5,6,18,13,7,14,15])),"./Pages/Admin/Resource/Edit.vue":()=>u(()=>import(`./Edit-DKlRxfoE.js`),__vite__mapDeps([19,1,2,3,4,5,6,18,13,7,14,15,20])),"./Pages/Admin/Resource/Index.vue":()=>u(()=>import(`./Index-By9Fq-LA.js`),__vite__mapDeps([21,1,2,3,4,5,22,7,20])),"./Pages/Admin/Roles/Edit.vue":()=>u(()=>import(`./Edit-ppjiZjeT.js`),__vite__mapDeps([23,1,2,3,4,5,6])),"./Pages/Admin/Roles/Index.vue":()=>u(()=>import(`./Index-CJcjrNaO.js`),__vite__mapDeps([24,1,2,3,4,5,7])),"./Pages/Admin/Users/Create.vue":()=>u(()=>import(`./Create-DWM7DbLl.js`),__vite__mapDeps([25,1,2,3,4,5,6,13,7,14])),"./Pages/Admin/Users/Edit.vue":()=>u(()=>import(`./Edit-BEiwW1oN.js`),__vite__mapDeps([26,1,2,3,4,5,6,13,7,14])),"./Pages/Admin/Users/Index.vue":()=>u(()=>import(`./Index-waO6UWa5.js`),__vite__mapDeps([27,1,2,3,4,5,22,7]))});i({title:e=>{let t=document.querySelector(`title`)?.dataset.brand||`Atrium`;return e?`${e} — ${t}`:t},resolve:e=>{let t=ke[`./Pages/${e}.vue`];if(!t)throw Error(`Atrium: page "${e}" not found`);return t()},setup({el:n,App:r,props:i,plugin:a}){Z(i.initialPage.props.theme),t({render:()=>e(r,i)}).use(a).use(Se).use(Ee).mount(n)},progress:{color:`var(--atrium-accent)`}});export{J as n,Z as t};
\ No newline at end of file
+const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Index-C_p9UH4T.js","assets/dist-MY__znoP.js","assets/AdminLayout--RXJFj9t.js","assets/LocaleSwitcher-DdLJ9WTE.js","assets/AdminLayout-QfjingjX.css","assets/AdminButton-Bx141Bs3.js","assets/AdminCard--HubMtUj.js","assets/AdminModal-DNJ_V4iq.js","assets/Login-D_P0ceoZ.js","assets/Index-9-V30Hlc.js","assets/Index-bqKVRXw8.js","assets/Dashboard-BU7gtvAo.js","assets/Index-1mD_GBWn.js","assets/Settings-C2VyFPrB.js","assets/FormField-xD6LELDV.js","assets/FormField-0qI8GE1v.css","assets/contentLocale-BtGD-iBF.js","assets/Edit-D-yhP5A2.js","assets/Create-BxhK0Jvn.js","assets/ContentLocaleSwitcher-BJIieXK-.js","assets/Edit-CHndUQJ2.js","assets/recordActions-CtRs42tG.js","assets/Index-CjLWl74m.js","assets/AdminDataTable-BaQwb_6U.js","assets/Edit-pGNJhUsL.js","assets/Index-P5jX14JD.js","assets/Create-C61-lS2c.js","assets/Edit-DGjzU-uC.js","assets/Index-DEbfZBFs.js"])))=>i.map(i=>d[i]);
+import{k as e,l as t,o as n,s as r,t as i}from"./dist-MY__znoP.js";var a=`modulepreload`,o=function(e){return`/vendor/atrium/`+e},s={},c=function(e){return e.pathname.endsWith(`.css`)},l=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},u=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),u=i?.nonce||i?.getAttribute(`nonce`);function d(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function f(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=d(t.map(t=>{t=o(t,n);let r=f(t),i=c(r);return l(s,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:a,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,u&&t.setAttribute(`nonce`,u),document.head.appendChild(t),i)return new Promise((e,n)=>{let i=a=>{t.removeEventListener(`load`,i),t.removeEventListener(`error`,i),a.type===`error`?n(Error(`Unable to preload CSS for ${r}`)):e(a)};t.addEventListener(`load`,i),t.addEventListener(`error`,i)})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},d=String.prototype.replace,f=/%20/g,p={RFC1738:`RFC1738`,RFC3986:`RFC3986`},m={RFC1738:function(e){return d.call(e,f,`+`)},RFC3986:function(e){return String(e)}},h=p.RFC1738;p.RFC3986;var g=p.RFC3986,_=Object.prototype.hasOwnProperty,v=Array.isArray,y=new WeakMap,b=function(e,t){return y.set(e,t),e};function x(e){return y.has(e)}var S=function(e){return y.get(e)},C=function(e,t){y.set(e,t)},w=(function(){let e=[];for(let t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e})(),T=function(e){for(;e.length>1;){let t=e.pop(),n=t.obj[t.prop];if(v(n)){let e=[];for(let t=0;t=0&&e>S(t)&&C(t,e)}return t},l)},te=function(e){let t=e.replace(/\+/g,` `);try{return decodeURIComponent(t)}catch{return t}},D=1024,ne=function(e,t,n,r){if(e.length===0)return e;let i=e;typeof e==`symbol`?i=Symbol.prototype.toString.call(e):typeof e!=`string`&&(i=String(e));let a=``;for(let e=0;e=D?i.slice(e,e+D):i;if(e+D=55296&&n<=56319&&(t=t.slice(0,-1),--e)}let n=[];for(let e=0;e=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122||r===h&&(i===40||i===41)?n[n.length]=t.charAt(e):i<128?n[n.length]=w[i]:i<2048?n[n.length]=w[192|i>>6]+w[128|i&63]:i<55296||i>=57344?n[n.length]=w[224|i>>12]+w[128|i>>6&63]+w[128|i&63]:(e+=1,i=65536+((i&1023)<<10|t.charCodeAt(e)&1023),n[n.length]=w[240|i>>18]+w[128|i>>12&63]+w[128|i>>6&63]+w[128|i&63])}a+=n.join(``)}return a},re=function(e){let t=[{obj:{o:e},prop:`o`}],n=new WeakMap;for(let e=0;en?b(E(a,{plainObjects:r}),a.length-1):a},k=function(e,t){if(v(e)){let n=[];for(let r=0;r0?_.join(`,`)||null:void 0}];else if(j(l))S=l;else{let e=Object.keys(_);S=u?e.sort(u):e}let C=s?t.replace(/\./g,`%2E`):t,w=r&&j(_)&&_.length===1?C+`[]`:C;if(i&&j(_)&&_.length===0)return w+`[]`;for(let t=0;t0?d+u:``}var L=Object.prototype.hasOwnProperty,R=Array.isArray,z={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,comma:!1,decodeDotInKeys:!1,decoder:te,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},B=function(e,t){return e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1?e.split(`,`):e},fe=function(e,t){let n={__proto__:null},r=t.ignoreQueryPrefix?e.replace(/^\?/,``):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,a=r.split(t.delimiter,i),o=0;for(;o-1&&(c=R(c)?[c]:c),t.comma&&R(c)&&c.length>t.arrayLimit&&(c=O([],c,t.arrayLimit,t.plainObjects));let l=L.call(n,s);l&&t.duplicates===`combine`?n[s]=O(n[s],c,t.arrayLimit,t.plainObjects):l&&t.duplicates!==`last`||(n[s]=c)}return n},pe=function(e,t,n,r){let i=r?t:B(t,n);for(let t=e.length-1;t>=0;--t){let r,a=e[t];if(a===`[]`&&n.parseArrays)r=x(i)?i:n.allowEmptyArrays&&(i===``||n.strictNullHandling&&i===null)?[]:O([],i,n.arrayLimit,n.plainObjects);else{r=n.plainObjects?Object.create(null):{};let e=a.charAt(0)===`[`&&a.charAt(a.length-1)===`]`?a.slice(1,-1):a,t=n.decodeDotInKeys?e.replace(/%2E/g,`.`):e,o=parseInt(t,10),s=!isNaN(o)&&a!==t&&String(o)===t&&o>=0&&n.parseArrays;!n.parseArrays&&t===``?r={0:i}:s&&o<=n.arrayLimit?(r=[],r[o]=i):s?(r[o]=i,b(r,o)):t!==`__proto__`&&(r[t]=i)}i=r}return i},me=function(e,t,n,r){if(!e)return;let i=n.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e,a=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,s=n.depth>0&&a.exec(i),c=s?i.slice(0,s.index):i,l=[];if(c){if(!n.plainObjects&&L.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}let u=0;for(;n.depth>0&&(s=o.exec(i))!==null&&u{try{return decodeURIComponent(e)}catch{return e}})}var H=class{constructor(e,t,n){this.name=e,this.definition=t,this.bindings=t.bindings??{},this.wheres=t.wheres??{},this.config=n}get template(){let e=`${this.origin}/${this.definition.uri}`.replace(/\/+$/,``);return e===``?`/`:e}get origin(){return this.config.absolute?this.definition.domain?`${this.config.url.match(/^\w+:\/\//)[0]}${this.definition.domain}${this.config.port?`:${this.config.port}`:``}`:this.config.url:``}get parameterSegments(){return this.template.match(/{[^}?]+\??}/g)?.map(e=>({name:e.replace(/{|\??}/g,``),required:!/\?}$/.test(e)}))??[]}matchesUrl(e){if(!this.definition.methods.includes(`GET`))return!1;let t=this.template.replace(/[.*+$()[\]]/g,`\\$&`).replace(/(\/?){([^}?]*)(\??)}/g,(e,t,n,r)=>{let i=`(?<${n}>${this.wheres[n]?.replace(/(^\^)|(\$$)/g,``)||`[^/?]+`})`;return r?`(${t}${i})?`:`${t}${i}`}).replace(/^\w+:\/\//,``),[n,r]=e.replace(/^\w+:\/\//,``).split(`?`),i=RegExp(`^${t}/?$`).exec(n);if(!i)try{i=RegExp(`^${t}/?$`).exec(decodeURI(n))}catch{}if(i){for(let e in i.groups)typeof i.groups[e]==`string`&&(i.groups[e]=V(i.groups[e]));return{params:i.groups,query:ge(r)}}return!1}compile(e){return this.parameterSegments.length?this.template.replace(/{([^}?]+)(\??)}/g,(t,n,r)=>{if(!r&&[null,void 0].includes(e[n]))throw Error(`Ziggy error: '${n}' parameter is required for route '${this.name}'.`);if(this.wheres[n]&&!RegExp(`^${r?`(${this.wheres[n]})?`:this.wheres[n]}$`).test(e[n]??``))throw Error(`Ziggy error: '${n}' parameter '${e[n]}' does not match required format '${this.wheres[n]}' for route '${this.name}'.`);return encodeURI(e[n]??``).replace(/%7C/g,`|`).replace(/%25/g,`%`).replace(/\$/g,`%24`)}).replace(this.config.absolute?/(\.[^/]+?)(\/\/)/:/(^)(\/\/)/,`$1/`).replace(/\/+$/,``):this.template}};function U(e){"@babel/helpers - typeof";return U=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},U(e)}function _e(e,t){if(U(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(U(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ve(e){var t=_e(e,`string`);return U(t)==`symbol`?t:t+``}function ye(e,t,n){return(t=ve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function G(e){for(var t=1;t!this._route.parameterSegments.some(({name:t})=>t===e)).filter(e=>e!==`_query`).reduce((e,t)=>G(G({},e),{},{[t]:this._params[t]}),{});return this._route.compile(this._params)+de(G(G({},e),this._params._query),{addQueryPrefix:!0,arrayFormat:`indices`,encodeValuesOnly:!0,skipNulls:!0,encoder:(e,t)=>typeof e==`boolean`?Number(e):t(e)})}_unresolve(e){e?this._config.absolute&&e.startsWith(`/`)&&(e=this._location().host+e):e=this._currentUrl();let t={},[n,r]=Object.entries(this._config.routes).find(([n,r])=>t=new H(n,r,this._config).matchesUrl(e))||[void 0,void 0];return G(G({name:n},t),{},{route:r})}_currentUrl(){let{host:e,pathname:t,search:n}=this._location();return(this._config.absolute?e+t:t.replace(this._config.url.replace(/^\w*:\/\/[^/]+/,``),``).replace(/^\/+/,`/`))+n}current(e,t){let{name:n,params:r,query:i,route:a}=this._unresolve();if(!e)return n;let o=RegExp(`^${e.replace(/\./g,`\\.`).replace(/\*/g,`.*`)}$`).test(n);if([null,void 0].includes(t)||!o)return o;let s=new H(n,a,this._config);t=this._parse(t,s);let c=G(G({},r),i);if(Object.values(t).every(e=>!e)&&!Object.values(c).some(e=>e!==void 0))return!0;let l=(e,t)=>Object.entries(e).every(([e,n])=>Array.isArray(n)&&Array.isArray(t[e])?n.every(n=>t[e].includes(n)||t[e].includes(V(String(n)))):typeof n==`object`&&typeof t[e]==`object`&&n!==null&&t[e]!==null?l(n,t[e]):t[e]==n||t[e]==V(String(n)));return l(t,c)}_location(){let{host:e=``,pathname:t=``,search:n=``}=typeof window<`u`?window.location:{},r=typeof this._config.location==`string`?new URL(this._config.location):this._config.location;return{host:r?.host??e,pathname:r?.pathname??t,search:r?.search??n}}get params(){let{params:e,query:t}=this._unresolve();return G(G({},e),t)}get routeParams(){return this._unresolve().params}get queryParams(){return this._unresolve().query}has(e){return this._config.routes.hasOwnProperty(e)}_parse(e={},t=this._route){e??={},e=[`string`,`number`].includes(typeof e)?[e]:e;let n=t.parameterSegments.filter(({name:e})=>!this._config.defaults[e]);return Array.isArray(e)?e=e.reduce((e,t,r)=>n[r]?G(G({},e),{},{[n[r].name]:t}):typeof t==`object`?G(G({},e),t):G(G({},e),{},{[t]:``}),{}):n.length===1&&!e.hasOwnProperty(n[0].name)&&(e.hasOwnProperty(Object.values(t.bindings)[0])||e.hasOwnProperty(`id`))&&(e={[n[0].name]:e}),G(G({},this._defaults(t)),this._substituteBindings(e,t))}_defaults(e){return e.parameterSegments.filter(({name:e})=>this._config.defaults[e]).reduce((e,{name:t},n)=>G(G({},e),{},{[t]:this._config.defaults[t]}),{})}_substituteBindings(e,{bindings:t,parameterSegments:n}){return Object.entries(e).reduce((e,[r,i])=>{if(!i||typeof i!=`object`||Array.isArray(i)||!n.some(({name:e})=>e===r))return G(G({},e),{},{[r]:i});let a=i.hasOwnProperty(t[r])?t[r]:i.hasOwnProperty(`id`)?`id`:void 0;if(a===void 0)throw Error(`Ziggy error: object passed as '${r}' parameter is missing route model binding key '${t[r]}'.`);return G(G({},e),{},{[r]:i[a]})},{})}valueOf(){return this.toString()}};function xe(e,t,n,r){let i=new be(e,t,n,r);return e?i.toString():i}var Se={install(e,t){let n=(e,n,r,i=t)=>xe(e,n,r,typeof i==`function`?i():i);parseInt(e.version)>2?(e.config.globalProperties.route=n,e.provide(`route`,n)):e.mixin({methods:{route:n}})}};function Ce(e,t){let n=Math.trunc(t)%10,r=Math.trunc(t)%100;switch(e){case`ja`:case`zh_CN`:case`tr`:case`kk`:case`uz`:return 0;case`fr`:return t===0||t===1?0:1;case`ru`:case`uk`:case`be`:return n===1&&r!==11?0:n>=2&&n<=4&&(r<10||r>=20)?1:2;case`pl`:return t===1?0:n>=2&&n<=4&&(r<12||r>14)?1:2;default:return t===1?0:1}}function K(){return n().props.translations||{}}function we(){return n().props.locale||`en`}function q(e,t){return Object.entries(t).reduce((e,[t,n])=>e.replaceAll(`:${t}`,String(n??``)),e)}function J(e,t={}){let n=K()[e];return typeof n==`string`?q(n,t):e}function Te(e,t,n={}){let r=K()[e];if(typeof r!=`string`)return e;let i=r.split(`|`),a=i[Math.min(Ce(we(),t),i.length-1)];return q(a,{count:t,...n})}var Ee={install(e){e.config.globalProperties.$t=J,e.config.globalProperties.$tc=Te}},De=[`graphite`,`day`,`night`,`sand`,`contrast`],Y=typeof window<`u`&&window.matchMedia?window.matchMedia(`(prefers-color-scheme: dark)`):null,X=null,Oe=e=>e===`system`?Y?.matches?`night`:`graphite`:De.includes(e)?e:`graphite`;function Z(e){if(!e)return;X=e;let t=document.documentElement;t.dataset.themeChoice=e,t.dataset.theme=Oe(e)}Y?.addEventListener(`change`,()=>{X===`system`&&Z(X)});var Q=e=>{let t=e.detail.page.props.locale;t&&(document.documentElement.lang=t.replace(`_`,`-`))};r.on(`success`,Q),r.on(`navigate`,Q);var $=e=>Z(e.detail.page.props.theme);r.on(`success`,$),r.on(`navigate`,$);var ke=Object.assign({"./Pages/Admin/ApiTokens/Index.vue":()=>u(()=>import(`./Index-C_p9UH4T.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),"./Pages/Admin/Auth/Login.vue":()=>u(()=>import(`./Login-D_P0ceoZ.js`),__vite__mapDeps([8,1,3])),"./Pages/Admin/Backups/Index.vue":()=>u(()=>import(`./Index-9-V30Hlc.js`),__vite__mapDeps([9,1,2,3,4,5,6,7])),"./Pages/Admin/Cache/Index.vue":()=>u(()=>import(`./Index-bqKVRXw8.js`),__vite__mapDeps([10,1,2,3,4,5])),"./Pages/Admin/Dashboard.vue":()=>u(()=>import(`./Dashboard-BU7gtvAo.js`),__vite__mapDeps([11,1,2,3,4])),"./Pages/Admin/Modules/Index.vue":()=>u(()=>import(`./Index-1mD_GBWn.js`),__vite__mapDeps([12,1,2,3,4,5])),"./Pages/Admin/Modules/Settings.vue":()=>u(()=>import(`./Settings-C2VyFPrB.js`),__vite__mapDeps([13,1,2,3,4,5,6,14,7,15,16])),"./Pages/Admin/Profile/Edit.vue":()=>u(()=>import(`./Edit-D-yhP5A2.js`),__vite__mapDeps([17,1,2,3,4])),"./Pages/Admin/Resource/Create.vue":()=>u(()=>import(`./Create-BxhK0Jvn.js`),__vite__mapDeps([18,1,2,3,4,5,6,19,14,7,15,16])),"./Pages/Admin/Resource/Edit.vue":()=>u(()=>import(`./Edit-CHndUQJ2.js`),__vite__mapDeps([20,1,2,3,4,5,6,19,14,7,15,16,21])),"./Pages/Admin/Resource/Index.vue":()=>u(()=>import(`./Index-CjLWl74m.js`),__vite__mapDeps([22,1,2,3,4,5,23,7,21])),"./Pages/Admin/Roles/Edit.vue":()=>u(()=>import(`./Edit-pGNJhUsL.js`),__vite__mapDeps([24,1,2,3,4,5,6])),"./Pages/Admin/Roles/Index.vue":()=>u(()=>import(`./Index-P5jX14JD.js`),__vite__mapDeps([25,1,2,3,4,5,7])),"./Pages/Admin/Users/Create.vue":()=>u(()=>import(`./Create-C61-lS2c.js`),__vite__mapDeps([26,1,2,3,4,5,6,14,7,15])),"./Pages/Admin/Users/Edit.vue":()=>u(()=>import(`./Edit-DGjzU-uC.js`),__vite__mapDeps([27,1,2,3,4,5,6,14,7,15])),"./Pages/Admin/Users/Index.vue":()=>u(()=>import(`./Index-DEbfZBFs.js`),__vite__mapDeps([28,1,2,3,4,5,23,7]))});i({title:e=>{let t=document.querySelector(`title`)?.dataset.brand||`Atrium`;return e?`${e} — ${t}`:t},resolve:e=>{let t=ke[`./Pages/${e}.vue`];if(!t)throw Error(`Atrium: page "${e}" not found`);return t()},setup({el:n,App:r,props:i,plugin:a}){Z(i.initialPage.props.theme),t({render:()=>e(r,i)}).use(a).use(Se).use(Ee).mount(n)},progress:{color:`var(--atrium-accent)`}});export{J as n,Z as t};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/app-BncygNAT.css b/packages/admin/dist/assets/app-BncygNAT.css
new file mode 100644
index 00000000..5f3e10fa
--- /dev/null
+++ b/packages/admin/dist/assets/app-BncygNAT.css
@@ -0,0 +1,2 @@
+/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
+@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--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-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--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-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, 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;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-4xl:56rem;--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-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--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);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--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);--font-brand:"Space Grotesk", var(--font-sans)}}@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, 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}html{accent-color:var(--atrium-accent);background-color:var(--atrium-page);color:var(--atrium-fg)}*{--tw-ring-offset-color:var(--atrium-surface)}::placeholder{color:var(--atrium-muted);opacity:1}select:not([multiple]):not([size]){appearance:none;background-color:var(--atrium-surface);background-image:linear-gradient(45deg,#0000 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,#0000 50%);background-position:calc(100% - 1rem),calc(100% - .6875rem);background-repeat:no-repeat;background-size:.3125rem .3125rem}select option{background-color:var(--atrium-surface);color:var(--atrium-fg)}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.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}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-y-0{inset-block:0}.top-0{top:0}.top-1{top:var(--spacing)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.right-0{right:0}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.bottom-4{bottom:calc(var(--spacing) * 4)}.left-0{left:0}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.isolate{isolation:isolate}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mr-1{margin-right:var(--spacing)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-3{margin-right:calc(var(--spacing) * 3)}.mr-4{margin-right:calc(var(--spacing) * 4)}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.-ml-0\.5{margin-left:calc(var(--spacing) * -.5)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-1{margin-left:var(--spacing)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-6{margin-left:calc(var(--spacing) * 6)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-square{aspect-ratio:1}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-24{height:calc(var(--spacing) * 24)}.h-full{height:100%}.h-px{height:1px}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[90vh\]{max-height:90vh}.max-h-\[min\(36rem\,calc\(100vh-8rem\)\)\]{max-height:min(36rem,100vh - 8rem)}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-\[4\.75rem\]{width:4.75rem}.w-\[22rem\]{width:22rem}.w-auto{width:auto}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-14{max-width:calc(var(--spacing) * 14)}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-\[85\%\]{max-width:85%}.max-w-\[90\%\]{max-width:90%}.max-w-\[calc\(100vw-2rem\)\]{max-width:calc(100vw - 2rem)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-48{min-width:calc(var(--spacing) * 48)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-separate{border-collapse:separate}.border-spacing-0{--tw-border-spacing-x:0px;--tw-border-spacing-y:0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0px;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)}.translate-y-0{--tw-translate-y:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-4{--tw-translate-y:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, )}.transform-gpu{transform:translateZ(0) var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, )}.animate-spin{animation:var(--animate-spin)}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.list-disc{list-style-type:disc}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.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-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}:where(.-space-x-px>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(-1px * var(--tw-space-x-reverse));margin-inline-end:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(var(--spacing) * var(--tw-space-x-reverse));margin-inline-end:calc(var(--spacing) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 4) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-8>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 8) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-x-reverse)))}.gap-y-3{row-gap:calc(var(--spacing) * 3)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-line>:not(:last-child)){border-color:var(--atrium-line)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-md{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.rounded-r-md{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}.rounded-b-lg{border-bottom-right-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-b-xl{border-bottom-right-radius:var(--radius-xl);border-bottom-left-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-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-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent{border-color:var(--atrium-accent)}.border-accent-hover{border-color:var(--atrium-accent-hover)}.border-accent-soft{border-color:var(--atrium-accent-soft)}.border-badge-line{border-color:var(--atrium-badge-line)}.border-current{border-color:currentColor}.border-danger{border-color:var(--atrium-danger)}.border-danger-soft{border-color:var(--atrium-danger-soft)}.border-field{border-color:var(--atrium-field)}.border-focus{border-color:var(--atrium-focus)}.border-line{border-color:var(--atrium-line)}.border-sidebar-line{border-color:var(--atrium-sidebar-line)}.border-success{border-color:var(--atrium-success)}.border-transparent{border-color:#0000}.border-warning-soft-fg{border-color:var(--atrium-warning-soft-fg)}.bg-accent{background-color:var(--atrium-accent)}.bg-accent-hover{background-color:var(--atrium-accent-hover)}.bg-accent-soft{background-color:var(--atrium-accent-soft)}.bg-black\/50{background-color:oklab(0% none none/.5)}.bg-current{background-color:currentColor}.bg-danger{background-color:var(--atrium-danger)}.bg-danger-hover{background-color:var(--atrium-danger-hover)}.bg-danger-soft{background-color:var(--atrium-danger-soft)}.bg-inherit{background-color:inherit}.bg-line{background-color:var(--atrium-line)}.bg-off{background-color:var(--atrium-off)}.bg-page{background-color:var(--atrium-page)}.bg-sidebar{background-color:var(--atrium-sidebar)}.bg-sidebar-active{background-color:var(--atrium-sidebar-active)}.bg-success-soft{background-color:var(--atrium-success-soft)}.bg-surface{background-color:var(--atrium-surface)}.bg-surface-alt{background-color:var(--atrium-surface-alt)}.bg-surface\/75{background-color:var(--atrium-surface)}@supports (color:color-mix(in lab, red, red)){.bg-surface\/75{background-color:color-mix(in oklab, var(--atrium-surface) 75%, transparent)}}.bg-transparent{background-color:#0000}.bg-warning-soft{background-color:var(--atrium-warning-soft)}.bg-white{background-color:#fff}.bg-contain{background-size:contain}.bg-center{background-position:50%}.bg-left{background-position:0}.bg-no-repeat{background-repeat:no-repeat}.fill-accent{fill:var(--atrium-accent)}.fill-fg{fill:var(--atrium-fg)}.fill-mark{fill:var(--atrium-mark)}.fill-mark-accent{fill:var(--atrium-mark-accent)}.fill-surface{fill:var(--atrium-surface)}.object-cover{object-fit:cover}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.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)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-1{padding-bottom:var(--spacing)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.pl-10{padding-left:calc(var(--spacing) * 10)}.pl-12{padding-left:calc(var(--spacing) * 12)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-brand{font-family:var(--font-brand)}.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-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.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-\[11px\]{font-size:11px}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.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-\[-0\.01em\]{--tw-tracking:-.01em;letter-spacing:-.01em}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--atrium-accent)}.text-accent-hover{color:var(--atrium-accent-hover)}.text-accent-soft-fg{color:var(--atrium-accent-soft-fg)}.text-danger{color:var(--atrium-danger)}.text-danger-soft-fg{color:var(--atrium-danger-soft-fg)}.text-fg{color:var(--atrium-fg)}.text-muted{color:var(--atrium-muted)}.text-off-fg{color:var(--atrium-off-fg)}.text-on-accent{color:var(--atrium-on-accent)}.text-on-danger{color:var(--atrium-on-danger)}.text-sidebar-active-fg{color:var(--atrium-sidebar-active-fg)}.text-sidebar-fg{color:var(--atrium-sidebar-fg)}.text-sidebar-muted{color:var(--atrium-sidebar-muted)}.text-success{color:var(--atrium-success)}.text-success-soft-fg{color:var(--atrium-success-soft-fg)}.text-transparent{color:#0000}.text-warning-soft-fg{color:var(--atrium-warning-soft-fg)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal, ) var(--tw-slashed-zero, ) var(--tw-numeric-figure, ) var(--tw-numeric-spacing, ) var(--tw-numeric-fraction, )}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-muted::placeholder{color:var(--atrium-muted)}.accent-hover{accent-color:var(--atrium-hover)}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_3px_0_0_var\(--atrium-sidebar-accent\)\]{--tw-shadow:inset 3px 0 0 var(--tw-shadow-color,var(--atrium-sidebar-accent));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.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-2{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(2px + 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-field{--tw-ring-color:var(--atrium-field)}.ring-focus{--tw-ring-color:var(--atrium-focus)}.ring-line{--tw-ring-color:var(--atrium-line)}.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{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.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))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-all{-webkit-user-select:all;user-select:all}.ring-inset{--tw-ring-inset:inset}@media (hover:hover){:is(:where(.group):hover .group-hover\:text-fg){color:var(--atrium-fg)}:is(:where(.group):hover .group-hover\:opacity-100){opacity:1}}.file\:mr-4::file-selector-button{margin-right:calc(var(--spacing) * 4)}.file\:rounded-md::file-selector-button{border-radius:var(--radius-md)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-accent-soft::file-selector-button{background-color:var(--atrium-accent-soft)}.file\:px-4::file-selector-button{padding-inline:calc(var(--spacing) * 4)}.file\:py-2::file-selector-button{padding-block:calc(var(--spacing) * 2)}.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-accent-hover::file-selector-button{color:var(--atrium-accent-hover)}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:border-fg:hover{border-color:var(--atrium-fg)}.hover\:border-field:hover{border-color:var(--atrium-field)}.hover\:border-focus:hover{border-color:var(--atrium-focus)}.hover\:bg-accent-hover:hover{background-color:var(--atrium-accent-hover)}.hover\:bg-accent-soft:hover{background-color:var(--atrium-accent-soft)}.hover\:bg-danger-hover:hover{background-color:var(--atrium-danger-hover)}.hover\:bg-danger-soft:hover{background-color:var(--atrium-danger-soft)}.hover\:bg-hover:hover{background-color:var(--atrium-hover)}.hover\:bg-sidebar-hover:hover{background-color:var(--atrium-sidebar-hover)}.hover\:text-accent:hover{color:var(--atrium-accent)}.hover\:text-accent-hover:hover{color:var(--atrium-accent-hover)}.hover\:text-accent-soft-fg:hover{color:var(--atrium-accent-soft-fg)}.hover\:text-danger:hover{color:var(--atrium-danger)}.hover\:text-danger-soft-fg:hover{color:var(--atrium-danger-soft-fg)}.hover\:text-fg:hover{color:var(--atrium-fg)}.hover\:text-sidebar-fg:hover{color:var(--atrium-sidebar-fg)}.hover\:underline:hover{text-decoration-line:underline}.hover\:file\:bg-accent-soft:hover::file-selector-button{background-color:var(--atrium-accent-soft)}}.focus\:border-focus:focus{border-color:var(--atrium-focus)}.focus\:ring-1:focus{--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)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(2px + 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\:ring-danger:focus{--tw-ring-color:var(--atrium-danger)}.focus\:ring-focus:focus{--tw-ring-color:var(--atrium-focus)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(2px + 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-focus:focus-visible{--tw-ring-color:var(--atrium-focus)}.focus-visible\:ring-sidebar-accent:focus-visible{--tw-ring-color:var(--atrium-sidebar-accent)}.focus-visible\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-focus:focus-visible{outline-color:var(--atrium-focus)}.focus-visible\:ring-inset:focus-visible{--tw-ring-inset:inset}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-off:disabled{background-color:var(--atrium-off)}.disabled\:text-muted:disabled{color:var(--atrium-muted)}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}@media (width>=40rem){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:my-8{margin-block:calc(var(--spacing) * 8)}.sm\:block{display:block}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:w-full{width:100%}.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-32{max-width:calc(var(--spacing) * 32)}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-md{max-width:var(--container-md)}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:max-w-xl{max-width:var(--container-xl)}.sm\:translate-y-0{--tw-translate-y:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.sm\:scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.sm\:scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:items-end{align-items:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-2{gap:calc(var(--spacing) * 2)}.sm\:gap-4{gap:calc(var(--spacing) * 4)}.sm\:px-2{padding-inline:calc(var(--spacing) * 2)}.sm\:px-4{padding-inline:calc(var(--spacing) * 4)}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}}@media (width>=48rem){.md\:block{display:block}:where(.md\:space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}}@media (width>=64rem){.lg\:col-span-2{grid-column:span 2/span 2}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:w-20{width:calc(var(--spacing) * 20)}.lg\:w-64{width:calc(var(--spacing) * 64)}.lg\:translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:gap-3{gap:calc(var(--spacing) * 3)}.lg\:p-6{padding:calc(var(--spacing) * 6)}.lg\:px-2{padding-inline:calc(var(--spacing) * 2)}.lg\:px-6{padding-inline:calc(var(--spacing) * 6)}.lg\:px-8{padding-inline:calc(var(--spacing) * 8)}.lg\:pl-20{padding-left:calc(var(--spacing) * 20)}.lg\:pl-64{padding-left:calc(var(--spacing) * 64)}.lg\:text-center{text-align:center}}@media (width>=80rem){.xl\:max-w-48{max-width:calc(var(--spacing) * 48)}}}@font-face{font-family:Space Grotesk;font-style:normal;font-display:swap;font-weight:600;src:url(/vendor/atrium/assets/space-grotesk-latin-600-normal-DjKNqYRj.woff2)format("woff2"),url(/vendor/atrium/assets/space-grotesk-latin-600-normal-BflQw4A9.woff)format("woff")}:root,[data-theme=graphite]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--atrium-sidebar:#111827;--atrium-sidebar-fg:#f9fafb;--atrium-sidebar-muted:#9ca3af;--atrium-sidebar-hover:#1f2937;--atrium-sidebar-active:#1f2937;--atrium-sidebar-active-fg:#fff;--atrium-sidebar-accent:#60a5fa;--atrium-sidebar-line:#1f2937;--atrium-page:#f3f4f6;--atrium-surface:#fff;--atrium-surface-alt:#f9fafb;--atrium-hover:#f3f4f6;--atrium-fg:#111827;--atrium-muted:#4b5563;--atrium-line:#e5e7eb;--atrium-field:#7e8691;--atrium-accent:#2563eb;--atrium-accent-hover:#1d4ed8;--atrium-on-accent:#fff;--atrium-accent-soft:#dbeafe;--atrium-accent-soft-fg:#1e40af;--atrium-focus:#2563eb;--atrium-off:#f3f4f6;--atrium-off-fg:#374151;--atrium-badge-line:transparent;--atrium-danger:#c81e1e;--atrium-danger-hover:#991b1b;--atrium-on-danger:#fff;--atrium-danger-soft:#fee2e2;--atrium-danger-soft-fg:#991b1b;--atrium-success:#15803d;--atrium-success-soft:#dcfce7;--atrium-success-soft-fg:#166534;--atrium-warning-soft:#fef3c7;--atrium-warning-soft-fg:#92400e;--atrium-mark:#fff;--atrium-mark-accent:#60a5fa}[data-theme=day]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--atrium-sidebar:#fff;--atrium-sidebar-fg:#1f2937;--atrium-sidebar-muted:#64748b;--atrium-sidebar-hover:#f1f5f9;--atrium-sidebar-active:#eef2ff;--atrium-sidebar-active-fg:#3730a3;--atrium-sidebar-accent:#4f46e5;--atrium-sidebar-line:#e2e8f0;--atrium-page:#f8fafc;--atrium-surface:#fff;--atrium-surface-alt:#f8fafc;--atrium-hover:#f1f5f9;--atrium-fg:#0f172a;--atrium-muted:#475569;--atrium-line:#e2e8f0;--atrium-field:#8391a5;--atrium-accent:#4f46e5;--atrium-accent-hover:#4338ca;--atrium-on-accent:#fff;--atrium-accent-soft:#e0e7ff;--atrium-accent-soft-fg:#3730a3;--atrium-focus:#4f46e5;--atrium-off:#f1f5f9;--atrium-off-fg:#334155;--atrium-badge-line:transparent;--atrium-danger:#c81e1e;--atrium-danger-hover:#991b1b;--atrium-on-danger:#fff;--atrium-danger-soft:#fee2e2;--atrium-danger-soft-fg:#991b1b;--atrium-success:#15803d;--atrium-success-soft:#dcfce7;--atrium-success-soft-fg:#166534;--atrium-warning-soft:#fef3c7;--atrium-warning-soft-fg:#92400e;--atrium-mark:#0f172a;--atrium-mark-accent:#4f46e5}[data-theme=night]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--atrium-sidebar:#0a0e14;--atrium-sidebar-fg:#e6eaf0;--atrium-sidebar-muted:#8b95a5;--atrium-sidebar-hover:#141b26;--atrium-sidebar-active:#1a2230;--atrium-sidebar-active-fg:#fff;--atrium-sidebar-accent:#8ab4ff;--atrium-sidebar-line:#1a2230;--atrium-page:#0f141b;--atrium-surface:#161d27;--atrium-surface-alt:#121821;--atrium-hover:#1f2733;--atrium-fg:#e6eaf0;--atrium-muted:#a0aaba;--atrium-line:#253041;--atrium-field:#5f6d82;--atrium-accent:#8ab4ff;--atrium-accent-hover:#b0ccff;--atrium-on-accent:#0a0e14;--atrium-accent-soft:#1e2f4d;--atrium-accent-soft-fg:#b9d1ff;--atrium-focus:#8ab4ff;--atrium-off:#222b38;--atrium-off-fg:#c3cbd6;--atrium-badge-line:transparent;--atrium-danger:#ff8a8a;--atrium-danger-hover:#ffb0b0;--atrium-on-danger:#0a0e14;--atrium-danger-soft:#3d1c22;--atrium-danger-soft-fg:#ffc2c2;--atrium-success:#5fd38d;--atrium-success-soft:#173524;--atrium-success-soft-fg:#a6ebc0;--atrium-warning-soft:#3a2e12;--atrium-warning-soft-fg:#fcd98a;--atrium-mark:#fff;--atrium-mark-accent:#8ab4ff}[data-theme=sand]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--atrium-sidebar:#1f1a14;--atrium-sidebar-fg:#f5efe6;--atrium-sidebar-muted:#b3a796;--atrium-sidebar-hover:#2b241c;--atrium-sidebar-active:#342b21;--atrium-sidebar-active-fg:#fff;--atrium-sidebar-accent:#f2a65a;--atrium-sidebar-line:#342b21;--atrium-page:#f7f3ec;--atrium-surface:#fff;--atrium-surface-alt:#fbf8f3;--atrium-hover:#f1ece4;--atrium-fg:#1f1a14;--atrium-muted:#5c5246;--atrium-line:#e7dfd2;--atrium-field:#958672;--atrium-accent:#a6490a;--atrium-accent-hover:#853a07;--atrium-on-accent:#fff;--atrium-accent-soft:#fce7d2;--atrium-accent-soft-fg:#7a3506;--atrium-focus:#a6490a;--atrium-off:#f1ece4;--atrium-off-fg:#4a4137;--atrium-badge-line:transparent;--atrium-danger:#b42318;--atrium-danger-hover:#912018;--atrium-on-danger:#fff;--atrium-danger-soft:#fde4e1;--atrium-danger-soft-fg:#8a1c12;--atrium-success:#2e7d32;--atrium-success-soft:#e3f2df;--atrium-success-soft-fg:#1f5a23;--atrium-warning-soft:#fbefc5;--atrium-warning-soft-fg:#7a4a06;--atrium-mark:#f5efe6;--atrium-mark-accent:#f2a65a}[data-theme=contrast]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--atrium-sidebar:#000;--atrium-sidebar-fg:#fff;--atrium-sidebar-muted:#d4d4d4;--atrium-sidebar-hover:#262626;--atrium-sidebar-active:#ffd400;--atrium-sidebar-active-fg:#000;--atrium-sidebar-accent:#ffd400;--atrium-sidebar-line:#fff;--atrium-page:#fff;--atrium-surface:#fff;--atrium-surface-alt:#fff;--atrium-hover:#fff2a8;--atrium-fg:#000;--atrium-muted:#262626;--atrium-line:#000;--atrium-field:#000;--atrium-accent:#0033a0;--atrium-accent-hover:#001f66;--atrium-on-accent:#fff;--atrium-accent-soft:#ffd400;--atrium-accent-soft-fg:#000;--atrium-focus:#0033a0;--atrium-off:#fff;--atrium-off-fg:#000;--atrium-badge-line:#000;--atrium-danger:#b00020;--atrium-danger-hover:#7a0016;--atrium-on-danger:#fff;--atrium-danger-soft:#ffe0e0;--atrium-danger-soft-fg:#7a0016;--atrium-success:#006b2d;--atrium-success-soft:#d9f5e3;--atrium-success-soft-fg:#003d1a;--atrium-warning-soft:#ffd400;--atrium-warning-soft-fg:#000;--atrium-mark:#fff;--atrium-mark-accent:#ffd400}[data-theme=contrast] .border{border-width:2px}[data-theme=contrast] .border-t{border-top-width:2px}[data-theme=contrast] .border-b{border-bottom-width:2px}[data-theme=contrast] .border-l{border-left-width:2px}[data-theme=contrast] .border-r{border-right-width:2px}[data-theme=contrast] .divide-y>:not(:last-child){border-bottom-width:2px}[data-credit]{--atrium-credit-logo:url(/vendor/atrium/assets/logo-DDS3n-zU.svg)}:where([data-theme=graphite],[data-theme=night],[data-theme=sand],[data-theme=contrast]) [data-credit-on=sidebar],:where([data-theme=night]) [data-credit-on=page]{--atrium-credit-logo:url(/vendor/atrium/assets/logo-white-BqJt87jq.svg)}select:not([multiple]):not([size]){padding-right:2rem}@property --tw-border-spacing-x{syntax:"";inherits:false;initial-value:0}@property --tw-border-spacing-y{syntax:"";inherits:false;initial-value:0}@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-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{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-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{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:"";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:"";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:"";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:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
diff --git a/packages/admin/dist/assets/app-BvgWOIqU.css b/packages/admin/dist/assets/app-BvgWOIqU.css
deleted file mode 100644
index 0db0d592..00000000
--- a/packages/admin/dist/assets/app-BvgWOIqU.css
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
-@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--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-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--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-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, 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;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-4xl:56rem;--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-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--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);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--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);--font-brand:"Space Grotesk", var(--font-sans)}}@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, 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}html{accent-color:var(--atrium-accent);background-color:var(--atrium-page);color:var(--atrium-fg)}*{--tw-ring-offset-color:var(--atrium-surface)}::placeholder{color:var(--atrium-muted);opacity:1}select:not([multiple]):not([size]){appearance:none;background-color:var(--atrium-surface);background-image:linear-gradient(45deg,#0000 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,#0000 50%);background-position:calc(100% - 1rem),calc(100% - .6875rem);background-repeat:no-repeat;background-size:.3125rem .3125rem}select option{background-color:var(--atrium-surface);color:var(--atrium-fg)}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.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}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-y-0{inset-block:0}.top-0{top:0}.top-1{top:var(--spacing)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.right-0{right:0}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.bottom-4{bottom:calc(var(--spacing) * 4)}.left-0{left:0}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.isolate{isolation:isolate}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mr-1{margin-right:var(--spacing)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-3{margin-right:calc(var(--spacing) * 3)}.mr-4{margin-right:calc(var(--spacing) * 4)}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.-ml-0\.5{margin-left:calc(var(--spacing) * -.5)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-1{margin-left:var(--spacing)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-6{margin-left:calc(var(--spacing) * 6)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-square{aspect-ratio:1}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-24{height:calc(var(--spacing) * 24)}.h-full{height:100%}.h-px{height:1px}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[90vh\]{max-height:90vh}.max-h-\[min\(36rem\,calc\(100vh-8rem\)\)\]{max-height:min(36rem,100vh - 8rem)}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-\[4\.75rem\]{width:4.75rem}.w-\[22rem\]{width:22rem}.w-auto{width:auto}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-14{max-width:calc(var(--spacing) * 14)}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-\[85\%\]{max-width:85%}.max-w-\[90\%\]{max-width:90%}.max-w-\[calc\(100vw-2rem\)\]{max-width:calc(100vw - 2rem)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-48{min-width:calc(var(--spacing) * 48)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-separate{border-collapse:separate}.border-spacing-0{--tw-border-spacing-x:0px;--tw-border-spacing-y:0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0px;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)}.translate-y-0{--tw-translate-y:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-4{--tw-translate-y:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, )}.transform-gpu{transform:translateZ(0) var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, )}.animate-spin{animation:var(--animate-spin)}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.list-disc{list-style-type:disc}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.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-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}:where(.-space-x-px>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(-1px * var(--tw-space-x-reverse));margin-inline-end:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(var(--spacing) * var(--tw-space-x-reverse));margin-inline-end:calc(var(--spacing) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 4) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-8>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 8) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-x-reverse)))}.gap-y-3{row-gap:calc(var(--spacing) * 3)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-line>:not(:last-child)){border-color:var(--atrium-line)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-md{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.rounded-r-md{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}.rounded-b-lg{border-bottom-right-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-b-xl{border-bottom-right-radius:var(--radius-xl);border-bottom-left-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-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-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent{border-color:var(--atrium-accent)}.border-accent-hover{border-color:var(--atrium-accent-hover)}.border-accent-soft{border-color:var(--atrium-accent-soft)}.border-badge-line{border-color:var(--atrium-badge-line)}.border-current{border-color:currentColor}.border-danger{border-color:var(--atrium-danger)}.border-danger-soft{border-color:var(--atrium-danger-soft)}.border-field{border-color:var(--atrium-field)}.border-focus{border-color:var(--atrium-focus)}.border-line{border-color:var(--atrium-line)}.border-sidebar-line{border-color:var(--atrium-sidebar-line)}.border-success{border-color:var(--atrium-success)}.border-transparent{border-color:#0000}.border-warning-soft-fg{border-color:var(--atrium-warning-soft-fg)}.bg-accent{background-color:var(--atrium-accent)}.bg-accent-hover{background-color:var(--atrium-accent-hover)}.bg-accent-soft{background-color:var(--atrium-accent-soft)}.bg-black\/50{background-color:oklab(0% none none/.5)}.bg-current{background-color:currentColor}.bg-danger{background-color:var(--atrium-danger)}.bg-danger-hover{background-color:var(--atrium-danger-hover)}.bg-danger-soft{background-color:var(--atrium-danger-soft)}.bg-inherit{background-color:inherit}.bg-line{background-color:var(--atrium-line)}.bg-off{background-color:var(--atrium-off)}.bg-page{background-color:var(--atrium-page)}.bg-sidebar{background-color:var(--atrium-sidebar)}.bg-sidebar-active{background-color:var(--atrium-sidebar-active)}.bg-success-soft{background-color:var(--atrium-success-soft)}.bg-surface{background-color:var(--atrium-surface)}.bg-surface-alt{background-color:var(--atrium-surface-alt)}.bg-surface\/75{background-color:var(--atrium-surface)}@supports (color:color-mix(in lab, red, red)){.bg-surface\/75{background-color:color-mix(in oklab, var(--atrium-surface) 75%, transparent)}}.bg-transparent{background-color:#0000}.bg-warning-soft{background-color:var(--atrium-warning-soft)}.bg-contain{background-size:contain}.bg-center{background-position:50%}.bg-left{background-position:0}.bg-no-repeat{background-repeat:no-repeat}.fill-accent{fill:var(--atrium-accent)}.fill-fg{fill:var(--atrium-fg)}.fill-mark{fill:var(--atrium-mark)}.fill-mark-accent{fill:var(--atrium-mark-accent)}.fill-surface{fill:var(--atrium-surface)}.object-cover{object-fit:cover}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.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)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-1{padding-bottom:var(--spacing)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.pl-10{padding-left:calc(var(--spacing) * 10)}.pl-12{padding-left:calc(var(--spacing) * 12)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-brand{font-family:var(--font-brand)}.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-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.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-\[11px\]{font-size:11px}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.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-\[-0\.01em\]{--tw-tracking:-.01em;letter-spacing:-.01em}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--atrium-accent)}.text-accent-hover{color:var(--atrium-accent-hover)}.text-accent-soft-fg{color:var(--atrium-accent-soft-fg)}.text-danger{color:var(--atrium-danger)}.text-danger-soft-fg{color:var(--atrium-danger-soft-fg)}.text-fg{color:var(--atrium-fg)}.text-muted{color:var(--atrium-muted)}.text-off-fg{color:var(--atrium-off-fg)}.text-on-accent{color:var(--atrium-on-accent)}.text-on-danger{color:var(--atrium-on-danger)}.text-sidebar-active-fg{color:var(--atrium-sidebar-active-fg)}.text-sidebar-fg{color:var(--atrium-sidebar-fg)}.text-sidebar-muted{color:var(--atrium-sidebar-muted)}.text-success{color:var(--atrium-success)}.text-success-soft-fg{color:var(--atrium-success-soft-fg)}.text-transparent{color:#0000}.text-warning-soft-fg{color:var(--atrium-warning-soft-fg)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal, ) var(--tw-slashed-zero, ) var(--tw-numeric-figure, ) var(--tw-numeric-spacing, ) var(--tw-numeric-fraction, )}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-muted::placeholder{color:var(--atrium-muted)}.accent-hover{accent-color:var(--atrium-hover)}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_3px_0_0_var\(--atrium-sidebar-accent\)\]{--tw-shadow:inset 3px 0 0 var(--tw-shadow-color,var(--atrium-sidebar-accent));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.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-2{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(2px + 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-field{--tw-ring-color:var(--atrium-field)}.ring-focus{--tw-ring-color:var(--atrium-focus)}.ring-line{--tw-ring-color:var(--atrium-line)}.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{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.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))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-all{-webkit-user-select:all;user-select:all}.ring-inset{--tw-ring-inset:inset}@media (hover:hover){:is(:where(.group):hover .group-hover\:text-fg){color:var(--atrium-fg)}:is(:where(.group):hover .group-hover\:opacity-100){opacity:1}}.file\:mr-4::file-selector-button{margin-right:calc(var(--spacing) * 4)}.file\:rounded-md::file-selector-button{border-radius:var(--radius-md)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-accent-soft::file-selector-button{background-color:var(--atrium-accent-soft)}.file\:px-4::file-selector-button{padding-inline:calc(var(--spacing) * 4)}.file\:py-2::file-selector-button{padding-block:calc(var(--spacing) * 2)}.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-accent-hover::file-selector-button{color:var(--atrium-accent-hover)}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:border-fg:hover{border-color:var(--atrium-fg)}.hover\:border-field:hover{border-color:var(--atrium-field)}.hover\:border-focus:hover{border-color:var(--atrium-focus)}.hover\:bg-accent-hover:hover{background-color:var(--atrium-accent-hover)}.hover\:bg-accent-soft:hover{background-color:var(--atrium-accent-soft)}.hover\:bg-danger-hover:hover{background-color:var(--atrium-danger-hover)}.hover\:bg-danger-soft:hover{background-color:var(--atrium-danger-soft)}.hover\:bg-hover:hover{background-color:var(--atrium-hover)}.hover\:bg-sidebar-hover:hover{background-color:var(--atrium-sidebar-hover)}.hover\:text-accent:hover{color:var(--atrium-accent)}.hover\:text-accent-hover:hover{color:var(--atrium-accent-hover)}.hover\:text-accent-soft-fg:hover{color:var(--atrium-accent-soft-fg)}.hover\:text-danger:hover{color:var(--atrium-danger)}.hover\:text-danger-soft-fg:hover{color:var(--atrium-danger-soft-fg)}.hover\:text-fg:hover{color:var(--atrium-fg)}.hover\:text-sidebar-fg:hover{color:var(--atrium-sidebar-fg)}.hover\:underline:hover{text-decoration-line:underline}.hover\:file\:bg-accent-soft:hover::file-selector-button{background-color:var(--atrium-accent-soft)}}.focus\:border-focus:focus{border-color:var(--atrium-focus)}.focus\:ring-1:focus{--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)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(2px + 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\:ring-danger:focus{--tw-ring-color:var(--atrium-danger)}.focus\:ring-focus:focus{--tw-ring-color:var(--atrium-focus)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(2px + 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-focus:focus-visible{--tw-ring-color:var(--atrium-focus)}.focus-visible\:ring-sidebar-accent:focus-visible{--tw-ring-color:var(--atrium-sidebar-accent)}.focus-visible\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-focus:focus-visible{outline-color:var(--atrium-focus)}.focus-visible\:ring-inset:focus-visible{--tw-ring-inset:inset}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-off:disabled{background-color:var(--atrium-off)}.disabled\:text-muted:disabled{color:var(--atrium-muted)}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}@media (width>=40rem){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:my-8{margin-block:calc(var(--spacing) * 8)}.sm\:block{display:block}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:w-full{width:100%}.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-32{max-width:calc(var(--spacing) * 32)}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-md{max-width:var(--container-md)}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:max-w-xl{max-width:var(--container-xl)}.sm\:translate-y-0{--tw-translate-y:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.sm\:scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.sm\:scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-2{gap:calc(var(--spacing) * 2)}.sm\:gap-4{gap:calc(var(--spacing) * 4)}.sm\:px-2{padding-inline:calc(var(--spacing) * 2)}.sm\:px-4{padding-inline:calc(var(--spacing) * 4)}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}}@media (width>=48rem){.md\:block{display:block}:where(.md\:space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}}@media (width>=64rem){.lg\:col-span-2{grid-column:span 2/span 2}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:w-20{width:calc(var(--spacing) * 20)}.lg\:w-64{width:calc(var(--spacing) * 64)}.lg\:translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:gap-3{gap:calc(var(--spacing) * 3)}.lg\:p-6{padding:calc(var(--spacing) * 6)}.lg\:px-2{padding-inline:calc(var(--spacing) * 2)}.lg\:px-6{padding-inline:calc(var(--spacing) * 6)}.lg\:px-8{padding-inline:calc(var(--spacing) * 8)}.lg\:pl-20{padding-left:calc(var(--spacing) * 20)}.lg\:pl-64{padding-left:calc(var(--spacing) * 64)}.lg\:text-center{text-align:center}}@media (width>=80rem){.xl\:max-w-48{max-width:calc(var(--spacing) * 48)}}}@font-face{font-family:Space Grotesk;font-style:normal;font-display:swap;font-weight:600;src:url(/vendor/atrium/assets/space-grotesk-latin-600-normal-DjKNqYRj.woff2)format("woff2"),url(/vendor/atrium/assets/space-grotesk-latin-600-normal-BflQw4A9.woff)format("woff")}:root,[data-theme=graphite]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--atrium-sidebar:#111827;--atrium-sidebar-fg:#f9fafb;--atrium-sidebar-muted:#9ca3af;--atrium-sidebar-hover:#1f2937;--atrium-sidebar-active:#1f2937;--atrium-sidebar-active-fg:#fff;--atrium-sidebar-accent:#60a5fa;--atrium-sidebar-line:#1f2937;--atrium-page:#f3f4f6;--atrium-surface:#fff;--atrium-surface-alt:#f9fafb;--atrium-hover:#f3f4f6;--atrium-fg:#111827;--atrium-muted:#4b5563;--atrium-line:#e5e7eb;--atrium-field:#7e8691;--atrium-accent:#2563eb;--atrium-accent-hover:#1d4ed8;--atrium-on-accent:#fff;--atrium-accent-soft:#dbeafe;--atrium-accent-soft-fg:#1e40af;--atrium-focus:#2563eb;--atrium-off:#f3f4f6;--atrium-off-fg:#374151;--atrium-badge-line:transparent;--atrium-danger:#c81e1e;--atrium-danger-hover:#991b1b;--atrium-on-danger:#fff;--atrium-danger-soft:#fee2e2;--atrium-danger-soft-fg:#991b1b;--atrium-success:#15803d;--atrium-success-soft:#dcfce7;--atrium-success-soft-fg:#166534;--atrium-warning-soft:#fef3c7;--atrium-warning-soft-fg:#92400e;--atrium-mark:#fff;--atrium-mark-accent:#60a5fa}[data-theme=day]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--atrium-sidebar:#fff;--atrium-sidebar-fg:#1f2937;--atrium-sidebar-muted:#64748b;--atrium-sidebar-hover:#f1f5f9;--atrium-sidebar-active:#eef2ff;--atrium-sidebar-active-fg:#3730a3;--atrium-sidebar-accent:#4f46e5;--atrium-sidebar-line:#e2e8f0;--atrium-page:#f8fafc;--atrium-surface:#fff;--atrium-surface-alt:#f8fafc;--atrium-hover:#f1f5f9;--atrium-fg:#0f172a;--atrium-muted:#475569;--atrium-line:#e2e8f0;--atrium-field:#8391a5;--atrium-accent:#4f46e5;--atrium-accent-hover:#4338ca;--atrium-on-accent:#fff;--atrium-accent-soft:#e0e7ff;--atrium-accent-soft-fg:#3730a3;--atrium-focus:#4f46e5;--atrium-off:#f1f5f9;--atrium-off-fg:#334155;--atrium-badge-line:transparent;--atrium-danger:#c81e1e;--atrium-danger-hover:#991b1b;--atrium-on-danger:#fff;--atrium-danger-soft:#fee2e2;--atrium-danger-soft-fg:#991b1b;--atrium-success:#15803d;--atrium-success-soft:#dcfce7;--atrium-success-soft-fg:#166534;--atrium-warning-soft:#fef3c7;--atrium-warning-soft-fg:#92400e;--atrium-mark:#0f172a;--atrium-mark-accent:#4f46e5}[data-theme=night]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--atrium-sidebar:#0a0e14;--atrium-sidebar-fg:#e6eaf0;--atrium-sidebar-muted:#8b95a5;--atrium-sidebar-hover:#141b26;--atrium-sidebar-active:#1a2230;--atrium-sidebar-active-fg:#fff;--atrium-sidebar-accent:#8ab4ff;--atrium-sidebar-line:#1a2230;--atrium-page:#0f141b;--atrium-surface:#161d27;--atrium-surface-alt:#121821;--atrium-hover:#1f2733;--atrium-fg:#e6eaf0;--atrium-muted:#a0aaba;--atrium-line:#253041;--atrium-field:#5f6d82;--atrium-accent:#8ab4ff;--atrium-accent-hover:#b0ccff;--atrium-on-accent:#0a0e14;--atrium-accent-soft:#1e2f4d;--atrium-accent-soft-fg:#b9d1ff;--atrium-focus:#8ab4ff;--atrium-off:#222b38;--atrium-off-fg:#c3cbd6;--atrium-badge-line:transparent;--atrium-danger:#ff8a8a;--atrium-danger-hover:#ffb0b0;--atrium-on-danger:#0a0e14;--atrium-danger-soft:#3d1c22;--atrium-danger-soft-fg:#ffc2c2;--atrium-success:#5fd38d;--atrium-success-soft:#173524;--atrium-success-soft-fg:#a6ebc0;--atrium-warning-soft:#3a2e12;--atrium-warning-soft-fg:#fcd98a;--atrium-mark:#fff;--atrium-mark-accent:#8ab4ff}[data-theme=sand]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--atrium-sidebar:#1f1a14;--atrium-sidebar-fg:#f5efe6;--atrium-sidebar-muted:#b3a796;--atrium-sidebar-hover:#2b241c;--atrium-sidebar-active:#342b21;--atrium-sidebar-active-fg:#fff;--atrium-sidebar-accent:#f2a65a;--atrium-sidebar-line:#342b21;--atrium-page:#f7f3ec;--atrium-surface:#fff;--atrium-surface-alt:#fbf8f3;--atrium-hover:#f1ece4;--atrium-fg:#1f1a14;--atrium-muted:#5c5246;--atrium-line:#e7dfd2;--atrium-field:#958672;--atrium-accent:#a6490a;--atrium-accent-hover:#853a07;--atrium-on-accent:#fff;--atrium-accent-soft:#fce7d2;--atrium-accent-soft-fg:#7a3506;--atrium-focus:#a6490a;--atrium-off:#f1ece4;--atrium-off-fg:#4a4137;--atrium-badge-line:transparent;--atrium-danger:#b42318;--atrium-danger-hover:#912018;--atrium-on-danger:#fff;--atrium-danger-soft:#fde4e1;--atrium-danger-soft-fg:#8a1c12;--atrium-success:#2e7d32;--atrium-success-soft:#e3f2df;--atrium-success-soft-fg:#1f5a23;--atrium-warning-soft:#fbefc5;--atrium-warning-soft-fg:#7a4a06;--atrium-mark:#f5efe6;--atrium-mark-accent:#f2a65a}[data-theme=contrast]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--atrium-sidebar:#000;--atrium-sidebar-fg:#fff;--atrium-sidebar-muted:#d4d4d4;--atrium-sidebar-hover:#262626;--atrium-sidebar-active:#ffd400;--atrium-sidebar-active-fg:#000;--atrium-sidebar-accent:#ffd400;--atrium-sidebar-line:#fff;--atrium-page:#fff;--atrium-surface:#fff;--atrium-surface-alt:#fff;--atrium-hover:#fff2a8;--atrium-fg:#000;--atrium-muted:#262626;--atrium-line:#000;--atrium-field:#000;--atrium-accent:#0033a0;--atrium-accent-hover:#001f66;--atrium-on-accent:#fff;--atrium-accent-soft:#ffd400;--atrium-accent-soft-fg:#000;--atrium-focus:#0033a0;--atrium-off:#fff;--atrium-off-fg:#000;--atrium-badge-line:#000;--atrium-danger:#b00020;--atrium-danger-hover:#7a0016;--atrium-on-danger:#fff;--atrium-danger-soft:#ffe0e0;--atrium-danger-soft-fg:#7a0016;--atrium-success:#006b2d;--atrium-success-soft:#d9f5e3;--atrium-success-soft-fg:#003d1a;--atrium-warning-soft:#ffd400;--atrium-warning-soft-fg:#000;--atrium-mark:#fff;--atrium-mark-accent:#ffd400}[data-theme=contrast] .border{border-width:2px}[data-theme=contrast] .border-t{border-top-width:2px}[data-theme=contrast] .border-b{border-bottom-width:2px}[data-theme=contrast] .border-l{border-left-width:2px}[data-theme=contrast] .border-r{border-right-width:2px}[data-theme=contrast] .divide-y>:not(:last-child){border-bottom-width:2px}[data-credit]{--atrium-credit-logo:url(/vendor/atrium/assets/logo-DDS3n-zU.svg)}:where([data-theme=graphite],[data-theme=night],[data-theme=sand],[data-theme=contrast]) [data-credit-on=sidebar],:where([data-theme=night]) [data-credit-on=page]{--atrium-credit-logo:url(/vendor/atrium/assets/logo-white-BqJt87jq.svg)}select:not([multiple]):not([size]){padding-right:2rem}@property --tw-border-spacing-x{syntax:"";inherits:false;initial-value:0}@property --tw-border-spacing-y{syntax:"";inherits:false;initial-value:0}@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-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{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-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{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:"";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:"";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:"";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:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
diff --git a/packages/admin/dist/manifest.json b/packages/admin/dist/manifest.json
index 0a30ed63..0e4362bb 100644
--- a/packages/admin/dist/manifest.json
+++ b/packages/admin/dist/manifest.json
@@ -20,8 +20,8 @@
"_dist-MY__znoP.js"
]
},
- "_AdminLayout-I1QMPYpW.js": {
- "file": "assets/AdminLayout-I1QMPYpW.js",
+ "_AdminLayout--RXJFj9t.js": {
+ "file": "assets/AdminLayout--RXJFj9t.js",
"name": "AdminLayout",
"imports": [
"_dist-MY__znoP.js",
@@ -54,13 +54,13 @@
"file": "assets/FormField-0qI8GE1v.css",
"src": "_FormField-0qI8GE1v.css"
},
- "_FormField-BI8KmQxQ.js": {
- "file": "assets/FormField-BI8KmQxQ.js",
+ "_FormField-xD6LELDV.js": {
+ "file": "assets/FormField-xD6LELDV.js",
"name": "FormField",
"imports": [
"_dist-MY__znoP.js",
"resources/js/app.js",
- "_AdminLayout-I1QMPYpW.js",
+ "_AdminLayout--RXJFj9t.js",
"_AdminModal-DNJ_V4iq.js",
"_AdminButton-Bx141Bs3.js"
],
@@ -107,13 +107,13 @@
"src": "resources/images/alvesoft/logo.svg"
},
"resources/js/Pages/Admin/ApiTokens/Index.vue": {
- "file": "assets/Index-BzuT6e6D.js",
+ "file": "assets/Index-C_p9UH4T.js",
"name": "Index",
"src": "resources/js/Pages/Admin/ApiTokens/Index.vue",
"isDynamicEntry": true,
"imports": [
"_dist-MY__znoP.js",
- "_AdminLayout-I1QMPYpW.js",
+ "_AdminLayout--RXJFj9t.js",
"resources/js/app.js",
"_AdminButton-Bx141Bs3.js",
"_AdminCard--HubMtUj.js",
@@ -131,102 +131,113 @@
]
},
"resources/js/Pages/Admin/Backups/Index.vue": {
- "file": "assets/Index-B0DDRHtS.js",
+ "file": "assets/Index-9-V30Hlc.js",
"name": "Index",
"src": "resources/js/Pages/Admin/Backups/Index.vue",
"isDynamicEntry": true,
"imports": [
"_dist-MY__znoP.js",
- "_AdminLayout-I1QMPYpW.js",
+ "_AdminLayout--RXJFj9t.js",
"_AdminButton-Bx141Bs3.js",
"_AdminCard--HubMtUj.js",
"_AdminModal-DNJ_V4iq.js"
]
},
+ "resources/js/Pages/Admin/Cache/Index.vue": {
+ "file": "assets/Index-bqKVRXw8.js",
+ "name": "Index",
+ "src": "resources/js/Pages/Admin/Cache/Index.vue",
+ "isDynamicEntry": true,
+ "imports": [
+ "_dist-MY__znoP.js",
+ "_AdminLayout--RXJFj9t.js",
+ "_AdminButton-Bx141Bs3.js"
+ ]
+ },
"resources/js/Pages/Admin/Dashboard.vue": {
- "file": "assets/Dashboard-BpfYcZ3c.js",
+ "file": "assets/Dashboard-BU7gtvAo.js",
"name": "Dashboard",
"src": "resources/js/Pages/Admin/Dashboard.vue",
"isDynamicEntry": true,
"imports": [
"_dist-MY__znoP.js",
- "_AdminLayout-I1QMPYpW.js"
+ "_AdminLayout--RXJFj9t.js"
]
},
"resources/js/Pages/Admin/Modules/Index.vue": {
- "file": "assets/Index-CVtF6Jho.js",
+ "file": "assets/Index-1mD_GBWn.js",
"name": "Index",
"src": "resources/js/Pages/Admin/Modules/Index.vue",
"isDynamicEntry": true,
"imports": [
"_dist-MY__znoP.js",
- "_AdminLayout-I1QMPYpW.js",
+ "_AdminLayout--RXJFj9t.js",
"_AdminButton-Bx141Bs3.js"
]
},
"resources/js/Pages/Admin/Modules/Settings.vue": {
- "file": "assets/Settings-DiwVH39L.js",
+ "file": "assets/Settings-C2VyFPrB.js",
"name": "Settings",
"src": "resources/js/Pages/Admin/Modules/Settings.vue",
"isDynamicEntry": true,
"imports": [
"_dist-MY__znoP.js",
- "_AdminLayout-I1QMPYpW.js",
+ "_AdminLayout--RXJFj9t.js",
"_AdminButton-Bx141Bs3.js",
"_AdminCard--HubMtUj.js",
- "_FormField-BI8KmQxQ.js",
+ "_FormField-xD6LELDV.js",
"_contentLocale-BtGD-iBF.js"
]
},
"resources/js/Pages/Admin/Profile/Edit.vue": {
- "file": "assets/Edit-D7McI_eD.js",
+ "file": "assets/Edit-D-yhP5A2.js",
"name": "Edit",
"src": "resources/js/Pages/Admin/Profile/Edit.vue",
"isDynamicEntry": true,
"imports": [
"_dist-MY__znoP.js",
- "_AdminLayout-I1QMPYpW.js"
+ "_AdminLayout--RXJFj9t.js"
]
},
"resources/js/Pages/Admin/Resource/Create.vue": {
- "file": "assets/Create-B8v2keK9.js",
+ "file": "assets/Create-BxhK0Jvn.js",
"name": "Create",
"src": "resources/js/Pages/Admin/Resource/Create.vue",
"isDynamicEntry": true,
"imports": [
"_dist-MY__znoP.js",
- "_AdminLayout-I1QMPYpW.js",
+ "_AdminLayout--RXJFj9t.js",
"_AdminButton-Bx141Bs3.js",
"_AdminCard--HubMtUj.js",
"_ContentLocaleSwitcher-BJIieXK-.js",
- "_FormField-BI8KmQxQ.js",
+ "_FormField-xD6LELDV.js",
"_contentLocale-BtGD-iBF.js"
]
},
"resources/js/Pages/Admin/Resource/Edit.vue": {
- "file": "assets/Edit-DKlRxfoE.js",
+ "file": "assets/Edit-CHndUQJ2.js",
"name": "Edit",
"src": "resources/js/Pages/Admin/Resource/Edit.vue",
"isDynamicEntry": true,
"imports": [
"_dist-MY__znoP.js",
- "_AdminLayout-I1QMPYpW.js",
+ "_AdminLayout--RXJFj9t.js",
"_AdminButton-Bx141Bs3.js",
"_AdminCard--HubMtUj.js",
"_ContentLocaleSwitcher-BJIieXK-.js",
- "_FormField-BI8KmQxQ.js",
+ "_FormField-xD6LELDV.js",
"_contentLocale-BtGD-iBF.js",
"_recordActions-CtRs42tG.js"
]
},
"resources/js/Pages/Admin/Resource/Index.vue": {
- "file": "assets/Index-By9Fq-LA.js",
+ "file": "assets/Index-CjLWl74m.js",
"name": "Index",
"src": "resources/js/Pages/Admin/Resource/Index.vue",
"isDynamicEntry": true,
"imports": [
"_dist-MY__znoP.js",
- "_AdminLayout-I1QMPYpW.js",
+ "_AdminLayout--RXJFj9t.js",
"_AdminButton-Bx141Bs3.js",
"_AdminDataTable-BaQwb_6U.js",
"_AdminModal-DNJ_V4iq.js",
@@ -234,71 +245,71 @@
]
},
"resources/js/Pages/Admin/Roles/Edit.vue": {
- "file": "assets/Edit-ppjiZjeT.js",
+ "file": "assets/Edit-pGNJhUsL.js",
"name": "Edit",
"src": "resources/js/Pages/Admin/Roles/Edit.vue",
"isDynamicEntry": true,
"imports": [
"_dist-MY__znoP.js",
- "_AdminLayout-I1QMPYpW.js",
+ "_AdminLayout--RXJFj9t.js",
"_AdminButton-Bx141Bs3.js",
"_AdminCard--HubMtUj.js",
"resources/js/app.js"
]
},
"resources/js/Pages/Admin/Roles/Index.vue": {
- "file": "assets/Index-CJcjrNaO.js",
+ "file": "assets/Index-P5jX14JD.js",
"name": "Index",
"src": "resources/js/Pages/Admin/Roles/Index.vue",
"isDynamicEntry": true,
"imports": [
"_dist-MY__znoP.js",
- "_AdminLayout-I1QMPYpW.js",
+ "_AdminLayout--RXJFj9t.js",
"_AdminButton-Bx141Bs3.js",
"_AdminModal-DNJ_V4iq.js"
]
},
"resources/js/Pages/Admin/Users/Create.vue": {
- "file": "assets/Create-DWM7DbLl.js",
+ "file": "assets/Create-C61-lS2c.js",
"name": "Create",
"src": "resources/js/Pages/Admin/Users/Create.vue",
"isDynamicEntry": true,
"imports": [
"_dist-MY__znoP.js",
- "_AdminLayout-I1QMPYpW.js",
+ "_AdminLayout--RXJFj9t.js",
"_AdminButton-Bx141Bs3.js",
"_AdminCard--HubMtUj.js",
- "_FormField-BI8KmQxQ.js"
+ "_FormField-xD6LELDV.js"
]
},
"resources/js/Pages/Admin/Users/Edit.vue": {
- "file": "assets/Edit-BEiwW1oN.js",
+ "file": "assets/Edit-DGjzU-uC.js",
"name": "Edit",
"src": "resources/js/Pages/Admin/Users/Edit.vue",
"isDynamicEntry": true,
"imports": [
"_dist-MY__znoP.js",
- "_AdminLayout-I1QMPYpW.js",
+ "_AdminLayout--RXJFj9t.js",
"_AdminButton-Bx141Bs3.js",
"_AdminCard--HubMtUj.js",
- "_FormField-BI8KmQxQ.js"
+ "_FormField-xD6LELDV.js"
]
},
"resources/js/Pages/Admin/Users/Index.vue": {
- "file": "assets/Index-waO6UWa5.js",
+ "file": "assets/Index-DEbfZBFs.js",
"name": "Index",
"src": "resources/js/Pages/Admin/Users/Index.vue",
"isDynamicEntry": true,
"imports": [
"_dist-MY__znoP.js",
- "_AdminLayout-I1QMPYpW.js",
+ "_AdminLayout--RXJFj9t.js",
"_AdminButton-Bx141Bs3.js",
"_AdminDataTable-BaQwb_6U.js",
"_AdminModal-DNJ_V4iq.js"
]
},
"resources/js/app.js": {
- "file": "assets/app-lI4VKCmX.js",
+ "file": "assets/app-BNjy5Z6H.js",
"name": "app",
"src": "resources/js/app.js",
"isEntry": true,
@@ -309,6 +320,7 @@
"resources/js/Pages/Admin/ApiTokens/Index.vue",
"resources/js/Pages/Admin/Auth/Login.vue",
"resources/js/Pages/Admin/Backups/Index.vue",
+ "resources/js/Pages/Admin/Cache/Index.vue",
"resources/js/Pages/Admin/Dashboard.vue",
"resources/js/Pages/Admin/Modules/Index.vue",
"resources/js/Pages/Admin/Modules/Settings.vue",
@@ -323,7 +335,7 @@
"resources/js/Pages/Admin/Users/Index.vue"
],
"css": [
- "assets/app-BvgWOIqU.css"
+ "assets/app-BncygNAT.css"
],
"assets": [
"assets/space-grotesk-latin-600-normal-DjKNqYRj.woff2",
diff --git a/packages/admin/lang/be/cache.php b/packages/admin/lang/be/cache.php
new file mode 100644
index 00000000..98956dbd
--- /dev/null
+++ b/packages/admin/lang/be/cache.php
@@ -0,0 +1,32 @@
+ 'Запісы чытаюцца з кэша, а не з базы. Захаванне запісу ў панэлі адразу абнаўляе кэш.',
+ 'hit_rate' => 'Трапленні ў кэш',
+ 'hits' => 'Трапленні',
+ 'misses' => 'Промахі',
+ 'size' => 'Памер',
+ 'entries' => 'Запісаў',
+ 'store' => 'Сховішча',
+ 'with_tags' => 'З тэгамі',
+ 'without_tags' => 'Без тэгаў (версіі)',
+ 'records' => 'Кэш запісаў',
+ 'pages' => 'Кэш старонак',
+ 'on' => 'Уключаны',
+ 'off' => 'Выключаны',
+ 'clear_hint' => 'Пасля захавання ў панэлі чысціць нічога не трэба. Гэта патрэбна, калі базу мянялі напрамую.',
+ 'module' => 'Модуль',
+ 'clear_module' => 'Ачысціць кэш модуля',
+ 'site' => 'Сайт',
+ 'clear_site' => 'Ачысціць кэш сайта',
+ 'clear_all' => 'Ачысціць увесь кэш',
+ 'reset_stats' => 'Скінуць статыстыку',
+ 'cleared' => 'Кэш ачышчаны.',
+];
diff --git a/packages/admin/lang/be/menu.php b/packages/admin/lang/be/menu.php
index a6760078..1a53a246 100644
--- a/packages/admin/lang/be/menu.php
+++ b/packages/admin/lang/be/menu.php
@@ -14,6 +14,7 @@
'administrators' => 'Адміністратары',
'roles' => 'Ролі',
'api_tokens' => 'Токены API',
+ 'cache' => 'Кэш',
'languages' => 'Мовы',
'sites' => 'Сайты',
'modules' => 'Модулі',
diff --git a/packages/admin/lang/de/cache.php b/packages/admin/lang/de/cache.php
new file mode 100644
index 00000000..b20633c5
--- /dev/null
+++ b/packages/admin/lang/de/cache.php
@@ -0,0 +1,32 @@
+ 'Datensätze werden aus dem Cache statt aus der Datenbank gelesen. Speichern im Panel aktualisiert ihn sofort.',
+ 'hit_rate' => 'Trefferquote',
+ 'hits' => 'Treffer',
+ 'misses' => 'Fehlgriffe',
+ 'size' => 'Größe',
+ 'entries' => 'Einträge',
+ 'store' => 'Speicher',
+ 'with_tags' => 'Mit Tags',
+ 'without_tags' => 'Ohne Tags (Versionen)',
+ 'records' => 'Datensatz-Cache',
+ 'pages' => 'Seiten-Cache',
+ 'on' => 'An',
+ 'off' => 'Aus',
+ 'clear_hint' => 'Nach dem Speichern im Panel ist kein Leeren nötig. Es hilft, wenn die Datenbank direkt geändert wurde.',
+ 'module' => 'Modul',
+ 'clear_module' => 'Modul-Cache leeren',
+ 'site' => 'Website',
+ 'clear_site' => 'Website-Cache leeren',
+ 'clear_all' => 'Gesamten Cache leeren',
+ 'reset_stats' => 'Statistik zurücksetzen',
+ 'cleared' => 'Der Cache wurde geleert.',
+];
diff --git a/packages/admin/lang/de/menu.php b/packages/admin/lang/de/menu.php
index 179cc122..c0416e3d 100644
--- a/packages/admin/lang/de/menu.php
+++ b/packages/admin/lang/de/menu.php
@@ -14,6 +14,7 @@
'administrators' => 'Administratoren',
'roles' => 'Rollen',
'api_tokens' => 'API-Tokens',
+ 'cache' => 'Cache',
'languages' => 'Sprachen',
'sites' => 'Websites',
'modules' => 'Module',
diff --git a/packages/admin/lang/en/cache.php b/packages/admin/lang/en/cache.php
new file mode 100644
index 00000000..354128db
--- /dev/null
+++ b/packages/admin/lang/en/cache.php
@@ -0,0 +1,32 @@
+ 'Records are read from the cache instead of the database. Saving a record in the panel updates it at once.',
+ 'hit_rate' => 'Hit rate',
+ 'hits' => 'Hits',
+ 'misses' => 'Misses',
+ 'size' => 'Size',
+ 'entries' => 'Entries',
+ 'store' => 'Store',
+ 'with_tags' => 'With tags',
+ 'without_tags' => 'Without tags (versions)',
+ 'records' => 'Record cache',
+ 'pages' => 'Page cache',
+ 'on' => 'On',
+ 'off' => 'Off',
+ 'clear_hint' => 'Clearing is never needed after saving in the panel. It helps after changing the database directly.',
+ 'module' => 'Module',
+ 'clear_module' => 'Clear module cache',
+ 'site' => 'Site',
+ 'clear_site' => 'Clear site cache',
+ 'clear_all' => 'Clear all cache',
+ 'reset_stats' => 'Reset statistics',
+ 'cleared' => 'The cache is cleared.',
+];
diff --git a/packages/admin/lang/en/menu.php b/packages/admin/lang/en/menu.php
index 349de9b6..05bf3699 100644
--- a/packages/admin/lang/en/menu.php
+++ b/packages/admin/lang/en/menu.php
@@ -12,6 +12,7 @@
'administrators' => 'Administrators',
'roles' => 'Roles',
'api_tokens' => 'API tokens',
+ 'cache' => 'Cache',
'languages' => 'Languages',
'sites' => 'Sites',
'modules' => 'Modules',
diff --git a/packages/admin/lang/es/cache.php b/packages/admin/lang/es/cache.php
new file mode 100644
index 00000000..db43b2b6
--- /dev/null
+++ b/packages/admin/lang/es/cache.php
@@ -0,0 +1,32 @@
+ 'Los registros se leen de la caché en lugar de la base de datos. Guardar en el panel la actualiza al instante.',
+ 'hit_rate' => 'Tasa de aciertos',
+ 'hits' => 'Aciertos',
+ 'misses' => 'Fallos',
+ 'size' => 'Tamaño',
+ 'entries' => 'Entradas',
+ 'store' => 'Almacén',
+ 'with_tags' => 'Con etiquetas',
+ 'without_tags' => 'Sin etiquetas (versiones)',
+ 'records' => 'Caché de registros',
+ 'pages' => 'Caché de páginas',
+ 'on' => 'Activada',
+ 'off' => 'Desactivada',
+ 'clear_hint' => 'Tras guardar en el panel no hace falta vaciar nada. Sirve si la base de datos se cambió directamente.',
+ 'module' => 'Módulo',
+ 'clear_module' => 'Vaciar caché del módulo',
+ 'site' => 'Sitio',
+ 'clear_site' => 'Vaciar caché del sitio',
+ 'clear_all' => 'Vaciar toda la caché',
+ 'reset_stats' => 'Restablecer estadísticas',
+ 'cleared' => 'La caché se ha vaciado.',
+];
diff --git a/packages/admin/lang/es/menu.php b/packages/admin/lang/es/menu.php
index 0e19fb71..a4b6d2fb 100644
--- a/packages/admin/lang/es/menu.php
+++ b/packages/admin/lang/es/menu.php
@@ -14,6 +14,7 @@
'administrators' => 'Administradores',
'roles' => 'Roles',
'api_tokens' => 'Tokens de API',
+ 'cache' => 'Caché',
'languages' => 'Idiomas',
'sites' => 'Sitios',
'modules' => 'Módulos',
diff --git a/packages/admin/lang/fr/cache.php b/packages/admin/lang/fr/cache.php
new file mode 100644
index 00000000..505084d7
--- /dev/null
+++ b/packages/admin/lang/fr/cache.php
@@ -0,0 +1,32 @@
+ 'Les enregistrements sont lus depuis le cache plutôt que la base. Un enregistrement dans le panneau le met à jour aussitôt.',
+ 'hit_rate' => 'Taux de succès',
+ 'hits' => 'Succès',
+ 'misses' => 'Échecs',
+ 'size' => 'Taille',
+ 'entries' => 'Entrées',
+ 'store' => 'Stockage',
+ 'with_tags' => 'Avec étiquettes',
+ 'without_tags' => 'Sans étiquettes (versions)',
+ 'records' => 'Cache des enregistrements',
+ 'pages' => 'Cache des pages',
+ 'on' => 'Activé',
+ 'off' => 'Désactivé',
+ 'clear_hint' => 'Après un enregistrement dans le panneau, rien à vider. Utile si la base a été modifiée directement.',
+ 'module' => 'Module',
+ 'clear_module' => 'Vider le cache du module',
+ 'site' => 'Site',
+ 'clear_site' => 'Vider le cache du site',
+ 'clear_all' => 'Vider tout le cache',
+ 'reset_stats' => 'Réinitialiser les statistiques',
+ 'cleared' => 'Le cache est vidé.',
+];
diff --git a/packages/admin/lang/fr/menu.php b/packages/admin/lang/fr/menu.php
index 76426d10..cdbb1884 100644
--- a/packages/admin/lang/fr/menu.php
+++ b/packages/admin/lang/fr/menu.php
@@ -14,6 +14,7 @@
'administrators' => 'Administrateurs',
'roles' => 'Rôles',
'api_tokens' => 'Jetons API',
+ 'cache' => 'Cache',
'languages' => 'Langues',
'sites' => 'Sites',
'modules' => 'Modules',
diff --git a/packages/admin/lang/it/cache.php b/packages/admin/lang/it/cache.php
new file mode 100644
index 00000000..72aae0ad
--- /dev/null
+++ b/packages/admin/lang/it/cache.php
@@ -0,0 +1,32 @@
+ 'I record vengono letti dalla cache invece che dal database. Salvare nel pannello la aggiorna subito.',
+ 'hit_rate' => 'Percentuale di successo',
+ 'hits' => 'Successi',
+ 'misses' => 'Mancati',
+ 'size' => 'Dimensione',
+ 'entries' => 'Voci',
+ 'store' => 'Archivio',
+ 'with_tags' => 'Con tag',
+ 'without_tags' => 'Senza tag (versioni)',
+ 'records' => 'Cache dei record',
+ 'pages' => 'Cache delle pagine',
+ 'on' => 'Attiva',
+ 'off' => 'Disattiva',
+ 'clear_hint' => 'Dopo un salvataggio nel pannello non serve svuotare nulla. Serve se il database è stato modificato direttamente.',
+ 'module' => 'Modulo',
+ 'clear_module' => 'Svuota cache del modulo',
+ 'site' => 'Sito',
+ 'clear_site' => 'Svuota cache del sito',
+ 'clear_all' => 'Svuota tutta la cache',
+ 'reset_stats' => 'Azzera statistiche',
+ 'cleared' => 'La cache è stata svuotata.',
+];
diff --git a/packages/admin/lang/it/menu.php b/packages/admin/lang/it/menu.php
index 856d2206..bed6bedf 100644
--- a/packages/admin/lang/it/menu.php
+++ b/packages/admin/lang/it/menu.php
@@ -14,6 +14,7 @@
'administrators' => 'Amministratori',
'roles' => 'Ruoli',
'api_tokens' => 'Token API',
+ 'cache' => 'Cache',
'languages' => 'Lingue',
'sites' => 'Siti',
'modules' => 'Moduli',
diff --git a/packages/admin/lang/ja/cache.php b/packages/admin/lang/ja/cache.php
new file mode 100644
index 00000000..b3db1504
--- /dev/null
+++ b/packages/admin/lang/ja/cache.php
@@ -0,0 +1,32 @@
+ 'レコードはデータベースではなくキャッシュから読み込まれます。パネルで保存するとすぐに更新されます。',
+ 'hit_rate' => 'ヒット率',
+ 'hits' => 'ヒット',
+ 'misses' => 'ミス',
+ 'size' => 'サイズ',
+ 'entries' => 'エントリ',
+ 'store' => 'ストア',
+ 'with_tags' => 'タグあり',
+ 'without_tags' => 'タグなし(バージョン)',
+ 'records' => 'レコードキャッシュ',
+ 'pages' => 'ページキャッシュ',
+ 'on' => 'オン',
+ 'off' => 'オフ',
+ 'clear_hint' => 'パネルで保存した後にクリアする必要はありません。データベースを直接変更したときに使います。',
+ 'module' => 'モジュール',
+ 'clear_module' => 'モジュールのキャッシュをクリア',
+ 'site' => 'サイト',
+ 'clear_site' => 'サイトのキャッシュをクリア',
+ 'clear_all' => 'すべてのキャッシュをクリア',
+ 'reset_stats' => '統計をリセット',
+ 'cleared' => 'キャッシュをクリアしました。',
+];
diff --git a/packages/admin/lang/ja/menu.php b/packages/admin/lang/ja/menu.php
index 6454fddb..585c5f60 100644
--- a/packages/admin/lang/ja/menu.php
+++ b/packages/admin/lang/ja/menu.php
@@ -14,6 +14,7 @@
'administrators' => '管理者',
'roles' => 'ロール',
'api_tokens' => 'API トークン',
+ 'cache' => 'キャッシュ',
'languages' => '言語',
'sites' => 'サイト',
'modules' => 'モジュール',
diff --git a/packages/admin/lang/kk/cache.php b/packages/admin/lang/kk/cache.php
new file mode 100644
index 00000000..8634b0d8
--- /dev/null
+++ b/packages/admin/lang/kk/cache.php
@@ -0,0 +1,32 @@
+ 'Жазбалар дерекқордан емес, кэштен оқылады. Панельде сақтау оны бірден жаңартады.',
+ 'hit_rate' => 'Кэшке түсу үлесі',
+ 'hits' => 'Түсулер',
+ 'misses' => 'Түспеулер',
+ 'size' => 'Көлемі',
+ 'entries' => 'Жазбалар',
+ 'store' => 'Қойма',
+ 'with_tags' => 'Тегтермен',
+ 'without_tags' => 'Тегтерсіз (нұсқалар)',
+ 'records' => 'Жазбалар кэші',
+ 'pages' => 'Беттер кэші',
+ 'on' => 'Қосулы',
+ 'off' => 'Өшірулі',
+ 'clear_hint' => 'Панельде сақтағаннан кейін ештеңе тазалаудың қажеті жоқ. Дерекқор тікелей өзгертілгенде керек.',
+ 'module' => 'Модуль',
+ 'clear_module' => 'Модуль кэшін тазалау',
+ 'site' => 'Сайт',
+ 'clear_site' => 'Сайт кэшін тазалау',
+ 'clear_all' => 'Барлық кэшті тазалау',
+ 'reset_stats' => 'Статистиканы нөлдеу',
+ 'cleared' => 'Кэш тазаланды.',
+];
diff --git a/packages/admin/lang/kk/menu.php b/packages/admin/lang/kk/menu.php
index c1af57b8..eb6f69e0 100644
--- a/packages/admin/lang/kk/menu.php
+++ b/packages/admin/lang/kk/menu.php
@@ -14,6 +14,7 @@
'administrators' => 'Әкімшілер',
'roles' => 'Рөлдер',
'api_tokens' => 'API токендері',
+ 'cache' => 'Кэш',
'languages' => 'Тілдер',
'sites' => 'Сайттар',
'modules' => 'Модульдер',
diff --git a/packages/admin/lang/pl/cache.php b/packages/admin/lang/pl/cache.php
new file mode 100644
index 00000000..6e89f978
--- /dev/null
+++ b/packages/admin/lang/pl/cache.php
@@ -0,0 +1,32 @@
+ 'Rekordy są czytane z pamięci podręcznej zamiast z bazy. Zapis w panelu od razu ją aktualizuje.',
+ 'hit_rate' => 'Trafienia w cache',
+ 'hits' => 'Trafienia',
+ 'misses' => 'Chybienia',
+ 'size' => 'Rozmiar',
+ 'entries' => 'Wpisy',
+ 'store' => 'Magazyn',
+ 'with_tags' => 'Z tagami',
+ 'without_tags' => 'Bez tagów (wersje)',
+ 'records' => 'Cache rekordów',
+ 'pages' => 'Cache stron',
+ 'on' => 'Włączony',
+ 'off' => 'Wyłączony',
+ 'clear_hint' => 'Po zapisie w panelu nic nie trzeba czyścić. Pomaga, gdy baza była zmieniana bezpośrednio.',
+ 'module' => 'Moduł',
+ 'clear_module' => 'Wyczyść cache modułu',
+ 'site' => 'Strona',
+ 'clear_site' => 'Wyczyść cache strony',
+ 'clear_all' => 'Wyczyść cały cache',
+ 'reset_stats' => 'Wyzeruj statystyki',
+ 'cleared' => 'Cache wyczyszczony.',
+];
diff --git a/packages/admin/lang/pl/menu.php b/packages/admin/lang/pl/menu.php
index 8a66dc95..d7d49c18 100644
--- a/packages/admin/lang/pl/menu.php
+++ b/packages/admin/lang/pl/menu.php
@@ -14,6 +14,7 @@
'administrators' => 'Administratorzy',
'roles' => 'Role',
'api_tokens' => 'Tokeny API',
+ 'cache' => 'Cache',
'languages' => 'Języki',
'sites' => 'Witryny',
'modules' => 'Moduły',
diff --git a/packages/admin/lang/pt_BR/cache.php b/packages/admin/lang/pt_BR/cache.php
new file mode 100644
index 00000000..106961c5
--- /dev/null
+++ b/packages/admin/lang/pt_BR/cache.php
@@ -0,0 +1,32 @@
+ 'Os registros são lidos do cache em vez do banco de dados. Salvar no painel o atualiza na hora.',
+ 'hit_rate' => 'Taxa de acertos',
+ 'hits' => 'Acertos',
+ 'misses' => 'Falhas',
+ 'size' => 'Tamanho',
+ 'entries' => 'Entradas',
+ 'store' => 'Armazenamento',
+ 'with_tags' => 'Com tags',
+ 'without_tags' => 'Sem tags (versões)',
+ 'records' => 'Cache de registros',
+ 'pages' => 'Cache de páginas',
+ 'on' => 'Ligado',
+ 'off' => 'Desligado',
+ 'clear_hint' => 'Depois de salvar no painel, não é preciso limpar nada. Ajuda quando o banco foi alterado diretamente.',
+ 'module' => 'Módulo',
+ 'clear_module' => 'Limpar cache do módulo',
+ 'site' => 'Site',
+ 'clear_site' => 'Limpar cache do site',
+ 'clear_all' => 'Limpar todo o cache',
+ 'reset_stats' => 'Zerar estatísticas',
+ 'cleared' => 'O cache foi limpo.',
+];
diff --git a/packages/admin/lang/pt_BR/menu.php b/packages/admin/lang/pt_BR/menu.php
index 58d4d891..63dcef2d 100644
--- a/packages/admin/lang/pt_BR/menu.php
+++ b/packages/admin/lang/pt_BR/menu.php
@@ -14,6 +14,7 @@
'administrators' => 'Administradores',
'roles' => 'Papéis',
'api_tokens' => 'Tokens de API',
+ 'cache' => 'Cache',
'languages' => 'Idiomas',
'sites' => 'Sites',
'modules' => 'Módulos',
diff --git a/packages/admin/lang/ru/cache.php b/packages/admin/lang/ru/cache.php
new file mode 100644
index 00000000..3b07967c
--- /dev/null
+++ b/packages/admin/lang/ru/cache.php
@@ -0,0 +1,32 @@
+ 'Записи читаются из кеша, а не из базы. Сохранение записи в панели сразу обновляет кеш.',
+ 'hit_rate' => 'Попадания в кеш',
+ 'hits' => 'Попадания',
+ 'misses' => 'Промахи',
+ 'size' => 'Размер',
+ 'entries' => 'Записей',
+ 'store' => 'Хранилище',
+ 'with_tags' => 'С тегами',
+ 'without_tags' => 'Без тегов (версии)',
+ 'records' => 'Кеш записей',
+ 'pages' => 'Кеш страниц',
+ 'on' => 'Включён',
+ 'off' => 'Выключен',
+ 'clear_hint' => 'После сохранения в панели чистить ничего не нужно. Это нужно, если база менялась напрямую.',
+ 'module' => 'Модуль',
+ 'clear_module' => 'Очистить кеш модуля',
+ 'site' => 'Сайт',
+ 'clear_site' => 'Очистить кеш сайта',
+ 'clear_all' => 'Очистить весь кеш',
+ 'reset_stats' => 'Сбросить статистику',
+ 'cleared' => 'Кеш очищен.',
+];
diff --git a/packages/admin/lang/ru/menu.php b/packages/admin/lang/ru/menu.php
index 7b44a1fb..02339ff8 100644
--- a/packages/admin/lang/ru/menu.php
+++ b/packages/admin/lang/ru/menu.php
@@ -12,6 +12,7 @@
'administrators' => 'Администраторы',
'roles' => 'Роли',
'api_tokens' => 'API-токены',
+ 'cache' => 'Кеш',
'languages' => 'Языки',
'sites' => 'Сайты',
'modules' => 'Модули',
diff --git a/packages/admin/lang/tr/cache.php b/packages/admin/lang/tr/cache.php
new file mode 100644
index 00000000..47065260
--- /dev/null
+++ b/packages/admin/lang/tr/cache.php
@@ -0,0 +1,32 @@
+ 'Kayıtlar veritabanı yerine önbellekten okunur. Panelde kaydetmek onu hemen günceller.',
+ 'hit_rate' => 'İsabet oranı',
+ 'hits' => 'İsabetler',
+ 'misses' => 'Iskalar',
+ 'size' => 'Boyut',
+ 'entries' => 'Girdiler',
+ 'store' => 'Depo',
+ 'with_tags' => 'Etiketli',
+ 'without_tags' => 'Etiketsiz (sürümler)',
+ 'records' => 'Kayıt önbelleği',
+ 'pages' => 'Sayfa önbelleği',
+ 'on' => 'Açık',
+ 'off' => 'Kapalı',
+ 'clear_hint' => 'Panelde kaydettikten sonra temizlemek gerekmez. Veritabanı doğrudan değiştirildiğinde işe yarar.',
+ 'module' => 'Modül',
+ 'clear_module' => 'Modül önbelleğini temizle',
+ 'site' => 'Site',
+ 'clear_site' => 'Site önbelleğini temizle',
+ 'clear_all' => 'Tüm önbelleği temizle',
+ 'reset_stats' => 'İstatistikleri sıfırla',
+ 'cleared' => 'Önbellek temizlendi.',
+];
diff --git a/packages/admin/lang/tr/menu.php b/packages/admin/lang/tr/menu.php
index f1370368..46229471 100644
--- a/packages/admin/lang/tr/menu.php
+++ b/packages/admin/lang/tr/menu.php
@@ -14,6 +14,7 @@
'administrators' => 'Yöneticiler',
'roles' => 'Roller',
'api_tokens' => 'API tokenları',
+ 'cache' => 'Önbellek',
'languages' => 'Diller',
'sites' => 'Siteler',
'modules' => 'Modüller',
diff --git a/packages/admin/lang/uk/cache.php b/packages/admin/lang/uk/cache.php
new file mode 100644
index 00000000..e964bb31
--- /dev/null
+++ b/packages/admin/lang/uk/cache.php
@@ -0,0 +1,32 @@
+ 'Записи читаються з кешу, а не з бази. Збереження запису в панелі одразу оновлює кеш.',
+ 'hit_rate' => 'Влучання в кеш',
+ 'hits' => 'Влучання',
+ 'misses' => 'Промахи',
+ 'size' => 'Розмір',
+ 'entries' => 'Записів',
+ 'store' => 'Сховище',
+ 'with_tags' => 'З тегами',
+ 'without_tags' => 'Без тегів (версії)',
+ 'records' => 'Кеш записів',
+ 'pages' => 'Кеш сторінок',
+ 'on' => 'Увімкнено',
+ 'off' => 'Вимкнено',
+ 'clear_hint' => 'Після збереження в панелі очищати нічого не треба. Це потрібно, якщо базу змінювали напряму.',
+ 'module' => 'Модуль',
+ 'clear_module' => 'Очистити кеш модуля',
+ 'site' => 'Сайт',
+ 'clear_site' => 'Очистити кеш сайту',
+ 'clear_all' => 'Очистити весь кеш',
+ 'reset_stats' => 'Скинути статистику',
+ 'cleared' => 'Кеш очищено.',
+];
diff --git a/packages/admin/lang/uk/menu.php b/packages/admin/lang/uk/menu.php
index 0c8e6c9c..b0742dbd 100644
--- a/packages/admin/lang/uk/menu.php
+++ b/packages/admin/lang/uk/menu.php
@@ -14,6 +14,7 @@
'administrators' => 'Адміністратори',
'roles' => 'Ролі',
'api_tokens' => 'Токени API',
+ 'cache' => 'Кеш',
'languages' => 'Мови',
'sites' => 'Сайти',
'modules' => 'Модулі',
diff --git a/packages/admin/lang/uz/cache.php b/packages/admin/lang/uz/cache.php
new file mode 100644
index 00000000..c3c16241
--- /dev/null
+++ b/packages/admin/lang/uz/cache.php
@@ -0,0 +1,32 @@
+ 'Yozuvlar maʼlumotlar bazasidan emas, keshdan oʻqiladi. Panelda saqlash uni darhol yangilaydi.',
+ 'hit_rate' => 'Keshga tushish ulushi',
+ 'hits' => 'Tushishlar',
+ 'misses' => 'Tushmasliklar',
+ 'size' => 'Hajmi',
+ 'entries' => 'Yozuvlar',
+ 'store' => 'Ombor',
+ 'with_tags' => 'Teglar bilan',
+ 'without_tags' => 'Teglarsiz (versiyalar)',
+ 'records' => 'Yozuvlar keshi',
+ 'pages' => 'Sahifalar keshi',
+ 'on' => 'Yoqilgan',
+ 'off' => 'Oʻchirilgan',
+ 'clear_hint' => 'Panelda saqlagandan keyin hech narsani tozalash shart emas. Bu bazani toʻgʻridan-toʻgʻri oʻzgartirganda kerak.',
+ 'module' => 'Modul',
+ 'clear_module' => 'Modul keshini tozalash',
+ 'site' => 'Sayt',
+ 'clear_site' => 'Sayt keshini tozalash',
+ 'clear_all' => 'Butun keshni tozalash',
+ 'reset_stats' => 'Statistikani nolga tushirish',
+ 'cleared' => 'Kesh tozalandi.',
+];
diff --git a/packages/admin/lang/uz/menu.php b/packages/admin/lang/uz/menu.php
index 878f9f38..392d85d1 100644
--- a/packages/admin/lang/uz/menu.php
+++ b/packages/admin/lang/uz/menu.php
@@ -14,6 +14,7 @@
'administrators' => 'Administratorlar',
'roles' => 'Rollar',
'api_tokens' => 'API tokenlari',
+ 'cache' => 'Kesh',
'languages' => 'Tillar',
'sites' => 'Saytlar',
'modules' => 'Modullar',
diff --git a/packages/admin/lang/zh_CN/cache.php b/packages/admin/lang/zh_CN/cache.php
new file mode 100644
index 00000000..2e0fc9b6
--- /dev/null
+++ b/packages/admin/lang/zh_CN/cache.php
@@ -0,0 +1,32 @@
+ '记录从缓存而不是数据库读取。在面板中保存会立即更新缓存。',
+ 'hit_rate' => '命中率',
+ 'hits' => '命中',
+ 'misses' => '未命中',
+ 'size' => '大小',
+ 'entries' => '条目',
+ 'store' => '存储',
+ 'with_tags' => '带标签',
+ 'without_tags' => '无标签(版本)',
+ 'records' => '记录缓存',
+ 'pages' => '页面缓存',
+ 'on' => '开启',
+ 'off' => '关闭',
+ 'clear_hint' => '在面板中保存后无需清除。仅在直接修改数据库后需要。',
+ 'module' => '模块',
+ 'clear_module' => '清除模块缓存',
+ 'site' => '站点',
+ 'clear_site' => '清除站点缓存',
+ 'clear_all' => '清除全部缓存',
+ 'reset_stats' => '重置统计',
+ 'cleared' => '缓存已清除。',
+];
diff --git a/packages/admin/lang/zh_CN/menu.php b/packages/admin/lang/zh_CN/menu.php
index ee0dcf49..d36dd574 100644
--- a/packages/admin/lang/zh_CN/menu.php
+++ b/packages/admin/lang/zh_CN/menu.php
@@ -14,6 +14,7 @@
'administrators' => '管理员',
'roles' => '角色',
'api_tokens' => 'API 令牌',
+ 'cache' => '缓存',
'languages' => '语言',
'sites' => '站点',
'modules' => '模块',
diff --git a/packages/admin/resources/js/Pages/Admin/Cache/Index.vue b/packages/admin/resources/js/Pages/Admin/Cache/Index.vue
new file mode 100644
index 00000000..57d18f60
--- /dev/null
+++ b/packages/admin/resources/js/Pages/Admin/Cache/Index.vue
@@ -0,0 +1,115 @@
+
+
+
+
+
+
{{ $t('menu.cache') }}
+
{{ $t('cache.subtitle') }}
+
+
+
+
+
{{ $t('cache.hit_rate') }}
+
{{ status.rate === null ? '—' : `${status.rate}%` }}
+
{{ $t('cache.hits') }}: {{ number(status.hits) }} · {{ $t('cache.misses') }}: {{ number(status.misses) }}
+
+
+
{{ $t('cache.size') }}
+
{{ bytes(status.bytes) }}
+
{{ $t('cache.entries') }}: {{ number(status.entries) }}
+
+
+
{{ $t('cache.store') }}
+
{{ status.driver }}
+
{{ status.tags ? $t('cache.with_tags') : $t('cache.without_tags') }}
+
+
+
{{ $t('cache.records') }}
+
+ {{ status.enabled ? $t('cache.on') : $t('cache.off') }}
+
+
{{ $t('cache.pages') }}: {{ status.pages ? $t('cache.on') : $t('cache.off') }}
+
+
+
+
+
{{ $t('cache.clear_hint') }}
+
+
+
+ {{ $t('cache.module') }}
+
+ {{ item.label }}
+
+
+
{{ $t('cache.clear_module') }}
+
+
+
+
+ {{ $t('cache.site') }}
+
+ {{ item.name }}
+
+
+
{{ $t('cache.clear_site') }}
+
+
+
+
{{ $t('cache.clear_all') }}
+
{{ $t('cache.reset_stats') }}
+
+
+
+
diff --git a/packages/admin/routes/admin.php b/packages/admin/routes/admin.php
index df324a1c..b51b54e9 100644
--- a/packages/admin/routes/admin.php
+++ b/packages/admin/routes/admin.php
@@ -10,6 +10,7 @@
use Atrium\Admin\Http\Controllers\AdminUserController;
use Atrium\Admin\Http\Controllers\ApiTokenController;
use Atrium\Admin\Http\Controllers\Auth\LoginController;
+use Atrium\Admin\Http\Controllers\CacheController;
use Atrium\Admin\Http\Controllers\DashboardController;
use Atrium\Admin\Http\Controllers\FileManagerController;
use Atrium\Admin\Http\Controllers\LocaleController;
@@ -72,6 +73,10 @@
Route::post('api-tokens', [ApiTokenController::class, 'store'])->name('admin.api-tokens.store');
Route::delete('api-tokens/{id}', [ApiTokenController::class, 'destroy'])->whereNumber('id')->name('admin.api-tokens.destroy');
+ // The record cache: hit rate, size, clearing — superadmins only
+ Route::get('cache', [CacheController::class, 'index'])->name('admin.cache.index');
+ Route::post('cache/clear', [CacheController::class, 'clear'])->name('admin.cache.clear');
+
// Admin Users (Administrators)
Route::resource('users', AdminUserController::class)->except(['show'])->names([
'index' => 'admin.users.index',
diff --git a/packages/admin/src/AtriumServiceProvider.php b/packages/admin/src/AtriumServiceProvider.php
index 3f54377b..822afb1a 100644
--- a/packages/admin/src/AtriumServiceProvider.php
+++ b/packages/admin/src/AtriumServiceProvider.php
@@ -12,12 +12,17 @@
use Atrium\Admin\Api\ApiResources;
use Atrium\Admin\Auth\Permissions;
use Atrium\Admin\Auth\SignIn;
+use Atrium\Admin\Cache\CacheStore;
+use Atrium\Admin\Cache\RecordCache;
+use Atrium\Admin\Cache\Versions;
use Atrium\Admin\Captcha\CaptchaManager;
use Atrium\Admin\Contracts\Sitemapable;
use Atrium\Admin\Hooks\Hooks;
use Atrium\Admin\Http\Middleware\AdminAuthenticate;
use Atrium\Admin\Http\Middleware\AuthenticateApiToken;
use Atrium\Admin\Http\Middleware\AuthorizeAdminRoute;
+use Atrium\Admin\Http\Middleware\CacheDebug;
+use Atrium\Admin\Http\Middleware\CachePages;
use Atrium\Admin\Http\Middleware\EnterSiteFolder;
use Atrium\Admin\Http\Middleware\HandleAtriumRequests;
use Atrium\Admin\Http\Middleware\RecordPageTiming;
@@ -38,6 +43,9 @@
use Atrium\Admin\Support\Sites;
use Closure;
use Illuminate\Contracts\Http\Kernel as HttpKernel;
+use Illuminate\Database\Eloquent\Builder;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Queue\Events\JobProcessing;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Blade;
@@ -99,6 +107,9 @@ public function register(): void
return redirect()->intended(route(config('atrium.auth.redirect_after_login', 'admin.dashboard')));
});
});
+ $this->app->singleton(CacheStore::class, fn (): CacheStore => CacheStore::fromConfig());
+ $this->app->singleton(Versions::class, fn ($app): Versions => new Versions($app->make(CacheStore::class)->repository()));
+ $this->app->singleton(RecordCache::class);
}
public function boot(): void
@@ -109,6 +120,7 @@ public function boot(): void
$this->registerRoutes();
$this->registerLocalizedRoutes();
$this->registerSitemapFlush();
+ $this->registerCache();
$this->registerCommands();
$this->registerCdnAssets();
}
@@ -160,6 +172,12 @@ private function registerMiddleware(): void
$this->app->make(HttpKernel::class)->pushMiddleware(EnterSiteFolder::class);
$this->appendToWebGroup(ResolveSite::class);
+ // The full-page cache (off by default) wraps the page once the site
+ // is known; the debug line goes around everything to count hits too.
+ // Both check their settings on every request and step aside.
+ $this->appendToWebGroup(CachePages::class);
+ $this->app->make(HttpKernel::class)->pushMiddleware(CacheDebug::class);
+
// Page timings feed the dashboard gadgets. Added here so the gadgets
// work right after install, without editing bootstrap/app.php.
if (config('atrium.dashboard.timings.enabled', true)) {
@@ -272,6 +290,75 @@ private function registerSitemapFlush(): void
Event::listen('eloquent.deleted: *', $flush);
}
+ /**
+ * The record cache: query macros, dropping what a saved record showed,
+ * a clean slate for every request and job.
+ */
+ private function registerCache(): void
+ {
+ Builder::macro('cachedIds', function (?int $perPage = null, ?int $page = null, array $dependsOn = []) {
+ /** @var Builder $this */
+ return app(RecordCache::class)->ids($this, $perPage, $page, $dependsOn);
+ });
+
+ Builder::macro('cachedPaginate', function (int $perPage = 20, string $pageName = 'page', ?int $page = null, ?string $locale = null, array $dependsOn = []) {
+ /** @var Builder $this */
+ return app(RecordCache::class)->paginate($this, $perPage, $pageName, $page, $locale, $dependsOn);
+ });
+
+ Builder::macro('cachedCards', function (?string $locale = null, array $dependsOn = []) {
+ /** @var Builder $this */
+ $cache = app(RecordCache::class);
+
+ return $cache->cards($this->getModel()::class, $cache->ids($this, dependsOn: $dependsOn)->ids, $locale);
+ });
+
+ // A cached page depends on the class of every model it read.
+ Event::listen('eloquent.retrieved: *', function (string $event): void {
+ if (config('atrium.cache.pages.enabled', false)) {
+ $this->app->make(RecordCache::class)->markRead(['list:'.substr($event, 20)]);
+ }
+ });
+
+ $changed = function (string $event, array $payload): void {
+ $record = $payload[0] ?? null;
+
+ if ($record instanceof Model) {
+ $cache = $this->app->make(RecordCache::class);
+ $cache->changed($record);
+ // Again once committed: a visitor who read between the save
+ // and the commit kept the old row under the new version.
+ $record->getConnection()->afterCommit(static fn () => $cache->changed($record));
+ }
+ };
+
+ foreach (['saved', 'deleted', 'restored', 'forceDeleted'] as $event) {
+ Event::listen('eloquent.'.$event.': *', $changed);
+ }
+
+ $reset = function (): void {
+ if ($this->app->resolved(RecordCache::class)) {
+ $cache = $this->app->make(RecordCache::class);
+ $cache->persistStats();
+ $cache->reset();
+ }
+ };
+
+ $this->app->terminating($reset);
+ Event::listen(JobProcessing::class, $reset);
+
+ // The monitoring module reads this request's hits and misses at the
+ // very end, after reset() may already have closed them.
+ $this->app->make(Hooks::class)->filter('atrium.cache.stats', function (array $stats): array {
+ $own = $this->app->make(RecordCache::class)->finishedStats();
+
+ return [
+ 'hits' => (int) ($stats['hits'] ?? 0) + $own['hits'],
+ 'misses' => (int) ($stats['misses'] ?? 0) + $own['misses'],
+ ] + $stats;
+ });
+ }
+
private function registerCommands(): void
{
if (! $this->app->runningInConsole()) {
@@ -279,6 +366,7 @@ private function registerCommands(): void
}
$this->commands([
+ Console\Commands\CacheWarmCommand::class,
Console\Commands\CdnPurgeCommand::class,
Console\Commands\CreateAdminCommand::class,
Console\Commands\IndexMediaCommand::class,
diff --git a/packages/admin/src/Auth/Permissions.php b/packages/admin/src/Auth/Permissions.php
index 9b287f83..936a9a0a 100644
--- a/packages/admin/src/Auth/Permissions.php
+++ b/packages/admin/src/Auth/Permissions.php
@@ -242,7 +242,7 @@ private function routePermission(?string $routeName): ?string
return null;
}
- if (str_starts_with($routeName, 'admin.roles.')) {
+ if (str_starts_with($routeName, 'admin.roles.') || str_starts_with($routeName, 'admin.cache.')) {
return self::SUPERADMIN;
}
diff --git a/packages/admin/src/Cache/CacheStore.php b/packages/admin/src/Cache/CacheStore.php
new file mode 100644
index 00000000..61a166a5
--- /dev/null
+++ b/packages/admin/src/Cache/CacheStore.php
@@ -0,0 +1,221 @@
+ group => key prefix of its tagged entries */
+ private array $prefixes = [];
+
+ public function __construct(
+ private readonly Repository $repository,
+ private readonly bool $tags,
+ ) {}
+
+ public static function fromConfig(): self
+ {
+ $repository = cache()->store(config('atrium.cache.store'));
+ $strategy = config('atrium.cache.strategy', 'auto');
+ $taggable = $repository instanceof CacheRepository && $repository->getStore() instanceof TaggableStore;
+
+ return new self($repository, $taggable && $strategy !== 'versions');
+ }
+
+ public function repository(): Repository
+ {
+ return $this->repository;
+ }
+
+ public function usesTags(): bool
+ {
+ return $this->tags;
+ }
+
+ public function driver(): string
+ {
+ if (! $this->repository instanceof CacheRepository) {
+ return 'custom';
+ }
+
+ $store = $this->repository->getStore();
+
+ return strtolower((string) preg_replace('/Store$/', '', class_basename($store)));
+ }
+
+ /**
+ * How much the store holds, where it can tell: the whole store (the
+ * record cache shares it with the application's own entries).
+ *
+ * @return array{entries:int|null,bytes:int|null}
+ */
+ public function size(): array
+ {
+ $size = ['entries' => null, 'bytes' => null];
+
+ if (! $this->repository instanceof CacheRepository) {
+ return $size;
+ }
+
+ $store = $this->repository->getStore();
+
+ try {
+ if ($store instanceof RedisStore) {
+ $connection = $store->connection();
+ $size['entries'] = (int) $connection->command('dbsize');
+ $info = $connection->command('info', ['memory']);
+ $memory = $info['Memory'] ?? $info;
+ $size['bytes'] = isset($memory['used_memory']) ? (int) $memory['used_memory'] : null;
+ } elseif ($store instanceof FileStore) {
+ $entries = 0;
+ $bytes = 0;
+
+ foreach ($store->getFilesystem()->allFiles($store->getDirectory()) as $file) {
+ $entries++;
+ $bytes += $file->getSize();
+ }
+
+ $size = ['entries' => $entries, 'bytes' => $bytes];
+ } elseif ($store instanceof DatabaseStore) {
+ $size['entries'] = $store->getConnection()->table((string) config('cache.stores.'.(config('atrium.cache.store') ?? config('cache.default')).'.table', 'cache'))->count();
+ }
+ } catch (Throwable) {
+ // A number on a screen is not worth an error.
+ }
+
+ return $size;
+ }
+
+ /**
+ * @param array $keys
+ * @return array key => value, null for a miss
+ */
+ public function many(string $group, array $keys): array
+ {
+ if ($keys === []) {
+ return [];
+ }
+
+ $raw = array_map(fn (string $key): string => $this->key($group, $key), $keys);
+ $values = $this->repository->many($raw);
+ $result = [];
+
+ foreach ($keys as $i => $key) {
+ $result[$key] = $values[$raw[$i]] ?? null;
+ }
+
+ return $result;
+ }
+
+ public function get(string $group, string $key): mixed
+ {
+ return $this->many($group, [$key])[$key];
+ }
+
+ /**
+ * @param array $values
+ */
+ public function putMany(string $group, array $values, int $ttl): void
+ {
+ if ($values === []) {
+ return;
+ }
+
+ if ($this->tags) {
+ $this->repository->tags($this->tagsOf($group))->putMany($values, $ttl);
+
+ return;
+ }
+
+ $raw = [];
+
+ foreach ($values as $key => $value) {
+ $raw[$this->key($group, (string) $key)] = $value;
+ }
+
+ $this->repository->putMany($raw, $ttl);
+ }
+
+ public function put(string $group, string $key, mixed $value, int $ttl): void
+ {
+ $this->putMany($group, [$key => $value], $ttl);
+ }
+
+ /**
+ * @param array $keys
+ */
+ public function forget(string $group, array $keys): void
+ {
+ foreach ($keys as $key) {
+ $this->repository->forget($this->key($group, $key));
+ }
+ }
+
+ /**
+ * Delete a group's entries where the store can; elsewhere they are
+ * already unreachable through bumped versions.
+ */
+ public function flush(?string $group = null): void
+ {
+ if (! $this->tags) {
+ return;
+ }
+
+ $this->repository->tags([$group === null ? 'atrium' : 'atrium:'.$group])->flush();
+ $this->prefixes = [];
+ }
+
+ public function reset(): void
+ {
+ $this->prefixes = [];
+ }
+
+ private function key(string $group, string $key): string
+ {
+ if (! $this->tags) {
+ return 'atrium:'.$key;
+ }
+
+ // Laravel's own tagged key: sha1(namespace of the tags).':'.$key.
+ $this->prefixes[$group] ??= $this->repository->tags($this->tagsOf($group))->taggedItemKey('');
+
+ return $this->prefixes[$group].$key;
+ }
+
+ /**
+ * @return array
+ */
+ private function tagsOf(string $group): array
+ {
+ return ['atrium', 'atrium:'.$group];
+ }
+}
diff --git a/packages/admin/src/Cache/CachedIds.php b/packages/admin/src/Cache/CachedIds.php
new file mode 100644
index 00000000..1c09d91a
--- /dev/null
+++ b/packages/admin/src/Cache/CachedIds.php
@@ -0,0 +1,25 @@
+ $ids
+ */
+ public function __construct(
+ public readonly array $ids,
+ public readonly int $total,
+ ) {}
+}
diff --git a/packages/admin/src/Cache/CachesRecords.php b/packages/admin/src/Cache/CachesRecords.php
new file mode 100644
index 00000000..46ba351a
--- /dev/null
+++ b/packages/admin/src/Cache/CachesRecords.php
@@ -0,0 +1,97 @@
+where(...)->cachedPaginate(20);
+ *
+ * A card carries the relations named by cacheRelations(). By default these
+ * come from the admin form: a belongs-to-many field's relation, the relation
+ * behind a belongs-to or section field (`brand_id` → `brand()`), and the
+ * SEO meta. A relation to the model's own class (a parent section, related
+ * products) is left out: saving one of those records does not rebuild the
+ * cards that would show it, and it would copy whole records into each
+ * card. Override it to choose yourself.
+ *
+ * @mixin Model
+ */
+trait CachesRecords
+{
+ /**
+ * @return array
+ */
+ public function cacheRelations(): array
+ {
+ $names = [];
+ // The trait may sit on a model that is not in the admin.
+ /** @phpstan-ignore function.alreadyNarrowedType */
+ $fields = method_exists(static::class, 'getAdministrationFields') ? static::getAdministrationFields() : [];
+
+ foreach ($fields as $field) {
+ $name = match ($field->getType()) {
+ 'belongsToMany' => $field->getName(),
+ 'belongsTo', 'treeSelect' => str_ends_with($field->getColumn(), '_id') ? Str::camel(Str::beforeLast($field->getColumn(), '_id')) : null,
+ default => null,
+ };
+
+ if ($name !== null && $this->isCacheRelation($name)) {
+ $names[] = $name;
+ }
+ }
+
+ if ($this->isCacheRelation('seoMeta')) {
+ $names[] = 'seoMeta';
+ }
+
+ return array_values(array_unique($names));
+ }
+
+ /**
+ * @return array
+ */
+ public static function cachedMany(iterable $ids, ?string $locale = null): array
+ {
+ return app(RecordCache::class)->cards(static::class, $ids, $locale);
+ }
+
+ public static function cached(int|string $id, ?string $locale = null): ?Card
+ {
+ return app(RecordCache::class)->cards(static::class, [$id], $locale)[0] ?? null;
+ }
+
+ private function isCacheRelation(string $name): bool
+ {
+ if (! method_exists($this, $name)) {
+ return false;
+ }
+
+ try {
+ $relation = $this->{$name}();
+
+ return $relation instanceof Relation && $relation->getRelated()::class !== static::class;
+ } catch (Throwable) {
+ return false;
+ }
+ }
+}
diff --git a/packages/admin/src/Cache/Card.php b/packages/admin/src/Cache/Card.php
new file mode 100644
index 00000000..23229268
--- /dev/null
+++ b/packages/admin/src/Cache/Card.php
@@ -0,0 +1,249 @@
+ null | {type, raw, relations} | list of them
+ * seo title, description, keywords, og_image
+ * media field => list of {url, path, name, thumbnails}
+ * url the record's public address (PublicUrl::forRecord)
+ * extra what modules added (RecordCache::extend()): the theme's
+ * page, custom field values …
+ *
+ * Read it as an array or through the methods. `$card->name` and
+ * `$card['name']` go through the model's casts and translations, exactly as
+ * `$model->name` would. `model()` gives the record back as a read-only
+ * Eloquent model with its declared relations set: templates that want a
+ * model get one without a query.
+ *
+ * @implements ArrayAccess
+ */
+final class Card implements ArrayAccess, JsonSerializable
+{
+ private ?Model $model = null;
+
+ /**
+ * @param array $data
+ */
+ public function __construct(private readonly array $data) {}
+
+ public function id(): int|string
+ {
+ return $this->data['id'];
+ }
+
+ /**
+ * @return class-string
+ */
+ public function type(): string
+ {
+ return $this->data['type'];
+ }
+
+ public function locale(): string
+ {
+ return (string) $this->data['locale'];
+ }
+
+ /**
+ * An attribute through the model's casts and translations.
+ */
+ public function get(string $attribute, mixed $default = null): mixed
+ {
+ return $this->model()->getAttribute($attribute) ?? $default;
+ }
+
+ /**
+ * The row as the database returns it.
+ *
+ * @return array
+ */
+ public function raw(): array
+ {
+ return $this->data['raw'];
+ }
+
+ /**
+ * A declared relation as a model, a collection of models, or null.
+ *
+ * @return Model|Collection|null
+ */
+ public function relation(string $name): Model|Collection|null
+ {
+ return $this->model()->getRelationValue($name);
+ }
+
+ public function seo(string $key): ?string
+ {
+ $value = $this->data['seo'][$key] ?? null;
+
+ return is_string($value) && $value !== '' ? $value : null;
+ }
+
+ /**
+ * The pictures or files of a form field.
+ *
+ * @return array}>
+ */
+ public function media(string $field): array
+ {
+ return $this->data['media'][$field] ?? [];
+ }
+
+ /**
+ * The first picture of the first filled-in field.
+ */
+ public function picture(string ...$fields): ?string
+ {
+ foreach ($fields as $field) {
+ if (($url = $this->media($field)[0]['url'] ?? null) !== null) {
+ return $url;
+ }
+ }
+
+ return null;
+ }
+
+ public function url(): ?string
+ {
+ $url = $this->data['url'] ?? null;
+
+ return is_string($url) ? $url : null;
+ }
+
+ /**
+ * What a module added to the card under its name.
+ */
+ public function extra(string $name, mixed $default = null): mixed
+ {
+ return $this->data['extra'][$name] ?? $default;
+ }
+
+ /**
+ * The record as an Eloquent model, its relations set from the card.
+ * Read it, never save it: it holds one language only. Name the class
+ * you expect to get it typed.
+ *
+ * @template T of Model
+ *
+ * @param class-string $as
+ * @return T
+ */
+ public function model(string $as = Model::class): Model
+ {
+ $model = $this->model ??= self::hydrate($this->data, $this->locale());
+
+ if (! $model instanceof $as) {
+ throw new LogicException('The card holds a '.$model::class.', not a '.$as.'.');
+ }
+
+ return $model;
+ }
+
+ /**
+ * @return array
+ */
+ public function toArray(): array
+ {
+ return $this->data;
+ }
+
+ /**
+ * @return array
+ */
+ public function jsonSerialize(): array
+ {
+ return [
+ 'id' => $this->id(),
+ 'type' => $this->type(),
+ 'locale' => $this->locale(),
+ 'attributes' => $this->model()->attributesToArray(),
+ 'seo' => $this->data['seo'] ?? [],
+ 'media' => $this->data['media'] ?? [],
+ 'url' => $this->url(),
+ 'extra' => $this->data['extra'] ?? [],
+ ];
+ }
+
+ public function __get(string $name): mixed
+ {
+ return $this->get($name);
+ }
+
+ public function __isset(string $name): bool
+ {
+ return $this->get($name) !== null;
+ }
+
+ public function offsetExists(mixed $offset): bool
+ {
+ return $this->get((string) $offset) !== null;
+ }
+
+ public function offsetGet(mixed $offset): mixed
+ {
+ return $this->get((string) $offset);
+ }
+
+ public function offsetSet(mixed $offset, mixed $value): void
+ {
+ throw new LogicException('A cached record is read-only.');
+ }
+
+ public function offsetUnset(mixed $offset): void
+ {
+ throw new LogicException('A cached record is read-only.');
+ }
+
+ /**
+ * @param array $data
+ */
+ private static function hydrate(array $data, string $locale): Model
+ {
+ /** @var class-string $type */
+ $type = $data['type'];
+ $prototype = new $type;
+ // Named like a model read by a query, so is() and the connection agree.
+ $model = $prototype->newFromBuilder($data['raw'], $prototype->getConnection()->getName());
+
+ // Translated attributes read in the card's language, whatever the
+ // app's language is now.
+ if (method_exists($model, 'setLocale')) {
+ $model->setLocale($locale);
+ }
+
+ foreach ($data['relations'] ?? [] as $name => $related) {
+ if ($related === null) {
+ $model->setRelation($name, null);
+ } elseif (array_is_list($related)) {
+ $model->setRelation($name, (new $type)->newCollection(array_map(static fn (array $item): Model => self::hydrate($item, $locale), $related)));
+ } else {
+ $model->setRelation($name, self::hydrate($related, $locale));
+ }
+ }
+
+ return $model;
+ }
+}
diff --git a/packages/admin/src/Cache/CardBuilder.php b/packages/admin/src/Cache/CardBuilder.php
new file mode 100644
index 00000000..479afb7b
--- /dev/null
+++ b/packages/admin/src/Cache/CardBuilder.php
@@ -0,0 +1,386 @@
+> */
+ private array $relations = [];
+
+ /** @var array> */
+ private array $dependencies = [];
+
+ /** @var array>> */
+ private array $mediaFields = [];
+
+ /** @var array> */
+ private array $fields = [];
+
+ /**
+ * @param array,string):array> $extenders
+ */
+ public function __construct(
+ private readonly array $extenders = [],
+ private readonly ?Closure $thumbnails = null,
+ ) {}
+
+ /**
+ * @param class-string $class
+ * @param array $ids
+ * @return array> id => card data
+ */
+ public function build(string $class, array $ids, string $locale, int $site): array
+ {
+ if ($ids === []) {
+ return [];
+ }
+
+ $previous = app()->getLocale();
+ app()->setLocale($locale);
+
+ try {
+ /** @var Collection $models */
+ $models = $class::query()->whereKey($ids)->with($this->relationsOf($class))->get();
+
+ $extra = [];
+
+ foreach ($this->extenders as $name => $extender) {
+ // A module's broken extender costs its own data, not the page.
+ $extra[$name] = (array) ($this->safely(static fn (): mixed => $extender($models, $locale)) ?? []);
+ }
+
+ $cards = [];
+
+ foreach ($models as $model) {
+ $id = $model->getKey();
+ $cards[$id] = [
+ 'id' => $id,
+ 'type' => $class,
+ 'locale' => $locale,
+ 'site' => $site,
+ 'raw' => $this->raw($model, $locale),
+ 'relations' => $this->relationData($model, $locale),
+ 'seo' => $this->seo($model),
+ 'media' => $this->media($model),
+ 'url' => $this->safely(static fn (): ?string => PublicUrl::forRecord($model)),
+ 'extra' => array_filter(array_map(static fn (array $values): mixed => $values[$id] ?? null, $extra), static fn (mixed $value): bool => $value !== null),
+ ];
+ }
+
+ return $cards;
+ } finally {
+ app()->setLocale($previous);
+ }
+ }
+
+ /**
+ * @param class-string $class
+ * @return array
+ */
+ public function relationsOf(string $class): array
+ {
+ if (isset($this->relations[$class])) {
+ return $this->relations[$class];
+ }
+
+ $model = new $class;
+
+ return $this->relations[$class] = $model instanceof Cacheable ? array_values($model->cacheRelations()) : [];
+ }
+
+ /**
+ * The classes a card shows something of: saving any record of them
+ * makes the cards rebuild. Morph relations are owned by the record
+ * (its SEO meta, its pictures) and drop its card themselves.
+ *
+ * @param class-string $class
+ * @return array
+ */
+ public function dependenciesOf(string $class): array
+ {
+ if (isset($this->dependencies[$class])) {
+ return $this->dependencies[$class];
+ }
+
+ $model = new $class;
+ $classes = [];
+
+ foreach ($this->relationsOf($class) as $name) {
+ $relation = $this->safely(static fn (): mixed => $model->{$name}());
+
+ if ($relation instanceof Relation && ! $relation instanceof MorphOneOrMany && ! $relation instanceof MorphTo) {
+ $classes[] = $relation->getRelated()::class;
+ }
+ }
+
+ // What the form links to: modules show the linked record's name.
+ foreach ($this->fieldsOf($class) as $field) {
+ if ($field instanceof BelongsToField && ($related = $field->getModelClass()) !== null) {
+ $classes[] = $related;
+ }
+ }
+
+ // A record of its own class is dropped by referencing() instead:
+ // otherwise every save would rebuild every card of the class.
+ $classes = array_filter($classes, static fn (string $related): bool => $related !== $class);
+
+ // The address is made of the sections' codes, its own class's too
+ // for a section: moving one moves the addresses below it.
+ $tree = PublicUrl::ruleFor($class)['tree'] ?? null;
+
+ if (is_string($tree) && $tree !== '') {
+ $classes[] = $tree;
+ }
+
+ return $this->dependencies[$class] = array_values(array_unique($classes));
+ }
+
+ /**
+ * Records of the same class whose cards show this one (related
+ * products, an analogue): their cards go when it is saved.
+ *
+ * @return array
+ */
+ public function referencing(Model $record): array
+ {
+ $class = $record::class;
+ $ids = [];
+
+ foreach ($this->fieldsOf($class) as $field) {
+ if (! $field instanceof BelongsToField || $field->getModelClass() !== $class) {
+ continue;
+ }
+
+ $query = $class::query()->withoutGlobalScopes();
+ $name = $field->getName();
+
+ if ($field->getType() === 'belongsToMany') {
+ if (! method_exists($record, $name) || ! $record->{$name}() instanceof BelongsToMany) {
+ continue;
+ }
+
+ $query->whereHas($name, static fn ($related) => $related->withoutGlobalScopes()->whereKey($record->getKey()));
+ } else {
+ $value = $record->getAttribute($field->getValueColumn());
+
+ if ($value === null || $field->getColumn() === $record->getKeyName()) {
+ continue;
+ }
+
+ $query->where($field->getColumn(), $value);
+ }
+
+ $ids = [...$ids, ...$query->whereKeyNot($record->getKey())->pluck($record->getKeyName())->all()];
+ }
+
+ return array_values(array_unique($ids));
+ }
+
+ /**
+ * The row, a translated column reduced to the card's language and the
+ * default one: fifteen languages of a long text would make every card
+ * fifteen times bigger.
+ *
+ * @return array
+ */
+ private function raw(Model $model, string $locale): array
+ {
+ $raw = $model->getAttributes();
+
+ if (! method_exists($model, 'getTranslatableAttributes') || ! method_exists($model, 'getTranslations')) {
+ return $raw;
+ }
+
+ $default = app(ContentLanguages::class)->default();
+
+ foreach ($model->getTranslatableAttributes() as $attribute) {
+ if (! isset($raw[$attribute])) {
+ continue;
+ }
+
+ $translations = $model->getTranslations($attribute);
+ $kept = array_intersect_key($translations, array_flip([$locale, $default]));
+ $raw[$attribute] = json_encode($kept, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
+ }
+
+ return $raw;
+ }
+
+ /**
+ * @return array
+ */
+ private function relationData(Model $model, string $locale): array
+ {
+ $data = [];
+
+ foreach ($model->getRelations() as $name => $value) {
+ if ($value instanceof Model) {
+ $data[$name] = $this->related($value, $locale);
+ } elseif ($value instanceof Collection) {
+ $data[$name] = $value->map(fn (Model $item): array => $this->related($item, $locale))->values()->all();
+ } elseif ($value === null) {
+ $data[$name] = null;
+ }
+ }
+
+ return $data;
+ }
+
+ /**
+ * @return array
+ */
+ private function related(Model $model, string $locale): array
+ {
+ return ['id' => $model->getKey(), 'type' => $model::class, 'raw' => $this->raw($model, $locale), 'relations' => []];
+ }
+
+ /**
+ * @return array
+ */
+ private function seo(Model $model): array
+ {
+ if (! method_exists($model, 'getSeoTitle')) {
+ return [];
+ }
+
+ return [
+ 'title' => $this->safely(static fn (): string => (string) $model->getSeoTitle()),
+ 'description' => method_exists($model, 'getSeoDescription') ? $this->safely(static fn (): string => (string) $model->getSeoDescription()) : null,
+ 'keywords' => method_exists($model, 'getSeoKeywords') ? $this->safely(static fn (): ?string => $model->getSeoKeywords()) : null,
+ 'og_image' => method_exists($model, 'getOgImage') ? $this->safely(static fn (): ?string => $model->getOgImage()) : null,
+ ];
+ }
+
+ /**
+ * Pictures and files of the form's image, gallery and file fields, with
+ * their addresses worked out once.
+ *
+ * @return array}>>
+ */
+ private function media(Model $model): array
+ {
+ $media = [];
+
+ foreach ($this->mediaFieldsOf($model::class) as $column) {
+ $items = [];
+
+ foreach ($this->list($model->getAttribute($column)) as $item) {
+ $url = MediaUrl::to($item);
+
+ if ($url === null) {
+ continue;
+ }
+
+ $path = (string) (is_array($item) ? ($item['path'] ?? $item['url'] ?? '') : $item);
+ $name = is_array($item) && isset($item['name']) ? (string) $item['name'] : rawurldecode(basename((string) parse_url($url, PHP_URL_PATH)));
+
+ $items[] = [
+ 'url' => $url,
+ 'path' => $path,
+ 'name' => $name,
+ 'thumbnails' => $this->thumbnails === null ? [] : (array) ($this->thumbnails)($path, $url),
+ ];
+ }
+
+ if ($items !== []) {
+ $media[$column] = $items;
+ }
+ }
+
+ return $media;
+ }
+
+ /**
+ * @return array
+ */
+ private function mediaFieldsOf(string $class): array
+ {
+ if (isset($this->mediaFields[$class]['columns'])) {
+ return $this->mediaFields[$class]['columns'];
+ }
+
+ $columns = [];
+
+ foreach ($this->fieldsOf($class) as $field) {
+ if ($field instanceof Field && in_array($field->getType(), ['image', 'gallery', 'file'], true)) {
+ $columns[] = $field->getColumn();
+ }
+ }
+
+ return $this->mediaFields[$class]['columns'] = $columns;
+ }
+
+ /**
+ * @return array
+ */
+ private function fieldsOf(string $class): array
+ {
+ return $this->fields[$class] ??= method_exists($class, 'getAdministrationFields') ? $class::getAdministrationFields() : [];
+ }
+
+ /**
+ * A value that may be one item, a list, or a JSON list.
+ *
+ * @return array
+ */
+ private function list(mixed $value): array
+ {
+ if (is_string($value) && str_starts_with(ltrim($value), '[')) {
+ $decoded = json_decode($value, true);
+
+ if (is_array($decoded)) {
+ return $decoded;
+ }
+ }
+
+ if (is_array($value) && (array_is_list($value) || ! (isset($value['path']) || isset($value['url'])))) {
+ return $value;
+ }
+
+ return [$value];
+ }
+
+ /**
+ * @template T
+ *
+ * @param Closure():T $callback
+ * @return T|null
+ */
+ private function safely(Closure $callback): mixed
+ {
+ try {
+ return $callback();
+ } catch (Throwable $e) {
+ report($e);
+
+ return null;
+ }
+ }
+}
diff --git a/packages/admin/src/Cache/RecordCache.php b/packages/admin/src/Cache/RecordCache.php
new file mode 100644
index 00000000..10c524c4
--- /dev/null
+++ b/packages/admin/src/Cache/RecordCache.php
@@ -0,0 +1,709 @@
+where('section_id', 3)->orderBy('price')->cachedPaginate(20);
+ * $cards = Product::cachedMany([12, 7, 31]);
+ *
+ * Keys carry version counters (see Versions):
+ *
+ * all everything; "clear all"
+ * site:{id} one site's cards, lists and pages
+ * list:{class} any record of the class saved or deleted: its lists,
+ * and the cards of other classes that show it (a brand's
+ * name on its products) rebuild lazily
+ * card:{class} the class's cards; "clear this module"
+ *
+ * Saving a record drops its own cards in every language and site at once,
+ * and bumps its class's list version.
+ */
+final class RecordCache
+{
+ /** @var array,string):array> */
+ private array $extenders = [];
+
+ private ?Closure $thumbnails = null;
+
+ private ?CardBuilder $builder = null;
+
+ private int $bulk = 0;
+
+ /** @var array class => class: the classes saved during a bulk, as a set */
+ private array $bulkTouched = [];
+
+ private bool $bulkEverything = false;
+
+ /** @var array> */
+ private array $warmers = [];
+
+ /** @var array name => name: the version names the current request has read through, as a set */
+ private array $read = [];
+
+ /** @var array{hits:int,misses:int} */
+ private array $stats = ['hits' => 0, 'misses' => 0];
+
+ /** @var array> class => keys of the records being changed right now */
+ private array $changing = [];
+
+ public function __construct(
+ private readonly CacheStore $store,
+ private readonly Versions $versions,
+ ) {}
+
+ /**
+ * The read name of a request whose page must not be kept: it holds
+ * something made for one visitor only.
+ */
+ public const NO_PAGE = 'no-page';
+
+ /** @var array{hits:int,misses:int} the counts of the request reset() last closed */
+ private array $lastStats = ['hits' => 0, 'misses' => 0];
+
+ public function enabled(): bool
+ {
+ return (bool) config('atrium.cache.enabled', true);
+ }
+
+ public function store(): CacheStore
+ {
+ return $this->store;
+ }
+
+ public function versions(): Versions
+ {
+ return $this->versions;
+ }
+
+ /**
+ * Cards of records in the order of the ids; ids with no record are
+ * left out. One multi-get, then one batch of queries for the misses.
+ *
+ * @param class-string $class
+ * @param iterable $ids
+ * @return array
+ */
+ public function cards(string $class, iterable $ids, ?string $locale = null): array
+ {
+ $ids = array_unique(array_map(self::normalizeId(...), is_array($ids) ? $ids : iterator_to_array($ids, false)));
+
+ if ($ids === []) {
+ return [];
+ }
+
+ $locale ??= app()->getLocale();
+ $site = $this->site();
+ // A cached page that shows the record is stale once any record of
+ // its class is saved (cards are dropped one by one, not versioned).
+ $this->markRead(['list:'.$class]);
+
+ if (! $this->enabled() || ! is_subclass_of($class, Cacheable::class)) {
+ $data = $this->builder()->build($class, $ids, $locale, $site);
+
+ return $this->ordered($ids, $data);
+ }
+
+ $prefix = $this->cardPrefix($class, $site, $locale);
+ $keys = array_map(static fn (int|string $id): string => $prefix.$id, $ids);
+ $values = $this->store->many(self::group($class), $keys);
+ $data = [];
+ $missing = [];
+
+ foreach ($ids as $i => $id) {
+ $value = $values[$keys[$i]] ?? null;
+
+ if (is_array($value)) {
+ $data[$id] = $value;
+ } else {
+ $missing[] = $id;
+ }
+ }
+
+ $this->stats['hits'] += count($data);
+ $this->stats['misses'] += count($missing);
+
+ if ($missing !== []) {
+ $built = $this->builder()->build($class, $missing, $locale, $site);
+ $put = [];
+
+ foreach ($built as $id => $card) {
+ $data[$id] = $card;
+ $put[$prefix.$id] = $card;
+ }
+
+ $this->store->putMany(self::group($class), $put, $this->ttl('cards'));
+ }
+
+ return $this->ordered($ids, $data);
+ }
+
+ /**
+ * The ids a list query answers, cached by the query itself (its
+ * filters, order, page, the site and the language) until a record of
+ * its class changes.
+ *
+ * @param Builder $query
+ * @param array> $dependsOn other classes the query reads (a join, whereHas)
+ */
+ public function ids(Builder $query, ?int $perPage = null, ?int $page = null, array $dependsOn = []): CachedIds
+ {
+ $model = $query->getModel();
+ $class = $model::class;
+
+ $run = static function () use ($query, $model, $perPage, $page): array {
+ $key = $model->getQualifiedKeyName();
+
+ if ($perPage === null) {
+ $ids = $query->toBase()->pluck($key)->all();
+
+ return ['ids' => $ids, 'total' => count($ids)];
+ }
+
+ $total = $query->toBase()->getCountForPagination();
+ $ids = $total > 0 ? (clone $query)->forPage((int) $page, $perPage)->toBase()->pluck($key)->all() : [];
+
+ return ['ids' => $ids, 'total' => $total];
+ };
+
+ if (! $this->enabled()) {
+ $result = $run();
+
+ return new CachedIds(array_map(self::normalizeId(...), $result['ids']), (int) $result['total']);
+ }
+
+ $names = ['all', 'site:'.$this->site(), 'list:'.$class];
+
+ foreach ($dependsOn as $dependency) {
+ $names[] = 'list:'.$dependency;
+ }
+
+ $this->markRead($names);
+
+ $hash = hash('xxh128', implode("\n", [
+ $query->toSql(),
+ json_encode(array_map(self::binding(...), $query->getBindings())),
+ $perPage,
+ $page,
+ app()->getLocale(),
+ ]));
+ $key = 'ids:'.$this->versions->stamp($names).':'.$hash;
+ $cached = $this->store->get(self::group($class), $key);
+
+ if (is_array($cached)) {
+ $this->stats['hits']++;
+ } else {
+ $this->stats['misses']++;
+ $cached = $run();
+ $this->store->put(self::group($class), $key, $cached, $this->ttl('lists'));
+ }
+
+ return new CachedIds(array_map(self::normalizeId(...), $cached['ids']), (int) $cached['total']);
+ }
+
+ /**
+ * A page of cards with the paginator the views know.
+ *
+ * @param Builder $query
+ * @param array> $dependsOn
+ * @return LengthAwarePaginator
+ */
+ public function paginate(Builder $query, int $perPage = 20, string $pageName = 'page', ?int $page = null, ?string $locale = null, array $dependsOn = []): LengthAwarePaginator
+ {
+ $page ??= Paginator::resolveCurrentPage($pageName);
+ $result = $this->ids($query, $perPage, $page, $dependsOn);
+
+ return new LengthAwarePaginator(
+ $this->cards($query->getModel()::class, $result->ids, $locale),
+ $result->total,
+ $perPage,
+ $page,
+ ['path' => Paginator::resolveCurrentPath(), 'pageName' => $pageName],
+ );
+ }
+
+ /**
+ * Anything else worth keeping until a record of the given classes
+ * changes: a tree of sections, the counters of a block.
+ *
+ * @param string|array $classes model classes, or any name a writer drops with flushClass()
+ */
+ public function remember(string|array $classes, string $key, Closure $callback, ?int $ttl = null, bool $perSite = true): mixed
+ {
+ if (! $this->enabled()) {
+ return $callback();
+ }
+
+ $classes = (array) $classes;
+ $names = ['all', ...array_map(static fn (string $class): string => 'list:'.$class, $classes)];
+
+ if ($perSite) {
+ $names[] = 'site:'.$this->site();
+ }
+
+ $this->markRead($names);
+ $group = self::group($classes[0] ?? 'remember');
+ $full = 'r:'.$this->versions->stamp($names).':'.($perSite ? $this->site().':' : '').$key;
+ $cached = $this->store->get($group, $full);
+
+ if (is_array($cached) && array_key_exists('v', $cached)) {
+ $this->stats['hits']++;
+
+ return $cached['v'];
+ }
+
+ $this->stats['misses']++;
+ $value = $callback();
+ $this->store->put($group, $full, ['v' => $value], $ttl ?? $this->ttl('lists'));
+
+ return $value;
+ }
+
+ /**
+ * A record was saved, deleted or restored: drop its cards in every
+ * language and site, make its class's lists and the cards that show it
+ * stale, and pass the news to the records it belongs to.
+ */
+ public function changed(Model $record): void
+ {
+ $class = $record::class;
+
+ if (in_array($class, (array) config('atrium.cache.ignore', []), true)) {
+ return;
+ }
+
+ if ($this->bulk > 0) {
+ $this->bulkTouched[$class] = $class;
+
+ return;
+ }
+
+ $key = $record->getKey();
+
+ if ($this->changing[$class][$key] ?? false) {
+ return;
+ }
+
+ $this->changing[$class][$key] = true;
+
+ try {
+ $this->versions->bump('list:'.$class);
+
+ // A site's domains and languages are in every address of its
+ // cards; a language is in every site's.
+ if ($record instanceof Site && $record->getKey() !== null) {
+ $this->flushSite((int) $record->getKey());
+ } elseif ($record instanceof Language) {
+ $this->flushAll();
+ }
+
+ if ($record instanceof Cacheable && $record->getKey() !== null) {
+ $this->forgetCards($class, [$record->getKey(), ...$this->builder()->referencing($record)]);
+ }
+
+ if (method_exists($record, 'cacheTouches')) {
+ foreach ((array) $record->cacheTouches() as $owner) {
+ if ($owner instanceof Model) {
+ $this->changed($owner);
+ }
+ }
+ }
+ } catch (Throwable $e) {
+ // A cache that is down must not fail the save.
+ report($e);
+ } finally {
+ unset($this->changing[$class][$key]);
+ }
+ }
+
+ /**
+ * Drop a class's cards and lists (and those of the classes showing it),
+ * or the remember() values kept under a name of one's own.
+ *
+ * @param string $class a model class or a remember() name
+ */
+ public function flushClass(string $class): void
+ {
+ $this->versions->bump('card:'.$class, 'list:'.$class);
+ $this->store->flush(self::group($class));
+ }
+
+ public function flushSite(int $site): void
+ {
+ $this->versions->bump('site:'.$site);
+ }
+
+ public function flushAll(): void
+ {
+ $this->versions->bump('all');
+ $this->store->flush();
+ }
+
+ /**
+ * Run an import without dropping cards record by record, then drop
+ * the classes it touched once.
+ *
+ * @template T
+ *
+ * Pass $everything for an import that writes past Eloquent (query
+ * builder inserts): no events tell which classes it touched, so the
+ * whole cache goes once at the end.
+ *
+ * @param Closure():T $callback
+ * @return T
+ */
+ public function bulk(Closure $callback, bool $everything = false): mixed
+ {
+ $this->bulk++;
+ $this->bulkEverything = $this->bulkEverything || $everything;
+
+ try {
+ return $callback();
+ } finally {
+ if (--$this->bulk === 0) {
+ $touched = $this->bulkTouched;
+ $all = $this->bulkEverything;
+ $this->bulkTouched = [];
+ $this->bulkEverything = false;
+
+ if ($all) {
+ $this->flushAll();
+ } else {
+ foreach ($touched as $class) {
+ $this->flushClass($class);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Add pages for atrium:cache:warm to open in a language: the theme adds
+ * its home page and the first page of every list.
+ *
+ * @param Closure(string):iterable $paths language => addresses or paths
+ */
+ public function warmUsing(Closure $paths): void
+ {
+ $this->warmers[] = $paths;
+ }
+
+ /**
+ * The paths atrium:cache:warm opens in a language, the site's home first.
+ *
+ * @return array
+ */
+ public function warmPaths(string $language): array
+ {
+ $paths = ['/'];
+
+ foreach ($this->warmers as $warmer) {
+ foreach ($warmer($language) as $url) {
+ $path = (string) parse_url((string) $url, PHP_URL_PATH);
+ $query = parse_url((string) $url, PHP_URL_QUERY);
+ $paths[] = '/'.ltrim($path, '/').(is_string($query) && $query !== '' ? '?'.$query : '');
+ }
+ }
+
+ return array_values(array_unique($paths));
+ }
+
+ /**
+ * Add a module's data to every card: called once per batch of records
+ * being built, in the card's language; returns id => data.
+ *
+ * @param Closure(Collection,string):array $extender
+ */
+ public function extend(string $name, Closure $extender): void
+ {
+ $this->extenders[$name] = $extender;
+ $this->builder = null;
+ }
+
+ /**
+ * How the cards get thumbnail addresses for their pictures:
+ * fn (string $path, string $url): array size => url.
+ */
+ public function thumbnailsUsing(?Closure $resolver): void
+ {
+ $this->thumbnails = $resolver;
+ $this->builder = null;
+ }
+
+ public function builder(): CardBuilder
+ {
+ return $this->builder ??= new CardBuilder($this->extenders, $this->thumbnails);
+ }
+
+ /**
+ * The time list queries compare against, in steps (a minute by
+ * default): `now()` would make every query, and so every key, new.
+ */
+ public function now(): Carbon
+ {
+ $step = max(1, (int) config('atrium.cache.time_step', 60));
+
+ return Carbon::createFromTimestamp(intdiv(Carbon::now()->getTimestamp(), $step) * $step, date_default_timezone_get());
+ }
+
+ /**
+ * @return array{hits:int,misses:int}
+ */
+ public function requestStats(): array
+ {
+ return $this->stats;
+ }
+
+ /**
+ * This request's counts, or, once the request has been closed by
+ * reset(), the counts it closed with: for whoever reads them at the very
+ * end (the monitoring module, through the atrium.cache.stats filter).
+ *
+ * @return array{hits:int,misses:int}
+ */
+ public function finishedStats(): array
+ {
+ return $this->stats['hits'] + $this->stats['misses'] > 0 ? $this->stats : $this->lastStats;
+ }
+
+ /**
+ * The version names read through during this request: a cached page
+ * stays valid while all of them stay the same.
+ *
+ * @return array
+ */
+ public function readNames(): array
+ {
+ return array_keys($this->read);
+ }
+
+ /**
+ * Keep the page cache off this request's page: a one-time token, a
+ * captcha question, anything made for this visitor alone.
+ */
+ public function dontKeepPage(): void
+ {
+ $this->read[self::NO_PAGE] = self::NO_PAGE;
+ }
+
+ public function pageKeepable(): bool
+ {
+ return ! isset($this->read[self::NO_PAGE]);
+ }
+
+ /**
+ * @param array $names
+ */
+ public function markRead(array $names): void
+ {
+ foreach ($names as $name) {
+ $this->read[$name] = $name;
+ }
+ }
+
+ /**
+ * Start afresh for the next request or job.
+ */
+ public function reset(): void
+ {
+ if ($this->stats['hits'] + $this->stats['misses'] > 0) {
+ $this->lastStats = $this->stats;
+ }
+
+ $this->read = [];
+ $this->stats = ['hits' => 0, 'misses' => 0];
+ $this->versions->reset();
+ $this->store->reset();
+ }
+
+ /**
+ * Add this request's hits and misses to the totals the admin shows.
+ */
+ public function persistStats(): void
+ {
+ if (! config('atrium.cache.stats', true)) {
+ return;
+ }
+
+ try {
+ $repository = $this->store->repository();
+
+ foreach ($this->stats as $name => $count) {
+ if ($count > 0 && $repository->increment('atrium:stats:'.$name, $count) === false) {
+ $repository->forever('atrium:stats:'.$name, $count);
+ }
+ }
+ } catch (Throwable) {
+ // Statistics are not worth an error page.
+ }
+ }
+
+ /**
+ * @return array{hits:int,misses:int}
+ */
+ public function totals(): array
+ {
+ $repository = $this->store->repository();
+
+ return [
+ 'hits' => (int) $repository->get('atrium:stats:hits', 0),
+ 'misses' => (int) $repository->get('atrium:stats:misses', 0),
+ ];
+ }
+
+ public function resetTotals(): void
+ {
+ $this->store->repository()->forget('atrium:stats:hits');
+ $this->store->repository()->forget('atrium:stats:misses');
+ }
+
+ public static function group(string $class): string
+ {
+ return str_replace('\\', '.', $class);
+ }
+
+ /**
+ * @param class-string $class
+ * @param array $ids
+ */
+ private function forgetCards(string $class, array $ids): void
+ {
+ $sites = $this->knownSites();
+ $locales = $this->knownLocales();
+ $keys = [];
+
+ foreach ($sites as $site) {
+ foreach ($locales as $locale) {
+ $prefix = $this->cardPrefix($class, $site, $locale, false);
+
+ foreach ($ids as $id) {
+ $keys[] = $prefix.$id;
+ }
+ }
+ }
+
+ $this->store->forget(self::group($class), $keys);
+
+ // Inside a transaction a request may build the card again from the
+ // old row before the commit: drop it once more after the commit.
+ if (DB::transactionLevel() > 0) {
+ DB::afterCommit(fn () => $this->store->forget(self::group($class), $keys));
+ }
+ }
+
+ /**
+ * @param class-string $class
+ */
+ private function cardPrefix(string $class, int $site, string $locale, bool $markRead = true): string
+ {
+ $names = ['all', 'site:'.$site, 'card:'.$class];
+
+ foreach ($this->builder()->dependenciesOf($class) as $dependency) {
+ $names[] = 'list:'.$dependency;
+ }
+
+ if ($markRead) {
+ $this->markRead($names);
+ }
+
+ return 'card:'.$this->versions->stamp($names).':'.$site.':'.$locale.':';
+ }
+
+ /**
+ * @return array
+ */
+ private function knownSites(): array
+ {
+ try {
+ $ids = app(Sites::class)->all()->pluck('id')->filter()->all();
+ } catch (Throwable) {
+ $ids = [];
+ }
+
+ return array_unique([0, ...$ids]);
+ }
+
+ /**
+ * @return array
+ */
+ private function knownLocales(): array
+ {
+ try {
+ $codes = Language::query()->pluck('code')->all();
+ } catch (Throwable) {
+ $codes = [];
+ }
+
+ return array_unique([app()->getLocale(), ...$codes]);
+ }
+
+ private function site(): int
+ {
+ $sites = app(Sites::class);
+
+ return $sites->isResolved() ? (int) $sites->current()->getKey() : 0;
+ }
+
+ private function ttl(string $kind): int
+ {
+ return max(1, (int) config('atrium.cache.ttl.'.$kind, $kind === 'cards' ? 86400 : 3600));
+ }
+
+ /**
+ * @param array $ids
+ * @param array> $data
+ * @return array
+ */
+ private function ordered(array $ids, array $data): array
+ {
+ $cards = [];
+
+ foreach ($ids as $id) {
+ if (isset($data[$id])) {
+ $cards[] = new Card($data[$id]);
+ }
+ }
+
+ return $cards;
+ }
+
+ private static function normalizeId(mixed $id): int|string
+ {
+ return is_int($id) || (is_string($id) && ctype_digit($id) && strlen($id) < 19) ? (int) $id : (string) $id;
+ }
+
+ private static function binding(mixed $value): mixed
+ {
+ return match (true) {
+ $value instanceof DateTimeInterface => $value->format('Y-m-d H:i:s.u'),
+ is_object($value) && method_exists($value, '__toString') => (string) $value,
+ default => $value,
+ };
+ }
+}
diff --git a/packages/admin/src/Cache/TouchesOwner.php b/packages/admin/src/Cache/TouchesOwner.php
new file mode 100644
index 00000000..88f72fb7
--- /dev/null
+++ b/packages/admin/src/Cache/TouchesOwner.php
@@ -0,0 +1,45 @@
+
+ */
+ public function cacheTouches(): array
+ {
+ $type = $this->getAttribute($this->ownerMorphName().'_type');
+ $id = $this->getAttribute($this->ownerMorphName().'_id');
+ $class = is_string($type) ? (Relation::getMorphedModel($type) ?? $type) : null;
+
+ if ($class === null || $id === null || ! is_subclass_of($class, Model::class)) {
+ return [];
+ }
+
+ $owner = new $class;
+ $owner->setRawAttributes([$owner->getKeyName() => $id], true);
+ $owner->exists = true;
+
+ return [$owner];
+ }
+
+ abstract protected function ownerMorphName(): string;
+}
diff --git a/packages/admin/src/Cache/Versions.php b/packages/admin/src/Cache/Versions.php
new file mode 100644
index 00000000..4105b530
--- /dev/null
+++ b/packages/admin/src/Cache/Versions.php
@@ -0,0 +1,120 @@
+> 1;
+
+ /** @var array */
+ private array $memo = [];
+
+ public function __construct(private readonly Repository $store) {}
+
+ /**
+ * @param array $names
+ * @return array name => version
+ */
+ public function get(array $names): array
+ {
+ $names = array_unique($names);
+ $missing = array_values(array_filter($names, fn (string $name): bool => ! isset($this->memo[$name])));
+
+ if ($missing !== []) {
+ $keys = array_map(static fn (string $name): string => self::PREFIX.$name, $missing);
+ $values = $this->store->many($keys);
+
+ foreach ($missing as $i => $name) {
+ $value = $values[$keys[$i]] ?? null;
+
+ if ($value === null || $value === false) {
+ $value = $this->start($name);
+ }
+
+ $this->memo[$name] = (string) $value;
+ }
+ }
+
+ return array_intersect_key($this->memo, array_flip($names));
+ }
+
+ /**
+ * One short string for a set of versions, to put into a key.
+ *
+ * @param array $names
+ */
+ public function stamp(array $names): string
+ {
+ sort($names);
+ $versions = $this->get($names);
+
+ return substr(hash('xxh128', implode('|', array_map(static fn (string $name): string => $name.'='.$versions[$name], $names))), 0, 16);
+ }
+
+ public function bump(string ...$names): void
+ {
+ foreach (array_unique($names) as $name) {
+ $key = self::PREFIX.$name;
+
+ // Redis and the array store create a missing counter at 1;
+ // ours never are 1, so that means it was not there.
+ $value = $this->store->increment($key);
+
+ if ($value === false || $value <= 1) {
+ $this->store->put($key, random_int(self::START_MIN, self::START_MAX), self::TTL);
+ }
+
+ unset($this->memo[$name]);
+ }
+ }
+
+ /**
+ * Forget what was read: the next request (under Octane, in a queue
+ * worker) must see versions bumped by other processes.
+ */
+ public function reset(): void
+ {
+ $this->memo = [];
+ }
+
+ private function start(string $name): string
+ {
+ $key = self::PREFIX.$name;
+ $this->store->add($key, random_int(self::START_MIN, self::START_MAX), self::TTL);
+
+ return (string) $this->store->get($key);
+ }
+}
diff --git a/packages/admin/src/Captcha/ImageCaptcha.php b/packages/admin/src/Captcha/ImageCaptcha.php
index 671a7b10..ff4e8cec 100644
--- a/packages/admin/src/Captcha/ImageCaptcha.php
+++ b/packages/admin/src/Captcha/ImageCaptcha.php
@@ -9,6 +9,7 @@
namespace Atrium\Admin\Captcha;
+use Atrium\Admin\Cache\RecordCache;
use Illuminate\Contracts\Cache\Repository as Cache;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Contracts\Encryption\Encrypter;
@@ -36,6 +37,9 @@ public function __construct(private readonly Encrypter $encrypter, private reado
public function widget(): HtmlString
{
+ // A question is used up on the first answer: a kept page would give
+ // every visitor the same one.
+ app(RecordCache::class)->dontKeepPage();
[$a, $b] = [random_int(1, 9), random_int(1, 9)];
$token = $this->encrypter->encrypt([
'q' => "$a + $b",
diff --git a/packages/admin/src/Console/Commands/CacheWarmCommand.php b/packages/admin/src/Console/Commands/CacheWarmCommand.php
new file mode 100644
index 00000000..580a9a8d
--- /dev/null
+++ b/packages/admin/src/Console/Commands/CacheWarmCommand.php
@@ -0,0 +1,146 @@
+warn('The record cache is off (ATRIUM_CACHE_ENABLED=false): nothing to warm.');
+
+ return self::SUCCESS;
+ }
+
+ // Warming must not leave a session file behind per page.
+ config(['session.driver' => 'array']);
+
+ $only = array_filter((array) $this->option('site'));
+ $pages = 0;
+ $cards = 0;
+
+ foreach ($sites->all() as $site) {
+ if (! $site->active || ($only !== [] && ! in_array($site->code, $only, true))) {
+ continue;
+ }
+
+ $sites->setCurrent($site);
+ $codes = $languages->codes();
+ $base = $this->base($site);
+
+ foreach ($codes as $code) {
+ foreach ($cache->warmPaths($code) as $path) {
+ $status = $this->open($kernel, $base.$path);
+ $pages++;
+ $this->line(sprintf(' %s %s', $status, $base.$path), verbosity: $status === 200 ? 'v' : 'normal');
+ }
+ }
+
+ if ($this->option('records')) {
+ $cards += $this->buildCards($cache, $resources, $codes);
+ }
+ }
+
+ $sites->forgetCurrent();
+ $this->info($this->option('records')
+ ? sprintf('Opened %d pages and built %d cards.', $pages, $cards)
+ : sprintf('Opened %d pages.', $pages));
+
+ return self::SUCCESS;
+ }
+
+ private function open(Kernel $kernel, string $url): int
+ {
+ try {
+ $request = Request::create($url, 'GET');
+ $response = $kernel->handle($request);
+ $kernel->terminate($request, $response);
+
+ return $response->getStatusCode();
+ } catch (Throwable $e) {
+ report($e);
+
+ return 500;
+ }
+ }
+
+ /**
+ * @param array $codes
+ */
+ private function buildCards(RecordCache $cache, ApiResources $resources, array $codes): int
+ {
+ $built = 0;
+
+ // Modules of the panel, and the models the theme gives addresses to.
+ $classes = [...$resources->modules(), ...array_keys((array) config('atrium.public_urls', []))];
+
+ foreach (array_unique($classes) as $class) {
+ if (! is_string($class) || ! class_exists($class)) {
+ continue;
+ }
+
+ if (! is_subclass_of($class, Cacheable::class) || ! is_subclass_of($class, Model::class)) {
+ continue;
+ }
+
+ $class::query()->select((new $class)->getQualifiedKeyName())->chunkById(500, function ($records) use ($cache, $class, $codes, &$built): void {
+ $ids = $records->modelKeys();
+
+ foreach ($codes as $code) {
+ $built += count($cache->cards($class, $ids, $code));
+ }
+
+ $cache->reset();
+ });
+ }
+
+ return $built;
+ }
+
+ /**
+ * Where the site is: its first domain (the app's URL when it has none)
+ * and its folder.
+ */
+ private function base(Site $site): string
+ {
+ $url = (string) config('app.url', 'http://localhost');
+ $scheme = parse_url($url, PHP_URL_SCHEME) ?: 'http';
+ $domain = ($site->domains)[0] ?? null;
+ $root = is_string($domain) && $domain !== '' ? $scheme.'://'.$domain : $url;
+
+ return rtrim($root, '/').($site->folder ? '/'.trim((string) $site->folder, '/') : '');
+ }
+}
diff --git a/packages/admin/src/Console/Commands/ModuleRemoveCommand.php b/packages/admin/src/Console/Commands/ModuleRemoveCommand.php
index 883fc4c4..b6b117a1 100644
--- a/packages/admin/src/Console/Commands/ModuleRemoveCommand.php
+++ b/packages/admin/src/Console/Commands/ModuleRemoveCommand.php
@@ -69,6 +69,7 @@ public function handle(Modules $modules): int
if (! $keep && Schema::hasTable(Settings::TABLE)) {
DB::table(Settings::TABLE)->where('module', $module->key())->delete();
+ $this->laravel->make(Settings::class)->flush();
}
if (($keys !== [] || $own !== []) && Schema::hasTable('admin_roles')) {
diff --git a/packages/admin/src/Contracts/Cacheable.php b/packages/admin/src/Contracts/Cacheable.php
new file mode 100644
index 00000000..08524f9b
--- /dev/null
+++ b/packages/admin/src/Contracts/Cacheable.php
@@ -0,0 +1,25 @@
+
+ */
+ public function cacheRelations(): array;
+}
diff --git a/packages/admin/src/Http/Controllers/AdminController.php b/packages/admin/src/Http/Controllers/AdminController.php
index 3c5fda56..3fcd88a0 100644
--- a/packages/admin/src/Http/Controllers/AdminController.php
+++ b/packages/admin/src/Http/Controllers/AdminController.php
@@ -11,6 +11,7 @@
use Atrium\Admin\Actions\CreateFromRecord;
use Atrium\Admin\Auth\Permissions;
+use Atrium\Admin\Cache\RecordCache;
use Atrium\Admin\Contracts\Administrable;
use Atrium\Admin\Facades\Hook;
use Atrium\Admin\Fields\CheckboxField;
@@ -429,6 +430,9 @@ protected function saveItem(Request $request, string $context, Model&Administrab
return $record;
}, attempts: 3);
+ // Pivot syncs and SEO rows fire no event of the record itself.
+ DB::afterCommit(static fn () => app(RecordCache::class)->changed($saved));
+
// Listeners send mail and queue jobs: only for what was committed,
// after the outermost transaction if the caller opened one.
DB::afterCommit(static fn () => Hook::fire('atrium.record.saved', $saved, $context));
diff --git a/packages/admin/src/Http/Controllers/CacheController.php b/packages/admin/src/Http/Controllers/CacheController.php
new file mode 100644
index 00000000..b111a4b9
--- /dev/null
+++ b/packages/admin/src/Http/Controllers/CacheController.php
@@ -0,0 +1,89 @@
+cache->totals();
+ $reads = $totals['hits'] + $totals['misses'];
+
+ return Inertia::render('Admin/Cache/Index', [
+ 'status' => [
+ 'enabled' => (bool) config('atrium.cache.enabled', true),
+ 'pages' => (bool) config('atrium.cache.pages.enabled', false),
+ 'driver' => $this->store->driver(),
+ 'tags' => $this->store->usesTags(),
+ 'hits' => $totals['hits'],
+ 'misses' => $totals['misses'],
+ 'rate' => $reads > 0 ? round($totals['hits'] * 100 / $reads, 1) : null,
+ ...$this->store->size(),
+ ],
+ 'modules' => collect($this->modules())
+ ->map(fn (string $class, string $key): array => ['key' => $key, 'label' => $this->resources->label($key)])
+ ->sortBy('label')
+ ->values(),
+ 'sites' => $this->sites->all()
+ ->filter(fn (Site $site): bool => $site->exists)
+ ->map(fn (Site $site): array => ['id' => $site->getKey(), 'name' => $site->name])
+ ->values(),
+ ]);
+ }
+
+ public function clear(Request $request): RedirectResponse
+ {
+ $validated = $request->validate([
+ 'scope' => ['required', Rule::in(['all', 'module', 'site', 'stats'])],
+ 'module' => ['required_if:scope,module', 'nullable', Rule::in(array_keys($this->modules()))],
+ 'site' => ['required_if:scope,site', 'nullable', 'integer'],
+ ]);
+
+ match ($validated['scope']) {
+ 'module' => $this->cache->flushClass($this->modules()[$validated['module']]),
+ 'site' => $this->cache->flushSite((int) $validated['site']),
+ 'stats' => $this->cache->resetTotals(),
+ default => $this->cache->flushAll(),
+ };
+
+ return redirect()->route('admin.cache.index')->with('success', __('atrium::cache.cleared'));
+ }
+
+ /**
+ * @return array key => model class of every cached module
+ */
+ private function modules(): array
+ {
+ return array_filter($this->resources->modules(), static fn (string $class): bool => is_subclass_of($class, Cacheable::class));
+ }
+}
diff --git a/packages/admin/src/Http/Middleware/CacheDebug.php b/packages/admin/src/Http/Middleware/CacheDebug.php
new file mode 100644
index 00000000..e5690bdd
--- /dev/null
+++ b/packages/admin/src/Http/Middleware/CacheDebug.php
@@ -0,0 +1,94 @@
+cache->requestStats();
+ $page = $response->headers->get(CachePages::HEADER, 'off');
+ $line = sprintf(
+ 'queries=%d (%.1f ms); cache hits=%d misses=%d; page cache=%s; %.1f ms',
+ self::$queries,
+ self::$queryMs,
+ $stats['hits'],
+ $stats['misses'],
+ strtolower($page),
+ (microtime(true) - $start) * 1000,
+ );
+
+ $response->headers->set(self::HEADER, $line);
+ $content = $response->getContent();
+
+ if (is_string($content) && str_contains((string) $response->headers->get('Content-Type'), 'text/html') && ($at = strripos($content, '