diff --git a/.prettierignore b/.prettierignore index e021d8a8..a5a4b240 100644 --- a/.prettierignore +++ b/.prettierignore @@ -33,3 +33,11 @@ tests/root_admission/fixtures/ # Generated from the persisted types by `cargo test -p vault-core --test persisted_schema`. src-tauri/crates/vault-core/tests/persisted_schema/revision-*.json + +# The landing site's generated types and the painting lab's renders. +site/.astro/ +site/hero-lab/out/ +site/hero-lab/screens-in/ +# The demo's build and its recording (site/demo/record.ts writes it). +site/public/app/ +site/demo/public/ diff --git a/AGENTS.md b/AGENTS.md index 9d6121ad..73c57082 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -33,7 +33,7 @@ Tech: Tauri 2 + Rust + React 19 + TypeScript + Vite + Bun。 **模塊小、職責清**:組件單一職責,大數據必虛擬化,業務邏輯不洩漏進 UI。檔案行數硬門檻與巨型檔案清單見 `repo-baseline.md`;重構 > 1000 行的檔案先做「審查階段」(架構地圖 / 拆分方案 / E2E 覆蓋確認)再動代碼。 -**受保護的入口**:`src/main.tsx` 與 `src/lib/ipc/bridge.ts` 是 desktop contract / IPC 入口,改動需對齊既有 contract。前端只透過 `src/lib/backend-client/` 的 typed client 呼叫後端;沒有 browser-preview 假後端。 +**受保護的入口**:`src/main.tsx` 與 `src/lib/ipc/bridge.ts` 是 desktop contract / IPC 入口,改動需對齊既有 contract。前端只透過 `src/lib/backend-client/` 的 typed client 呼叫後端;測試與開發不用 browser-preview 假後端。官網 demo(`site/demo/`)是例外:獨立建置,重播從真後端錄下的回答,只給訪客試玩,不拿來驗證任何東西。demo 凍結在錄製時的版本,不隨每次發版重錄,只在畫面明顯改變或有值得展示的新功能時重錄(步驟見 `site/README.md`)。 **測試是契約**:權威 gate 是 `bun run check`,具體規則見 `quality-matrix.md`。不跑 mutation test,也不強制 100% 覆蓋率;測試以 E2E 為主: diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 53b317b6..b55565ad 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -47,7 +47,7 @@ bun run build ## Surface Boundaries -There is no browser-preview backend. The frontend reaches Rust either through Tauri or through the dev IPC bridge; with neither, every command fails with "PathKeep cannot reach its backend". `bun run dev` on its own only serves the Vite bundle. +There is no browser-preview backend. The frontend reaches Rust either through Tauri or through the dev IPC bridge; with neither, every command fails with "PathKeep cannot reach its backend". `bun run dev` on its own only serves the Vite bundle. The landing page's demo (`site/demo/`) is a separate build that swaps the transport for answers recorded from the real backend; it is there for visitors to try, never for testing (see `site/README.md`). - `bun run desktop:dev` is the real Tauri desktop surface. Use it for anything native: the overlay title bar, the menu bar / tray icon and its `pathkeep://` events, open at login, keychain prompts, Finder reveal, the updater, window sizing. - `bun run dev:demo` (`scripts/dev-demo.mjs`) writes synthetic Chrome ×2 and Firefox profiles under `var/demo/`, starts the debug backend with the dev bridge, initializes the archive and runs a first backup, then serves the frontend at http://127.0.0.1:1420. It keeps the archive, keychain and scheduler inside `var/demo/` (`CHB_PROJECT_ROOT`, `CHB_TEST_KEYRING_DIR`, `PATHKEEP_PLATFORM_TEST_SANDBOX_DIR`, its own schedule label), so it never touches your real history, keychain or LaunchAgents. `--fresh` wipes `var/demo/`; `--first-run` stops before initialization so the app opens on onboarding. This is the default way to look at UI changes. diff --git a/docs/architecture/module-boundary-map.md b/docs/architecture/module-boundary-map.md index a1ec054b..ce7a295e 100644 --- a/docs/architecture/module-boundary-map.md +++ b/docs/architecture/module-boundary-map.md @@ -16,7 +16,7 @@ ## 前端(2026-10 redesign 之後) -前端只透過 typed client 跟 Rust 說話,沒有 browser-preview 假後端:不在 Tauri 裡、也沒有 dev IPC bridge 時,`src/lib/backend-client/shared.ts` 的 `call()` 直接丟錯。瀏覽器裡要看真資料用 `bun run dev:demo`(真後端 + 合成瀏覽器資料)。 +前端只透過 typed client 跟 Rust 說話,沒有 browser-preview 假後端:不在 Tauri 裡、也沒有 dev IPC bridge 時,`src/lib/backend-client/shared.ts` 的 `call()` 直接丟錯。瀏覽器裡要看真資料用 `bun run dev:demo`(真後端 + 合成瀏覽器資料)。官網的 demo 不改這條:`site/demo/` 在自己的 Vite 建置裡,把 `src/lib/ipc/` 的三個傳輸模組換成重播真後端錄音的版本,`src/` 不知道它存在,也不拿它驗證任何東西(做法見 `site/README.md`)。 | 目錄 / 檔案 | 負責 | 不負責 | | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | diff --git a/docs/architecture/tech-stack.md b/docs/architecture/tech-stack.md index d61870dc..21d7236c 100644 --- a/docs/architecture/tech-stack.md +++ b/docs/architecture/tech-stack.md @@ -101,7 +101,7 @@ rig 啟用 `serde_json/preserve_order`;visit / schema fingerprint 與 native / - `devtools-bridge` 是 **開發期 feature-gated surface**,只在 `bun run desktop:dev:bridge` 或 `tauri dev --features devtools-bridge` 時啟用。 - 這條 bridge 只把 typed desktop command facade 鏡射到 localhost,方便 Chrome / Playwright / CDP 調試;它不是 shipping API,也不應被當成 plugin sandbox 或 remote control surface。 -- 2026-10 起沒有 browser-preview 假後端。瀏覽器裡驗證 UI 用 `bun run dev:demo`(debug 後端 + dev bridge + 合成 Chrome×2 / Firefox 歷史,`--first-run --fresh` 從 onboarding 開始);E2E 用 `bun run test:e2e`,同樣跑在真後端上,產物在 `artifacts/e2e/`。dev bridge 下沒有選單列圖示;`pathkeep://` 桌面事件由 bridge 的 `/events`(server-sent events)送到瀏覽器,前端用 `listenDesktopEvent` 在 Tauri 與 bridge 下聽同一個事件(2026-10-09 起;之前收不到,Ask 在 E2E 裡永遠停在「處理中」)。 +- 2026-10 起沒有 browser-preview 假後端(官網 demo 例外,2026-11:`site/demo/` 的獨立建置重播從真後端錄下的回答,只給訪客試玩,見 `site/README.md`)。瀏覽器裡驗證 UI 用 `bun run dev:demo`(debug 後端 + dev bridge + 合成 Chrome×2 / Firefox 歷史,`--first-run --fresh` 從 onboarding 開始);E2E 用 `bun run test:e2e`,同樣跑在真後端上,產物在 `artifacts/e2e/`。dev bridge 下沒有選單列圖示;`pathkeep://` 桌面事件由 bridge 的 `/events`(server-sent events)送到瀏覽器,前端用 `listenDesktopEvent` 在 Tauri 與 bridge 下聽同一個事件(2026-10-09 起;之前收不到,Ask 在 E2E 裡永遠停在「處理中」)。 2026-10 desktop integration note:開機時啟動、選單列 / 系統匣圖示與 `pathkeep://open-command-palette`、`pathkeep://backup-finished` 兩個事件見 [desktop-command-surface.md](desktop-command-surface.md)「Open at login 與選單列圖示(2026-10)」。 diff --git a/docs/plan/BACKLOG.md b/docs/plan/BACKLOG.md index d654ec25..9fbe0b57 100644 --- a/docs/plan/BACKLOG.md +++ b/docs/plan/BACKLOG.md @@ -362,6 +362,14 @@ - 契約:憑證/私鑰只進加密 secrets,永不入 repo;reproducible build 原則不破;release rehearsal(`bun run verify`)通過。 - 驗收:CI 產出 signed + notarized + stapled 的 `.app`/`.dmg`;裝在乾淨機器上 Gatekeeper 不擋;授一次 FDA 後,安裝下一個版本仍保有 FDA(備份不再靜默失效)。 +- [ ] **WORK-SITE-DEMO-V060** — 官網的 demo 從 v0.6.0 正式版重錄一次,加上 Agent 空間(發布 v0.6.0 時做;接在 `WORK-AH-SCREENS` 之後) + - 讀先:`site/README.md`「The demo」。 + - 用戶 2026-11-15 選了「demo 固定在一個版本」:建好的 app 和錄音一起放在 git 的 `site/public/app/`,平常發版不碰它;只在畫面明顯改了、或有值得展示的新功能時才重錄。現在那份是 `feat/agent-history-product` 的 6a67d6f8 錄的,About 顯示 `0.5.0-dev · 6a67d6f8 (modified)`,只有瀏覽紀錄。 + - 要做:合成的 Agent 對話(Claude Code、Codex、Pi、DeepSeek Harness 各自的原生格式;`WORK-AH-SCREENS` 給 `dev:demo` 和 E2E 做的那一套直接拿來用)在 `demo/record.ts` 裡走真的備份;`demo/walk.ts` 和 `demo/check.ts` 的導覽加上 Agent 空間每個畫面;從 v0.6.0 tag 的乾淨 checkout 編帶 dev bridge 的 debug 後端,重錄,`check:demo` 三語都過,再 commit `site/public/app/`。 + - 官網上設計原型拍的截圖:hero 的兩張「紀錄」頁、demo 窗載入前的首頁、功能牆的「Agent 洞察」。Agent 畫面進了 `src/` 之後全部改從 demo 拍(`hero-lab/capture-screens.ts`、`hero-lab/capture-features.ts`;功能牆瀏覽紀錄那三張已經是從 demo 拍的),`hero-lab/screens-text.ts` 那張翻譯表大半可以拿掉。 + - 一起處理:設定 › AI 打開「語意搜尋」後,demo 一直停在「正在下載語言模型…」,沒有錯誤。demo 對 `download_static_embedding_model` 回的是「demo 做不到」,畫面沒顯示出來;先查真的 app 下載失敗時是不是也這樣停住,再決定改 demo 的回答還是修 app。 + - 驗收:demo 的 About 顯示 v0.6.0 與它的 commit;兩個空間都能逛;`check:demo` 三語、`page-check.ts`(Chrome 與 `--webkit`)全過。 + --- ## 維護規則 @@ -378,6 +386,7 @@ - 毛玻璃視窗下,視窗那一層沒有變淡:`src/index.css` 裡毛玻璃的 `--window`/`--panel` 寫在 `@layer base` 裡,而 `:root` 的值不在任何 layer,沒有 layer 的規則贏過有 layer 的。做外框時在瀏覽器裡量到毛玻璃下 `--window` 仍是不透明時的值(`rgb(250 250 252 / 0.62)`);用戶 2026-11-14 說 macOS 上選了毛玻璃確實有變透明,但「非常,非常不明顯」,跟量到的一致:桌布那一層有拿掉,視窗那一層沒有照設計降到 14%。修的時候把那兩條規則移出 layer,並在桌面視窗上看過深淺兩種主題。 - 新手引導的排程預覽只在每個間隔第一次被選時寫入設定;選過別的再選回來、然後關掉,下次可能從錯的間隔開始。 - `vault-crypto/tests/search_index.rs` 的 `the_block_cache_bounds_memory` 在機器記憶體吃緊時會假失敗:它比較兩個子行程的常駐記憶體成長量,而系統在壓力下會把記憶體壓縮或換出,量到的成長變成負數(2026-11-14 同時有別的編譯在跑時看到「2 MiB 的快取 -0.5 MiB、不設上限的 -3.9 MiB」,單獨重跑通過)。快取大小本身的斷言(`max_cache_mib`)是可靠的;常駐記憶體那一條要換成不受系統壓力影響的量法。 + - 首頁「近 30 天瀏覽」在繁中、簡中時,第一個 x 軸標籤的頭被圖表左緣切掉:「10月17日」只剩「0月17日」(2026-11-15 做官網 demo 時看到,量過:中文標籤超出圖表左緣 5 px,英文的「Oct 17」放得下)。`features/home/home-cards.tsx` 的 `XAxis` 左右各只留 14 px,標籤以第一個點為中心,標籤寬度的一半超過 14 px 就出界。月份是兩位數時才會發生。 - [ ] **WORK-VAULT-FOLLOWUPS-2026-11** — 規劃 `WORK-VAULT-STORE-ROLES` 時讀程式找到、跟 Agent 對話無關的現有行為(2026-11-14;兩份獨立的盤點都指出,但都只讀了程式,動手前先重現) - 搬到另一台電腦會丟掉使用者改過的網站分類與搜尋引擎規則:它們存在 `derived/intelligence.db`(`site_dictionary_overrides`、`search_engine_rules`),而搬移檔把這個資料庫當成可以重算、不帶走,匯入預覽還寫「洞察會重建」。同一個原因,已存的網頁文字檔會被帶過去,但記錄「哪個網址對應哪個檔」的那幾列(`page_content_enrichments`)不會,所以在新電腦上這些文字找不到(`vault_lifecycle` 的搬家測試重現了這兩件事)。修法要改 `data-model.md` 已接受的那一句,需要用戶同意。 diff --git a/eslint.config.js b/eslint.config.js index 8b2c8c07..3bec5679 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -27,6 +27,9 @@ export default defineConfig([ 'tests/fixtures', // Design prototype on invented data; type-checked by its own tsconfig. 'docs/design/prototype-2026-11-agent-history', + // The landing site is its own package: `astro check` types its pages, and + // the painting lab's Bun scripts are checked by running them (site/README.md). + 'site', ]), { files: ['**/*.{ts,tsx}'], diff --git a/site/.gitignore b/site/.gitignore new file mode 100644 index 00000000..de384ad7 --- /dev/null +++ b/site/.gitignore @@ -0,0 +1,5 @@ +node_modules/ +dist/ +# A recording before it is built into public/app/ (see README, The demo). +demo/public/ +.astro/ diff --git a/site/README.md b/site/README.md new file mode 100644 index 00000000..a400ee02 --- /dev/null +++ b/site/README.md @@ -0,0 +1,222 @@ +# PathKeep's landing page + +A static site built with Astro: one page in English (`/`), Traditional +Chinese (`/zh-tw/`) and Simplified Chinese (`/zh-cn/`). It has its own +`package.json` and lockfile; nothing here is part of the app. + +```sh +bun install +bun run dev # http://127.0.0.1:4391 +bun run check # astro check: types in .astro and .ts files +bun run build # writes dist/, with the demo already built in public/app/ +bun run preview # serves dist/ on 4391 +``` + +The demo in `public/app/` is built and committed (see The demo), so +building the site needs nothing outside this folder. + +## Where things are + +- `src/content/copy.ts` is the shape of every word on the page; the words + are in `copy-en.ts`, `copy-zh-tw.ts` and `copy-zh-cn.ts`. A `|` marks + where a line may break (see `src/components/Phrases.astro`), so Chinese + headings never end on a single character. +- `src/components/` holds one component per section, plus `Painting.astro` + (a painting behind a panel's content) and `Shot.astro` (the app's window + over a painting). +- `src/styles/site.css` is the whole look. `fonts.css` loads the faces + from Fontsource; body Chinese uses the system sans. +- The motion runs on [Motion](https://motion.dev) from the script in + `src/layouts/Page.astro`: `scroll()` scrubs the opening card (the frame + closing in, the window growing, the painting drifting) and `inView()` + lets section heads and panels rise into place once. `site.css` holds + every resting state, so with reduced motion or without script the page + is simply still and fully visible. +- `public/paintings/` holds the paintings, `public/screens/` the app + screenshots in the windows and on the feature wall, `public/brand/` the + mark. +- `demo/` builds the demo that runs in the last window (see below). + +## The paintings + +Every painting is drawn in code by the lab in `hero-lab/`: a WebGL2 +painter that mixes pigments with Kubelka–Munk on a simulated ribbed linen +(`hero-lab/src/presets.ts` has the recipes). It needs a Chrome install, +which renders on the GPU. + +```sh +bun hero-lab/export-panels.ts # paintings → public/paintings/-.webp +bun hero-lab/export-screens.ts # hero-lab/screens-in//*.png → public/screens//*.webp +bun hero-lab/export-social.ts # share pictures → public/social/.jpg (needs the preview server) +bun hero-lab/gallery.ts --set pk # every preset on one page, in hero-lab/out/ +``` + +`export-panels.ts` cuts each panel's picture out of a larger render, so +the calm band of each painting sits under the words set on it: ink on the +light bands, paper on the dark ones. If a panel's shape or its text +changes, check the text still lands on its band before changing the cut. + +To paint a new one, add a recipe to `hero-lab/src/presets.ts` (a support, +the layers in the order a painter would lay them, then the light and the +grade), look at it with `bun hero-lab/render.ts --size 3840x2160` +or beside the others with `gallery.ts`, then give it a source and its cuts +in `export-panels.ts`. Every render uses a fixed seed, so a recipe always +paints the same picture. The recipes that did not make it onto the page +(the `cf-`, `wc-` and `pk-dawn` rounds) stay as starting points. Renders +land in `hero-lab/out/`, which git ignores. + +## The demo + +The window in the demo section runs the real app: `demo/vite.config.ts` +builds `src/` as it is, and swaps the three modules that reach the desktop +backend (`src/lib/ipc/bridge.ts`, `events.ts`, `search-stream.ts`) for +`demo/transport/`, matched by the file they resolve to. Nothing in `src/` +changes, and the desktop build never contains the swap. The page loads the +app (`/app/?lang=…`) into its window as the section comes near, on screens +at least 760 px wide; phones keep the picture and say the demo needs a +computer's screen. The loaded app stays inert, so the wheel scrolls the +page past it, until the visitor clicks the window; once the section has +scrolled away it is inert again. + +The answers come from the recording in `public/app/recording/`: what the real backend +said while `demo/walk.ts` clicked through every screen, over synthetic +browsers set up the way onboarding's defaults leave them. `demo/backend.ts` +answers, in this order: a batch lookup (icons, preview images, stars) item +by item; the exact call; a History list or ⌘K word search worked out from +the recorded visits and pages; a page opened in a new tab; a change; an +Insights card's section from the batch it came in (a card reads its own +once its copy goes stale, after a backup, say); the same command with the +closest arguments. A search the walk never typed is +answered over every page the archive holds (the recording keeps the list). + +Nothing a visitor does is saved, and nothing says so either: a change (a +setting, a star, a note, the backup schedule, Back up now) is answered the +way the backend answers one that went through, built from the request over +what the recording says now (`demo/writes.ts`). The app shows it taken; +the next time it reads the same thing it gets the recording again, and a +reload starts over. Each answer is typed with the reply the app's client +declares, so a version that changes one fails `tsc -p demo`. A command the +demo cannot answer that way, such as importing, restoring or deleting the +archive, says in the visitor's language that the demo can't do it. + +The demo's clock starts where the recording was made, because the app +asks for "today" and "the last 7 days" by its own clock. Insights use the +archive's time zone and match anywhere; the demo's settings say its owner +kept them there on the visitor's computer, so the app never offers to move +them. History's date presets follow the visitor's own zone, so elsewhere +they are worked out in the page. + +The demo is frozen at the version it was recorded from: the built app and +its recording sit in git under `public/app/`, and a release does not touch +them. Record and build again only when the app's screens have changed +enough that the demo no longer looks like the app, or when a new feature +is worth showing (the Agent screens, for one). The About screen in the +demo shows which version and commit it is. + +Record from a clean checkout of a released version: `record.ts` refuses a +backend built from another commit or from uncommitted changes in `src/` or +`src-tauri/`, and `build:demo` refuses to build when `src/` is not as it +was at the recording's commit (the app would ask for answers the +recording does not have), before it clears `public/app/`. It needs a debug +build of the app with the dev bridge, its worker beside it: + +```sh +# From the repository root: the worker, staged where the app's build looks +# for it, then the app with the dev bridge. +cargo build --manifest-path src-tauri/Cargo.toml -p vault-worker --bin pathkeep-worker +cp src-tauri/target/debug/pathkeep-worker "src-tauri/binaries/pathkeep-worker-$(rustc --print host-tuple)" +cargo build --manifest-path src-tauri/Cargo.toml --features devtools-bridge + +# Then here: about a minute. The recording lands in demo/public/ (ignored +# by git) and build:demo copies it into public/app/ with the app. +bun run record:demo -- --backend ../src-tauri/target/debug/pathkeep-desktop +bun run build:demo && bun run check:demo +``` + +Commit `public/app/` afterwards: the old build's hashed files go, the new +ones come. Building the demo needs the repository's own dependencies +(`bun install` at the root). + +`record.ts` runs everything in a fresh folder under the system's temp +folder (a debug PathKeep window may open meanwhile), rewrites where things +were to a Mac user's own folders, and refuses to write the recording if +anything about the machine is left in it: home folder, user name, host +name, Git e-mail, this checkout. `check.ts` walks the built demo again and +fails on any answer the recording does not have, then makes a visitor's +changes and fails on any error the app shows; `--zone ` runs it +as a visitor elsewhere, where Insights must not offer to move. The walk goes by the English labels; the other +languages open every screen by its address. + +## Checks + +With `bun run preview` running: + +```sh +bun hero-lab/page-check.ts # every language at desktop, wide desktop and phone, as a visitor loads it +bun hero-lab/page-check.ts --webkit # the same in WebKit, Safari's engine +bun hero-lab/pageshot.ts /zh-tw/ # full-page and phone screenshots into hero-lab/out/pages/ +bun run check:demo # the built demo against its recording +../node_modules/.bin/tsc -p demo # the demo's types, with the app's settings +``` + +The repository's root Prettier formats the `.ts`, `.css` and Markdown files +here. Root ESLint skips this folder: `astro check` types the site itself +(`src/`), and the lab's Bun scripts in `hero-lab/` are checked by running +them. + +## Publishing + +On Cloudflare Pages, with the Git repository connected: + +- Root directory: `site` +- Build command: + `bun install --frozen-lockfile && bun run build` +- Build output directory: `dist` +- Environment variable `BUN_VERSION`: the root `package.json`'s + `packageManager` version. + +`public/_headers` sets the response headers: a year's cache for built +files whose names carry their content's hash, and two basic safety +headers everywhere. + +## Notes + +- `typescript` is held at 6.x: `astro check` needs TypeScript's JavaScript + API, which the native TypeScript 7 compiler does not ship yet + ([withastro/roadmap#1321](https://github.com/withastro/roadmap/discussions/1321)). + Move to 7 once `@astrojs/check` supports it. +- Set `site` in `astro.config.mjs` once the domain is known: the page then + emits its canonical URL and the `hreflang` alternates between languages. +- The opening card's window shows each space's records page (what people + keep PathKeep for); the demo's window, until the app loads, the browsing + home page the demo opens on. The feature wall's browsing pictures are cut + from the demo itself by `hero-lab/capture-features.ts` (with the preview + server running), so their words are the app's own in each language; its + Agent picture is cut from the prototype's Agent insights. +- The windows show screenshots of the v0.6 design prototype, one set per + language: `hero-lab/capture-screens.ts --hide ` swaps + their Traditional Chinese for the entries in `hero-lab/screens-text.ts` + (marked where they carry the app's own wording) and stops on anything + without one; `export-screens.ts` then writes the WebP files. Capture them + from the real app once its Agent screens exist; the prototype is + temporary. For the prototype, this leaves out its notes and its options + button: + + ```sh + --hide 'div.shrink-0:has(> .border-dashed:only-child), .rounded-xl.border-dashed.text-muted-foreground, button.fixed.border-dashed' + ``` + +- The opening card's frame variable `--p` is written to the element's + style on every scroll frame, not animated natively. In WebKit (seen in + Playwright's WebKit 2248), when Motion's native animation drove the + registered `--p`, the frame did not reliably redraw: + `getComputedStyle(card).getPropertyValue('--p')` read `1` while the + computed `clip-path` still held `calc(0 * …)`, so at 1920 px and on + phones the card stayed full-screen past its foot. +- `hero-lab/page-check.ts --webkit` needs Playwright's own WebKit build + (`bunx playwright install webkit` at the repository root). Firefox is not + covered. Two things only WebKit did, both checked there: a message the + app posts from an animation frame names the landing page itself as its + `event.source` (so the page knows the demo by origin), and an inert frame + still scrolls under the wheel (so `.shot__app[inert]` takes no pointer + events). diff --git a/site/astro.config.mjs b/site/astro.config.mjs new file mode 100644 index 00000000..4b13027d --- /dev/null +++ b/site/astro.config.mjs @@ -0,0 +1,13 @@ +// @ts-check +/** + * PathKeep's public site: static pages only, built by Astro. + * Port 4391 because 4321 is often taken by other local servers. + */ +import { defineConfig } from 'astro/config' + +export default defineConfig({ + trailingSlash: 'always', + build: { format: 'directory' }, + server: { host: '127.0.0.1', port: 4391 }, + devToolbar: { enabled: false }, +}) diff --git a/site/bun.lock b/site/bun.lock new file mode 100644 index 00000000..7ed9ed96 --- /dev/null +++ b/site/bun.lock @@ -0,0 +1,732 @@ +{ + "lockfileVersion": 1, + "configVersion": 1, + "workspaces": { + "": { + "name": "pathkeep-site", + "dependencies": { + "@fontsource-variable/geist": "^5.3.0", + "@fontsource-variable/geist-mono": "^5.3.0", + "@fontsource-variable/noto-serif-sc": "^5.3.1", + "@fontsource-variable/noto-serif-tc": "^5.3.1", + "@fontsource/instrument-serif": "^5.3.0", + "astro": "^7.4.12", + "motion": "^14.14.0", + "simple-icons": "^16.37.0", + }, + "devDependencies": { + "@astrojs/check": "^0.9.12", + "typescript": "^6.0.3", + }, + }, + }, + "packages": { + "@astrojs/astro2tsx": ["@astrojs/astro2tsx@0.1.4", "", { "dependencies": { "@emnapi/core": "1.11.3", "@emnapi/runtime": "1.11.3", "@napi-rs/wasm-runtime": "1.2.4" } }, "sha512-5dJqY4i1AlXxcsSFHkaegnrgdVs9J4U93y/YF0xmvmSOcNYVQnf4db3IhvqHZ5v8biLPlPlFmlYsqHj0c4/ZSA=="], + + "@astrojs/check": ["@astrojs/check@0.9.12", "", { "dependencies": { "@astrojs/language-server": "^2.17.3", "chokidar": "^5.0.0", "kleur": "^4.1.5", "yargs": "^18.2.0" }, "peerDependencies": { "typescript": "^5.0.0 || ^6.0.0" }, "bin": { "astro-check": "./bin/astro-check.js" } }, "sha512-hazpqxIfZWj2VhyPyR0pOEQ/IhFDM/2nIApL96zMXABdD8NrUKYDmhxTy7h+drTDl9MQG/Sd1ET/4amadVJUUA=="], + + "@astrojs/compiler-binding": ["@astrojs/compiler-binding@0.5.3", "", { "optionalDependencies": { "@astrojs/compiler-binding-android-arm64": "0.5.3", "@astrojs/compiler-binding-darwin-arm64": "0.5.3", "@astrojs/compiler-binding-darwin-x64": "0.5.3", "@astrojs/compiler-binding-linux-arm64-gnu": "0.5.3", "@astrojs/compiler-binding-linux-arm64-musl": "0.5.3", "@astrojs/compiler-binding-linux-x64-gnu": "0.5.3", "@astrojs/compiler-binding-linux-x64-musl": "0.5.3", "@astrojs/compiler-binding-wasm32-wasi": "0.5.3", "@astrojs/compiler-binding-win32-arm64-msvc": "0.5.3", "@astrojs/compiler-binding-win32-x64-msvc": "0.5.3" } }, "sha512-fHG6eWKvnSlV11dUMZSi4AynOGjVbNBgZZc704Hi9DW8WeKtbsS7fJQT3omz1Nba+5mccLQQGAWOQ65cnuNLtg=="], + + "@astrojs/compiler-binding-android-arm64": ["@astrojs/compiler-binding-android-arm64@0.5.3", "", { "os": "android", "cpu": "arm64" }, "sha512-ThyoCqtrdp6UwmMvScluDll4vvj4kXwUPKHYozLbXJKPH5zrJ8sr5xQJVOk0YvgBrCvGBA/lPVVLyEp1aLuBYg=="], + + "@astrojs/compiler-binding-darwin-arm64": ["@astrojs/compiler-binding-darwin-arm64@0.5.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-zMI4ndCVCd0Wsrm8sXVcIk6uviKsgndFLnxqNd6Qx26LINSkb0lQ7SL8gKyGcTu0hJRTBwl7Y1WcpMk37aeaKQ=="], + + "@astrojs/compiler-binding-darwin-x64": ["@astrojs/compiler-binding-darwin-x64@0.5.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-Ce51oGlDgBAwoVOy5Y4FeIqFkXbS/vJkIAPN5pXIYchn/3izF4c2t//KuUZJopwzD6Kblj46kKiqmxRUt/mAJg=="], + + "@astrojs/compiler-binding-linux-arm64-gnu": ["@astrojs/compiler-binding-linux-arm64-gnu@0.5.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-WCBGgpmUqbuWW3KAsNOKRXDeQIAeQLftZhZ+CNyl3eg4JtkfZRXHav2qItzVg6ODyzmS2e+QkpgsQuwMSInGgA=="], + + "@astrojs/compiler-binding-linux-arm64-musl": ["@astrojs/compiler-binding-linux-arm64-musl@0.5.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-DRcjEOFWcMbaaTsbOEferYozr2zDUf/roDzcF6WxHSSto+rqZ1N87xxj/pjOpz0JtTBlZ3V59nZGONcNiQUSWw=="], + + "@astrojs/compiler-binding-linux-x64-gnu": ["@astrojs/compiler-binding-linux-x64-gnu@0.5.3", "", { "os": "linux", "cpu": "x64" }, "sha512-8rIMmEFtuVe5mMvwBR59uSHZL7CaJ/CPm5Hh3r3Bd5JLoSPkBbl1xk8kwUkNKJ0QSbGEFdWkUnx73JRZq46i2A=="], + + "@astrojs/compiler-binding-linux-x64-musl": ["@astrojs/compiler-binding-linux-x64-musl@0.5.3", "", { "os": "linux", "cpu": "x64" }, "sha512-+sZCsIXq/PQBiemALIr+GbERKQbQ82mHW2ibJUlCDtsjyFA/8Udm8WGZhS7AGjb2P9ekQ4j7Z8dbxb0f3E0oZw=="], + + "@astrojs/compiler-binding-wasm32-wasi": ["@astrojs/compiler-binding-wasm32-wasi@0.5.3", "", { "dependencies": { "@emnapi/core": "1.11.3", "@emnapi/runtime": "1.11.3", "@napi-rs/wasm-runtime": "^1.2.7" }, "cpu": "none" }, "sha512-cEhZ7XAoZYffJdNYb3MDWci1UKhSEjPN+DMaLEB8X1tKlhlYNw9eVWUyNZTe1gb3nr7JJBVXdXDioqE00dyVLQ=="], + + "@astrojs/compiler-binding-win32-arm64-msvc": ["@astrojs/compiler-binding-win32-arm64-msvc@0.5.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-Vcg6+NlU2SOmVGweQEmufu40MHuDuRR80dp9xNLutBWGdJG1HP0XivjGWKGkx/2EK3HN5rwB2NwPgBNDkhKsnQ=="], + + "@astrojs/compiler-binding-win32-x64-msvc": ["@astrojs/compiler-binding-win32-x64-msvc@0.5.3", "", { "os": "win32", "cpu": "x64" }, "sha512-Mt5bK4l5ZcUdNcVxJ7VVt2x5Ck46cXgxCmIhT8sVyUST04FBRYqcYTXQLvy1Py4ejglcWRxAS6z+jBVHs3LPfg=="], + + "@astrojs/compiler-rs": ["@astrojs/compiler-rs@0.5.3", "", { "dependencies": { "@astrojs/compiler-binding": "0.5.3" } }, "sha512-rNSAYm5IcRJMpNm+cSMaaPNCmzCXIdiz67kcBwC1qN8eTmO48wEJ6hZdlGq60+0HIHwUlncfaMxti1Fk2uJu7w=="], + + "@astrojs/internal-helpers": ["@astrojs/internal-helpers@0.13.2", "", { "dependencies": { "@types/hast": "^3.0.5", "@types/mdast": "^4.0.4", "picomatch": "^4.0.7", "retext-smartypants": "^6.2.0", "shiki": "^4.6.0", "smol-toml": "^1.9.1", "unified": "^11.0.5", "yaml": "^2.9.1" } }, "sha512-SWiNS+OMrhwWYzJENTekHUyUCMKB+tdU6D4v1ZNIU1ZHh2mScQ8WIs0J6AJ8KPXkIrs9+EZU7Rm2CstfThyVnw=="], + + "@astrojs/language-server": ["@astrojs/language-server@2.17.3", "", { "dependencies": { "@astrojs/astro2tsx": "^0.1.2", "@astrojs/yaml2ts": "^0.2.4", "@volar/kit": "~2.4.28", "@volar/language-core": "~2.4.28", "@volar/language-server": "~2.4.28", "@volar/language-service": "~2.4.28", "muggle-string": "^0.4.1", "tinyglobby": "^0.2.17", "volar-service-css": "0.0.71", "volar-service-emmet": "0.0.71", "volar-service-html": "0.0.71", "volar-service-prettier": "0.0.71", "volar-service-typescript": "0.0.71", "volar-service-typescript-twoslash-queries": "0.0.71", "volar-service-yaml": "0.0.71", "vscode-html-languageservice": "^5.6.2", "vscode-uri": "^3.2.0" }, "peerDependencies": { "prettier": "^3.0.0", "prettier-plugin-astro": ">=0.11.0" }, "optionalPeers": ["prettier", "prettier-plugin-astro"], "bin": { "astro-ls": "./bin/nodeServer.js" } }, "sha512-QIAFu1e/4quJMTPdmBOm+ZPXc5NDGZE4/YQjgR3EgjhGLl/tdidaWJDr5WmO2lesVc+BW1qN/xNBURmuePDG2A=="], + + "@astrojs/markdown-satteri": ["@astrojs/markdown-satteri@0.4.10", "", { "dependencies": { "@astrojs/internal-helpers": "^0.13.2", "@astrojs/prism": "^4.1.2", "github-slugger": "^2.0.0", "satteri": "^0.11.6" } }, "sha512-3h/wheVjZIcP/m295nkiUjOvCsCs6QpvZ3l4BfDU4ghNQcrcFrNVu1+K+I+YT61hH9tuCDQiGdF8QDzfDoG42w=="], + + "@astrojs/prism": ["@astrojs/prism@4.1.2", "", { "dependencies": { "prismjs": "^1.30.0" } }, "sha512-jMrUEpFDarDO1KWPvVc9eSa8DSfwBlwEOHwX+8zvZQpiqXRGDxFnOXHsYqV6DP7w+0qIgTr98gS1GdQlm8ypWg=="], + + "@astrojs/runtime": ["@astrojs/runtime@0.1.1", "", { "dependencies": { "@oslojs/encoding": "^1.1.0", "clsx": "^2.1.1" } }, "sha512-2Tr9IJ4aQBPDFzlSLq139eWS9OZnuhL0yU2al8cCpnTE/RszygSyGIP8piBmEio1zDUaItb/+YxxsrmldUCBmg=="], + + "@astrojs/telemetry": ["@astrojs/telemetry@3.4.2", "", { "dependencies": { "ci-info": "^4.4.0", "dset": "^3.1.4", "is-docker": "^4.0.0", "package-manager-detector": "^1.9.0" } }, "sha512-2JOMRUxJrBSfiVDfeKLv1wBmvSIx1Y6u2YEO8awZ9qSq3u/rNAiUyFdOYi8dHv91kHrmYEQX7pRDw0J4xyj3UA=="], + + "@astrojs/vite-plugin-astro": ["@astrojs/vite-plugin-astro@0.1.3", "", { "dependencies": { "@astrojs/compiler-rs": "^0.5.1", "@astrojs/internal-helpers": "^0.13.2", "@astrojs/runtime": "^0.1.1", "common-ancestor-path": "^2.0.0", "devalue": "^6.0.2", "magic-string": "^1.4.2", "rolldown": "~1.2.16", "smol-toml": "^1.9.0", "zod": "^4.6.5" }, "peerDependencies": { "vite": "^8.3.3" } }, "sha512-yj+xGnr3HeHUtIdra/tWizJuisBoxAuWlBTElMlf22FpSxinrTwTl/dqftG0D2BsQTcn4/shgCCUwcnkcZ8buA=="], + + "@astrojs/yaml2ts": ["@astrojs/yaml2ts@0.2.4", "", { "dependencies": { "yaml": "^2.8.3" } }, "sha512-8oddpOae35pJsXPQXhTkM0ypfKPskVsh2bCxRtbf7e+/Epw2nReakFYpLKjZMEr75CsoF203PMnCocpfz0s69A=="], + + "@babel/helper-string-parser": ["@babel/helper-string-parser@7.29.14", "", {}, "sha512-CXvKMFvM80ihI7Vox9jb+kQjnyjESQNPM+vB7U0Zz6TWuZA+Z/FL0QPMH300h33qJtIx+REeBhXqWOPW48TcAQ=="], + + "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.29.7", "", {}, "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg=="], + + "@babel/parser": ["@babel/parser@7.29.14", "", { "dependencies": { "@babel/types": "^7.29.14" }, "bin": "./bin/babel-parser.js" }, "sha512-VL220vXuyO2z3rNIQwY7ftj9UwpqOt+33sH+sBWkOekbsSR2g7EEMnOx24ZlCH0xOA3DM/33SifVFGbnJD8r/w=="], + + "@babel/types": ["@babel/types@7.29.14", "", { "dependencies": { "@babel/helper-string-parser": "^7.29.14", "@babel/helper-validator-identifier": "^7.29.7" } }, "sha512-UjI/dKmwJwT9pOszJitq2G6EObZPnsZUfdCr92z2TlF3EZK9J3EdfOKUrCzHl6wFthbzwhzl1Soc/UIwxRiq6w=="], + + "@bruits/satteri-android-arm64": ["@bruits/satteri-android-arm64@0.11.7", "", { "os": "android", "cpu": "arm64" }, "sha512-ej+1rIKs+yb6/OtcIe1SO22OXjJV0qqUopl5VNZF8Sqc/Pj4m1DXoqBQsPxW5OUYYiDUymIy6hnnn8M78VYk2w=="], + + "@bruits/satteri-darwin-arm64": ["@bruits/satteri-darwin-arm64@0.11.7", "", { "os": "darwin", "cpu": "arm64" }, "sha512-yllQOX1kVWrwqL7tamQlp4NP0loIb4KuadjuNrAe4JEOerHpgYISPRDb8DqLipgvP7Ks4e87LydZpdakMR1rhQ=="], + + "@bruits/satteri-darwin-x64": ["@bruits/satteri-darwin-x64@0.11.7", "", { "os": "darwin", "cpu": "x64" }, "sha512-RMQrKzEZRZSiYyLFifiSuk0nBH6uAY1TVMNR/h/aE4rr2OS6l82e4MJTpC6H/tqSMoE+3CwbkUKBQGLHIweYlg=="], + + "@bruits/satteri-freebsd-x64": ["@bruits/satteri-freebsd-x64@0.11.7", "", { "os": "freebsd", "cpu": "x64" }, "sha512-EFlqw+RDRo3wYdy1ZSR/dNYhfWjuZL86PYwRcpLWWEZskjfpNnhIdxS13Xw2QJE1hSjTGVq4aZaVvlUjoj8p5A=="], + + "@bruits/satteri-linux-arm64-gnu": ["@bruits/satteri-linux-arm64-gnu@0.11.7", "", { "os": "linux", "cpu": "arm64" }, "sha512-aeH365GHaqv01wRSiHaGUlpL28U8e9UnV9LxjIF6BOyTj71/M5bop4HKomcis4VxFZjd68fDqNyU22yFkF/h7A=="], + + "@bruits/satteri-linux-arm64-musl": ["@bruits/satteri-linux-arm64-musl@0.11.7", "", { "os": "linux", "cpu": "arm64" }, "sha512-72WlBhuwOHm+2Nv4Qf1WzfS75PHOLz81sYkDJnmj0Rm2C4Xax5faSiTDt7vWo1IcK6rDlkuRDNnWIw8uIKWuVQ=="], + + "@bruits/satteri-linux-x64-gnu": ["@bruits/satteri-linux-x64-gnu@0.11.7", "", { "os": "linux", "cpu": "x64" }, "sha512-gDp4v1jjckeNCetLtrMUfDV4CKGYL6fayDPdoaQq09nkDCSrclxEFK7kAmRuHhoalgsao4bZMFqQr3HQtN2NEQ=="], + + "@bruits/satteri-linux-x64-musl": ["@bruits/satteri-linux-x64-musl@0.11.7", "", { "os": "linux", "cpu": "x64" }, "sha512-zqzSpQLA6V3J/TO2Vjuc1VRQPIQQdoSYmzKKFL+3GwGlbXiFQP2ZUDSLw9xlm0tTKXkCM9ANr4jMiDASZ+JGUw=="], + + "@bruits/satteri-wasm32-wasi": ["@bruits/satteri-wasm32-wasi@0.11.7", "", { "dependencies": { "@emnapi/core": "1.11.1", "@emnapi/runtime": "1.11.1", "@napi-rs/wasm-runtime": "^1.2.7" }, "cpu": "none" }, "sha512-L46f6rtlaBR4fsTWGCTFcXtbtka2GyM3l9TsmE0FgTxjXGq+sndYg5X3hzlhWDkNvJpRtCHCmgTRJ5+cIi4o3A=="], + + "@bruits/satteri-win32-arm64-msvc": ["@bruits/satteri-win32-arm64-msvc@0.11.7", "", { "os": "win32", "cpu": "arm64" }, "sha512-R2+o6EbJK4pqbd086H9BGUVYAyZ5F6FnShfoyRIu0Zu9DTE3H6EU/Z+ua7p9dmYf6JQQbE9DCwwavi4xiaGAhQ=="], + + "@bruits/satteri-win32-x64-msvc": ["@bruits/satteri-win32-x64-msvc@0.11.7", "", { "os": "win32", "cpu": "x64" }, "sha512-OIyBFJ35uMu5CH5RWnIR3bKsZwScKZ7vXmhCohZ+qonT1SkxmHCEf4H8YRWThRL2EXdVDjkjhfOsaiA4O24Vvw=="], + + "@capsizecss/unpack": ["@capsizecss/unpack@4.0.1", "", { "dependencies": { "fontkitten": "^1.0.3" } }, "sha512-CuNiSqg7+e1cO/GjffyMOm5Tt2jUF9CWHHnvQ/UkqvtkGfHdgwEC0wpmq7fkN3gxwpRnrAN0WzO3vREKmNolMQ=="], + + "@clack/core": ["@clack/core@1.6.0", "", { "dependencies": { "fast-string-width": "^3.0.2", "fast-wrap-ansi": "^0.2.0", "sisteransi": "^2.0.0" } }, "sha512-4GZynIB2IIe431odxesswvWTCP6orvqd6e2b07b3VFWBQRqUqIHc/EPIZwFoKS692QBp+ooPuXKaJV8g4kXuYA=="], + + "@clack/prompts": ["@clack/prompts@1.9.0", "", { "dependencies": { "@clack/core": "1.6.0", "fast-string-width": "^3.0.2", "fast-wrap-ansi": "^0.2.0", "sisteransi": "^2.0.0" } }, "sha512-tEj8X2No2A1c9NDnZECxiiJ8TP3vmFlN9tLlLeSaMqVW4tUmVG2R4qpv/eP4zymWxnymYLkLcIYVV0VcWj3RCQ=="], + + "@emmetio/abbreviation": ["@emmetio/abbreviation@2.3.3", "", { "dependencies": { "@emmetio/scanner": "^1.0.4" } }, "sha512-mgv58UrU3rh4YgbE/TzgLQwJ3pFsHHhCLqY20aJq+9comytTXUDNGG/SMtSeMJdkpxgXSXunBGLD8Boka3JyVA=="], + + "@emmetio/css-abbreviation": ["@emmetio/css-abbreviation@2.1.8", "", { "dependencies": { "@emmetio/scanner": "^1.0.4" } }, "sha512-s9yjhJ6saOO/uk1V74eifykk2CBYi01STTK3WlXWGOepyKa23ymJ053+DNQjpFcy1ingpaO7AxCcwLvHFY9tuw=="], + + "@emmetio/css-parser": ["@emmetio/css-parser@0.4.1", "", { "dependencies": { "@emmetio/stream-reader": "^2.2.0", "@emmetio/stream-reader-utils": "^0.1.0" } }, "sha512-2bC6m0MV/voF4CTZiAbG5MWKbq5EBmDPKu9Sb7s7nVcEzNQlrZP6mFFFlIaISM8X6514H9shWMme1fCm8cWAfQ=="], + + "@emmetio/html-matcher": ["@emmetio/html-matcher@1.3.0", "", { "dependencies": { "@emmetio/scanner": "^1.0.0" } }, "sha512-NTbsvppE5eVyBMuyGfVu2CRrLvo7J4YHb6t9sBFLyY03WYhXET37qA4zOYUjBWFCRHO7pS1B9khERtY0f5JXPQ=="], + + "@emmetio/scanner": ["@emmetio/scanner@1.0.4", "", {}, "sha512-IqRuJtQff7YHHBk4G8YZ45uB9BaAGcwQeVzgj/zj8/UdOhtQpEIupUhSk8dys6spFIWVZVeK20CzGEnqR5SbqA=="], + + "@emmetio/stream-reader": ["@emmetio/stream-reader@2.2.0", "", {}, "sha512-fXVXEyFA5Yv3M3n8sUGT7+fvecGrZP4k6FnWWMSZVQf69kAq0LLpaBQLGcPR30m3zMmKYhECP4k/ZkzvhEW5kw=="], + + "@emmetio/stream-reader-utils": ["@emmetio/stream-reader-utils@0.1.0", "", {}, "sha512-ZsZ2I9Vzso3Ho/pjZFsmmZ++FWeEd/txqybHTm4OgaZzdS8V9V/YYWQwg5TC38Z7uLWUV1vavpLLbjJtKubR1A=="], + + "@emnapi/core": ["@emnapi/core@1.11.3", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.3", "tslib": "^2.4.0" } }, "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg=="], + + "@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="], + + "@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g=="], + + "@fontsource-variable/geist": ["@fontsource-variable/geist@5.3.0", "", {}, "sha512-j0m+vLQuG5XAYoHtGCVu0spvlGreR3EzpECUVzkFmI1mTVnAO38l/NEPDCFgZ177JxzYJCLSmTQibIiYPilGrA=="], + + "@fontsource-variable/geist-mono": ["@fontsource-variable/geist-mono@5.3.0", "", {}, "sha512-vBbuwDEo9AkrqADMXOrlAR3DFcJi4/JxeuU43FoiQERnNwsfXNnvxvReZG02cQKmyk4DZkZdBZX3oTDvy2zBAw=="], + + "@fontsource-variable/noto-serif-sc": ["@fontsource-variable/noto-serif-sc@5.3.1", "", {}, "sha512-aIHcBaL13QctVaJFeT6wqfgO9Rq/cNtD5g2ob4ze59fYPYwacGthnIrHBe83kDpMEB/k6VGtGc6fS99RImcoSQ=="], + + "@fontsource-variable/noto-serif-tc": ["@fontsource-variable/noto-serif-tc@5.3.1", "", {}, "sha512-IW3Pydbc5NWA5JNPyk2SST3x85STRtakYXs4HQKU2cv3xB4Y192z1OV2z09XOS9TcZckbPPzagpQ1lgeBjSFNw=="], + + "@fontsource/instrument-serif": ["@fontsource/instrument-serif@5.3.0", "", {}, "sha512-mDiaIg0u67sYV59fie92Wz4sM8UiVlbL7fLxnFPCKkX15DMASEnQTREbaP5S5/3DCcsoAOcQ0sV9E4AeY4QqYQ=="], + + "@img/colour": ["@img/colour@1.1.0", "", {}, "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ=="], + + "@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.3.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg=="], + + "@img/sharp-darwin-x64": ["@img/sharp-darwin-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.3.4" }, "os": "darwin", "cpu": "x64" }, "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw=="], + + "@img/sharp-freebsd-wasm32": ["@img/sharp-freebsd-wasm32@0.35.5", "", { "dependencies": { "@img/sharp-wasm32": "0.35.5" }, "os": "freebsd" }, "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw=="], + + "@img/sharp-libvips-darwin-arm64": ["@img/sharp-libvips-darwin-arm64@1.3.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw=="], + + "@img/sharp-libvips-darwin-x64": ["@img/sharp-libvips-darwin-x64@1.3.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ=="], + + "@img/sharp-libvips-linux-arm": ["@img/sharp-libvips-linux-arm@1.3.4", "", { "os": "linux", "cpu": "arm" }, "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw=="], + + "@img/sharp-libvips-linux-arm64": ["@img/sharp-libvips-linux-arm64@1.3.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A=="], + + "@img/sharp-libvips-linux-ppc64": ["@img/sharp-libvips-linux-ppc64@1.3.4", "", { "os": "linux", "cpu": "ppc64" }, "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ=="], + + "@img/sharp-libvips-linux-riscv64": ["@img/sharp-libvips-linux-riscv64@1.3.4", "", { "os": "linux", "cpu": "none" }, "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q=="], + + "@img/sharp-libvips-linux-s390x": ["@img/sharp-libvips-linux-s390x@1.3.4", "", { "os": "linux", "cpu": "s390x" }, "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ=="], + + "@img/sharp-libvips-linux-x64": ["@img/sharp-libvips-linux-x64@1.3.4", "", { "os": "linux", "cpu": "x64" }, "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw=="], + + "@img/sharp-libvips-linuxmusl-arm64": ["@img/sharp-libvips-linuxmusl-arm64@1.3.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA=="], + + "@img/sharp-libvips-linuxmusl-x64": ["@img/sharp-libvips-linuxmusl-x64@1.3.4", "", { "os": "linux", "cpu": "x64" }, "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg=="], + + "@img/sharp-linux-arm": ["@img/sharp-linux-arm@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.3.4" }, "os": "linux", "cpu": "arm" }, "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ=="], + + "@img/sharp-linux-arm64": ["@img/sharp-linux-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.3.4" }, "os": "linux", "cpu": "arm64" }, "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ=="], + + "@img/sharp-linux-ppc64": ["@img/sharp-linux-ppc64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-ppc64": "1.3.4" }, "os": "linux", "cpu": "ppc64" }, "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA=="], + + "@img/sharp-linux-riscv64": ["@img/sharp-linux-riscv64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-riscv64": "1.3.4" }, "os": "linux", "cpu": "none" }, "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ=="], + + "@img/sharp-linux-s390x": ["@img/sharp-linux-s390x@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.3.4" }, "os": "linux", "cpu": "s390x" }, "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA=="], + + "@img/sharp-linux-x64": ["@img/sharp-linux-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.3.4" }, "os": "linux", "cpu": "x64" }, "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog=="], + + "@img/sharp-linuxmusl-arm64": ["@img/sharp-linuxmusl-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.3.4" }, "os": "linux", "cpu": "arm64" }, "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg=="], + + "@img/sharp-linuxmusl-x64": ["@img/sharp-linuxmusl-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.3.4" }, "os": "linux", "cpu": "x64" }, "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A=="], + + "@img/sharp-wasm32": ["@img/sharp-wasm32@0.35.5", "", { "dependencies": { "@emnapi/runtime": "^1.11.3" } }, "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ=="], + + "@img/sharp-webcontainers-wasm32": ["@img/sharp-webcontainers-wasm32@0.35.5", "", { "dependencies": { "@img/sharp-wasm32": "0.35.5" }, "cpu": "none" }, "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA=="], + + "@img/sharp-win32-arm64": ["@img/sharp-win32-arm64@0.35.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q=="], + + "@img/sharp-win32-ia32": ["@img/sharp-win32-ia32@0.35.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A=="], + + "@img/sharp-win32-x64": ["@img/sharp-win32-x64@0.35.5", "", { "os": "win32", "cpu": "x64" }, "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg=="], + + "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.6.0", "", {}, "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw=="], + + "@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.2.4", "", { "dependencies": { "@tybys/wasm-util": "^0.10.3" }, "peerDependencies": { "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.4", "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.4" } }, "sha512-AJxoUD2/15ESHbvpcyjU274nsAPLuOtPHCk0vKJM5pj//Fg/B1FXNWjPnXTT9PymCYYiHo4zPj0ZomXBKhoy7g=="], + + "@oslojs/encoding": ["@oslojs/encoding@1.1.0", "", {}, "sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ=="], + + "@oxc-project/types": ["@oxc-project/types@0.156.0", "", {}, "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw=="], + + "@rolldown/binding-android-arm-eabi": ["@rolldown/binding-android-arm-eabi@1.2.19", "", { "os": "android", "cpu": "arm" }, "sha512-e+Ebe0WT+9tbXmNKPIiC8YrWAHYwug3m6i4p3rZGGulfZri1jtI4HslT+OZnFf/OIHowWF71DTlHwXBP2SiA7A=="], + + "@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.2.19", "", { "os": "android", "cpu": "arm64" }, "sha512-hOombrTJ+szt2ciEzS7oCA78lMPBgF5UMQWCJIyNfnrI7GLl8HYoFqCnpL2gcPOaXMqryGCU5ExdQKyDDcC+yA=="], + + "@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.2.19", "", { "os": "darwin", "cpu": "arm64" }, "sha512-XoMA2pwCKGTQzUjPgtRwkedH4WmXhdIPKT6l6oOxd1PUbNodGI6DcBekgN7EC//+x3pfBYX/qL1gNmZAqivw5g=="], + + "@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.2.19", "", { "os": "darwin", "cpu": "x64" }, "sha512-zo8EsSSwMZCY/e+fRnGaX02YGgvJD0yvhNi/9hpGPA2MJ9ZF8dPCw75UGfpI6OpQ/myR/dIYmogRvqiZD0TrXg=="], + + "@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.2.19", "", { "os": "freebsd", "cpu": "x64" }, "sha512-O8ISAOfI1nj7AuBPd30FSF47z7f7lzlk5poQVGgiikvQuGEBFYvW8ki+UEnT+YJPnNGjQzn304klt4O9FUE7mA=="], + + "@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.2.19", "", { "os": "linux", "cpu": "arm" }, "sha512-/lYCba5NO0yq4S0jGMH8QTBtkvQxoXjoQWzF5BcWp9MjB9jxVRD1GQDNofkVjcOj30DWyhLIN/4Oe60JKzaONw=="], + + "@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.2.19", "", { "os": "linux", "cpu": "arm64" }, "sha512-pm/apFMBnSbFb3O6nG5pHO1iqHhZrjGDFEjSm+ot9J17XXPvH9L90y5h+jgfHCE+Qdlsvy8qKEcU4VKxgjD+vA=="], + + "@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.2.19", "", { "os": "linux", "cpu": "arm64" }, "sha512-K1SmQp3FFichn8oqrNIwvFoZ5wcvjC7goBzpaMNvLf9FZc+QB/QvLmnpJZgAAGHiD980tP8FZZnXk2K94rvlxg=="], + + "@rolldown/binding-linux-ppc64-gnu": ["@rolldown/binding-linux-ppc64-gnu@1.2.19", "", { "os": "linux", "cpu": "ppc64" }, "sha512-I0xwD57jP/3A7+5UPZin2w8Y7XHEmEM5zqpYZOcQ45MlNW6tUJUziymV3yRr7rL4vwyfEcRsRksC4a7Kc08p5Q=="], + + "@rolldown/binding-linux-s390x-gnu": ["@rolldown/binding-linux-s390x-gnu@1.2.19", "", { "os": "linux", "cpu": "s390x" }, "sha512-BrtEHT24SNXj9HiXqy+s/kXiSiQGt6EKCPUlRirAoIioVxKGnbXBUEkbZASAei7iZJB0/Ynm+0JP00Ipx7AnSw=="], + + "@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.2.19", "", { "os": "linux", "cpu": "x64" }, "sha512-rm75/9DkHKeU2WnA8w4X94WGYgLlDCFCfkQC+4bguVJmC/jvDRv2B+2wLOYhyE0fVuv7//Ckk39OoOufyCu76Q=="], + + "@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.2.19", "", { "os": "linux", "cpu": "x64" }, "sha512-irh/4+iYFM4GAzpluDErgjz89bj6NDtqqMAG/6O1LG38Ed3NpyebzCpcVNkFW8uhy+/3/BocUvnXDR33CXWe9A=="], + + "@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.2.19", "", { "os": "none", "cpu": "arm64" }, "sha512-+KWTWNoPt+CfSq94CiceWu3yPE+QzkaG+phPyz9G60tmZLwfQkcA4AeksafzvJAw4pvg1mcd5a1TkUqVv0s4JA=="], + + "@rolldown/binding-wasm32-wasi": ["@rolldown/binding-wasm32-wasi@1.2.19", "", { "dependencies": { "@emnapi/core": "2.0.0-beta.2", "@emnapi/runtime": "2.0.0-beta.2", "@napi-rs/wasm-runtime": "1.2.6" }, "cpu": "none" }, "sha512-7EH+skOsl5qpWnK0vzamgJFhOv1cwxQpsxm8tI883K9fur5c27p8q87fzEO6BbBPabA2/+s/zR63/pLc137iOg=="], + + "@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.2.19", "", { "os": "win32", "cpu": "arm64" }, "sha512-3Q1Yg1Q7tEvBWoZf5rFvG/GKZQPgwfru+p4wBajDfJFBs0SHCpL++dfTjW9gyAKd1T7ZpIYvdaUax7Pa/IhFVQ=="], + + "@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.2.19", "", { "os": "win32", "cpu": "x64" }, "sha512-y/sqRRc6d7hECzOFc5n3LSeqctmIp9mMjY1Kq4s14uLPd/LZ4z7i1zrW6fMtp2mPeuQIC4e6ULMcwQzMomqQag=="], + + "@rolldown/pluginutils": ["@rolldown/pluginutils@1.1.1", "", {}, "sha512-glFIJDvLNDtJhT9qrMFWLPbvS+skxgt4L0K8Ei2YtnhPysAJnsI7nyxSJxKj4ADeKX0OLjC4ntRkwpLOoS3rwA=="], + + "@shikijs/core": ["@shikijs/core@4.6.0", "", { "dependencies": { "@shikijs/primitive": "4.6.0", "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5", "hast-util-to-html": "^9.0.6" } }, "sha512-bfd4OKgvoyXYiYmMRuleA656P4V7M/Du9lcTl38Ngm6KszMj7bq4J1IGZwSYR4c95Tv5UQALtYNWUwaI9UT3xw=="], + + "@shikijs/engine-javascript": ["@shikijs/engine-javascript@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "oniguruma-to-es": "^4.3.6" } }, "sha512-K0oqxFoL+kEMdz89mHLFO15Tsbv3kFZ6WR1cXZKMvLSc+oqaM00A6pyga1qSeXB22dP0tTiSApRcGBaKWsEccg=="], + + "@shikijs/engine-oniguruma": ["@shikijs/engine-oniguruma@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0" } }, "sha512-aggd6Q7SuJOXNnsUbfG2XesxBJKBMAw/PDTUo9PyRjMaaJJ2dNrI+q0C+25ARXAK9yLHAlwxc9oRT2u68YKZ7w=="], + + "@shikijs/langs": ["@shikijs/langs@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0" } }, "sha512-1yMEX3oCVV54LUq/ovfpRkDQoYDkcvjSWFFa/YLUDMiSoRzMi2uxLJYbv41ahT8Lu9lFMaa7hecd3Q39trqUyg=="], + + "@shikijs/primitive": ["@shikijs/primitive@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5" } }, "sha512-c54+TQEo9ToqgfL/AU8FpjnV09+GA9Oa7M5ROkkXteZfp5XzpAJGXjjvZQFQioJOwm/w/6Z3lIzQstAkl8coag=="], + + "@shikijs/themes": ["@shikijs/themes@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0" } }, "sha512-qHAVAs80RiGD+IRuH9G+JPDOEc9A/kHsng4EzCUCwB9bLzW6Z0y9WETh2YyCcADJBmfrIaJ1Jp7KBNP6FHkgtQ=="], + + "@shikijs/types": ["@shikijs/types@4.6.0", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5" } }, "sha512-+ENG1adsKt/X7cRYw1Nl7BEpBmPOjmQ7bR/eGmHuMlT8gtOFf3KEi5l31DJYyAWhW6Y6bjP1plU7FmaxWGENFw=="], + + "@shikijs/vscode-textmate": ["@shikijs/vscode-textmate@10.1.0", "", {}, "sha512-cVBuhDQjBZaNMTwBquYfPydrUP+E3hE6oYGasx8h6ZrODIM7/r+gxLDXdd66oszbrggZHEntdE6j+5gYIVyMWQ=="], + + "@tybys/wasm-util": ["@tybys/wasm-util@0.10.4", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A=="], + + "@types/estree": ["@types/estree@1.0.10", "", {}, "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g=="], + + "@types/estree-jsx": ["@types/estree-jsx@1.0.5", "", { "dependencies": { "@types/estree": "*" } }, "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg=="], + + "@types/hast": ["@types/hast@3.0.5", "", { "dependencies": { "@types/unist": "*" } }, "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g=="], + + "@types/mdast": ["@types/mdast@4.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA=="], + + "@types/nlcst": ["@types/nlcst@2.0.3", "", { "dependencies": { "@types/unist": "*" } }, "sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA=="], + + "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="], + + "@ungap/structured-clone": ["@ungap/structured-clone@1.4.0", "", {}, "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ=="], + + "@volar/kit": ["@volar/kit@2.4.31", "", { "dependencies": { "@volar/language-service": "2.4.31", "@volar/typescript": "2.4.31", "typesafe-path": "^0.2.2", "vscode-languageserver-textdocument": "^1.0.11", "vscode-uri": "^3.0.8" }, "peerDependencies": { "typescript": "<7" } }, "sha512-pQgvegC28dfdNcs/iDNZVHkMs+dG7rpD9Aj+sNU2hildv1QuH7/MIoff/cSJW/IR25AGOeHWbJXWWFKDXXWtVw=="], + + "@volar/language-core": ["@volar/language-core@2.4.31", "", { "dependencies": { "@volar/source-map": "2.4.31" } }, "sha512-OM+OZfynHa1/4WlC8klqvwTQVmhYUZuwpAKdfl/rlvK8jaIozMD5qwXsOkxcRJA2tC+TEFsG1K81lNP4s/IAzQ=="], + + "@volar/language-server": ["@volar/language-server@2.4.31", "", { "dependencies": { "@volar/language-core": "2.4.31", "@volar/language-service": "2.4.31", "@volar/typescript": "2.4.31", "path-browserify": "^1.0.1", "request-light": "^0.7.0", "vscode-languageserver": "^9.0.1", "vscode-languageserver-protocol": "^3.17.5", "vscode-languageserver-textdocument": "^1.0.11", "vscode-uri": "^3.0.8" }, "peerDependencies": { "typescript": "<7" }, "optionalPeers": ["typescript"] }, "sha512-PI/3CLcoHzb3RUNuh3ecWEf3d3doGnJ7/dYTvvE+8Y9dnV2SjVXp6BP7G2S5mdq9L1yFYP5yhoEHXc1OIfmX0A=="], + + "@volar/language-service": ["@volar/language-service@2.4.31", "", { "dependencies": { "@volar/language-core": "2.4.31", "vscode-languageserver-protocol": "^3.17.5", "vscode-languageserver-textdocument": "^1.0.11", "vscode-uri": "^3.0.8" }, "peerDependencies": { "typescript": "<7" }, "optionalPeers": ["typescript"] }, "sha512-LM9HFsBVhHZ7RbFUZK9P23FvamK8XCDcN0kNgOTts02wVgnygo3ReLbmBmUZ3GuYnrYn6HHoQvqk/eHIzzTnrg=="], + + "@volar/source-map": ["@volar/source-map@2.4.31", "", {}, "sha512-odi31S3mKm57aO7Pd5P624FmGIB49U4lUPnYRUKvCDa8WZy5N5Yb+GMp2WJNaeIr4+q0ijNpuHsJLrfEiWvHtA=="], + + "@volar/typescript": ["@volar/typescript@2.4.31", "", { "dependencies": { "@volar/language-core": "2.4.31", "@volar/language-service": "2.4.31", "path-browserify": "^1.0.1", "vscode-uri": "^3.0.8" }, "peerDependencies": { "typescript": "<7" }, "optionalPeers": ["typescript"] }, "sha512-OBHLLAi03AmaRWqzytdFhgtW2B3HM+2/vXFkvnZAlEKltalUTyu+No7g9aZx7e9efrDLOtHsd/3PgCHSfgVJ/Q=="], + + "@vscode/emmet-helper": ["@vscode/emmet-helper@2.11.0", "", { "dependencies": { "emmet": "^2.4.3", "jsonc-parser": "^2.3.0", "vscode-languageserver-textdocument": "^1.0.1", "vscode-languageserver-types": "^3.15.1", "vscode-uri": "^3.0.8" } }, "sha512-QLxjQR3imPZPQltfbWRnHU6JecWTF1QSWhx3GAKQpslx7y3Dp6sIIXhKjiUJ/BR9FX8PVthjr9PD6pNwOJfAzw=="], + + "@vscode/l10n": ["@vscode/l10n@0.0.18", "", {}, "sha512-KYSIHVmslkaCDyw013pphY+d7x1qV8IZupYfeIfzNA+nsaWHbn5uPuQRvdRFsa9zFzGeudPuoGoZ1Op4jrJXIQ=="], + + "ajv": ["ajv@8.20.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA=="], + + "ajv-draft-04": ["ajv-draft-04@1.0.0", "", { "peerDependencies": { "ajv": "^8.5.0" }, "optionalPeers": ["ajv"] }, "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw=="], + + "ajv-i18n": ["ajv-i18n@4.2.0", "", { "peerDependencies": { "ajv": "^8.0.0-beta.0" } }, "sha512-v/ei2UkCEeuKNXh8RToiFsUclmU+G57LO1Oo22OagNMENIw+Yb8eMwvHu7Vn9fmkjJyv6XclhJ8TbuigSglPkg=="], + + "am-i-vibing": ["am-i-vibing@0.5.0", "", { "dependencies": { "process-ancestry": "^0.1.0" }, "bin": { "am-i-vibing": "dist/cli.mjs" } }, "sha512-KLcsDhqf1XRrJmJr+9I/C0EX2K+sGrAGZFgkmd84c8TJO9zJBu+/kFInjazu1KfJWFhWDKdRWkpBzEs7s35DVA=="], + + "ansi-regex": ["ansi-regex@6.6.0", "", {}, "sha512-XZ5apbzreCbXSKwPjJstu8R0zOi247w3XYwWxtwBXgpZrCyc1Ka7p9/xY0A9/diMewmHbEKz+FIraWaEWjlN5g=="], + + "ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], + + "anymatch": ["anymatch@3.1.3", "", { "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw=="], + + "aria-query": ["aria-query@5.3.2", "", {}, "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw=="], + + "astro": ["astro@7.4.12", "", { "dependencies": { "@astrojs/compiler-rs": "^0.5.2", "@astrojs/internal-helpers": "^0.13.2", "@astrojs/markdown-satteri": "^0.4.10", "@astrojs/runtime": "^0.1.1", "@astrojs/telemetry": "^3.4.2", "@astrojs/vite-plugin-astro": "^0.1.3", "@capsizecss/unpack": "^4.0.1", "@clack/prompts": "^1.8.1", "@oslojs/encoding": "^1.1.0", "am-i-vibing": "^0.5.0", "aria-query": "^5.3.2", "axobject-query": "^4.1.0", "ci-info": "^4.4.0", "cookie": "^2.0.2", "devalue": "^6.0.3", "diff": "^9.0.0", "dset": "^3.1.4", "es-module-lexer": "^3.0.4", "flattie": "^1.1.1", "fontace": "~0.4.1", "get-tsconfig": "5.0.0-beta.6", "github-slugger": "^2.0.0", "html-escaper": "3.0.3", "http-cache-semantics": "^4.3.0", "jsonc-parser": "^3.3.1", "magic-string": "^1.4.5", "magicast": "^0.5.5", "mri": "^1.2.0", "mrmime": "^2.0.1", "neotraverse": "^1.0.1", "obug": "^3.0.0", "p-limit": "^7.3.3", "p-queue": "^10.0.0", "package-manager-detector": "^1.9.0", "piccolore": "^0.1.3", "picomatch": "^4.0.7", "rolldown": "~1.2.16", "shiki": "^4.6.0", "smol-toml": "^1.9.1", "svgo": "^4.1.0", "tinyclip": "^1.0.3", "tinyexec": "^1.3.1", "tinyglobby": "^0.2.17", "tinyps": "^0.5.1", "ultrahtml": "^1.7.0", "unifont": "^1.0.3", "unstorage": "^1.17.6", "verkit": "^0.5.0", "vite": "^8.3.6", "vitefu": "^1.1.3", "xxhash-wasm": "^1.1.0", "zod": "^4.6.7" }, "optionalDependencies": { "sharp": "^0.35.4" }, "peerDependencies": { "@astrojs/markdown-remark": "^7.3.0" }, "optionalPeers": ["@astrojs/markdown-remark"], "bin": { "astro": "./bin/astro.mjs" } }, "sha512-DKX+Ds0rqV49HrLwEB9JFrCyfvQeC16FCe1HrPK8S3osiJH/e2vQ22CHIDOpI48UaeiPbxPT26peXgGTy6w0ig=="], + + "axobject-query": ["axobject-query@4.1.0", "", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="], + + "bail": ["bail@2.0.2", "", {}, "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="], + + "boolbase": ["boolbase@1.0.0", "", {}, "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="], + + "ccount": ["ccount@2.0.1", "", {}, "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg=="], + + "character-entities-html4": ["character-entities-html4@2.1.0", "", {}, "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA=="], + + "character-entities-legacy": ["character-entities-legacy@3.0.0", "", {}, "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ=="], + + "chokidar": ["chokidar@5.0.0", "", { "dependencies": { "readdirp": "^5.0.0" } }, "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw=="], + + "ci-info": ["ci-info@4.5.0", "", {}, "sha512-d1uM8k5UZEyPza1n/MG3ko8nKupKN0KJpFsipgPcgaCCvV+IqIfJ+NzTjetlLM+UcXZx3+cLrNr76+eAO7G1Mw=="], + + "cliui": ["cliui@9.0.1", "", { "dependencies": { "string-width": "^7.2.0", "strip-ansi": "^7.1.0", "wrap-ansi": "^9.0.0" } }, "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w=="], + + "clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="], + + "comma-separated-tokens": ["comma-separated-tokens@2.0.3", "", {}, "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg=="], + + "commander": ["commander@11.1.0", "", {}, "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ=="], + + "common-ancestor-path": ["common-ancestor-path@2.0.0", "", {}, "sha512-dnN3ibLeoRf2HNC+OlCiNc5d2zxbLJXOtiZUudNFSXZrNSydxcCsSpRzXwfu7BBWCIfHPw+xTayeBvJCP/D8Ng=="], + + "cookie": ["cookie@2.0.2", "", {}, "sha512-SL0cVuEdETEp7pN0FuZb01toc3vnODEfVUCooxG1SJN0yIirh7JMb9X9bvfCFf0vzzbT68RdbKDHYTiWy7a7iw=="], + + "cookie-es": ["cookie-es@1.2.3", "", {}, "sha512-lXVyvUvrNXblMqzIRrxHb57UUVmqsSWlxqt3XIjCkUP0wDAf6uicO6KMbEgYrMNtEvWgWHwe42CKxPu9MYAnWw=="], + + "crossws": ["crossws@0.3.5", "", { "dependencies": { "uncrypto": "^0.1.3" } }, "sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA=="], + + "css-select": ["css-select@6.0.0", "", { "dependencies": { "boolbase": "^1.0.0", "css-what": "^7.0.0", "domhandler": "^5.0.3", "domutils": "^3.2.2", "nth-check": "^2.1.1" } }, "sha512-rZZVSLle8v0+EY8QAkDWrKhpgt6SA5OtHsgBnsj6ZaLb5dmDVOWUDtQitd9ydxxvEjhewNudS6eTVU7uOyzvXw=="], + + "css-tree": ["css-tree@3.2.1", "", { "dependencies": { "mdn-data": "2.27.1", "source-map-js": "^1.2.1" } }, "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA=="], + + "css-what": ["css-what@7.0.0", "", {}, "sha512-wD5oz5xibMOPHzy13CyGmogB3phdvcDaB5t0W/Nr5Z2O/agcB8YwOz6e2Lsp10pNDzBoDO9nVa3RGs/2BttpHQ=="], + + "csso": ["csso@5.0.5", "", { "dependencies": { "css-tree": "~2.2.0" } }, "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ=="], + + "defu": ["defu@6.1.7", "", {}, "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ=="], + + "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], + + "destr": ["destr@2.0.5", "", {}, "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA=="], + + "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], + + "devalue": ["devalue@6.0.3", "", {}, "sha512-3woMEITftG1wKeO/4d/QXH1DVKctTSZg3jNGPpjp9hNr5Hos8MCFF5McTML5ZtgKDObm2R591B0spRp2IVernA=="], + + "devlop": ["devlop@1.1.0", "", { "dependencies": { "dequal": "^2.0.0" } }, "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA=="], + + "diff": ["diff@9.0.0", "", {}, "sha512-svtcdpS8CgJyqAjEQIXdb3OjhFVVYjzGAPO8WGCmRbrml64SPw/jJD4GoE98aR7r25A0XcgrK3F02yw9R/vhQw=="], + + "dom-serializer": ["dom-serializer@2.0.0", "", { "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.2", "entities": "^4.2.0" } }, "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg=="], + + "domelementtype": ["domelementtype@2.3.0", "", {}, "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw=="], + + "domhandler": ["domhandler@5.0.3", "", { "dependencies": { "domelementtype": "^2.3.0" } }, "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w=="], + + "domutils": ["domutils@3.2.2", "", { "dependencies": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", "domhandler": "^5.0.3" } }, "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw=="], + + "dset": ["dset@3.1.4", "", {}, "sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA=="], + + "emmet": ["emmet@2.4.11", "", { "dependencies": { "@emmetio/abbreviation": "^2.3.3", "@emmetio/css-abbreviation": "^2.1.8" } }, "sha512-23QPJB3moh/U9sT4rQzGgeyyGIrcM+GH5uVYg2C6wZIxAIJq7Ng3QLT79tl8FUwDXhyq9SusfknOrofAKqvgyQ=="], + + "emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="], + + "entities": ["entities@4.5.0", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="], + + "es-module-lexer": ["es-module-lexer@3.0.4", "", {}, "sha512-BldNY5mwkVu+cQ5Ymn3e6hB9Sx8XHx4ZevWbiUyZbfKxJxYO27Hf0wfzkxIaD5CAJMaGl3YspKELj0ff/7nCMA=="], + + "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], + + "extend": ["extend@3.0.2", "", {}, "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="], + + "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], + + "fast-string-truncated-width": ["fast-string-truncated-width@3.0.3", "", {}, "sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g=="], + + "fast-string-width": ["fast-string-width@3.0.2", "", { "dependencies": { "fast-string-truncated-width": "^3.0.2" } }, "sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg=="], + + "fast-uri": ["fast-uri@3.1.9", "", {}, "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ=="], + + "fast-wrap-ansi": ["fast-wrap-ansi@0.2.2", "", { "dependencies": { "fast-string-width": "^3.0.2" } }, "sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q=="], + + "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], + + "flattie": ["flattie@1.1.1", "", {}, "sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ=="], + + "fnv1a-64": ["fnv1a-64@0.1.2", "", {}, "sha512-mJbcILTPybAR1jdOwt/lVv8N2cffeJFFP+gVbSAwLEx1ujXH27RpPd8Rokec/KX9c76UYIB6Co+H4lQzxPnJfA=="], + + "fontace": ["fontace@0.4.1", "", { "dependencies": { "fontkitten": "^1.0.2" } }, "sha512-lDMvbAzSnHmbYMTEld5qdtvNH2/pWpICOqpean9IgC7vUbUJc3k+k5Dokp85CegamqQpFbXf0rAVkbzpyTA8aw=="], + + "fontkitten": ["fontkitten@1.0.3", "", { "dependencies": { "tiny-inflate": "^1.0.3" } }, "sha512-Wp1zXWPVUPBmfoa3Cqc9ctaKuzKAV6uLstRqlR56kSjplf5uAce+qeyYym7F+PHbGTk+tCEdkCW6RD7DX/gBZw=="], + + "framer-motion": ["framer-motion@14.14.0", "", { "dependencies": { "motion-dom": "14.14.0", "motion-utils": "14.7.0", "tslib": "^2.4.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0", "remix": "^3.1.0" }, "optionalPeers": ["react", "react-dom", "remix"] }, "sha512-fidRX0VzkZdA9OovFiBSzJtt9/jLcJpna78Z+KCqQQZIWoIpN3tOhEXAhhAw/FObUUh+o3Y18yx1F4BP0mVJ8Q=="], + + "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="], + + "get-east-asian-width": ["get-east-asian-width@1.7.0", "", {}, "sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q=="], + + "get-tsconfig": ["get-tsconfig@5.0.0-beta.6", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-X6fBC0pmImC70gvX2zm56go9hx0MyoGVdG0tUCkg/D+Xnh5TJsOZ7iDbOdI3PvmtrDxnu1YdDufpK2QJX1Meqw=="], + + "github-slugger": ["github-slugger@2.0.0", "", {}, "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw=="], + + "h3": ["h3@1.15.11", "", { "dependencies": { "cookie-es": "^1.2.3", "crossws": "^0.3.5", "defu": "^6.1.6", "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", "node-mock-http": "^1.0.4", "radix3": "^1.1.2", "ufo": "^1.6.3", "uncrypto": "^0.1.3" } }, "sha512-L3THSe2MPeBwgIZVSH5zLdBBU90TOxarvhK9d04IDY2AmVS8j2Jz2LIWtwsGOU3lu2I5jCN7FNvVfY2+XyF+mg=="], + + "hast-util-to-html": ["hast-util-to-html@9.0.6", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-whitespace": "^3.0.0", "html-void-elements": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "stringify-entities": "^4.0.0", "zwitch": "^2.0.4" } }, "sha512-1SZUxCN3TtJAE7e2BQN2MBHsoZ1gnmi9GoCP5Di59CSWptIezSAW09yDZyVbanb78V9eCwrKqdQsjtfVTxYHWA=="], + + "hast-util-whitespace": ["hast-util-whitespace@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw=="], + + "html-escaper": ["html-escaper@3.0.3", "", {}, "sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ=="], + + "html-void-elements": ["html-void-elements@3.0.0", "", {}, "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg=="], + + "http-cache-semantics": ["http-cache-semantics@4.3.0", "", {}, "sha512-M5t5LlJpS1UHMjvwRQVdFHvPISGeLAxNcrWuJkeGh0KxsqCHZ1O3NXZU/8x7cD0BDcGW8kapxMKTvwlqrNkHkA=="], + + "iron-webcrypto": ["iron-webcrypto@1.2.1", "", {}, "sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg=="], + + "is-docker": ["is-docker@4.0.0", "", { "bin": { "is-docker": "cli.js" } }, "sha512-LHE+wROyG/Y/0ZnbktRCoTix2c1RhgWaZraMZ8o1Q7zCh0VSrICJQO5oqIIISrcSBtrXv0o233w1IYwsWCjTzA=="], + + "is-plain-obj": ["is-plain-obj@4.1.0", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="], + + "json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="], + + "jsonc-parser": ["jsonc-parser@3.3.1", "", {}, "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ=="], + + "kleur": ["kleur@4.1.5", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="], + + "lightningcss": ["lightningcss@1.33.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.33.0", "lightningcss-darwin-arm64": "1.33.0", "lightningcss-darwin-x64": "1.33.0", "lightningcss-freebsd-x64": "1.33.0", "lightningcss-linux-arm-gnueabihf": "1.33.0", "lightningcss-linux-arm64-gnu": "1.33.0", "lightningcss-linux-arm64-musl": "1.33.0", "lightningcss-linux-x64-gnu": "1.33.0", "lightningcss-linux-x64-musl": "1.33.0", "lightningcss-win32-arm64-msvc": "1.33.0", "lightningcss-win32-x64-msvc": "1.33.0" } }, "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA=="], + + "lightningcss-android-arm64": ["lightningcss-android-arm64@1.33.0", "", { "os": "android", "cpu": "arm64" }, "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg=="], + + "lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.33.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg=="], + + "lightningcss-darwin-x64": ["lightningcss-darwin-x64@1.33.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ=="], + + "lightningcss-freebsd-x64": ["lightningcss-freebsd-x64@1.33.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg=="], + + "lightningcss-linux-arm-gnueabihf": ["lightningcss-linux-arm-gnueabihf@1.33.0", "", { "os": "linux", "cpu": "arm" }, "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ=="], + + "lightningcss-linux-arm64-gnu": ["lightningcss-linux-arm64-gnu@1.33.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg=="], + + "lightningcss-linux-arm64-musl": ["lightningcss-linux-arm64-musl@1.33.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ=="], + + "lightningcss-linux-x64-gnu": ["lightningcss-linux-x64-gnu@1.33.0", "", { "os": "linux", "cpu": "x64" }, "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg=="], + + "lightningcss-linux-x64-musl": ["lightningcss-linux-x64-musl@1.33.0", "", { "os": "linux", "cpu": "x64" }, "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw=="], + + "lightningcss-win32-arm64-msvc": ["lightningcss-win32-arm64-msvc@1.33.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA=="], + + "lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.33.0", "", { "os": "win32", "cpu": "x64" }, "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA=="], + + "lru-cache": ["lru-cache@11.5.3", "", {}, "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg=="], + + "magic-string": ["magic-string@1.4.5", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.6.0" } }, "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w=="], + + "magicast": ["magicast@0.5.5", "", { "dependencies": { "@babel/parser": "^7.29.7", "@babel/types": "^7.29.7", "source-map-js": "^1.2.1" } }, "sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA=="], + + "mdast-util-to-hast": ["mdast-util-to-hast@13.2.2", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@ungap/structured-clone": "^1.0.0", "devlop": "^1.0.0", "micromark-util-sanitize-uri": "^2.0.0", "trim-lines": "^3.0.0", "unist-util-position": "^5.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-l2pnmOuqs+SGLVpTVXnRLQu5v1AzvDe181404fbXzzqObVxrAnnVxapAP27pUwzLBL/ABIkgUhGlPVU7QSvIFg=="], + + "mdn-data": ["mdn-data@2.27.1", "", {}, "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ=="], + + "micromark-util-character": ["micromark-util-character@2.1.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q=="], + + "micromark-util-encode": ["micromark-util-encode@2.0.1", "", {}, "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw=="], + + "micromark-util-sanitize-uri": ["micromark-util-sanitize-uri@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ=="], + + "micromark-util-symbol": ["micromark-util-symbol@2.0.1", "", {}, "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q=="], + + "micromark-util-types": ["micromark-util-types@2.0.3", "", {}, "sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg=="], + + "motion": ["motion@14.14.0", "", { "dependencies": { "framer-motion": "14.14.0", "tslib": "^2.4.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0", "remix": "^3.1.0" }, "optionalPeers": ["react", "react-dom", "remix"] }, "sha512-a306U6sV5VKq1abtzKiinB+UQjiY88jrsvQzWORP3WPv/DFANyoYVlPbdnmJPMEbusyPXB4GyQJVANaq/pSIYQ=="], + + "motion-dom": ["motion-dom@14.14.0", "", { "dependencies": { "motion-utils": "14.7.0" } }, "sha512-IAxcKhYkuQA2W0Tlx1AvVgImfqEoF3/t3IovbPQJlYkefmGsmrXjn967lMII5VmFmLpQEab4+ZkHo/ijJ4Esig=="], + + "motion-utils": ["motion-utils@14.7.0", "", {}, "sha512-woO0/Nb7ys75f94fjvQi/6leiHGvZUYkeHUPEZ3vxsV+9OpEVhkxp01x8MlRwX0zt31EqgXsKDAoBoJLC148Tw=="], + + "mri": ["mri@1.2.0", "", {}, "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA=="], + + "mrmime": ["mrmime@2.0.1", "", {}, "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ=="], + + "muggle-string": ["muggle-string@0.4.1", "", {}, "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ=="], + + "nanoid": ["nanoid@3.3.20", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ=="], + + "neotraverse": ["neotraverse@1.0.2", "", {}, "sha512-DLMUFnyCrRAncRJhDC2yNbSTcpEukp+nczID/na3XdIHQFokPveK69xel642cQHgUGszctsOSeCePqPpY25W6Q=="], + + "nlcst-to-string": ["nlcst-to-string@4.0.0", "", { "dependencies": { "@types/nlcst": "^2.0.0" } }, "sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA=="], + + "node-fetch-native": ["node-fetch-native@1.6.7", "", {}, "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q=="], + + "node-mock-http": ["node-mock-http@1.0.5", "", {}, "sha512-KQyt/wLjG3TAc7DOUhpqWzgd4ERxR80JOlTK5VE5R1S12IaPVN5qkj4klBce9HPG1Njuup4Sb5bljaT34lIyjw=="], + + "normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="], + + "nth-check": ["nth-check@2.1.1", "", { "dependencies": { "boolbase": "^1.0.0" } }, "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w=="], + + "obug": ["obug@3.0.0", "", {}, "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw=="], + + "ofetch": ["ofetch@1.5.1", "", { "dependencies": { "destr": "^2.0.5", "node-fetch-native": "^1.6.7", "ufo": "^1.6.1" } }, "sha512-2W4oUZlVaqAPAil6FUg/difl6YhqhUR7x2eZY4bQCko22UXg3hptq9KLQdqFClV+Wu85UX7hNtdGTngi/1BxcA=="], + + "oniguruma-parser": ["oniguruma-parser@0.12.2", "", {}, "sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw=="], + + "oniguruma-to-es": ["oniguruma-to-es@4.3.6", "", { "dependencies": { "oniguruma-parser": "^0.12.2", "regex": "^6.1.0", "regex-recursion": "^6.0.2" } }, "sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA=="], + + "p-limit": ["p-limit@7.3.3", "", { "dependencies": { "yocto-queue": "^1.2.1" } }, "sha512-SKgVvDU5TNIxQ4r30U75BNLC6a+6GOEjngrk/ysM5+Zu3oJuk1SC5ApzIzY/7PjCEjoVPMWJ0zho/4QUiEB7TQ=="], + + "p-queue": ["p-queue@10.0.0", "", {}, "sha512-P2wrCri3bhGLPo3kX7qYVXbo/5GvaVATU0DpO24CbeT53Y4z35t8JUWku04ERpXHUYB5rPMi3TkWE3fmJgx5rA=="], + + "package-manager-detector": ["package-manager-detector@1.9.0", "", {}, "sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA=="], + + "path-browserify": ["path-browserify@1.0.1", "", {}, "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="], + + "piccolore": ["piccolore@0.1.3", "", {}, "sha512-o8bTeDWjE086iwKrROaDf31K0qC/BENdm15/uH9usSC/uZjJOKb2YGiVHfLY4GhwsERiPI1jmwI2XrA7ACOxVw=="], + + "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], + + "picomatch": ["picomatch@4.0.7", "", {}, "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA=="], + + "postcss": ["postcss@8.5.33", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ=="], + + "prettier": ["prettier@3.10.1", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-70vp3ZUYoPlFbF9uiTdXHUUCGEIp7d4+6p+8DYbkm2jP7x/3i/paXVF6dopSI3zd/CEitrZN1rc4i85xWmmXlg=="], + + "prismjs": ["prismjs@1.30.0", "", {}, "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw=="], + + "process-ancestry": ["process-ancestry@0.1.0", "", {}, "sha512-tGqJW/UnclpYASFcM6Xh8D8l/BMtaQ9+CSG0vlJSJTcdMM4lDRv4c6H0Pdcsfted+bVczdYSfk2fdukg2gQkZg=="], + + "property-information": ["property-information@7.2.0", "", {}, "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg=="], + + "radix3": ["radix3@1.1.2", "", {}, "sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA=="], + + "readdirp": ["readdirp@5.1.1", "", {}, "sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA=="], + + "regex": ["regex@6.1.0", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg=="], + + "regex-recursion": ["regex-recursion@6.0.2", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg=="], + + "regex-utilities": ["regex-utilities@2.3.0", "", {}, "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng=="], + + "request-light": ["request-light@0.7.0", "", {}, "sha512-lMbBMrDoxgsyO+yB3sDcrDuX85yYt7sS8BfQd11jtbW/z5ZWgLZRcEGLsLoYw7I0WSUGQBs8CC8ScIxkTX1+6Q=="], + + "require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="], + + "resolve-pkg-maps": ["resolve-pkg-maps@1.0.0", "", {}, "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw=="], + + "retext-smartypants": ["retext-smartypants@6.2.0", "", { "dependencies": { "@types/nlcst": "^2.0.0", "nlcst-to-string": "^4.0.0", "unist-util-visit": "^5.0.0" } }, "sha512-kk0jOU7+zGv//kfjXEBjdIryL1Acl4i9XNkHxtM7Tm5lFiCog576fjNC9hjoR7LTKQ0DsPWy09JummSsH1uqfQ=="], + + "rolldown": ["rolldown@1.2.19", "", { "dependencies": { "@oxc-project/types": "=0.156.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.2.19", "@rolldown/binding-android-arm64": "1.2.19", "@rolldown/binding-darwin-arm64": "1.2.19", "@rolldown/binding-darwin-x64": "1.2.19", "@rolldown/binding-freebsd-x64": "1.2.19", "@rolldown/binding-linux-arm-gnueabihf": "1.2.19", "@rolldown/binding-linux-arm64-gnu": "1.2.19", "@rolldown/binding-linux-arm64-musl": "1.2.19", "@rolldown/binding-linux-ppc64-gnu": "1.2.19", "@rolldown/binding-linux-s390x-gnu": "1.2.19", "@rolldown/binding-linux-x64-gnu": "1.2.19", "@rolldown/binding-linux-x64-musl": "1.2.19", "@rolldown/binding-openharmony-arm64": "1.2.19", "@rolldown/binding-wasm32-wasi": "1.2.19", "@rolldown/binding-win32-arm64-msvc": "1.2.19", "@rolldown/binding-win32-x64-msvc": "1.2.19" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-QIiV1J9d0pzN4jeeTH4sjPy0AZ6cAy2cG0ExeoE1+U8Rvj+hR3gYkokx0YbeUNGlZqiQJJ2utcETe0oKXwzsuA=="], + + "satteri": ["satteri@0.11.7", "", { "dependencies": { "@types/estree-jsx": "^1.0.5", "@types/hast": "^3.0.5", "@types/mdast": "^4.0.4", "@types/unist": "^3.0.3" }, "optionalDependencies": { "@bruits/satteri-android-arm64": "0.11.7", "@bruits/satteri-darwin-arm64": "0.11.7", "@bruits/satteri-darwin-x64": "0.11.7", "@bruits/satteri-freebsd-x64": "0.11.7", "@bruits/satteri-linux-arm64-gnu": "0.11.7", "@bruits/satteri-linux-arm64-musl": "0.11.7", "@bruits/satteri-linux-x64-gnu": "0.11.7", "@bruits/satteri-linux-x64-musl": "0.11.7", "@bruits/satteri-wasm32-wasi": "0.11.7", "@bruits/satteri-win32-arm64-msvc": "0.11.7", "@bruits/satteri-win32-x64-msvc": "0.11.7" } }, "sha512-xDOSxkc1ew3z3IovIjmsqJaVHRXTGYJkPvx0LL/U6o90km8kSU+pmrZVvnWd5creJeE0UnvMEienlkPuYQdJaA=="], + + "sax": ["sax@1.6.1", "", {}, "sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q=="], + + "semver": ["semver@7.8.6", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw=="], + + "sharp": ["sharp@0.35.5", "", { "dependencies": { "@img/colour": "^1.1.0", "detect-libc": "^2.1.2", "semver": "^7.8.5" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.35.5", "@img/sharp-darwin-x64": "0.35.5", "@img/sharp-freebsd-wasm32": "0.35.5", "@img/sharp-libvips-darwin-arm64": "1.3.4", "@img/sharp-libvips-darwin-x64": "1.3.4", "@img/sharp-libvips-linux-arm": "1.3.4", "@img/sharp-libvips-linux-arm64": "1.3.4", "@img/sharp-libvips-linux-ppc64": "1.3.4", "@img/sharp-libvips-linux-riscv64": "1.3.4", "@img/sharp-libvips-linux-s390x": "1.3.4", "@img/sharp-libvips-linux-x64": "1.3.4", "@img/sharp-libvips-linuxmusl-arm64": "1.3.4", "@img/sharp-libvips-linuxmusl-x64": "1.3.4", "@img/sharp-linux-arm": "0.35.5", "@img/sharp-linux-arm64": "0.35.5", "@img/sharp-linux-ppc64": "0.35.5", "@img/sharp-linux-riscv64": "0.35.5", "@img/sharp-linux-s390x": "0.35.5", "@img/sharp-linux-x64": "0.35.5", "@img/sharp-linuxmusl-arm64": "0.35.5", "@img/sharp-linuxmusl-x64": "0.35.5", "@img/sharp-webcontainers-wasm32": "0.35.5", "@img/sharp-win32-arm64": "0.35.5", "@img/sharp-win32-ia32": "0.35.5", "@img/sharp-win32-x64": "0.35.5" }, "peerDependencies": { "@types/node": "*" }, "optionalPeers": ["@types/node"] }, "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g=="], + + "shiki": ["shiki@4.6.0", "", { "dependencies": { "@shikijs/core": "4.6.0", "@shikijs/engine-javascript": "4.6.0", "@shikijs/engine-oniguruma": "4.6.0", "@shikijs/langs": "4.6.0", "@shikijs/themes": "4.6.0", "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5" } }, "sha512-imjLsVHgPuWhvpU3P+zOekvMYqnel7QmKsFC4Sn0fCuAvaaalBsxwKEsrU8Ko5BdFnZA6Go/8a0RzahS634UgA=="], + + "simple-icons": ["simple-icons@16.37.0", "", {}, "sha512-8mCJIhpMYOL9g13GW59EiL3sVXJnTEKGCTZFaekl9UQ3Qo0SwVjnLaJ82QiaH8BKBdouEDzrHMXIWh8cBIy48A=="], + + "sisteransi": ["sisteransi@2.0.0", "", {}, "sha512-2WCqLdt12eN6ehLI50S2/ZxoowXU3DD1KVPRyVP0WEsFahrGZZmCdq1K59qjJljMRIDTwx1D9YaRK+hDneBUMg=="], + + "smol-toml": ["smol-toml@1.9.1", "", {}, "sha512-j7WyPdf0CJoutMzMoPLF/bVXHtKZIT9Rb4eGeEbWw8X2t5oirjPgpL+OpaENZrILYaXqYwnVH+qgUwVbl+pUJQ=="], + + "source-map-js": ["source-map-js@1.2.2", "", {}, "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw=="], + + "space-separated-tokens": ["space-separated-tokens@2.0.2", "", {}, "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="], + + "std-env": ["std-env@4.3.0", "", {}, "sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag=="], + + "string-width": ["string-width@8.3.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ=="], + + "stringify-entities": ["stringify-entities@4.0.4", "", { "dependencies": { "character-entities-html4": "^2.0.0", "character-entities-legacy": "^3.0.0" } }, "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg=="], + + "strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], + + "svgo": ["svgo@4.1.0", "", { "dependencies": { "commander": "^11.1.0", "css-select": "^6.0.0", "css-tree": "^3.0.1", "css-what": "^7.0.0", "csso": "^5.0.5", "picocolors": "^1.1.1", "sax": "1.6.1" }, "bin": { "svgo": "bin/svgo.js" } }, "sha512-bkxnTg1kSU0guhIBmibA6UUhrQmPVA1XsQLN+ylCd+UWzbnLkySOcXpyk1mrl05f+pcaCx2eHb+sp6BgMZWX+Q=="], + + "tiny-inflate": ["tiny-inflate@1.0.3", "", {}, "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw=="], + + "tinyclip": ["tinyclip@1.0.3", "", {}, "sha512-nTv2raKFMzGG6JJp0lpNDsRPdfFE6UHlu2rVEjXo8vkx1ZS3LW2CVXqIaLu8xZlu+6tbFs9V58Qc/Jmk/Ii7wA=="], + + "tinyexec": ["tinyexec@1.3.1", "", {}, "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA=="], + + "tinyglobby": ["tinyglobby@0.2.17", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="], + + "tinyps": ["tinyps@0.5.2", "", {}, "sha512-sYhvdbpuo2rGE7u/jPUMiZz4H2LCaOodUtRD9ot4DLNFQbr884g9zozoJnxLI+1r4hXqWkmdHUl8Yig2Rllxxw=="], + + "trim-lines": ["trim-lines@3.0.1", "", {}, "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="], + + "trough": ["trough@2.2.0", "", {}, "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw=="], + + "tslib": ["tslib@2.9.1", "", {}, "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA=="], + + "typesafe-path": ["typesafe-path@0.2.2", "", {}, "sha512-OJabfkAg1WLZSqJAJ0Z6Sdt3utnbzr/jh+NAHoyWHJe8CMSy79Gm085094M9nvTPy22KzTVn5Zq5mbapCI/hPA=="], + + "typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="], + + "typescript-auto-import-cache": ["typescript-auto-import-cache@0.3.6", "", { "dependencies": { "semver": "^7.3.8" } }, "sha512-RpuHXrknHdVdK7wv/8ug3Fr0WNsNi5l5aB8MYYuXhq2UH5lnEB1htJ1smhtD5VeCsGr2p8mUDtd83LCQDFVgjQ=="], + + "ufo": ["ufo@1.6.4", "", {}, "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA=="], + + "ultrahtml": ["ultrahtml@1.7.0", "", {}, "sha512-2xRd0VHoAQE4M+vF/DvFFB7pUV0ZxTW1TLi7lHQWnF/Sb5TPeEUV/l+hxcNnGO00ZXGnR0voCMmYRKQf+rvJ2g=="], + + "uncrypto": ["uncrypto@0.1.3", "", {}, "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q=="], + + "undici": ["undici@8.12.4", "", {}, "sha512-8Mx+uNKKER2bA4AdtedkqRbwUCIJFr2nJckXRe5yrDqzePqwLP7VNcctN8/XdmDSbF7mS+jJKIszlL+vbam1VA=="], + + "unified": ["unified@11.0.5", "", { "dependencies": { "@types/unist": "^3.0.0", "bail": "^2.0.0", "devlop": "^1.0.0", "extend": "^3.0.0", "is-plain-obj": "^4.0.0", "trough": "^2.0.0", "vfile": "^6.0.0" } }, "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA=="], + + "unifont": ["unifont@1.0.3", "", { "dependencies": { "css-tree": "^3.1.0", "fnv1a-64": "^0.1.2", "std-env": "^4.2.0", "undici": "^8.0.0" } }, "sha512-XGnEwj5sWdCbiBX01mWLSBncS0yMRjnLygau3IfdOlfjMacNIQvTGW4VH7pWBq+gGWArfSef/CensMLjMmIr/A=="], + + "unist-util-is": ["unist-util-is@6.0.1", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g=="], + + "unist-util-position": ["unist-util-position@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA=="], + + "unist-util-stringify-position": ["unist-util-stringify-position@4.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ=="], + + "unist-util-visit": ["unist-util-visit@5.2.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.1.0" } }, "sha512-fpsYs/VVoZxfGY9/j3FQpZmN8wdLJaV1Pt38AaJNZu9uKIHcFU3halCdBveEq1HGKO1OEfJY65w1zvoFV1b3qQ=="], + + "unist-util-visit-parents": ["unist-util-visit-parents@6.1.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-vKXxz6O38sKDj1mtx/k2cWvkkFBuYGx6uGrlzBkVeWCRF/F8sdI0j3Wbkz/5rVNRRuVc8UrgRdbCxNhmYXgP3w=="], + + "unstorage": ["unstorage@1.17.6", "", { "dependencies": { "anymatch": "^3.1.3", "chokidar": "^5.0.0", "destr": "^2.0.5", "h3": "^1.15.11", "lru-cache": "^11.5.3", "node-fetch-native": "^1.6.7", "ofetch": "^1.5.1", "ufo": "^1.6.4" }, "peerDependencies": { "@azure/app-configuration": "^1.8.0", "@azure/cosmos": "^4.2.0", "@azure/data-tables": "^13.3.0", "@azure/identity": "^4.6.0", "@azure/keyvault-secrets": "^4.9.0", "@azure/storage-blob": "^12.26.0", "@capacitor/preferences": "^6 || ^7 || ^8", "@deno/kv": ">=0.9.0", "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0 || ^11.0.0", "@planetscale/database": "^1.19.0", "@upstash/redis": "^1.34.3", "@vercel/blob": ">=0.27.1", "@vercel/functions": "^2.2.12 || ^3.0.0", "@vercel/kv": "^1 || ^2 || ^3", "aws4fetch": "^1.0.20", "db0": ">=0.2.1", "idb-keyval": "^6.2.1", "ioredis": "^5.4.2", "uploadthing": "^7.4.4" }, "optionalPeers": ["@azure/app-configuration", "@azure/cosmos", "@azure/data-tables", "@azure/identity", "@azure/keyvault-secrets", "@azure/storage-blob", "@capacitor/preferences", "@deno/kv", "@netlify/blobs", "@planetscale/database", "@upstash/redis", "@vercel/blob", "@vercel/functions", "@vercel/kv", "aws4fetch", "db0", "idb-keyval", "ioredis", "uploadthing"] }, "sha512-gjKtcmn/KwZuJZO9o2sc0esAQnhmTw0LviDHwevTXbJMYs0dRTp8ZEEWXHU0vTpzbN3cA0yxlTeyXssMp3zDqw=="], + + "verkit": ["verkit@0.5.0", "", {}, "sha512-u4J1hr6Y+C/hit34GwL3eIcUf3wngT8TlYUjK7tk0jxydKLAq3sYvifjdTDA6U3KCKRcQCQDGf/srjxfZF3l7g=="], + + "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], + + "vfile-message": ["vfile-message@4.0.4", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-66ycRswIkNmHH9PHku7ADtv5RVwgIrOcuv3J8Svz6h4qgGRrKVa+9/neuKyJZUXyOpYwLTvS+whZ4R2urHHgQg=="], + + "vite": ["vite@8.3.8", "", { "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.7", "postcss": "^8.5.32", "rolldown": "~1.2.18", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.7.1 || ^0.8.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-LzOn3h9rG/0vhLdXrV4yJ4QFA9eEoqCl+Yx+kGJd7aB9w6nfNgVHKSYwLPZUHrz4ZGa+t+kXjV9itvcHDLQouA=="], + + "vitefu": ["vitefu@1.1.3", "", { "peerDependencies": { "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" }, "optionalPeers": ["vite"] }, "sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg=="], + + "volar-service-css": ["volar-service-css@0.0.71", "", { "dependencies": { "vscode-css-languageservice": "^6.3.0", "vscode-languageserver-textdocument": "^1.0.11", "vscode-uri": "^3.0.8" }, "peerDependencies": { "@volar/language-service": "~2.4.0" }, "optionalPeers": ["@volar/language-service"] }, "sha512-wRRFt9BpjMKCazcgOh67MSjUjiWUCAh99DyYSDIOTuxaRjEtDC7PpB0k1Y1wbJIW/pVtMUSVbpPo3UGSm0Byxw=="], + + "volar-service-emmet": ["volar-service-emmet@0.0.71", "", { "dependencies": { "@emmetio/css-parser": "^0.4.1", "@emmetio/html-matcher": "^1.3.0", "@vscode/emmet-helper": "^2.9.3", "vscode-uri": "^3.0.8" }, "peerDependencies": { "@volar/language-service": "~2.4.0" }, "optionalPeers": ["@volar/language-service"] }, "sha512-zqjzt6bN95e3CUstBm0PBFAJnrfz0ZAARka87fart46/gNCLLuP3Vujy8V/J8HEziTFLnfkgIASLFYPUhonJcA=="], + + "volar-service-html": ["volar-service-html@0.0.71", "", { "dependencies": { "vscode-html-languageservice": "^5.3.0", "vscode-languageserver-textdocument": "^1.0.11", "vscode-uri": "^3.0.8" }, "peerDependencies": { "@volar/language-service": "~2.4.0" }, "optionalPeers": ["@volar/language-service"] }, "sha512-e8tHPhgQ7ooLfudAEIku+kgd9pWkq3SSz8RbnQDI1+Eb8wbenkLGHqoirLqz5ORLV6wIMr2Iv08RWBG5eOcgpw=="], + + "volar-service-prettier": ["volar-service-prettier@0.0.71", "", { "dependencies": { "vscode-uri": "^3.0.8" }, "peerDependencies": { "@volar/language-service": "~2.4.0", "prettier": "^2.2 || ^3.0" }, "optionalPeers": ["@volar/language-service", "prettier"] }, "sha512-Rz7JVH3qD108UCdmIEiZvOBNljMt2nLFdbN8AXcDfn7xD9F5I2aCIsDVqBbXw21PsnxG0b7MfwtNF+zPS/NKUg=="], + + "volar-service-typescript": ["volar-service-typescript@0.0.71", "", { "dependencies": { "path-browserify": "^1.0.1", "semver": "^7.6.2", "typescript-auto-import-cache": "^0.3.5", "vscode-languageserver-textdocument": "^1.0.11", "vscode-nls": "^5.2.0", "vscode-uri": "^3.0.8" }, "peerDependencies": { "@volar/language-service": "~2.4.0" }, "optionalPeers": ["@volar/language-service"] }, "sha512-yTtM/BVT6hoyEYnDtaCyAtNhdNeS/mhTTABlBOdw3NNiRBUin3IznFJpgfjer4c6RYopiPjjQjc9VFhxVl1mLw=="], + + "volar-service-typescript-twoslash-queries": ["volar-service-typescript-twoslash-queries@0.0.71", "", { "dependencies": { "vscode-uri": "^3.0.8" }, "peerDependencies": { "@volar/language-service": "~2.4.0" }, "optionalPeers": ["@volar/language-service"] }, "sha512-9K2k72s4n7rV9s4bX0MyjbX9iBribvKZbBJKuEmTCZfeWJXs6Yh7bGpY4eoc7UufAjvpheBqwyZCOIPBvxCv0A=="], + + "volar-service-yaml": ["volar-service-yaml@0.0.71", "", { "dependencies": { "vscode-uri": "^3.0.8", "yaml-language-server": "~1.23.0" }, "peerDependencies": { "@volar/language-service": "~2.4.0" }, "optionalPeers": ["@volar/language-service"] }, "sha512-qYGWGuVpUTnZGu5P/CR4KLK4aIR8RrcVnmfZ2eRcj9q/I8VZCoC5yy9FtEvfNvnDp4MU17yhdJcvpQPIqhJS2Q=="], + + "vscode-css-languageservice": ["vscode-css-languageservice@6.3.10", "", { "dependencies": { "@vscode/l10n": "^0.0.18", "vscode-languageserver-textdocument": "^1.0.12", "vscode-languageserver-types": "3.17.5", "vscode-uri": "^3.1.0" } }, "sha512-eq5N9Er3fC4vA9zd9EFhyBG90wtCCuXgRSpAndaOgXMh1Wgep5lBgRIeDgjZBW9pa+332yC9+49cZMW8jcL3MA=="], + + "vscode-html-languageservice": ["vscode-html-languageservice@5.6.2", "", { "dependencies": { "@vscode/l10n": "^0.0.18", "vscode-languageserver-textdocument": "^1.0.12", "vscode-languageserver-types": "^3.17.5", "vscode-uri": "^3.1.0" } }, "sha512-ulCrSnFnfQ16YzvwnYUgEbUEl/ZG7u2eV27YhvLObSHKkb8fw1Z9cgsnUwjTEeDIdJDoTDTDpxuhQwoenoLNMg=="], + + "vscode-json-languageservice": ["vscode-json-languageservice@4.1.8", "", { "dependencies": { "jsonc-parser": "^3.0.0", "vscode-languageserver-textdocument": "^1.0.1", "vscode-languageserver-types": "^3.16.0", "vscode-nls": "^5.0.0", "vscode-uri": "^3.0.2" } }, "sha512-0vSpg6Xd9hfV+eZAaYN63xVVMOTmJ4GgHxXnkLCh+9RsQBkWKIghzLhW2B9ebfG+LQQg8uLtsQ2aUKjTgE+QOg=="], + + "vscode-jsonrpc": ["vscode-jsonrpc@10.0.0", "", {}, "sha512-USSfxg0vDIpTQqlQBGxF3mBARyoS8cU7LHLpbYNh6dOJt32dlskxPWB0Irrh5TllTmyf7oNLAvqDqzklbwwnpA=="], + + "vscode-languageserver": ["vscode-languageserver@9.0.1", "", { "dependencies": { "vscode-languageserver-protocol": "3.17.5" }, "bin": { "installServerIntoExtension": "bin/installServerIntoExtension" } }, "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g=="], + + "vscode-languageserver-protocol": ["vscode-languageserver-protocol@3.18.5", "", { "dependencies": { "vscode-jsonrpc": "10.0.0", "vscode-languageserver-types": "3.18.5" } }, "sha512-FW4fBMzZ99N8xeob4py0l050wgCoRgTpEq5Xcsb9lM1bc29UKGR/wSV+4knaqFxssFHajy7OzNiKP/m3U1ZEuA=="], + + "vscode-languageserver-textdocument": ["vscode-languageserver-textdocument@1.0.16", "", {}, "sha512-qeNEuOi9a3qkqRf7Gfez2WL2VwlBTLCNekHBGO9kxPVUp9XuY15yfTJ9jwvOwKI0I2MhUUfZq95NSp+LK1CLQg=="], + + "vscode-languageserver-types": ["vscode-languageserver-types@3.18.5", "", {}, "sha512-kPd6+JQNz3HMJvjKlqUxERSlZHAntl/aGpsk7ImwIh0ewDKDcjgAEyVSYciPiOJD3ftbK9IrfiqUeTZLSbCizw=="], + + "vscode-nls": ["vscode-nls@5.2.0", "", {}, "sha512-RAaHx7B14ZU04EU31pT+rKz2/zSl7xMsfIZuo8pd+KZO6PXtQmpevpq3vxvWNcrGbdmhM/rr5Uw5Mz+NBfhVng=="], + + "vscode-uri": ["vscode-uri@3.2.0", "", {}, "sha512-m2gXo3bn0G1kT9InzMf07fTbqMbGtyckj3bH5ktLO+1Ssv+yiATZ4dhwaQv9UZWxJh6E9IFGnQyjgWVDWVBDrg=="], + + "wrap-ansi": ["wrap-ansi@9.0.2", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww=="], + + "xxhash-wasm": ["xxhash-wasm@1.1.0", "", {}, "sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA=="], + + "y18n": ["y18n@5.0.8", "", {}, "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="], + + "yaml": ["yaml@2.9.1", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw=="], + + "yaml-language-server": ["yaml-language-server@1.23.0", "", { "dependencies": { "@vscode/l10n": "^0.0.18", "ajv": "^8.17.1", "ajv-draft-04": "^1.0.0", "ajv-i18n": "^4.2.0", "prettier": "^3.8.1", "request-light": "^0.5.7", "vscode-json-languageservice": "4.1.8", "vscode-languageserver": "^9.0.0", "vscode-languageserver-textdocument": "^1.0.1", "vscode-languageserver-types": "^3.16.0", "vscode-uri": "^3.0.2", "yaml": "2.8.3" }, "bin": { "yaml-language-server": "bin/yaml-language-server" } }, "sha512-3qVyCOexLCWw06PQa5kRPwvMWMZ/eZeCRWUvgD6a0OkqL/4iCnxy2WumbWifa937Uo5xhyWJ0uxlU39ljhNh7A=="], + + "yargs": ["yargs@18.2.0", "", { "dependencies": { "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "string-width": "^8.2.1", "y18n": "^5.0.5", "yargs-parser": "^22.0.0" } }, "sha512-9OpKOLeaoNFecEp7P6iYbzze/5CqWoH7N3SMs/6y1XF4nMvFMspEGZzJ6uFi9MmQwXhyzqYoSEKO3tvA3Z/o2w=="], + + "yargs-parser": ["yargs-parser@22.0.0", "", {}, "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw=="], + + "yocto-queue": ["yocto-queue@1.2.2", "", {}, "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ=="], + + "zod": ["zod@4.6.7", "", {}, "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg=="], + + "zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="], + + "@astrojs/compiler-binding-wasm32-wasi/@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.2.7", "", { "dependencies": { "@tybys/wasm-util": "^0.10.3" }, "peerDependencies": { "@emnapi/core": "^1.7.1 || 2.0.0-beta.2 || 2.0.0-beta.3", "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2 || 2.0.0-beta.3" } }, "sha512-zJccwplOAbgfZju95IUHazLnx9RAPtPN2YGJXI6UbrgeaR9QfPjGrQL6ERkSAtnVCA4Q+83ApGyaX5zdpCaKkQ=="], + + "@bruits/satteri-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.11.1", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.2", "tslib": "^2.4.0" } }, "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ=="], + + "@bruits/satteri-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.11.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw=="], + + "@bruits/satteri-wasm32-wasi/@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.2.7", "", { "dependencies": { "@tybys/wasm-util": "^0.10.3" }, "peerDependencies": { "@emnapi/core": "^1.7.1 || 2.0.0-beta.2 || 2.0.0-beta.3", "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2 || 2.0.0-beta.3" } }, "sha512-zJccwplOAbgfZju95IUHazLnx9RAPtPN2YGJXI6UbrgeaR9QfPjGrQL6ERkSAtnVCA4Q+83ApGyaX5zdpCaKkQ=="], + + "@rolldown/binding-wasm32-wasi/@emnapi/core": ["@emnapi/core@2.0.0-beta.2", "", { "dependencies": { "@emnapi/wasi-threads": "2.2.0", "tslib": "^2.4.0" } }, "sha512-MzCVoWtcg4Pm2B3je5mMvYMvj3MmBKw+fU7vbsJc9/iT8ip6/eYIHo/Dsm/mr+wsHB6SEyJDuxB09Yy6r/8+4A=="], + + "@rolldown/binding-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@2.0.0-beta.2", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-JcrSPzPvZuNZvJqPTF9Fw25LbOJ8avzFVlaf2grmH4Cku0oGP47tRgqPZadcfj3YoZMHkFVnCYFbQM8I+i5QEw=="], + + "@rolldown/binding-wasm32-wasi/@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.2.6", "", { "dependencies": { "@tybys/wasm-util": "^0.10.3" }, "peerDependencies": { "@emnapi/core": "^1.7.1 || 2.0.0-beta.2", "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2" } }, "sha512-mRyDmEw9/fCDXCGfL1sbgIw/GUK0PVxRW4YwgPN61F3LQ+fSyoBFarJVzgGyhF6kRzEQZ0FejDqm4WLXSeqQmw=="], + + "@vscode/emmet-helper/jsonc-parser": ["jsonc-parser@2.3.1", "", {}, "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg=="], + + "anymatch/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], + + "cliui/string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], + + "csso/css-tree": ["css-tree@2.2.1", "", { "dependencies": { "mdn-data": "2.0.28", "source-map-js": "^1.0.1" } }, "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA=="], + + "vscode-css-languageservice/vscode-languageserver-types": ["vscode-languageserver-types@3.17.5", "", {}, "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg=="], + + "vscode-languageserver/vscode-languageserver-protocol": ["vscode-languageserver-protocol@3.17.5", "", { "dependencies": { "vscode-jsonrpc": "8.2.0", "vscode-languageserver-types": "3.17.5" } }, "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg=="], + + "wrap-ansi/string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], + + "yaml-language-server/request-light": ["request-light@0.5.8", "", {}, "sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg=="], + + "yaml-language-server/yaml": ["yaml@2.8.3", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg=="], + + "@bruits/satteri-wasm32-wasi/@emnapi/core/@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.2", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA=="], + + "@rolldown/binding-wasm32-wasi/@emnapi/core/@emnapi/wasi-threads": ["@emnapi/wasi-threads@2.2.0", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-JP7OYH38Q7+pyTAe14raZHLQIK7BDKbdwji+Xi3pcd/6QkJYQH3SX4wu6EplGrGJWRepoNzedfm0G3B9Z4e9Rw=="], + + "csso/css-tree/mdn-data": ["mdn-data@2.0.28", "", {}, "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g=="], + + "vscode-languageserver/vscode-languageserver-protocol/vscode-jsonrpc": ["vscode-jsonrpc@8.2.0", "", {}, "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA=="], + + "vscode-languageserver/vscode-languageserver-protocol/vscode-languageserver-types": ["vscode-languageserver-types@3.17.5", "", {}, "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg=="], + } +} diff --git a/site/demo/backend.ts b/site/demo/backend.ts new file mode 100644 index 00000000..cbbee05a --- /dev/null +++ b/site/demo/backend.ts @@ -0,0 +1,621 @@ +/** + * The demo's backend: answers the real backend gave, recorded over a + * synthetic archive and replayed here. Nothing is saved: a change goes + * through as far as the app can see and is kept nowhere (`writes.ts`). + * + * Responsible for: answering a command from the recording, in this order: + * a batch lookup item by item; the exact call (opening the file of the day + * or site it belongs to, see `shards.ts`); a History list worked out from + * every recorded visit (`timeline.ts`); a page opened in a new tab; a + * change (`writes.ts`); an Insights card's section from the batch it came + * in; the same command with the closest arguments; + * otherwise the demo's refusal. Every app snapshot says the archive's + * owner kept Insights in its own time zone on this computer. Not + * responsible for: how the app reaches it (`transport/`), or making the + * recording (`record.ts`). + */ +import type { + SearchEvent, + SearchHit, + SearchRequest, + SearchStarted, + SearchStep, +} from '@/lib/backend-client/search' +import { readStoredLanguagePreference, resolveLanguage } from '@/lib/i18n' +import { CommandInvokeError } from '@/lib/ipc/command-error' +import { computerTimeZone } from '@/lib/time-zone' +import type { + AppSnapshot, + HistoryEntry, + HistoryQuery, + HistoryQueryResponse, +} from '@/lib/types' +import { shardOf } from './shards' +import { unpackTimeline, type PackedTimeline } from './timeline' +import { writes, type Recorded } from './writes' + +/** One command the app sent while recording, and what came back. */ +export interface RecordedCall { + command: string + args: unknown + status: number + response: unknown +} + +/** One search the app ran while recording, and the events it streamed. */ +export interface RecordedSearch { + request: SearchRequest + started: SearchStarted + events: SearchEvent[] +} + +export interface Recording { + /** When the recording was made; the demo's clock starts here. */ + recordedAt: string + /** The time zone it was made in (the archive's), as an IANA name. */ + zone: string + calls: RecordedCall[] + searches: RecordedSearch[] + /** Every page the search index held, each with its latest visit. */ + pages: SearchHit[] +} + +const refusal = { + en: 'The demo can’t do this: it runs in your browser and saves nothing.', + 'zh-TW': 'demo 做不到這件事:它在瀏覽器裡跑,什麼都不會儲存。', + 'zh-CN': 'demo 做不到这件事:它在浏览器里运行,什么都不会保存。', +} + +/** JSON with object keys sorted, so equal arguments give equal keys. */ +export function canonical(value: unknown): string { + if (Array.isArray(value)) return `[${value.map(canonical).join(',')}]` + if (value && typeof value === 'object') + return `{${Object.keys(value) + .filter((k) => (value as Record)[k] !== undefined) + .sort() + .map( + (k) => + `${JSON.stringify(k)}:${canonical((value as Record)[k])}`, + ) + .join(',')}}` + return JSON.stringify(value ?? null) +} + +const keyOf = (command: string, args: unknown) => + `${command} ${canonical(args)}` + +/** + * Commands that look up a batch of items, one answer per item, for the rows + * on screen. Which rows those are depends on where the visitor scrolled, so + * each item is answered from every item the recording looked up. + */ +type Lookup = { + items: (args: Record) => unknown[] + key: (item: unknown) => string + /** Builds the reply from the recorded answers, by item key. */ + reply: (items: unknown[], known: Map) => unknown + /** Each recorded answer's items, keyed like the request's. */ + learn: ( + args: Record, + response: unknown, + ) => [string, unknown][] +} +type Entry = { url: string } +const perItem = (field: string, fallback: (item: Entry) => object): Lookup => ({ + items: (args) => (args[field] as unknown[]) ?? [], + key: (item) => (item as Entry).url, + learn: (_, response) => + (response as Entry[]).map((answer) => [answer.url, answer]), + reply: (items, known) => + (items as Entry[]).map((item) => ({ + ...fallback(item), + ...(known.get(item.url) as object), + ...item, + })), +}) +const lookups: Record = { + load_history_favicons: perItem('entries', () => ({ favicon: null })), + // The recording ran offline; the demo shows every page without a preview + // image rather than "blocked". + load_history_og_images: { + items: (args) => (args.entries as unknown[]) ?? [], + key: (item) => (item as Entry).url, + learn: () => [], + reply: (items) => + (items as Entry[]).map(({ url }) => ({ + url, + ogImage: null, + fetchStatus: 'missing', + })), + }, + load_site_favicons: { + items: (args) => (args.domains as string[]) ?? [], + key: (domain) => domain as string, + learn: (_, response) => + (response as { domain: string }[]).map((answer) => [ + answer.domain, + answer, + ]), + reply: (domains, known) => + (domains as string[]).map( + (domain) => known.get(domain) ?? { domain, favicon: null }, + ), + }, + get_star_status: { + items: (args) => + ((args.request as { entityKeys?: string[] })?.entityKeys ?? + []) as unknown[], + key: (key) => key as string, + learn: (_, response) => Object.entries(response as Record), + reply: (keys, known) => + Object.fromEntries( + (keys as string[]).map((key) => [key, known.get(key) ?? false]), + ), + }, +} + +const exact = new Map() +const byCommand = new Map() +const known = new Map>() +const searches = new Map() +let pages: SearchHit[] = [] +let lastStep: SearchStep | null = null +/** Every visit, newest first; read from `recording/timeline.json` when first needed. */ +let timeline: HistoryEntry[] | undefined +/** How a recorded word search (⌘K) said the index stood. */ +let searchState: HistoryQueryResponse['searchState'] = null + +export function takeRecording(recording: Recording) { + for (const call of recording.calls) { + exact.set(keyOf(call.command, call.args), call) + byCommand.set(call.command, [...(byCommand.get(call.command) ?? []), call]) + const lookup = lookups[call.command] + if (lookup && call.status < 400) { + const map = known.get(call.command) ?? new Map() + for (const [key, value] of lookup.learn( + call.args as Record, + call.response, + )) + map.set(key, value) + known.set(call.command, map) + } + } + for (const search of recording.searches ?? []) { + searches.set(canonical(search.request), search) + for (const event of search.events) + if (event.type === 'step' && !event.data.provisional) + lastStep = event.data + } + pages = recording.pages ?? [] + searchState = + ( + recording.calls.find( + (call) => + call.command === 'query_history' && + (call.response as HistoryQueryResponse)?.searchState, + )?.response as HistoryQueryResponse | undefined + )?.searchState ?? null +} + +/** The recording's files, each fetched once, when first needed. */ +const opened = new Map>() +function open(name: string): Promise { + if (!opened.has(name)) + opened.set( + name, + fetch(`./recording/${name}.json`).then((response) => + response.ok ? response.json() : null, + ), + ) + return opened.get(name) as Promise +} + +/** Takes in a day's or a site's file the first time one of its calls is asked for. */ +async function openShard(command: string, args: unknown) { + const shard = shardOf(command, args) + if (!shard || opened.has(shard)) { + if (shard) await opened.get(shard) + return + } + const calls = await open(shard) + for (const call of calls ?? []) { + exact.set(keyOf(call.command, call.args), call) + byCommand.set(call.command, [...(byCommand.get(call.command) ?? []), call]) + } +} + +/** Every visit, newest first, as History lists them. */ +async function everyVisit(): Promise { + timeline ??= unpackTimeline( + (await open('timeline')) ?? { + pages: [], + profiles: [], + apps: [], + visits: [], + }, + ) + return timeline +} + +/** Every word of `query` in the page's title or address. */ +const matchesWords = (query: string) => { + const words = query.toLowerCase().split(/\s+/).filter(Boolean) + return (visit: HistoryEntry) => { + const text = `${visit.title ?? ''} ${visit.url}`.toLowerCase() + return words.every((word) => text.includes(word)) + } +} + +/** + * A History list the recording has no exact answer for, worked out from + * what it holds: words (⌘K) over every page; anything else (a date range, + * a browser, a site, a page further down) over every visit. + */ +async function historyList( + query: HistoryQuery, +): Promise { + if (query.regexMode) return null + const kept = (visit: HistoryEntry) => + (!query.profileId || visit.profileId === query.profileId) && + (!query.browserKind || + visit.profileId.startsWith(`${query.browserKind}:`)) && + (!query.domain || + visit.domain === query.domain || + visit.domain.endsWith(`.${query.domain}`)) && + (query.startTimeMs == null || visit.visitTime >= query.startTimeMs) && + (query.endTimeMs == null || visit.visitTime <= query.endTimeMs) + let rows: HistoryEntry[] + if (query.q) { + if (!query.groupByUrl) return null + rows = pages + .map((hit) => hit.visit) + .filter((visit) => kept(visit) && matchesWords(query.q ?? '')(visit)) + rows.sort( + (a, b) => + (query.sort === 'relevance' + ? (b.visitCount ?? 0) - (a.visitCount ?? 0) + : 0) || b.visitTime - a.visitTime, + ) + } else { + const visits = await everyVisit() + if (visits.length === 0) return null + rows = visits.filter(kept) + } + if (query.sort === 'oldest') rows.reverse() + const cursorOf = (row: HistoryEntry) => + query.q ? `demo:${row.url}` : `${row.visitTime}|${row.id}` + const start = query.cursor + ? rows.findIndex((row) => cursorOf(row) === query.cursor) + 1 + : 0 + const limit = query.limit ?? 100 + const items = rows.slice(start, start + limit) + const hasNext = start + limit < rows.length + return { + searchState: query.q ? searchState : null, + total: items.length, + totalExact: false, + totalVisits: query.q + ? items.reduce((sum, row) => sum + (row.visitCount ?? 1), 0) + : null, + items, + page: 1, + pageSize: limit, + pageCount: 1, + hasPrevious: start > 0, + hasNext, + nextCursor: + hasNext && items.length > 0 ? cursorOf(items[items.length - 1]) : null, + } +} + +/** Every leaf of a JSON value, by its path. */ +function leaves(value: unknown, at = '', into = new Map()) { + if (value && typeof value === 'object') + for (const [key, inner] of Object.entries(value)) + leaves(inner, `${at}.${key}`, into) + else into.set(at, value) + return into +} + +const DAY = 86_400_000 +const asTime = (value: unknown) => + typeof value === 'string' && /^\d{4}-\d{2}-\d{2}/.test(value) + ? Date.parse(value) + : typeof value === 'number' && value > 1e12 + ? value + : null + +/** + * How alike two calls' arguments are: one point per equal leaf, less a + * little for each day between dates in the same place. A custom date range + * gets the recorded range closest to it. + */ +function likeness( + wanted: Map, + recorded: Map, +) { + let score = 0 + for (const [at, value] of wanted) { + const other = recorded.get(at) + if (other === value) score += 1 + else { + const [a, b] = [asTime(value), asTime(other)] + if (a !== null && b !== null) + score -= Math.min(Math.abs(a - b) / DAY, 3650) / 3650 + } + } + return score +} + +function refuse(command: string): never { + console.warn('[demo] not recorded:', command) + const language = resolveLanguage(readStoredLanguagePreference()) + throw new CommandInvokeError(refusal[language] ?? refusal.en, { + code: 'demo', + }) +} + +function replay(call: RecordedCall) { + if (call.status >= 400) { + const envelope = (call.response ?? {}) as Record + throw new CommandInvokeError( + envelope.message ?? `"${call.command}" failed.`, + { + cause: call.response, + code: envelope.code, + actionHint: envelope.actionHint, + retryHint: envelope.retryHint, + }, + ) + } + return structuredClone(call.response) +} + +/** + * Insights read their cards in two batches (`features/insights/overview.ts`); + * a card reads its own only when its copy went stale, after a backup, say. + * The recording holds those sections only inside their batch: by the + * command a card reads with, its batch and the field there. + */ +const inBatch: Record = { + get_digest_summary: ['get_intelligence_primary_overview', 'digestSummary'], + get_top_sites: ['get_intelligence_primary_overview', 'topSites'], + get_refind_pages: ['get_intelligence_primary_overview', 'refindPages'], + get_search_engine_ranking: [ + 'get_intelligence_primary_overview', + 'searchEngineRanking', + ], + get_top_search_concepts: [ + 'get_intelligence_primary_overview', + 'topSearchConcepts', + ], + get_query_families: ['get_intelligence_primary_overview', 'queryFamilies'], + get_activity_mix: ['get_intelligence_primary_overview', 'activityMix'], + get_discovery_trend: [ + 'get_intelligence_primary_overview', + 'discoveryTrendDay', + ], + get_habit_patterns: ['get_intelligence_primary_overview', 'habitPatterns'], + get_stable_sources: ['get_intelligence_secondary_overview', 'stableSources'], + get_search_effectiveness: [ + 'get_intelligence_secondary_overview', + 'searchEffectiveness', + ], + get_friction_signals: [ + 'get_intelligence_secondary_overview', + 'frictionSignals', + ], + get_reopened_investigations: [ + 'get_intelligence_secondary_overview', + 'reopenedInvestigations', + ], + get_breadth_index: ['get_intelligence_secondary_overview', 'breadthIndex'], + get_path_flows: ['get_intelligence_secondary_overview', 'pathFlows'], + get_compare_sets: ['get_intelligence_secondary_overview', 'compareSets'], + get_multi_browser_diff: [ + 'get_intelligence_secondary_overview', + 'multiBrowserDiff', + ], +} + +type CardRequest = { + dateRange?: unknown + profileId?: unknown + cursor?: unknown + sortBy?: unknown +} + +/** The range and profile a card or batch is for, without its page or order. */ +const scopeOf = (args: unknown) => { + const request = (args as { request?: CardRequest } | null)?.request + return canonical({ + dateRange: request?.dateRange, + profileId: request?.profileId ?? null, + }) +} + +/** + * A card's section from the batch for the same range: what the backend + * computed for that card there. Only a first page in the usual order, the + * one a batch holds. + */ +function fromBatch(command: string, args: unknown): unknown { + const where = inBatch[command] + const request = (args as { request?: CardRequest } | null)?.request + if (!where || !request || request.cursor != null) return undefined + if (request.sortBy != null && request.sortBy !== 'visits') return undefined + const [batch, field] = where + const scope = scopeOf(args) + const call = byCommand + .get(batch) + ?.find( + (recorded) => recorded.status < 400 && scopeOf(recorded.args) === scope, + ) + if (!call) return undefined + return structuredClone((call.response as Record)[field]) +} + +/** What the recording says now, for building the answer to a change. */ +const recorded: Recorded = { + latest(command: string) { + const call = byCommand.get(command)?.at(-1) + if (!call) refuse(command) + return replay(call) as T + }, + exactly(command: string, args: unknown) { + const call = exact.get(keyOf(command, args)) + return call ? (replay(call) as T) : undefined + }, +} + +/** The commands whose answer is the app snapshot, which holds the settings. */ +const snapshotCommands = new Set([ + 'app_snapshot', + 'save_config', + 'set_content_fetch_settings', + 'store_ai_provider_api_key', + 'clear_ai_provider_api_key', +]) + +/** + * The archive's owner kept Insights in its own time zone on the visitor's + * computer, so the app does not offer to move them: they stay in the zone + * the recording computed them in (`features/insights/zone.ts`). + */ +const keptZone = (snapshot: AppSnapshot): AppSnapshot => ({ + ...snapshot, + config: { ...snapshot.config, insightsZoneKeptFor: computerTimeZone() }, +}) + +export async function answer(command: string, args: unknown): Promise { + const reply = await fromRecording(command, args) + return snapshotCommands.has(command) ? keptZone(reply as AppSnapshot) : reply +} + +async function fromRecording(command: string, args: unknown): Promise { + const lookup = lookups[command] + if (lookup) { + const items = lookup.items((args ?? {}) as Record) + return lookup.reply(items, known.get(command) ?? new Map()) + } + + await openShard(command, args) + const hit = exact.get(keyOf(command, args)) + if (hit) return replay(hit) + + if (command === 'query_history') { + const list = await historyList((args as { query: HistoryQuery }).query) + if (list) { + console.info( + '[demo] listed in the page:', + (args as { query: HistoryQuery }).query, + ) + return list + } + } + + if (command === 'open_visited_page' || command === 'open_external_url') { + const url = (args as { url?: string } | undefined)?.url + if (url && /^https?:\/\//.test(url)) + window.open(url, '_blank', 'noopener,noreferrer') + return '' + } + + const write = writes[command] + if (write) return write(args as never, recorded) + + const section = fromBatch(command, args) + if (section !== undefined) { + console.info('[demo] taken from its batch:', command) + return section + } + + const calls = byCommand.get(command) + if (!calls) refuse(command) + const wanted = leaves(args) + let best = calls[0] + let bestScore = -Infinity + for (const call of calls) { + const score = likeness(wanted, leaves(call.args)) + if (score > bestScore) [best, bestScore] = [call, score] + } + console.info('[demo] nearest answer:', command) + return replay(best) +} + +/** + * A search: the recorded one when the walk typed the same; otherwise the + * demo searches the recorded pages itself, every word in the title or the + * address (or the pattern, in regex mode). The ranking is simpler than the + * app's, the pages are the same. + */ +export function searchFor(request: SearchRequest): RecordedSearch { + const recorded = searches.get(canonical(request)) + if (recorded) return structuredClone(recorded) + console.info('[demo] searched in the page:', request.query) + const query = (request.query ?? '').trim() + let test: (text: string) => number + if (request.regex) { + let pattern: RegExp | null = null + try { + pattern = new RegExp(query, 'iu') + } catch { + // The app says so itself before it searches. + } + test = (text) => (pattern?.test(text) ? 1 : 0) + } else { + const words = query.toLowerCase().split(/\s+/).filter(Boolean) + test = (text) => { + const lower = text.toLowerCase() + return words.every((word) => lower.includes(word)) ? words.length : 0 + } + } + const hits = pages + .filter(({ visit }) => { + if (request.profileId && visit.profileId !== request.profileId) + return false + if ( + request.browserKind && + !visit.profileId.startsWith(`${request.browserKind}:`) + ) + return false + if (request.domain && !visit.domain.endsWith(request.domain)) return false + if (request.startTimeMs != null && visit.visitTime < request.startTimeMs) + return false + if (request.endTimeMs != null && visit.visitTime > request.endTimeMs) + return false + return !request.starred + }) + .map((hit) => ({ + ...hit, + score: test(hit.visit.title ?? '') * 2 + test(hit.visit.url), + })) + .filter((hit) => hit.score > 0) + const order: Record number> = { + newest: (a, b) => b.visit.visitTime - a.visit.visitTime, + oldest: (a, b) => a.visit.visitTime - b.visit.visitTime, + visits: (a, b) => (b.visit.visitCount ?? 0) - (a.visit.visitCount ?? 0), + relevance: (a, b) => + b.score - a.score || + (b.visit.visitCount ?? 0) - (a.visit.visitCount ?? 0), + } + hits.sort(order[request.sort ?? 'relevance'] ?? order.relevance) + const visits = hits.reduce((sum, hit) => sum + (hit.visit.visitCount ?? 1), 0) + const step = { + ...(lastStep as SearchStep), + page: 1, + items: hits, + provisional: false, + count: { value: hits.length, exact: true }, + visits: { value: visits, exact: true }, + cursor: null, + } + return { + request, + started: { sessionId: `demo-${Date.now()}`, indexer: step.indexer }, + events: [ + { type: 'indexer', data: step.indexer }, + { type: 'step', data: step }, + ], + } +} diff --git a/site/demo/boot.ts b/site/demo/boot.ts new file mode 100644 index 00000000..e23ea56e --- /dev/null +++ b/site/demo/boot.ts @@ -0,0 +1,76 @@ +/** + * The demo's entry: open in the landing page's language, load the + * recording, start the clock where the recording was made, then start the + * app itself, and tell the landing page once a screen is up. A recording + * run starts the app straight away, on the real clock, against the real + * backend. + */ +import { takeRecording, type Recording } from './backend' + +/** The app keeps its language here (`src/lib/i18n/provider.tsx`). */ +const LANGUAGE_KEY = 'pathkeep-language-preference' + +/** + * Shifts the page's clock so it reads `at` now and runs on from there, at + * the real clock's pace. The recorded answers were computed on that day; + * the app asks for "today" and "the last 7 days" by its own clock, and has + * to ask for the same days. + * + * Written here rather than taken from @sinonjs/fake-timers: its clock moves + * in fixed steps on a timer (20 ms by default, slower in a background tab), + * which makes the app's charts stutter. This only needs a subclass and a + * Proxy, the same in every browser. + */ +function startClockAt(at: number) { + const Real = Date + const offset = at - Real.now() + class DemoDate extends Real { + constructor(...args: ConstructorParameters | []) { + if (args.length === 0) super(Real.now() + offset) + else super(...(args as ConstructorParameters)) + } + static override now() { + return Real.now() + offset + } + // Dates the browser makes itself (structuredClone, for one) are still dates. + static [Symbol.hasInstance](value: unknown) { + return value instanceof Real + } + } + globalThis.Date = new Proxy(DemoDate, { + // `Date()` called without `new` is a string of now. + apply: () => new DemoDate().toString(), + }) as unknown as DateConstructor +} + +void (async () => { + const lang = new URLSearchParams(location.search).get('lang') + if (lang === 'en' || lang === 'zh-CN' || lang === 'zh-TW') { + try { + localStorage.setItem(LANGUAGE_KEY, lang) + } catch { + // Without storage the app follows the browser's language. + } + } + if (import.meta.env.MODE !== 'record') { + const recording = (await ( + await fetch('./recording/index.json') + ).json()) as Recording + takeRecording(recording) + startClockAt(Date.parse(recording.recordedAt)) + } + await import('@/main') + if (parent === window) return + // The landing page shows the window's glass until the app has drawn a screen. + const root = document.getElementById('root') + const drawn = new MutationObserver(() => { + if (!root?.querySelector('main')) return + drawn.disconnect() + requestAnimationFrame(() => + requestAnimationFrame(() => + parent.postMessage('pathkeep-demo-ready', location.origin), + ), + ) + }) + if (root) drawn.observe(root, { childList: true, subtree: true }) +})() diff --git a/site/demo/check.ts b/site/demo/check.ts new file mode 100644 index 00000000..ddb53fb5 --- /dev/null +++ b/site/demo/check.ts @@ -0,0 +1,253 @@ +/** + * Checks a built demo against its recording: walks `walk.ts` in Chrome (in + * English; other languages tour every screen by address) and fails if the + * app sent anything the recording has no answer for (exact, or worked out + * in the page from what it holds), or if the page threw. In English it also + * makes the changes a visitor would (a backup, the schedule, a star, a + * note, a setting) and fails if the app shows an error for one, then opens + * Insights again, whose cards read their own sections once the backup has + * made their copies stale. In another + * time zone the History date presets are worked out in the page, and lists + * the app asks for up to the visitor's own today take the recorded answer + * with the closest dates; both are reported, not failed. There it fails if + * Insights offer to move to the visitor's zone. + * Run after `vite build --config site/demo/vite.config.ts`. + * + * node site/demo/check.ts [--dir ] [--lang en] [--zone ] [--shots ] + */ +import { mkdirSync, readdirSync, readFileSync } from 'node:fs' +import { createServer } from 'node:http' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import { chromium } from '@playwright/test' +import { tour, walk } from './walk.ts' + +const here = path.dirname(fileURLToPath(import.meta.url)) +const argv = process.argv.slice(2) +const flag = (name: string) => + argv.includes(name) ? argv[argv.indexOf(name) + 1] : undefined +const dir = path.resolve(flag('--dir') ?? path.join(here, '../public/app')) +const lang = flag('--lang') ?? 'en' +const shots = flag('--shots') +const recordedIn = ( + JSON.parse(readFileSync(path.join(dir, 'recording/index.json'), 'utf8')) as { + zone: string + } +).zone +/** Where the visitor is; the recording's own zone unless told. */ +const zone = flag('--zone') ?? recordedIn +const elsewhere = zone !== recordedIn +const port = 4_397 +const base = `http://127.0.0.1:${port}` + +const types: Record = { + '.html': 'text/html', + '.js': 'text/javascript', + '.css': 'text/css', + '.json': 'application/json', + '.svg': 'image/svg+xml', + '.woff2': 'font/woff2', +} +const server = createServer((request, response) => { + const url = new URL(request.url ?? '/', base) + const file = path.join( + dir, + url.pathname === '/' ? 'index.html' : url.pathname, + ) + try { + const body = readFileSync(file) + response.writeHead(200, { + 'content-type': types[path.extname(file)] ?? 'application/octet-stream', + }) + response.end(body) + } catch { + response.writeHead(404).end() + } +}).listen(port, '127.0.0.1') + +const problems: string[] = [] +const workedOut: string[] = [] +const browser = await chromium.launch({ channel: 'chrome', headless: true }) +const page = await browser.newPage({ + viewport: { width: 1360, height: 860 }, + timezoneId: zone, +}) +page.on('pageerror', (error) => problems.push(`page error: ${error.message}`)) +page.on('console', (message) => { + const text = message.text() + if ( + /^\[demo\] ((listed|searched) in the page|taken from its batch)/.test(text) + ) + workedOut.push(text) + else if (elsewhere && text.startsWith('[demo] nearest answer')) + workedOut.push(text) + else if (text.startsWith('[demo]')) problems.push(text) +}) +page.setDefaultTimeout(10_000) +let shot = 0 +await page.goto(`${base}/?lang=${lang}`) +try { + await page.locator('main').first().waitFor({ timeout: 30_000 }) +} catch { + console.error( + `The demo did not start (${problems.join('; ') || 'no screen drawn'}). Is ${path.join(dir, 'recording/index.json')} there?`, + ) + process.exit(1) +} +await (lang === 'en' ? walk : tour)(page, { + base: `${base}/?lang=${lang}`, + settled: async (name) => { + if (!shots) return + mkdirSync(shots, { recursive: true }) + const file = `${String((shot += 1)).padStart(2, '0')}-${name.replace(/[^\w-]+/g, '_')}.png` + await page.screenshot({ path: path.join(shots, file) }) + }, + missed: (name, error) => + problems.push(`step ${name}: ${String(error).split('\n')[0]}`), +}) +// A search the walk never typed: the demo searches the recorded pages itself. +if (lang === 'en') { + const box = page.getByPlaceholder(/Search titles/).first() + await page.goto(`${base}/?lang=en#/browsing/history`) + await box.fill('marathon taper') + await page.waitForTimeout(800) + const found = await page + .locator('main') + .getByText(/marathon taper/i) + .count() + if (found === 0) problems.push('a search outside the recording found nothing') + if (shots) + await page.screenshot({ + path: path.join(shots, 'search-outside-the-recording.png'), + }) + + // Locking, never recorded: without a passcode the app says one comes + // first and opens its settings, as over the real backend. + await page.goto(`${base}/?lang=en#/browsing/home`) + await page.getByRole('button', { name: /Lock PathKeep/ }).click() + await page + .waitForURL(/#\/settings\/security/, { timeout: 5_000 }) + .catch(() => problems.push('locking did not lead to the passcode settings')) + + // Changes go through on screen with no error, and are kept nowhere + // (writes.ts): a backup, the backup schedule, a star, a note, a setting. + const change = async ( + name: string, + act: () => Promise, + says?: RegExp, + ) => { + try { + await act() + if (says) await page.getByText(says).first().waitFor({ timeout: 5_000 }) + await page.waitForTimeout(800) + const shown = await page + .locator('[data-sonner-toast][data-type="error"], main [role="alert"]') + .count() + if (shown > 0) problems.push(`${name}: the app showed an error`) + } catch (error) { + problems.push(`${name}: ${String(error).split('\n')[0]}`) + } + } + await page.goto(`${base}/?lang=en#/browsing/home`) + await change( + 'back up now', + () => page.getByRole('button', { name: 'Back up now' }).first().click(), + /no new visits/, + ) + await page.goto(`${base}/?lang=en#/browsing/backup`) + await change('the backup schedule', async () => { + await page.getByRole('radio', { name: 'Every 6h' }).click() + await page + .getByRole('dialog') + .getByRole('button', { name: 'Update' }) + .click() + }) + await page.goto(`${base}/?lang=en#/browsing/history`) + await page + .getByRole('listbox', { name: 'History timeline' }) + .getByRole('option') + .first() + .click() + await change( + 'a star', + () => page.getByRole('button', { name: 'Star this page' }).click(), + /^Starred$/, + ) + await change( + 'a note', + () => + page + .getByPlaceholder('Add a note you can search later') + .fill('Taper week starts Monday'), + /^Saved$/, + ) + await page.goto(`${base}/?lang=en#/settings`) + await change('a setting', () => + page + .getByRole('switch', { name: /Open at login/ }) + .first() + .click(), + ) + + // Insights again, after the backup made every card's copy stale: the + // cards read their own sections now (backend.ts takes them from their + // batch). A visitor in another time zone is not asked to move Insights + // to it: the archive's owner kept them in its own. + await page.goto(`${base}/?lang=en#/browsing/insights`) + await page.locator('main').first().waitFor() + await page.waitForLoadState('networkidle') + await page.waitForTimeout(1_000) + if ( + elsewhere && + (await page.getByRole('button', { name: /^Keep / }).count()) > 0 + ) + problems.push('Insights offer to move to the visitor’s time zone') + + // Pages the walk opens only one of: a day (the first, a middle and the + // last month recorded), every site, and History narrowed to a site and a + // day long ago. Each must come from its own file or the whole History list. + const months = readdirSync(path.join(dir, 'recording/days')).sort() + const dayIn = (month: string) => { + const calls = JSON.parse( + readFileSync(path.join(dir, 'recording/days', month), 'utf8'), + ) as { args: unknown }[] + return JSON.stringify(calls[0].args).match(/\d{4}-\d{2}-\d{2}/)![0] + } + const days = [ + months[0], + months[Math.floor(months.length / 2)], + months.at(-1)!, + ].map(dayIn) + const sites = readdirSync(path.join(dir, 'recording/site')).map((file) => + decodeURIComponent(file.replace(/\.json$/, '')), + ) + const opens = [ + ...days.map((day) => `browsing/insights/day/${day}`), + ...sites.map( + (site) => `browsing/insights/site/${encodeURIComponent(site)}`, + ), + `browsing/history?domain=${encodeURIComponent(sites[0])}`, + `browsing/history?date=${days[1]}`, + ] + for (const route of opens) { + await page.goto(`${base}/?lang=en#/${route}`) + await page.waitForLoadState('networkidle') + await page.waitForTimeout(300) + const empty = await page + .locator('main') + .getByText(/Couldn’t load/) + .count() + if (empty > 0) problems.push(`${route} could not load something`) + } +} +await browser.close() +server.close() + +if (problems.length > 0) { + console.error(`The demo strayed from its recording ${problems.length} times:`) + for (const problem of problems) console.error(` ${problem}`) + process.exit(1) +} +console.log( + `The demo answered every step of the walk from its recording${workedOut.length > 0 ? ` (${workedOut.length} worked out in the page or from the closest dates)` : ''}.`, +) diff --git a/site/demo/index.html b/site/demo/index.html new file mode 100644 index 00000000..23ade347 --- /dev/null +++ b/site/demo/index.html @@ -0,0 +1,14 @@ + + + + + + + + PathKeep demo + + +
+ + + diff --git a/site/demo/record.ts b/site/demo/record.ts new file mode 100644 index 00000000..d6c15b0b --- /dev/null +++ b/site/demo/record.ts @@ -0,0 +1,584 @@ +/** + * Makes the demo's recording: writes synthetic browsers, runs the real + * backend over them with its dev bridge, sets the archive up the way + * onboarding's defaults do, then walks the app (the `--mode record` build) + * through `walk.ts` in Chrome and keeps every command, answer and search. + * + * node site/demo/record.ts [--backend ] [--out ] [--shots ] + * + * The backend is a debug build with the dev bridge + * (`cargo build --manifest-path src-tauri/Cargo.toml --features devtools-bridge`), + * its `pathkeep-worker` beside it. Record from a clean checkout of the + * release: the About screen shows the build's version and commit. + * + * Everything runs in a fresh folder under the system's temp folder, never + * in your own PathKeep data, and is removed at the end. A debug PathKeep + * window may open while it runs; the walk does not use it. + * + * The answers carry the folders the backend ran in. Those are rewritten to + * the places a Mac keeps them, and the run fails if anything about this + * computer is left (home folder, user name, host name, Git e-mail, this + * checkout, its time zone). Everything runs in one fixed time zone for the + * same reason: Insights keep days in the computer's zone and say which. + */ +import { spawn, spawnSync, type ChildProcess } from 'node:child_process' +import { + constants, + copyFileSync, + mkdirSync, + readFileSync, + rmSync, + writeFileSync, +} from 'node:fs' +import { createServer } from 'node:http' +import { homedir, hostname, tmpdir, userInfo } from 'node:os' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import { chromium } from '@playwright/test' +import { writeSyntheticBrowsers } from '../../scripts/fixtures/synthetic-browsers.mjs' +import type { SearchHit } from '../../src/lib/backend-client/search.ts' +import type { + HistoryEntry, + HistoryQueryResponse, +} from '../../src/lib/types/archive.ts' +import type { RecordedCall, Recording } from './backend.ts' +import type { RecordLog } from './record/log.ts' +import { shardOf } from './shards.ts' +import { packTimeline, unpackTimeline } from './timeline.ts' +import { walk } from './walk.ts' + +/** + * The demo archive's time zone, for the synthetic browsing (written in + * local hours), the backend and the browser alike. The synthetic person + * looks up Taipei's weather, so they live there. + */ +const zone = 'Asia/Taipei' +const ownZone = Intl.DateTimeFormat().resolvedOptions().timeZone +process.env.TZ = zone + +const here = path.dirname(fileURLToPath(import.meta.url)) +const repo = path.resolve(here, '../..') +const argv = process.argv.slice(2) +const flag = (name: string) => + argv.includes(name) ? argv[argv.indexOf(name) + 1] : undefined +const backend = path.resolve( + flag('--backend') ?? + path.join(repo, 'var/demo-target/debug/pathkeep-desktop'), +) +const out = path.resolve(flag('--out') ?? path.join(here, 'public/recording')) +const shots = flag('--shots') + +const root = path.join(tmpdir(), 'pathkeep-demo-record') +const ipcPort = 43_190 +const appPort = 4_396 +const bridge = `http://127.0.0.1:${ipcPort}` +const appUrl = `http://127.0.0.1:${appPort}` +/** Only ever opens the throwaway archive made below. */ +const demoPassword = 'pathkeep-demo-archive' + +/** Where the demo says things are: a Mac user's own folders. */ +const home = '/Users/alex' +const places: [from: string, to: string][] = [ + ['PathKeep.app', '/Applications/PathKeep.app'], + ['project-root', `${home}/Library/Application Support/com.yi-ting.pathkeep`], + [ + 'browsers/chrome-user-data', + `${home}/Library/Application Support/Google/Chrome`, + ], + ['browsers/firefox', `${home}/Library/Application Support/Firefox`], + ['no-safari', `${home}/Library/Safari`], + ['os-sandbox', `${home}/Library`], +] +const words: [from: string, to: string][] = [ + ['com.yi-ting.pathkeep.demo-record.backup', 'com.yi-ting.pathkeep.backup'], + ['fixture@example.test', 'alex@example.com'], + ['work@example.test', 'alex@work.example.com'], +] + +const children: ChildProcess[] = [] +const stop = () => { + for (const child of children) child.kill('SIGTERM') +} +process.on('exit', stop) +for (const signal of ['SIGINT', 'SIGTERM'] as const) + process.on(signal, () => { + stop() + process.exit(1) + }) + +async function invoke(name: string, payload: unknown = {}): Promise { + const response = await fetch(`${bridge}/commands/${name}`, { + method: 'POST', + headers: { 'content-type': 'application/json' }, + body: JSON.stringify(payload), + }) + const body = (await response.json()) as T + if (!response.ok) throw new Error(`${name}: ${JSON.stringify(body)}`) + return body +} + +async function until( + what: string, + check: () => Promise, + seconds = 120, +): Promise { + for (let i = 0; i < seconds * 2; i += 1) { + try { + const value = await check() + if (value !== null) return value + } catch { + // Not up yet. + } + await new Promise((resolve) => setTimeout(resolve, 500)) + } + throw new Error(`Gave up waiting for ${what}.`) +} + +// 1. Synthetic browsers, and the app's two programs copied in, all under `root`. +rmSync(root, { recursive: true, force: true }) +const dir = (name: string) => { + const at = path.join(root, name) + mkdirSync(at, { recursive: true }) + return at +} +const programs = dir('PathKeep.app/Contents/MacOS') +for (const name of ['pathkeep-desktop', 'pathkeep-worker']) + copyFileSync( + path.join(path.dirname(backend), name), + path.join(programs, name), + constants.COPYFILE_FICLONE, + ) +const now = Date.now() +const browsers = writeSyntheticBrowsers(dir('browsers'), { now }) +console.log(`Wrote ${browsers.counts.total} synthetic visits.`) + +children.push( + spawn(path.join(programs, 'pathkeep-desktop'), [], { + stdio: 'inherit', + env: { + ...process.env, + CHB_PROJECT_ROOT: dir('project-root'), + CHB_CHROME_USER_DATA_DIR: browsers.chromeUserDataRoot, + CHB_FIREFOX_PROFILES_DIR: browsers.firefoxProfilesRoot, + CHB_SAFARI_ROOT: dir('no-safari'), + PATHKEEP_PLATFORM_TEST_SANDBOX_DIR: dir('os-sandbox'), + PATHKEEP_TEST_BLOCK_NETWORK: '1', + CHB_TEST_KEYRING_DIR: dir('keyring'), + PATHKEEP_PLATFORM_TEST_SCHEDULE_LABEL: + 'com.yi-ting.pathkeep.demo-record.backup', + PATHKEEP_ENABLE_DEV_IPC_BRIDGE: '1', + PATHKEEP_DEV_IPC_PORT: String(ipcPort), + PATHKEEP_DEV_IPC_ALLOWED_ORIGINS: appUrl, + TZ: zone, + }, + }), +) +await until('the backend', async () => + (await fetch(`${bridge}/health`)).ok ? true : null, +) + +// The demo pairs this checkout's frontend with this backend's answers: both +// must come from the same commit, with the app's code as committed. +{ + const head = spawnSync('git', ['rev-parse', 'HEAD'], { + cwd: repo, + encoding: 'utf8', + }).stdout.trim() + const changed = spawnSync( + 'git', + ['status', '--porcelain', '--', 'src', 'src-tauri'], + { + cwd: repo, + encoding: 'utf8', + }, + ).stdout.trim() + const built = await invoke<{ gitCommitFull: string }>('app_build_info') + if (built.gitCommitFull !== head || changed) + throw new Error( + `Record from one commit: the backend was built from ${built.gitCommitFull}, this checkout is at ${head}${changed ? ' with changes in src/ or src-tauri/' : ''}.`, + ) +} + +// 2. Set up as a new user who accepts onboarding's defaults: every browser, +// encrypted with the key in the keychain, backed up every hour. +type Snapshot = { + config: Record + browserProfiles: { profileId: string; historyExists: boolean }[] +} +const snapshot = await invoke('app_snapshot') +const selectedProfileIds = snapshot.browserProfiles + .filter((p) => p.historyExists && /^(chrome|firefox):/.test(p.profileId)) + .map((p) => p.profileId) +await invoke('initialize_archive', { + config: { + ...snapshot.config, + selectedProfileIds, + dueAfterHours: 1, + archiveMode: 'Encrypted', + rememberDatabaseKeyInKeyring: true, + preferredLanguage: 'system', + }, + databaseKey: demoPassword, +}) +await invoke('keyring_store_database_key', { value: demoPassword }) +const plan = await invoke('preview_schedule', {}) +await invoke('apply_schedule', { plan }) +const report = await invoke<{ run?: { newVisits?: number } }>( + 'run_backup_now', + { dueOnly: false }, +) +console.log( + `Backed up ${report.run?.newVisits ?? 0} visits from ${selectedProfileIds.length} profiles.`, +) +await until('the search index', async () => + (await invoke<{ phase: string }>('search_indexer_state')).phase === 'ready' + ? true + : null, +) + +// 3. The record build, served where the bridge accepts it. +const app = dir('app') +const built = spawnSync( + path.join(repo, 'node_modules/.bin/vite'), + [ + 'build', + '--config', + 'site/demo/vite.config.ts', + '--mode', + 'record', + '--outDir', + app, + '--logLevel', + 'warn', + ], + { + cwd: repo, + stdio: 'inherit', + env: { ...process.env, PATHKEEP_DEMO_BRIDGE: bridge }, + }, +) +if (built.status !== 0) throw new Error('The record build failed.') +const types: Record = { + '.html': 'text/html', + '.js': 'text/javascript', + '.css': 'text/css', + '.svg': 'image/svg+xml', + '.woff2': 'font/woff2', + '.png': 'image/png', +} +const server = createServer((request, response) => { + const url = new URL(request.url ?? '/', appUrl) + const file = path.join( + app, + url.pathname === '/' ? 'index.html' : url.pathname, + ) + try { + const body = readFileSync(file) + response.writeHead(200, { + 'content-type': types[path.extname(file)] ?? 'application/octet-stream', + }) + response.end(body) + } catch { + response.writeHead(404).end() + } +}).listen(appPort, '127.0.0.1') + +// 4. The walk. +const browser = await chromium.launch({ channel: 'chrome', headless: true }) +const page = await browser.newPage({ + viewport: { width: 1360, height: 860 }, + timezoneId: zone, +}) +page.on('pageerror', (error) => console.error(`[page error] ${error.message}`)) +let shot = 0 +const missed: string[] = [] +await page.goto(`${appUrl}/?lang=en`) +await walk(page, { + base: `${appUrl}/?lang=en`, + settled: async (name) => { + if (!shots) return + mkdirSync(shots, { recursive: true }) + await page.screenshot({ + path: path.join( + shots, + `${String((shot += 1)).padStart(2, '0')}-${name}.png`, + ), + }) + }, + missed: (name, error) => { + missed.push(name) + console.warn(`Missed ${name}: ${String(error).split('\n')[0]}`) + }, +}) +const log = (await page.evaluate(() => globalThis.pathkeepDemoLog)) as RecordLog +await browser.close() +server.close() + +// Every page the search index holds, for the searches the walk never typed: +// the demo answers those itself over this list. +async function everyPage(): Promise { + const request = { query: '.', regex: true, sort: 'newest', pageSize: 5000 } + const started = await invoke<{ sessionId: string }>('start_search', { + request, + }) + const stream = await fetch( + `${bridge}/searches/${encodeURIComponent(started.sessionId)}/events`, + ) + const reader = stream.body!.pipeThrough(new TextDecoderStream()).getReader() + let buffer = '' + for (;;) { + const { value, done } = await reader.read() + if (done) + throw new Error('The search for every page ended without an answer.') + buffer += value + for ( + let at = buffer.indexOf('\n\n'); + at >= 0; + at = buffer.indexOf('\n\n') + ) { + const data = buffer + .slice(0, at) + .split('\n') + .filter((line) => line.startsWith('data:')) + .map((line) => line.slice(5).trim()) + .join('\n') + buffer = buffer.slice(at + 2) + if (!data) continue + const event = JSON.parse(data) as { + type: string + data: { + provisional: boolean + items: SearchHit[] + count: { value: number; exact: boolean } + } + } + if (event.type === 'error') + throw new Error( + `The search for every page failed: ${JSON.stringify(event.data)}`, + ) + if (event.type !== 'step' || event.data.provisional) continue + await reader.cancel() + const { items, count } = event.data + if (!count.exact || items.length !== count.value) + throw new Error( + `The search for every page returned ${items.length} of ${count.value}.`, + ) + return items + } + } +} +const pages = await everyPage() + +/** Where a command takes its page cursor, if it pages. */ +function withCursor(args: unknown, cursor: string): unknown { + const copy = structuredClone(args) as Record + for (const holder of [copy, copy?.query, copy?.request] as Record< + string, + unknown + >[]) + if (holder && typeof holder === 'object' && 'cursor' in holder) { + holder.cursor = cursor + return copy + } + return null +} + +/** `args` with every string that reads `from` reading `to` instead. */ +function swapped(args: unknown, from: string, to: string): unknown { + return JSON.parse( + JSON.stringify(args, (_, value: unknown) => (value === from ? to : value)), + ) +} + +const seen = new Set( + log.calls.map((call) => `${call.command} ${JSON.stringify(call.args)}`), +) +/** Asks the backend and keeps the answer, once per command and arguments. */ +async function record(command: string, args: unknown): Promise { + const key = `${command} ${JSON.stringify(args)}` + const known = log.calls.find( + (call) => + call.command === command && + seen.has(key) && + JSON.stringify(call.args) === JSON.stringify(args), + ) + if (known) return known.response + seen.add(key) + const response = await invoke(command, args) + log.calls.push({ command, args, status: 200, response }) + return response +} + +// Insights' lists, five pages on, so a visitor can scroll on. (History's +// list comes whole, below.) +type Page = { items?: unknown[]; hasNext?: boolean; nextCursor?: string | null } +for (const first of [...log.calls]) { + if (first.command === 'query_history') continue + let response = first.response as Page | null + for ( + let n = 1; + n < 5 && response?.nextCursor && response.hasNext !== false; + n += 1 + ) { + const args = withCursor(first.args, response.nextCursor) + if (!args) break + response = (await record(first.command, args)) as Page + } +} + +// History's whole list, newest first: the demo works out any date range, +// browser, site or page further down from it. +type HistoryArgs = { query: Record } +const plain = log.calls.find((call) => { + const query = (call.args as HistoryArgs | null)?.query + return ( + call.command === 'query_history' && + query?.sort === 'newest' && + !query.cursor && + [ + 'q', + 'domain', + 'browserKind', + 'profileId', + 'startTimeMs', + 'endTimeMs', + ].every((key) => query[key] == null) + ) +}) +if (!plain) throw new Error('The walk never opened History.') +const visits: HistoryEntry[] = [] +for ( + let page = plain.response as HistoryQueryResponse; + ; + page = await invoke( + 'query_history', + withCursor(plain.args, page.nextCursor!), + ) +) { + visits.push(...page.items) + if (!page.hasNext || !page.nextCursor) break +} +const packed = packTimeline(visits) +{ + const unpacked = unpackTimeline(packed) + const at = visits.findIndex( + (visit, i) => JSON.stringify(unpacked[i]) !== JSON.stringify(visit), + ) + if (at >= 0) + throw new Error( + `The packed History list does not unpack to what the backend sent:\n sent ${JSON.stringify(visits[at])}\n read ${JSON.stringify(unpacked[at])}`, + ) +} + +// What a row shows when clicked, for every page the archive has. +for (const { visit } of pages) + for (const command of ['get_url_detail', 'get_url_annotation']) + await record(command, { url: visit.url }) + +// Every day's page in Insights, from the first of January of the archive's +// first year to today, and every site's: whichever a visitor opens is there. +const dayKey = (time: number) => + new Intl.DateTimeFormat('en-CA', { timeZone: zone }).format(time) +const first = dayKey(visits.at(-1)!.visitTime).slice(0, 4) +const days: string[] = [] +for ( + let at = Date.parse(`${first}-01-01T12:00:00Z`); + dayKey(at) <= dayKey(now); + at += 86_400_000 +) + days.push(dayKey(at)) +const dayShown = log.calls.filter((call) => + shardOf(call.command, call.args)?.startsWith('days/'), +) +if (dayShown.length === 0) throw new Error('The walk never opened a day.') +/** The day the walk opened, as its calls name it. */ +const walkedDay = JSON.stringify(dayShown[0].args).match( + /\d{4}-\d{2}-\d{2}/, +)![0] +for (const day of days) + for (const call of dayShown) + await record(call.command, swapped(call.args, walkedDay, day)) + +const siteShown = log.calls.filter((call) => + shardOf(call.command, call.args)?.startsWith('site/'), +) +if (siteShown.length === 0) throw new Error('The walk never opened a site.') +const walkedSite = ( + siteShown[0].args as { request: { registrableDomain: string } } +).request.registrableDomain +const sites = new Set() +JSON.stringify(log.calls, (key, value: unknown) => { + if (key === 'registrableDomain' && typeof value === 'string') sites.add(value) + return value +}) +for (const site of sites) + for (const call of siteShown) + await record(call.command, swapped(call.args, walkedSite, site)) +stop() + +// 5. Into files: the main one, the History list, a file per day and per +// site. Rewrite where things are, check nothing about this computer is +// left, then write them out. +const files = new Map() +const shards = new Map() +const main: RecordedCall[] = [] +for (const call of log.calls) { + const shard = shardOf(call.command, call.args) + if (shard) shards.set(shard, [...(shards.get(shard) ?? []), call]) + else main.push(call) +} +files.set('index', { + recordedAt: new Date(now).toISOString(), + zone, + calls: main, + searches: log.searches, + pages, +} satisfies Recording) +files.set('timeline', packed) +for (const [shard, calls] of shards) files.set(shard, calls) + +const real = (p: string) => [p, p.startsWith('/var/') ? `/private${p}` : p] +const user = userInfo().username +const email = spawnSync('git', ['config', 'user.email'], { + encoding: 'utf8', +}).stdout.trim() +const telling = [ + homedir(), + `/Users/${user}`, + `/home/${user}`, + hostname(), + email, + repo, + root, + tmpdir(), + '/var/folders/', + '/private/var/', + ownZone === zone ? '' : ownZone, +].filter((needle) => needle.length > 2) +const texts = new Map() +for (const [name, content] of files) { + let text = JSON.stringify(content) + for (const [from, to] of places) + for (const at of real(path.join(root, from))) text = text.replaceAll(at, to) + for (const [from, to] of words) text = text.replaceAll(from, to) + const leaks = telling.filter((needle) => text.includes(needle)) + if (leaks.length > 0) + throw new Error( + `recording/${name}.json still says where it was made: ${leaks.join(', ')}`, + ) + texts.set(name, text) +} +rmSync(out, { recursive: true, force: true }) +let bytes = 0 +for (const [name, text] of texts) { + const file = path.join(out, `${name}.json`) + mkdirSync(path.dirname(file), { recursive: true }) + writeFileSync(file, text) + bytes += text.length +} +console.log( + `Recorded ${log.calls.length} calls, ${log.searches.length} searches, ${visits.length} visits on ${pages.length} pages, ${days.length} days and ${sites.size} sites: ${texts.size} files, ${(bytes / 1e6).toFixed(1)} MB, in ${out}.`, +) +if (missed.length > 0) console.warn(`Steps not done: ${missed.join(', ')}`) +rmSync(root, { recursive: true, force: true }) +process.exit(missed.length > 0 ? 1 : 0) diff --git a/site/demo/record/bridge.ts b/site/demo/record/bridge.ts new file mode 100644 index 00000000..1f2cc7db --- /dev/null +++ b/site/demo/record/bridge.ts @@ -0,0 +1,34 @@ +/** + * Recording build: the app's own bridge to the real backend, with every + * command and its answer (or error) logged. + */ +import * as original from '@/lib/ipc/bridge' +import { CommandInvokeError } from '@/lib/ipc/command-error' +import { log } from './log' + +export type CommandPayload = original.CommandPayload + +export const invokeCommand: typeof original.invokeCommand = async ( + command: string, + payload?: CommandPayload, +) => { + try { + const response = await original.invokeCommand(command, payload) + log.calls.push({ command, args: payload ?? null, status: 200, response }) + return response + } catch (error) { + if (error instanceof CommandInvokeError) + log.calls.push({ + command, + args: payload ?? null, + status: 500, + response: { + message: error.message, + code: error.code, + actionHint: error.actionHint, + retryHint: error.retryHint, + }, + }) + throw error + } +} diff --git a/site/demo/record/log.ts b/site/demo/record/log.ts new file mode 100644 index 00000000..9d4b1ac1 --- /dev/null +++ b/site/demo/record/log.ts @@ -0,0 +1,34 @@ +/** + * What a recording run collects in the page: every command the app sent + * through the real bridge with its answer, and every search with the events + * it streamed. `record.ts` reads it out at the end of the walk. + */ +import type { + SearchEvent, + SearchRequest, + SearchStarted, +} from '@/lib/backend-client/search' +import type { RecordedCall, RecordedSearch } from '../backend' + +export interface RecordLog { + calls: RecordedCall[] + searches: RecordedSearch[] +} + +declare global { + var pathkeepDemoLog: RecordLog | undefined +} + +export const log: RecordLog = (globalThis.pathkeepDemoLog ??= { + calls: [], + searches: [], +}) + +export function logSearch( + request: SearchRequest, + started: SearchStarted, +): SearchEvent[] { + const events: SearchEvent[] = [] + log.searches.push({ request, started, events }) + return events +} diff --git a/site/demo/record/search-stream.ts b/site/demo/record/search-stream.ts new file mode 100644 index 00000000..631a8626 --- /dev/null +++ b/site/demo/record/search-stream.ts @@ -0,0 +1,28 @@ +/** + * Recording build: the app's own search stream, with each search's request, + * its start and the events it streamed logged. + */ +import * as original from '@/lib/ipc/search-stream' +import type { SearchEvent } from '@/lib/backend-client/search' +import { logSearch } from './log' + +export const SEARCH_CONNECTION_LOST = original.SEARCH_CONNECTION_LOST + +export type SearchStream = original.SearchStream + +export const openSearchStream: typeof original.openSearchStream = async ( + request, + onEvent, +) => { + // Events can arrive before the stream is returned; keep those for the log. + const early: SearchEvent[] = [] + let events: SearchEvent[] | null = null + const stream = await original.openSearchStream(request, (event) => { + ;(events ?? early).push(event) + onEvent(event) + }) + const { close: _close, ...started } = stream + events = logSearch(request, started) + events.push(...early) + return stream +} diff --git a/site/demo/shards.ts b/site/demo/shards.ts new file mode 100644 index 00000000..b74e2a0a --- /dev/null +++ b/site/demo/shards.ts @@ -0,0 +1,41 @@ +/** + * Where in the recording a call lives. What the screens need loads with the + * demo (`recording/index.json`); the pages a visitor opens one at a time + * live in files of their own, fetched when one is opened: a month of days + * per file, a site per file. Every day and every site is recorded, so any + * one a visitor picks is there. + * + * `record.ts` files calls by this; `backend.ts` looks them up by it. + */ + +/** What a day's page in Insights asks for. */ +const dayCommands = new Set([ + 'get_day_insights', + 'get_sessions', + 'get_search_queries', + 'get_compare_sets', +]) + +type Request = { + date?: string + dateRange?: { start?: string; end?: string } + registrableDomain?: string +} + +const isDay = (value: unknown): value is string => + typeof value === 'string' && /^\d{4}-\d{2}-\d{2}$/.test(value) + +/** The file a call belongs in (`days/2026-04`, `site/strava.com`), or null for the main one. */ +export function shardOf(command: string, args: unknown): string | null { + const request = (args as { request?: Request } | null)?.request + if (!request) return null + if (dayCommands.has(command)) { + const range = request.dateRange + const day = + request.date ?? (range?.start === range?.end ? range?.start : undefined) + if (isDay(day)) return `days/${day.slice(0, 7)}` + } + if (command === 'get_domain_deep_dive' && request.registrableDomain) + return `site/${encodeURIComponent(request.registrableDomain)}` + return null +} diff --git a/site/demo/timeline.ts b/site/demo/timeline.ts new file mode 100644 index 00000000..bc48804c --- /dev/null +++ b/site/demo/timeline.ts @@ -0,0 +1,98 @@ +/** + * Every visit in the demo archive, newest first, the way History lists them, + * kept compact: each page (address, title, site) and each profile written + * once, and every visit as a row of numbers pointing at them. The demo works + * out any History list from it (a date range, a browser, a site, a page + * further down); `record.ts` checks that unpacking gives back exactly what + * the backend sent. + */ +import type { HistoryEntry } from '../../src/lib/types/archive.ts' + +export interface PackedTimeline { + /** Address, title, site. */ + pages: [string, string | null, string][] + profiles: string[] + /** The app a visit came through, where the browser says (Firefox does). */ + apps: (string | null)[] + /** id, profile, page, visit time, duration, transition, source visit id, app. */ + visits: [ + number, + number, + number, + number, + number | null, + number | null, + number, + number, + ][] +} + +/** The backend's `visitedAt`: RFC 3339 in UTC, milliseconds only when there are any. */ +const visitedAt = (time: number) => + new Date(time).toISOString().replace('.000Z', 'Z').replace('Z', '+00:00') + +export function packTimeline(entries: HistoryEntry[]): PackedTimeline { + const pages = new Map() + const profiles = new Map() + const apps = new Map() + const packed: PackedTimeline = { + pages: [], + profiles: [], + apps: [], + visits: [], + } + for (const entry of entries) { + const pageKey = JSON.stringify([ + entry.url, + entry.title ?? null, + entry.domain, + ]) + if (!pages.has(pageKey)) { + pages.set(pageKey, packed.pages.length) + packed.pages.push([entry.url, entry.title ?? null, entry.domain]) + } + if (!profiles.has(entry.profileId)) { + profiles.set(entry.profileId, packed.profiles.length) + packed.profiles.push(entry.profileId) + } + const app = entry.appId ?? null + if (!apps.has(app)) { + apps.set(app, packed.apps.length) + packed.apps.push(app) + } + packed.visits.push([ + entry.id, + profiles.get(entry.profileId)!, + pages.get(pageKey)!, + entry.visitTime, + entry.durationMs ?? null, + entry.transition ?? null, + entry.sourceVisitId, + apps.get(app)!, + ]) + } + return packed +} + +export function unpackTimeline(packed: PackedTimeline): HistoryEntry[] { + return packed.visits.map( + ([id, profile, page, time, durationMs, transition, sourceVisitId, app]) => { + const [url, title, domain] = packed.pages[page] + return { + id, + profileId: packed.profiles[profile], + url, + title, + domain, + favicon: null, + visitedAt: visitedAt(time), + visitTime: time, + durationMs, + transition, + sourceVisitId, + appId: packed.apps[app], + enrichmentExcerpt: null, + } + }, + ) +} diff --git a/site/demo/transport/bridge.ts b/site/demo/transport/bridge.ts new file mode 100644 index 00000000..7cb4b7e1 --- /dev/null +++ b/site/demo/transport/bridge.ts @@ -0,0 +1,13 @@ +/** + * Stands in for `src/lib/ipc/bridge.ts` in the demo build: commands go to + * the demo's backend instead of the desktop app. + */ +import type * as Original from '@/lib/ipc/bridge' +import { answer } from '../backend' + +export type CommandPayload = Original.CommandPayload + +export const invokeCommand: typeof Original.invokeCommand = async ( + command: string, + payload?: CommandPayload, +) => (await answer(command, payload)) as TResponse diff --git a/site/demo/transport/events.ts b/site/demo/transport/events.ts new file mode 100644 index 00000000..f3016e98 --- /dev/null +++ b/site/demo/transport/events.ts @@ -0,0 +1,8 @@ +/** + * Stands in for `src/lib/ipc/events.ts` in the demo build. Nothing runs in + * the background of the demo, so nothing sends events. + */ +import type * as Original from '@/lib/ipc/events' + +export const listenDesktopEvent: typeof Original.listenDesktopEvent = + async () => () => {} diff --git a/site/demo/transport/search-stream.ts b/site/demo/transport/search-stream.ts new file mode 100644 index 00000000..f8eaa891 --- /dev/null +++ b/site/demo/transport/search-stream.ts @@ -0,0 +1,34 @@ +/** + * Stands in for `src/lib/ipc/search-stream.ts` in the demo build: a search + * plays back its events (recorded, or the demo's own), one per frame, the + * way the real backend streams them. + */ +import type * as Original from '@/lib/ipc/search-stream' +import { searchFor } from '../backend' + +export const SEARCH_CONNECTION_LOST: typeof Original.SEARCH_CONNECTION_LOST = + 'search-connection-lost' + +export type SearchStream = Original.SearchStream + +export const openSearchStream: typeof Original.openSearchStream = async ( + request, + onEvent, +) => { + const search = searchFor(request) + let open = true + const events = [...search.events] + const next = () => { + const event = events.shift() + if (!open || !event) return + onEvent(event) + requestAnimationFrame(next) + } + requestAnimationFrame(next) + return { + ...search.started, + close: () => { + open = false + }, + } +} diff --git a/site/demo/tsconfig.json b/site/demo/tsconfig.json new file mode 100644 index 00000000..cc187047 --- /dev/null +++ b/site/demo/tsconfig.json @@ -0,0 +1,23 @@ +{ + // The demo runs the app's own code, so it is checked with the app's + // settings: its browser half against the DOM, and the scripts that make + // and check the recording against Node. + // ../node_modules/.bin/tsc -p demo + "extends": "../../tsconfig.app.json", + "compilerOptions": { + "tsBuildInfoFile": "../../node_modules/.tmp/tsconfig.demo.tsbuildinfo", + "types": ["vite/client", "node"], + // Built with the app's Vite, not the copy Astro brings into site/. + "paths": { + "@/*": ["../../src/*"], + "vite": ["../../node_modules/vite/dist/node/index.d.ts"] + } + }, + "include": [ + "*.ts", + "transport/*.ts", + "record/*.ts", + "../../src/vite-env.d.ts" + ], + "exclude": [] +} diff --git a/site/demo/vite.config.ts b/site/demo/vite.config.ts new file mode 100644 index 00000000..235fd5e8 --- /dev/null +++ b/site/demo/vite.config.ts @@ -0,0 +1,151 @@ +/** + * Builds the real app (`src/`) for the landing page's demo, with the modules + * that reach the desktop backend swapped for the demo's own: answers + * recorded from the real backend, replayed in the browser. Nothing in `src/` + * changes, and the desktop build cannot pick up the swap: it only happens + * in this build. + * + * `--mode record` builds the bundle `record.ts` walks to make the recording: + * the app's own transport to a running backend, with every answer logged. + * The demo build never contains that code. + * + * Run from the repository root, with the app's own Vite and plugins: + * ./node_modules/.bin/vite build --config site/demo/vite.config.ts + */ +import { spawnSync } from 'node:child_process' +import { existsSync, readFileSync } from 'node:fs' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import tailwindcss from '@tailwindcss/vite' +import react from '@vitejs/plugin-react' +import type { ConfigEnv, Plugin, UserConfig } from 'vite' + +const here = path.dirname(fileURLToPath(import.meta.url)) +const repo = path.resolve(here, '../..') +const src = path.join(repo, 'src') +const ipc = (name: string) => path.join(src, 'lib/ipc', `${name}.ts`) + +/** Each backend-facing module of the app, and what replaces it in each build. */ +const swapsFor = (mode: string) => + mode === 'record' + ? new Map([ + [ipc('bridge'), path.join(here, 'record/bridge.ts')], + [ipc('search-stream'), path.join(here, 'record/search-stream.ts')], + ]) + : new Map( + ['bridge', 'events', 'search-stream'].map((name) => [ + ipc(name), + path.join(here, 'transport', `${name}.ts`), + ]), + ) + +/** + * Replaces a module wherever it is imported from, whatever the import path + * says (`./bridge`, `../ipc/bridge`, `@/lib/ipc/bridge`), by what it resolves + * to. The demo's own modules still reach the originals. + */ +function swapTransport(swaps: Map): Plugin { + return { + name: 'pathkeep-demo-transport', + enforce: 'pre', + async resolveId(source, importer, options) { + if (!importer || importer.startsWith(here)) return null + const resolved = await this.resolve(source, importer, { + ...options, + skipSelf: true, + }) + return (resolved && swaps.get(resolved.id)) ?? null + }, + } +} + +/** + * The app's stylesheet leaves Tailwind to find class names on its own, from + * where the build runs: the repository root for the app, this folder here. + * Point it at the repository, so the demo gets the app's classes. + */ +function scanTheApp(): Plugin { + const stylesheet = path.join(src, 'index.css') + return { + name: 'pathkeep-demo-sources', + enforce: 'pre', + transform(code, id) { + if (id !== stylesheet) return null + return `${code}\n@source ${JSON.stringify(repo)};\n` + }, + } +} + +/** + * The demo pairs this checkout's app with the recording's answers, so both + * must come from one commit. Stops before anything is built (and before the + * built demo in `site/public/app/` is cleared) when there is no recording + * here, or when `src/` is not as it was at the recording's commit: an app + * that asks differently would meet answers that no longer fit. Record again + * then (README, The demo). + */ +function sameAppAsTheRecording() { + const file = path.join(here, 'public/recording/index.json') + if (!existsSync(file)) + throw new Error( + `No recording at ${file}: record one first (site/README.md, The demo).`, + ) + const recording = JSON.parse(readFileSync(file, 'utf8')) as { + calls: { command: string; response: unknown }[] + } + const commit = ( + recording.calls.find((call) => call.command === 'app_build_info') + ?.response as { gitCommitFull?: string } | undefined + )?.gitCommitFull + if (!commit) + throw new Error(`${file} does not say which commit it was recorded from.`) + const git = (...args: string[]) => { + const run = spawnSync('git', args, { cwd: repo, encoding: 'utf8' }) + if (run.status !== 0) + throw new Error(`git ${args.join(' ')}: ${run.stderr.trim()}`) + return run.stdout.split('\n').filter(Boolean) + } + const changed = [ + ...git('diff', '--name-only', commit, '--', 'src'), + ...git('ls-files', '--others', '--exclude-standard', '--', 'src'), + ] + if (changed.length > 0) + throw new Error( + `The recording was made from ${commit.slice(0, 8)}, and src/ differs from it (${changed.slice(0, 4).join(', ')}${changed.length > 4 ? ', …' : ''}). Record again (site/README.md, The demo).`, + ) +} + +export default ({ mode }: ConfigEnv) => { + const bridge = process.env.PATHKEEP_DEMO_BRIDGE + if (mode === 'record' && !bridge) + throw new Error( + 'Set PATHKEEP_DEMO_BRIDGE to the running backend’s bridge URL.', + ) + if (mode !== 'record') sameAppAsTheRecording() + return { + root: here, + base: './', + plugins: [ + swapTransport(swapsFor(mode)), + scanTheApp(), + react(), + tailwindcss(), + ], + resolve: { alias: { '@': src } }, + define: { + // Sends the app down the bridge's path (commands over a transport, no + // Tauri window): to the real bridge when recording, to the swapped + // modules in the demo. + 'import.meta.env.VITE_PATHKEEP_DEV_IPC_URL': JSON.stringify( + mode === 'record' ? bridge : 'demo', + ), + }, + // The recording rides along with the demo; a recording run makes it. + publicDir: mode === 'record' ? false : path.join(here, 'public'), + build: { + outDir: path.join(repo, 'site/public/app'), + emptyOutDir: true, + }, + server: { fs: { allow: [repo] } }, + } satisfies UserConfig +} diff --git a/site/demo/walk.ts b/site/demo/walk.ts new file mode 100644 index 00000000..93c19a2f --- /dev/null +++ b/site/demo/walk.ts @@ -0,0 +1,276 @@ +/** + * What a visitor does in the demo, in the order the recording does it: every + * screen, its tabs, filters and ranges, scrolling to the end of each list, + * a few searches, and the previews a change starts from (a new backup + * interval, what would be deleted), closed before anything is applied. + * Read-only: nothing here changes the archive, because the demo saves + * nothing. + * + * `record.ts` walks it against the real backend to make the recording; the + * demo's check walks it against the recording, where every command must + * find its exact answer. Labels are the English catalog's. + */ +import type { Locator, Page } from '@playwright/test' + +export interface WalkOptions { + /** The app's address, up to the `#`. */ + base: string + /** Called after each step, once the screen has settled. */ + settled?: (name: string) => Promise + /** A step that could not be done; the walk goes on. */ + missed?: (name: string, error: unknown) => void +} + +/** Every screen, by address. */ +export const routes = [ + 'browsing/home', + 'browsing/history', + 'browsing/insights', + 'browsing/backup', + 'ask', + ...['general', 'security', 'ai', 'background', 'storage', 'about'].map( + (s) => `settings/${s}`, + ), +] + +/** + * Opens every screen by its address, nothing clicked: what the walk can do + * in any language, since its clicks go by the English labels. + */ +export async function tour(page: Page, { base, settled }: WalkOptions) { + for (const route of routes) { + await page.goto(`${base}#/${route}`) + await page.waitForLoadState('networkidle') + await page.waitForTimeout(400) + await settled?.(route.replace('/', '-')) + } +} + +/** Searches a visitor might type; each is recorded with its results. */ +export const searches = [ + 'tokio', + 'camera', + 'strava', + 'JLPT', + 'sqlite', + '台北', + 'github issues', + '/tokio|smol/', +] + +export async function walk(page: Page, { base, settled, missed }: WalkOptions) { + const settle = async (name: string) => { + await page.waitForLoadState('networkidle') + await page.waitForTimeout(400) + await settled?.(name) + } + const step = async (name: string, action: () => Promise) => { + try { + await action() + await settle(name) + } catch (error) { + missed?.(name, error) + } + } + const go = async (route: string) => { + await page.goto(`${base}#/${route}`) + } + /** + * Scrolls the screen to its end, a screenful at a time: the largest area + * in it that scrolls (a list scrolls inside the screen, not the screen). + */ + const scrollThrough = async (screen: Locator) => { + for (let i = 0; i < 40; i += 1) { + const done = await screen.evaluate((root) => { + const areas = [root, ...root.querySelectorAll('*')].filter( + (el) => + el.scrollHeight > el.clientHeight + 8 && + /auto|scroll/.test(getComputedStyle(el).overflowY), + ) + const area = areas.sort((a, b) => b.clientHeight - a.clientHeight)[0] + if (!area) return true + area.scrollBy(0, area.clientHeight * 0.9) + return area.scrollTop + area.clientHeight >= area.scrollHeight - 2 + }) + await page.waitForTimeout(300) + await page.waitForLoadState('networkidle') + if (done) break + } + } + const main = page.locator('main').first() + const pick = async (control: string, option: string) => { + await page + .getByRole('button', { name: control }) + .or(page.getByRole('combobox', { name: control })) + .first() + .click() + await page + .getByRole('option', { name: option }) + .or(page.getByRole('menuitemradio', { name: option })) + .or(page.getByRole('menuitem', { name: option })) + .first() + .click() + } + + // Home + await step('home', () => go('browsing/home')) + await step('home-scrolled', () => scrollThrough(main)) + await step('home-previous-year', () => + page.getByRole('button', { name: 'Previous year' }).click(), + ) + await step('home-next-year', () => + page.getByRole('button', { name: 'Next year' }).click(), + ) + // A day in the year (the last one with visits): its page in Insights. + await step('home-day', async () => { + await go('browsing/home') + await page.waitForLoadState('networkidle') + await page.locator('[data-cell][role="button"]').last().click() + await page.waitForLoadState('networkidle') + await scrollThrough(main) + }) + + // Each page in "Things you keep coming back to": its page in Insights. + await go('browsing/home') + await page.waitForLoadState('networkidle') + await scrollThrough(main) + const pageLinks = main.locator('a[href*="/insights/page/"]') + await pageLinks + .first() + .waitFor() + .catch((error) => missed?.('home-returns-to', error)) + const returnsTo = await pageLinks.evaluateAll((links) => + links.map((link) => link.getAttribute('href')!), + ) + for (const href of returnsTo) + await step(`home-returns-to-${returnsTo.indexOf(href)}`, async () => { + await page.goto(`${base}${href}`) + await page.waitForLoadState('networkidle') + await scrollThrough(main) + }) + + // History + await step('history', () => go('browsing/history')) + // The first visit listed, whichever it is: the synthetic history moves + // with the day it is recorded on. + await step('history-row', () => + page + .getByRole('listbox', { name: 'History timeline' }) + .getByRole('option') + .first() + .click(), + ) + await step('history-row-closed', () => page.keyboard.press('Escape')) + await step('history-scrolled', () => scrollThrough(main)) + for (const range of [ + 'Today', + 'Yesterday', + 'Last 7 days', + 'Last 30 days', + 'All dates', + ]) + await step(`history-${range}`, () => pick('Date filter', range)) + for (const view of ['Sites', 'Starred', 'Timeline']) + await step(`history-${view}`, async () => { + await page + .getByRole('tab', { name: view }) + .or(page.getByRole('radio', { name: view })) + .first() + .click() + await page.waitForLoadState('networkidle') + await scrollThrough(main) + }) + const box = page + .getByRole('searchbox', { name: 'Search history' }) + .or(page.getByPlaceholder(/Search titles/)) + .first() + for (const query of searches) + await step(`search-${query}`, async () => { + await box.fill(query) + await page.waitForTimeout(800) + await page.waitForLoadState('networkidle') + }) + await step('search-cleared', () => box.fill('')) + + // Insights + await step('insights', () => go('browsing/insights')) + await step('insights-scrolled', () => scrollThrough(main)) + for (const range of ['1y', '90d', '30d', '7d', 'All time']) + await step(`insights-${range}`, async () => { + await page + .getByRole('radio', { name: range }) + .or(page.getByRole('button', { name: range, exact: true })) + .first() + .click() + await page.waitForLoadState('networkidle') + await scrollThrough(main) + }) + + // A site from the top sites: its page in Insights. + await step('insights-site', async () => { + await go('browsing/insights') + await page.waitForLoadState('networkidle') + await page + .locator('main') + .getByText('strava.com', { exact: true }) + .first() + .click() + await page.waitForLoadState('networkidle') + await scrollThrough(main) + }) + + // Backup, and the preview each other backup interval starts from + await step('backup', () => go('browsing/backup')) + await step('backup-scrolled', () => scrollThrough(main)) + for (const interval of ['Every 6h', 'Daily', 'Off']) + await step(`backup-${interval}`, async () => { + await go('browsing/backup') + await page.waitForLoadState('networkidle') + await page.getByRole('radio', { name: interval }).click() + await page.getByRole('dialog').waitFor() + await page.waitForLoadState('networkidle') + await page.keyboard.press('Escape') + }) + + // Ask, Settings + await step('ask', () => go('ask')) + for (const section of [ + 'general', + 'security', + 'ai', + 'background', + 'storage', + 'about', + ]) + await step(`settings-${section}`, async () => { + await go(`settings/${section}`) + await page.waitForLoadState('networkidle') + await scrollThrough(main) + }) + // What keeping less history would delete, and the archive's health check. + await step('settings-storage-review', async () => { + await go('settings/storage') + await page.waitForLoadState('networkidle') + await page.getByRole('button', { name: 'Review…' }).click() + await page.getByRole('dialog').waitFor() + await page.waitForLoadState('networkidle') + await page.keyboard.press('Escape') + }) + await step('settings-about-check', async () => { + await go('settings/about') + await page.waitForLoadState('networkidle') + await page.getByRole('button', { name: 'Check', exact: true }).click() + await page.waitForTimeout(600) + await page.waitForLoadState('networkidle') + }) + + // The command palette + await step('palette', async () => { + await go('browsing/home') + await page.waitForLoadState('networkidle') + await page.keyboard.press('Meta+K') + await page.keyboard.type('git', { delay: 60 }) + await page.waitForTimeout(800) + }) + await page.keyboard.press('Escape') +} diff --git a/site/demo/writes.ts b/site/demo/writes.ts new file mode 100644 index 00000000..3d03d545 --- /dev/null +++ b/site/demo/writes.ts @@ -0,0 +1,277 @@ +/** + * The changes a visitor makes in the demo. Each is answered the way the + * backend answers a change that went through, built from the request over + * what the recording says now, and kept nowhere: when the app reads the + * same thing again it gets the recording, and a reload starts over. So a + * change takes on screen without an error, and nothing is saved. Also the + * update check, which this build cannot do. + * + * Responsible for: those answers, each typed with the reply the app's own + * client declares, so a version that changes one fails `tsc -p demo` before + * it is recorded again. Not responsible for: reads (`backend.ts`). A + * command not listed here gets the demo's refusal (`backend.ts`): the + * demo does not answer what it cannot build from the recording. + */ +import type { + annotationsClient, + UrlAnnotation, +} from '@/lib/backend-client/annotations' +import type { appClient } from '@/lib/backend-client/app' +import type { archiveClient } from '@/lib/backend-client/archive' +import type { contentEnrichmentClient } from '@/lib/backend-client/content-enrichment' +import type { desktopClient } from '@/lib/backend-client/desktop' +import type { explorerClient } from '@/lib/backend-client/explorer' +import type { insightsClient } from '@/lib/backend-client/insights' +import type { intelligenceClient } from '@/lib/backend-client/intelligence' +import type { scheduleClient } from '@/lib/backend-client/schedule' +import type { starsClient } from '@/lib/backend-client/stars' +import type { supportClient } from '@/lib/backend-client/support' +import type { updateClient } from '@/lib/backend-client/update' +import type { AppConfig } from '@/lib/types' +import { RELEASES_PAGE_URL } from '@/lib/update' + +/** What a client call resolves to: the answer the app expects back. */ +type Reply = F extends (...args: never[]) => Promise ? R : never + +/** What the recording says now, as the backend would answer it. */ +export interface Recorded { + /** The latest recorded answer to a read; the demo's refusal if it has none. */ + latest(command: string): T + /** The recorded answer to exactly this read, if there is one. */ + exactly(command: string, args: unknown): T | undefined +} + +type Write = (args: never, recorded: Recorded) => unknown + +/** A note or tags saved for a page, over what the page had. */ +function annotation( + recorded: Recorded, + url: string, + change: Partial, +): UrlAnnotation { + const before = recorded.exactly('get_url_annotation', { + url, + }) + const at = new Date().toISOString() + return { + url, + notes: '', + tags: [], + createdAt: at, + ...before, + ...change, + updatedAt: at, + } +} + +/** The installed backup schedule, as the backend reports a change to it. */ +const scheduleApplied = ( + recorded: Recorded, +): Reply => { + const status = + recorded.latest>('schedule_status') + return { + applied: true, + platform: status.platform, + files: status.detectedFiles, + message: '', + stepResults: [], + } +} + +export const writes: Record = { + // Settings: the snapshot the backend sends back after saving, with the + // visitor's settings in it. + save_config: ( + args: { config: AppConfig }, + recorded, + ): Reply => ({ + ...recorded.latest>('app_snapshot'), + config: args.config, + }), + // These change what other reads say (page summaries, the stored key), so + // the snapshot stays as recorded and the app's next read shows the same. + set_content_fetch_settings: ( + _: unknown, + recorded, + ): Reply => + recorded.latest>('app_snapshot'), + store_ai_provider_api_key: ( + _: unknown, + recorded, + ): Reply => + recorded.latest>('app_snapshot'), + clear_ai_provider_api_key: ( + _: unknown, + recorded, + ): Reply => + recorded.latest>('app_snapshot'), + + // Opening at login and the menu bar icon: the new state, as the OS would + // report it. + set_launch_at_login: ( + args: { enabled: boolean }, + recorded, + ): Reply => ({ + ...recorded.latest>( + 'get_desktop_integration', + ), + launchAtLogin: args.enabled, + }), + set_menu_bar_icon: ( + args: { enabled: boolean }, + recorded, + ): Reply => ({ + ...recorded.latest>( + 'get_desktop_integration', + ), + menuBarIcon: args.enabled, + }), + + // The lock as it stands. Without a passcode the backend leaves the + // session unlocked when asked to lock (`app_lock.rs`), and the app says a + // passcode comes first; a passcode set here is not kept. + lock_app_session: ( + _: unknown, + recorded, + ): Reply => + recorded.latest>('app_lock_status'), + set_app_lock_passcode: ( + _: unknown, + recorded, + ): Reply => + recorded.latest>('app_lock_status'), + clear_app_lock_passcode: ( + _: unknown, + recorded, + ): Reply => + recorded.latest>('app_lock_status'), + + // A page's note and tags, saved over what it had. + set_url_notes: ( + args: { + request: { url: string; notes: string; sourceProfile?: string | null } + }, + recorded, + ): Reply => + annotation(recorded, args.request.url, { + notes: args.request.notes, + sourceProfile: args.request.sourceProfile ?? null, + }), + replace_url_tags: ( + args: { + request: { url: string; tags: string[]; sourceProfile?: string | null } + }, + recorded, + ): Reply => + annotation(recorded, args.request.url, { + tags: args.request.tags, + sourceProfile: args.request.sourceProfile ?? null, + }), + + // The backend answers these with nothing. + set_star: (): Reply => undefined, + unset_star: (): Reply => undefined, + mark_og_images_shown: (): Reply => + undefined, + set_site_category: (): Reply => + undefined, + // The app's own error log; the demo keeps none. + record_frontend_error: () => undefined, + + // Back up now, a moment after the last backup (the demo's clock stands + // there): a run that found nothing new. The app reads only the run and + // its warnings (`backup-runner.tsx`). + run_backup_now: ( + _: unknown, + recorded, + ): Reply => { + const last = + recorded.latest>('app_snapshot') + .recentRuns[0] + const at = new Date().toISOString() + return { + dueSkipped: false, + run: last && { + ...last, + id: last.id + 1, + startedAt: at, + finishedAt: at, + trigger: 'manual', + newVisits: 0, + newUrls: 0, + newDownloads: 0, + }, + profiles: [], + warnings: [], + } + }, + + // The backup schedule: set, removed or repaired as asked. + apply_schedule: ( + _: unknown, + recorded, + ): Reply => scheduleApplied(recorded), + remove_schedule: ( + _: unknown, + recorded, + ): Reply => scheduleApplied(recorded), + repair_schedule: ( + _: unknown, + recorded, + ): Reply => scheduleApplied(recorded), + + // Background jobs: as they stand. + run_ai_queue_jobs: ( + _: unknown, + recorded, + ): Reply => + recorded.latest>( + 'load_ai_queue_status', + ), + retry_intelligence_job: ( + _: unknown, + recorded, + ): Reply => + recorded.latest>( + 'load_intelligence_runtime', + ), + cancel_intelligence_job: ( + _: unknown, + recorded, + ): Reply => + recorded.latest>( + 'load_intelligence_runtime', + ), + + // Checking for an update: the demo cannot update itself, and says so the + // way the app does for any build that cannot, with the releases page. + check_for_app_update: ( + _: unknown, + recorded, + ): Reply => ({ + availability: { + supported: false, + checkedAt: new Date().toISOString(), + available: false, + currentVersion: + recorded.latest>('app_build_info') + .version, + version: null, + notes: null, + publishedAt: null, + error: null, + downloadUrl: RELEASES_PAGE_URL, + }, + pendingUpdate: null, + }), + + // Exporting: as when the save dialog is closed, nothing written and + // nothing to say (`export-row.tsx`). + export_history: (): Reply => null, + // Showing a file in Finder: a browser has none to show it in. + open_path_in_file_manager: (): Reply< + typeof supportClient.openPathInFileManager + > => '', + reveal_logs: (): Reply => '', +} diff --git a/site/hero-lab/.gitignore b/site/hero-lab/.gitignore new file mode 100644 index 00000000..8ef17612 --- /dev/null +++ b/site/hero-lab/.gitignore @@ -0,0 +1,2 @@ +out/ +screens-in/ diff --git a/site/hero-lab/capture-features.ts b/site/hero-lab/capture-features.ts new file mode 100644 index 00000000..84f94b2e --- /dev/null +++ b/site/hero-lab/capture-features.ts @@ -0,0 +1,89 @@ +/** + * Cuts the pictures for the feature wall (`src/components/Features.astro`), + * once per language: the browsing ones from the demo, which is the real app + * in that language on the recorded archive, so their words are the app's + * own; the Agent one from the Agent insights screen `capture-screens.ts` + * took. Needs the preview server, with the demo built into it. + * + * bun site/hero-lab/capture-features.ts + * + * Writes `hero-lab/screens-in//feature-.png` at twice the pixels; + * then run `export-screens.ts` for the WebP files the page loads. + */ +import { chromium, type Page } from '@playwright/test' +import { readFile } from 'node:fs/promises' +import { join } from 'node:path' +import { langs } from '../src/content/copy' + +const out = join(import.meta.dir, 'screens-in') +const demo = 'http://127.0.0.1:4391/app/' + +/** A cut of a 1360×860 screen of the demo, and what to do there first. */ +const cuts: { + id: string + route: string + clip: { x: number; y: number; width: number; height: number } + before?: (page: Page) => Promise +}[] = [ + { + id: 'search', + route: 'browsing/history', + clip: { x: 96, y: 18, width: 1240, height: 450 }, + before: async (page) => { + // A pattern: the search box takes /regex/ as well as words. + await page.locator('main input').first().fill('/tokio|smol/') + await page.waitForTimeout(1500) + }, + }, + { + id: 'history', + route: 'browsing/history', + clip: { x: 96, y: 136, width: 760, height: 550 }, + }, + { + id: 'insights', + route: 'browsing/insights', + clip: { x: 200, y: 30, width: 1020, height: 550 }, + }, +] + +/** The Agent one, from the Agent insights screen, in its pixels. */ +const agent = { x: 200, y: 190, width: 2440, height: 1070 } + +const browser = await chromium.launch({ channel: 'chrome', headless: true }) +try { + for (const { lang, slug } of langs) { + const page = await browser.newPage({ + viewport: { width: 1360, height: 860 }, + deviceScaleFactor: 2, + }) + for (const cut of cuts) { + await page.goto(`${demo}?lang=${lang}#/${cut.route}`) + await page.locator('main').first().waitFor() + await page.waitForLoadState('networkidle') + await page.waitForTimeout(1500) + await cut.before?.(page) + const file = join(out, slug, `feature-${cut.id}.png`) + await page.screenshot({ path: file, clip: cut.clip }) + console.log(`screens-in/${slug}/feature-${cut.id}.png`) + } + await page.close() + + const screen = await readFile(join(out, slug, 'agent-insights.png')) + const sheet = await browser.newPage({ + viewport: { width: 2720, height: 1720 }, + }) + await sheet.setContent( + ``, + ) + await sheet.locator('img').evaluate((img: HTMLImageElement) => img.decode()) + await sheet.screenshot({ + path: join(out, slug, 'feature-agent.png'), + clip: agent, + }) + await sheet.close() + console.log(`screens-in/${slug}/feature-agent.png`) + } +} finally { + await browser.close() +} diff --git a/site/hero-lab/capture-screens.ts b/site/hero-lab/capture-screens.ts new file mode 100644 index 00000000..f323b43a --- /dev/null +++ b/site/hero-lab/capture-screens.ts @@ -0,0 +1,162 @@ +/** + * Photographs the app's screens for the windows on the page, once per + * language. The screens are drawn in Traditional Chinese; for English and + * Simplified Chinese every piece of text in the picture is swapped for its + * entry in `screens-text.ts` first. A screen with a piece of Chinese that + * has no entry, or an English screen still showing any Chinese afterwards, + * is not written, and the run ends in failure. + * + * bun site/hero-lab/capture-screens.ts [--hide ] + * + * serves the screens, routed by hash (#/browsing/home and so on), and + * may carry a query. --hide names elements to leave out of the pictures. + * Writes `hero-lab/screens-in//.png`: 1360×860 at twice the + * pixels, the window's own background left transparent. Then run + * `export-screens.ts` for the WebP files the page loads. + */ +import { chromium } from '@playwright/test' +import { mkdir } from 'node:fs/promises' +import { join } from 'node:path' +import { langs } from '../src/content/copy' +import { inPhrase, words } from './screens-text' + +const argv = process.argv.slice(2) +const base = argv[0] +const hide = argv.includes('--hide') ? argv[argv.indexOf('--hide') + 1] : '' +if (!base || base.startsWith('--')) { + console.log('usage: capture-screens.ts [--hide ]') + process.exit(1) +} + +const screens = [ + ['browsing-home', '#/browsing/home'], + ['browsing-history', '#/browsing/history'], + ['agent-insights', '#/agent/insights'], + ['agent-chats', '#/agent/chats'], +] as const + +/** + * Swaps the Chinese in the visible picture for `lang`, or, when a piece has + * no entry, changes nothing and returns what is missing. Runs in the page. + */ +const swap = ({ + lang, + words, + inPhrase, +}: { + lang: 'en' | 'zh-CN' + words: Record> + inPhrase: Record>> +}) => { + const cjk = /[ -〿㐀-鿿豈-﫿＀-￯]/ + const shown = (el: Element) => { + const box = el.getBoundingClientRect() + const style = getComputedStyle(el) + return ( + style.display !== 'none' && + style.visibility !== 'hidden' && + box.width > 0 && + box.height > 0 && + box.bottom > 0 && + box.top < innerHeight && + box.right > 0 && + box.left < innerWidth + ) + } + // The phrase a piece belongs to: its nearest ancestor that is not inline. + const phraseOf = (el: Element) => { + let block = el + while ( + block.parentElement && + ['inline', 'inline-block', 'inline-flex'].includes( + getComputedStyle(block).display, + ) && + (block.textContent ?? '').length < 60 + ) + block = block.parentElement + return (block.textContent ?? '').replace(/\s+/g, ' ').trim() + } + const pieces = () => { + const found: { node: Text; text: string; el: Element }[] = [] + const walk = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT) + for (let n = walk.nextNode(); n; n = walk.nextNode()) { + const text = n.textContent ?? '' + const el = n.parentElement + if (el && cjk.test(text) && shown(el)) + found.push({ node: n as Text, text, el }) + } + return found + } + + const missing: string[] = [] + const edits: (() => void)[] = [] + for (const { node, text, el } of pieces()) { + const key = text.trim() + const entry = inPhrase[phraseOf(el)]?.[key] ?? words[key] + if (!entry) missing.push(key) + else { + const [lead, trail] = [text.match(/^\s*/)![0], text.match(/\s*$/)![0]] + edits.push(() => (node.textContent = lead + entry[lang] + trail)) + } + } + for (const input of document.querySelectorAll( + 'input[placeholder], textarea[placeholder]', + )) { + const key = input.placeholder.trim() + if (!cjk.test(key) || !shown(input)) continue + const entry = words[key] + if (!entry) missing.push(`placeholder ${key}`) + else edits.push(() => (input.placeholder = entry[lang])) + } + if (missing.length) return missing + for (const edit of edits) edit() + document.documentElement.lang = lang + if (lang === 'en') return pieces().map((p) => `left in Chinese: ${p.text}`) + return [] +} + +const out = join(import.meta.dir, 'screens-in') +const browser = await chromium.launch({ channel: 'chrome', headless: true }) +let failed = false +for (const l of langs) { + await mkdir(join(out, l.slug), { recursive: true }) + for (const [name, hash] of screens) { + // A fresh page each time: moving between hash routes keeps the shell's + // text from the last picture, already swapped. + const page = await browser.newPage({ + viewport: { width: 1360, height: 860 }, + deviceScaleFactor: 2, + }) + await page.goto(base + hash, { waitUntil: 'networkidle' }) + await page.addStyleTag({ + content: `${hide ? `${hide} { display: none !important }` : ''} html, body { background: transparent !important }`, + }) + await page.waitForTimeout(1200) + if (l.lang !== 'zh-TW') { + const problems = await page.evaluate(swap, { + lang: l.lang, + words: words as unknown as Record>, + inPhrase: inPhrase as unknown as Record< + string, + Record> + >, + }) + if (problems.length) { + failed = true + console.log(`${l.slug}/${name}: not written`) + for (const p of new Set(problems)) console.log(` ${p}`) + await page.close() + continue + } + await page.waitForTimeout(300) + } + await page.screenshot({ + path: join(out, l.slug, `${name}.png`), + omitBackground: true, + }) + console.log(`screens-in/${l.slug}/${name}.png`) + await page.close() + } +} +await browser.close() +process.exit(failed ? 1 : 0) diff --git a/site/hero-lab/driver.ts b/site/hero-lab/driver.ts new file mode 100644 index 00000000..26f6c41e --- /dev/null +++ b/site/hero-lab/driver.ts @@ -0,0 +1,52 @@ +/** + * Opens the painter in headless Chrome so scripts can render presets. + * The installed Chrome renders on the GPU; set HERO_CHANNEL=chromium to use + * Playwright's own build instead (software GL, same picture, much slower). + */ + +import { chromium, type Browser, type Page } from '@playwright/test' +import { join } from 'node:path' +import type { PaintRequest, PaintResult } from './src/main' + +export interface Renderer { + presets: string[] + render: (req: PaintRequest) => Promise + toWebp: (pngBase64: string, quality: number) => Promise + close: () => Promise +} + +export async function openRenderer(): Promise { + const bundle = await Bun.build({ + entrypoints: [join(import.meta.dir, 'src/main.ts')], + target: 'browser', + format: 'esm', + loader: { '.glsl': 'text', '.frag': 'text', '.vert': 'text' }, + }) + if (!bundle.success) { + for (const m of bundle.logs) console.error(m) + throw new Error('bundle failed') + } + const code = await bundle.outputs[0].text() + const browser: Browser = await chromium.launch({ + channel: process.env.HERO_CHANNEL ?? 'chrome', + headless: true, + }) + const page: Page = await browser.newPage() + page.on('console', (m) => console.log(`[page] ${m.text()}`)) + page.on('pageerror', (e) => console.error(`[page error] ${e.message}`)) + await page.setContent('') + await page.addScriptTag({ content: code, type: 'module' }) + await page.waitForFunction(() => 'heroPaint' in window) + const presets = await page.evaluate(() => window.heroPresets) + return { + presets, + render: (req) => + page.evaluate((r) => window.heroPaint(r), req) as Promise, + toWebp: (png, quality) => + page.evaluate(([p, q]) => window.heroToWebp(p as string, q as number), [ + png, + quality, + ] as const), + close: () => browser.close(), + } +} diff --git a/site/hero-lab/export-panels.ts b/site/hero-lab/export-panels.ts new file mode 100644 index 00000000..eff433d0 --- /dev/null +++ b/site/hero-lab/export-panels.ts @@ -0,0 +1,174 @@ +/** + * Renders the paintings the landing page sets its content on and cuts each + * panel's picture out of them, at the widths the page's `srcset` lists. + * + * bun site/hero-lab/export-panels.ts [cut,cut…] + * + * Writes `site/public/paintings/-.webp`. + * + * Each cut is the part of a painting its panel shows: the opening card + * (hero and app window) is one tall painting; the spaces, privacy and + * download panels show the band their text sits on. Texture scales with a + * painting's width, so rendering larger only adds pixels, never changes + * the picture. + */ + +import { mkdir, writeFile } from 'node:fs/promises' +import { join } from 'node:path' +import { openRenderer } from './driver' + +interface Cut { + name: string + /** The region, in pixels of the render. */ + x: number + y: number + w: number + h: number + /** File widths; heights keep the region's shape. */ + widths: number[] +} + +const SOURCES: { + preset: string + width: number + height: number + cuts: Cut[] +}[] = [ + { + preset: 'pk-ember', + width: 3310, + height: 3800, + cuts: [ + // The opening card, hero and app window together: the whole painting, + // light apricot at the top under the headline, the window lower down. + { + name: 'intro', + x: 0, + y: 0, + w: 3310, + h: 3800, + widths: [1920, 2560, 3310], + }, + // A phone's opening card is tall and narrow: more of the apricot, centred. + { name: 'hero-phone', x: 1313, y: 0, w: 684, h: 1368, widths: [720] }, + ], + }, + { + preset: 'pk-ember', + width: 3840, + height: 2400, + // The retention chart's PathKeep row: burnt sienna with a pale streak. + cuts: [{ name: 'path', x: 0, y: 1990, w: 3840, h: 48, widths: [1920] }], + }, + // The two spaces: the dark foot of each swatch carries the text. + { + preset: 'sw-browsing', + width: 1400, + height: 1480, + cuts: [ + { + name: 'browsing', + x: 39, + y: 351, + w: 1322, + h: 1129, + widths: [680, 1320], + }, + ], + }, + { + preset: 'sw-agent', + width: 1400, + height: 1480, + cuts: [ + { name: 'agent', x: 39, y: 351, w: 1322, h: 1129, widths: [680, 1320] }, + ], + }, + // Indigo above for the statement, the ember streak at the panel's foot. + { + preset: 'pk-dusk', + width: 2752, + height: 1960, + cuts: [ + { + name: 'privacy', + x: 0, + y: 0, + w: 2752, + h: 1600, + widths: [1376, 2064, 2752], + }, + ], + }, + { + preset: 'pk-spaces', + width: 2752, + height: 1560, + cuts: [ + { + name: 'demo', + x: 0, + y: 0, + w: 2752, + h: 1560, + widths: [1376, 2064, 2752], + }, + ], + }, + // Bone with the grey drag behind the words and the orange line in the gap above the platforms. + { + preset: 'pk-paper', + width: 4096, + height: 1846, + cuts: [ + { + name: 'download', + x: 667, + y: 562, + w: 2762, + h: 1284, + widths: [1376, 2064, 2752], + }, + ], + }, +] + +const only = (process.argv[2] ?? '').split(',').filter(Boolean) +const out = join(import.meta.dir, '..', 'public', 'paintings') +await mkdir(out, { recursive: true }) + +const renderer = await openRenderer() +try { + for (const source of SOURCES) { + const cuts = source.cuts.filter( + (c) => !only.length || only.includes(c.name), + ) + if (!cuts.length) continue + const res = await renderer.render({ + preset: source.preset, + seed: 1, + width: source.width, + height: source.height, + crops: cuts.flatMap((c) => + c.widths.map((w) => ({ + name: `${c.name}-${w}`, + x: c.x, + y: c.y, + w: c.w, + h: c.h, + outW: w, + type: 'webp' as const, + quality: 0.82, + })), + ), + }) + for (const f of res.files) { + const bytes = Buffer.from(f.base64, 'base64') + const name = f.name.replace(/^crop-/, '') + await writeFile(join(out, name), bytes) + console.log(`paintings/${name} ${(bytes.length / 1024).toFixed(0)} KB`) + } + } +} finally { + await renderer.close() +} diff --git a/site/hero-lab/export-screens.ts b/site/hero-lab/export-screens.ts new file mode 100644 index 00000000..03ad894c --- /dev/null +++ b/site/hero-lab/export-screens.ts @@ -0,0 +1,41 @@ +/** + * Converts the app screenshots that `capture-screens.ts` writes, one folder + * per language in `site/hero-lab/screens-in//*.png`, to WebP (alpha + * kept) under `site/public/screens//`, for the windows on the page. + * + * bun site/hero-lab/export-screens.ts + */ + +import { mkdir, readdir, readFile, writeFile } from 'node:fs/promises' +import { join } from 'node:path' +import { langs } from '../src/content/copy' +import { openRenderer } from './driver' + +const inDir = join(import.meta.dir, 'screens-in') +const outDir = join(import.meta.dir, '..', 'public', 'screens') + +const work: { slug: string; name: string }[] = [] +for (const { slug } of langs) { + const pngs = (await readdir(join(inDir, slug)).catch(() => [])).filter((f) => + f.endsWith('.png'), + ) + for (const name of pngs) work.push({ slug, name }) +} +if (!work.length) { + console.log(`no PNG screenshots under ${inDir}`) + process.exit(0) +} + +const renderer = await openRenderer() +try { + for (const { slug, name } of work) { + await mkdir(join(outDir, slug), { recursive: true }) + const png = (await readFile(join(inDir, slug, name))).toString('base64') + const webp = Buffer.from(await renderer.toWebp(png, 0.88), 'base64') + const file = name.replace(/\.png$/, '.webp') + await writeFile(join(outDir, slug, file), webp) + console.log(`screens/${slug}/${file} ${(webp.length / 1024).toFixed(0)} KB`) + } +} finally { + await renderer.close() +} diff --git a/site/hero-lab/export-social.ts b/site/hero-lab/export-social.ts new file mode 100644 index 00000000..c080f141 --- /dev/null +++ b/site/hero-lab/export-social.ts @@ -0,0 +1,70 @@ +/** + * Draws the picture a link to the page shows when it is shared (1200×630, + * one per language) into `site/public/social/.jpg`: the top of the + * opening card's painting, the name, the promise and the version line, set + * in the page's own fonts. Needs the preview server on 4391; the page's + * `` points at the pictures once `site` is set. + * + * bun site/hero-lab/export-social.ts + */ +import { chromium } from '@playwright/test' +import { mkdir } from 'node:fs/promises' +import { join } from 'node:path' +import { copy, langs } from '../src/content/copy' + +const out = join(import.meta.dir, '..', 'public', 'social') +await mkdir(out, { recursive: true }) + +const browser = await chromium.launch({ channel: 'chrome', headless: true }) +for (const l of langs) { + const c = copy[l.lang] + const page = await browser.newPage({ + viewport: { width: 1200, height: 630 }, + deviceScaleFactor: 1, + }) + await page.goto(`http://127.0.0.1:4391${l.path}`, { + waitUntil: 'networkidle', + }) + await page.evaluate( + ({ title, note }) => { + // One line per phrase, as the opening card sets the promise. + const phrases = title + .replace(/\{\w+:([^}]+)\}/g, '$1') + .split('|') + .map((p) => `${p.trim()}`) + .join('') + document.body.innerHTML = ` + + ` + }, + { title: c.hero.title, note: c.hero.note }, + ) + await page.waitForLoadState('networkidle') + await page.evaluate(async () => { + await document.fonts.ready + await Promise.all( + Array.from(document.images).map((i) => i.decode().catch(() => undefined)), + ) + }) + await page.waitForTimeout(300) + await page.screenshot({ + path: join(out, `${l.slug}.jpg`), + type: 'jpeg', + quality: 86, + }) + console.log(`social/${l.slug}.jpg`) + await page.close() +} +await browser.close() diff --git a/site/hero-lab/gallery.ts b/site/hero-lab/gallery.ts new file mode 100644 index 00000000..3832d376 --- /dev/null +++ b/site/hero-lab/gallery.ts @@ -0,0 +1,256 @@ +/** + * Builds the comparison gallery: every candidate as a hero (with a sample + * nav and headline over it), a 100% crop, a phone-width crop, its dominant + * colours, and the size of the full 4K WebP. + * + * bun site/hero-lab/gallery.ts [--seed N] [--set first|pk] + * + * `first` is the first round (headline over the painting, 16:10); `pk` is + * the dragged-band round in PathKeep's colours, shown with the app's + * translucent window floating over it (16:9). + * Writes the gallery's index.html and images under `site/hero-lab/out/`. + */ + +import { mkdir, writeFile } from 'node:fs/promises' +import { join } from 'node:path' +import { openRenderer } from './driver' +import { presets } from './src/presets' + +const argv = process.argv.slice(2) +const flag = (name: string) => + argv.includes(`--${name}`) ? argv[argv.indexOf(`--${name}`) + 1] : undefined +const seed = Number(flag('seed') ?? 1) +const set = flag('set') ?? 'first' +const W = 3840 +const windowed = set === 'pk' +const H = windowed ? 2176 : 2400 + +interface Look { + /** 100% detail crop in full-resolution pixels. */ + detail: [number, number, number, number] + /** Text colour of the sample headline; for the window mock, light or dark app theme. */ + tone: 'ink' | 'paper' +} + +const looks: Record = { + 'cf-dawn': { detail: [900, 1250, 1200, 750], tone: 'ink' }, + 'cf-ember': { detail: [2050, 1300, 1200, 750], tone: 'paper' }, + 'cf-spaces': { detail: [2450, 1650, 1200, 750], tone: 'ink' }, + 'cf-fresco': { detail: [1700, 1150, 1200, 750], tone: 'ink' }, + 'wc-dawn': { detail: [1250, 1350, 1200, 750], tone: 'ink' }, + 'wc-dusk': { detail: [700, 1500, 1200, 750], tone: 'paper' }, + 'wc-tide': { detail: [700, 1150, 1200, 750], tone: 'ink' }, + 'wc-mist': { detail: [1100, 1700, 1200, 750], tone: 'ink' }, + 'wc-stain': { detail: [2300, 650, 1200, 750], tone: 'ink' }, + 'pk-dawn': { detail: [60, 900, 1200, 750], tone: 'ink' }, + 'pk-dusk': { detail: [60, 1100, 1200, 750], tone: 'paper' }, + 'pk-ember': { detail: [60, 900, 1200, 750], tone: 'ink' }, + 'pk-spaces': { detail: [60, 900, 1200, 750], tone: 'ink' }, + 'pk-paper': { detail: [60, 1100, 1200, 750], tone: 'ink' }, +} + +const ids = Object.keys(presets).filter((id) => + windowed ? id.startsWith('pk-') : !id.startsWith('pk-'), +) + +const outDir = join(import.meta.dir, 'out', windowed ? 'gallery-pk' : 'gallery') +await mkdir(outDir, { recursive: true }) +const renderer = await openRenderer() + +interface Entry { + id: string + title: string + note: string + tone: Look['tone'] + palette: { hex: string; share: number }[] + webpBytes: number + ms: number +} +const entries: Entry[] = [] +const phoneW = Math.round((H * 9) / 19.5) + +try { + for (const id of ids) { + const preset = presets[id] + const look = looks[id] ?? { detail: [1300, 800, 1200, 750], tone: 'ink' } + const [dx, dy, dw, dh] = look.detail + const res = await renderer.render({ + preset: id, + seed, + width: W, + height: H, + webpQuality: 0.88, + previews: [2000], + palette: 6, + crops: [ + { name: 'detail', x: dx, y: dy, w: dw, h: dh, type: 'webp' }, + { + name: 'phone', + x: Math.round((W - phoneW) / 2), + y: 0, + w: phoneW, + h: H, + outW: 520, + type: 'webp', + }, + ], + }) + const dir = join(outDir, id) + await mkdir(dir, { recursive: true }) + let webpBytes = 0 + for (const f of res.files) { + if (f.name.endsWith('.jpg')) continue + const bytes = Buffer.from(f.base64, 'base64') + if (f.name === 'full.webp') webpBytes = bytes.length + await writeFile(join(dir, f.name), bytes) + } + entries.push({ + id, + title: preset.title, + note: preset.note, + tone: look.tone, + palette: res.palette, + webpBytes, + ms: res.ms, + }) + console.log( + `${id}: ${(webpBytes / 1048576).toFixed(2)} MB webp, ${res.ms.toFixed(0)} ms`, + ) + } +} finally { + await renderer.close() +} + +const esc = (s: string) => + s.replace(/&/g, '&').replace(//g, '>') +const mb = (n: number) => `${(n / 1048576).toFixed(1)} MB` + +const windowHero = (e: Entry) => ` +
+ +
+
BrowsingAgentsInsights
+
` + +const sections = entries + .map( + (e, i) => ` +
+
${String(i + 1).padStart(2, '0')}

${esc(e.title)}

${e.id}
+ ${windowed ? windowHero(e) : ''} +
+ ${esc(e.title)} + +
+

Keep the path
you’ve walked.

+

Your browsers quietly delete your history. PathKeep keeps all of it, on your computer, and helps you find your way back.

+ +
+
Pl. ${String(i + 1).padStart(2, '0')} — ${esc(e.title)}
+
+
+
100% crop of the 3840 × 2400 render
+
Phone (centre crop)
+
+

${esc(e.note)}

+
    ${e.palette + .map( + (c) => + `
  • ${c.hex}${Math.round(c.share * 100)}%
  • `, + ) + .join('')}
+
4K WebP
${mb(e.webpBytes)}
Render
${(e.ms / 1000).toFixed(1)} s on the GPU
Seed
${seed}
+
+
+
`, + ) + .join('\n') + +const html = ` + + + + +Hero candidates + + + + + + +
+

Hero candidates

+

${ + windowed + ? 'Dragged-band paintings in PathKeep’s own colours: the light and dark walls, the orange heat scale, agent teal with browsing orange, and a quiet paper one. Full-width bands feathered into each other and dragged sideways on a ribbed canvas. Each is shown under PathKeep’s translucent window, then bare, with a 100% crop and its colours.' + : 'Nine paintings drawn in WebGL: pigments mixed with Kubelka–Munk, laid on linen, plaster or cold-pressed paper. Each one is shown as the top of the page would look, with a 100% crop, a phone crop and the colours a site would take from it. The nav and headline are placeholders to judge legibility, not the final type.' + }

+
    ${entries.map((e) => `
  1. ${esc(e.title)}
  2. `).join('')}
+
+${sections} + + +` +await writeFile(join(outDir, 'index.html'), html) +console.log(join(outDir, 'index.html')) diff --git a/site/hero-lab/page-check.ts b/site/hero-lab/page-check.ts new file mode 100644 index 00000000..c40c754d --- /dev/null +++ b/site/hero-lab/page-check.ts @@ -0,0 +1,419 @@ +/** + * Checks the landing page as a visitor loads it (nothing forced), in every + * language, at desktop, wide desktop and phone width: the opening card + * starts full-screen, stays so while its window rises to the middle of + * the screen, and is framed to the column the panels below hang in once + * the window moves on (and rests framed with reduced motion or without + * script), every in-page link + * lands, nothing scrolls sideways, every picture and request loads, no + * script errors, every section head and panel that rises into view ends up + * visible (and is never hidden without script), the retention chart draws + * itself when scrolled to, and the tabs swap the window. Also fails on wording the page dropped on + * purpose: the paintings are decoration, never exhibits, and sections + * carry no numbered labels. Needs the preview server on 4391. + * + * bun site/hero-lab/page-check.ts # in Chrome + * bun site/hero-lab/page-check.ts --webkit # in WebKit, Safari's engine + */ +import { chromium, webkit } from '@playwright/test' + +/** + * Where the opening card shows. Its frame is a clip, and the clip clips hit + * testing too, so this probes just inside and outside the edges of the + * column the panels below hang in. + */ +const probeCard = () => { + const card = document.querySelector('[data-intro]')! + const column = document.querySelector('.spaces')!.getBoundingClientRect() + const on = (x: number) => card.contains(document.elementFromPoint(x, 240)) + return { + fullScreen: on(1) && on(document.documentElement.clientWidth - 2), + framed: + !on(column.left - 2) && + on(column.left + 2) && + on(column.right - 2) && + !on(column.right + 2), + } +} + +/** Section heads and panels still hidden by their entrance (see Page.astro). */ +const hiddenParts = () => + Array.from(document.querySelectorAll('[data-reveal]')) + .flatMap((el) => + el.dataset.reveal === 'group' ? Array.from(el.children) : [el], + ) + .filter((el) => { + const style = getComputedStyle(el) + return Number(style.opacity) < 0.99 || style.transform !== 'none' + }) + .map((el) => el.textContent?.trim().slice(0, 32) || el.className) + +const PAGES = ['/', '/zh-tw/', '/zh-cn/'] +const DROPPED = [ + /圖版|图版/, + /\bPlates?\b/, + /版權頁|版权页/, + /Colophon/i, + /#[0-9a-f]{6}\b/i, + /\bpk-[a-z]+/, + /WebP\b/, + /\bseed\b/i, + /種子|种子/, + /\b0\d — /, + // A product token the copy failed to turn into its mark (Marked.astro). + /\{\w+:[^}]+\}/, +] + +const browser = process.argv.includes('--webkit') + ? await webkit.launch() + : await chromium.launch({ channel: 'chrome', headless: true }) +let failed = false +const fail = (msg: string) => { + failed = true + console.log(' FAIL', msg) +} + +for (const path of PAGES) { + // 1920 is wider than the column, so the frame closes past the gutter; + // 375×1366 (a phone-width window on a tall screen) brings the card's foot + // up early, before a quarter of a screen has scrolled. + const sizes = [ + [1440, 900], + [1920, 900], + [390, 844], + [375, 1366], + ] + for (const [width, height] of sizes) { + console.log(path, `${width}×${height}`) + const page = await browser.newPage({ viewport: { width, height } }) + const problems: string[] = [] + page.on('requestfailed', (r) => problems.push(`failed ${r.url()}`)) + page.on( + 'response', + (r) => r.status() >= 400 && problems.push(`${r.status()} ${r.url()}`), + ) + page.on('pageerror', (e) => problems.push(`script error: ${e.message}`)) + page.on( + 'console', + (m) => m.type() === 'error' && problems.push(`console: ${m.text()}`), + ) + await page.goto(`http://127.0.0.1:4391${path}`, { + waitUntil: 'networkidle', + }) + + const text = await page.evaluate(() => document.body.innerText) + for (const re of DROPPED) { + const m = text.match(re) + if (m) fail(`page says ${JSON.stringify(m[0])}`) + } + const badAnchors = await page.evaluate(() => + Array.from(document.querySelectorAll('a[href^="#"]')) + .map((a) => a.getAttribute('href')!) + .filter((h) => h !== '#' && !document.getElementById(h.slice(1))), + ) + if (badAnchors.length) fail(`links to nothing: ${badAnchors.join(', ')}`) + const sideways = await page.evaluate( + () => + document.documentElement.scrollWidth - + document.documentElement.clientWidth, + ) + if (sideways > 0) fail(`scrolls sideways by ${sideways}px`) + + // Everything set in the column shares its edges. (A caption's margin + // rule once undid the column's centring, pushing it out to the window's + // edge on screens wider than the column.) + const astray = await page.evaluate(() => { + const column = document.querySelector('.spaces')!.getBoundingClientRect() + return Array.from(document.querySelectorAll('.wrap')) + .filter((el) => { + const box = el.getBoundingClientRect() + const style = getComputedStyle(el) + const left = box.left + parseFloat(style.paddingLeft) + const right = box.right - parseFloat(style.paddingRight) + return ( + Math.abs(left - column.left) > 1 || + Math.abs(right - column.right) > 1 + ) + }) + .map((el) => el.className) + }) + if (astray.length) fail(`off the column: ${astray.join(', ')}`) + + // Each language's windows and feature tiles show the screens taken in + // that language. + const foreign = await page.evaluate( + (slug) => + Array.from( + document.querySelectorAll( + '.shot__screen, .tile__screen', + ), + ) + .map((i) => i.getAttribute('src')!) + .filter((src) => !src.startsWith(`/screens/${slug}/`)), + path.replaceAll('/', '') || 'en', + ) + if (foreign.length) + fail(`screens from another language: ${foreign.join(', ')}`) + + // The opening card is full-screen at the top, still full-screen when + // its window sits in the middle of the screen, and framed to the column + // once the window's foot is 30% of the way down. Positions come from + // layout, as Motion measures them: the window's scaling does not count. + const scrollTo = async (y: number) => { + await page.evaluate( + (top) => window.scrollTo({ top, behavior: 'instant' }), + y, + ) + await page.waitForTimeout(400) + } + const marks = await page.evaluate(() => { + const view = document.querySelector('.intro .shot__window')! + let top = 0 + for ( + let el: HTMLElement | null = view; + el; + el = el.offsetParent as HTMLElement | null + ) + top += el.offsetTop + return { + centred: top + view.offsetHeight / 2 - innerHeight / 2, + closed: top + view.offsetHeight - innerHeight * 0.3, + } + }) + const atTop = await page.evaluate(probeCard) + await scrollTo(marks.centred) + const centred = await page.evaluate(probeCard) + await scrollTo(marks.closed + 8) + const movedOn = await page.evaluate(probeCard) + if (!atTop.fullScreen) + fail('opening card does not fill the screen at the top of the page') + if (!centred.fullScreen) + fail('the wall closes in before the window reaches the middle') + if (!movedOn.framed) + fail('opening card not framed once its window has moved on') + + for (let y = 0; y < 16000; y += 300) { + await page.mouse.wheel(0, 300) + await page.waitForTimeout(40) + } + await page.waitForTimeout(2200) + const state = await page.evaluate(() => ({ + chart: document.querySelector('.retention')?.classList.contains('is-in'), + bars: Array.from(document.querySelectorAll('.retention__kept')).map( + (b) => getComputedStyle(b).transform, + ), + paint: getComputedStyle(document.querySelector('.retention__paint')!) + .clipPath, + broken: Array.from(document.images) + .filter( + (i) => + i.offsetParent !== null && (!i.complete || i.naturalWidth === 0), + ) + .map((i) => i.currentSrc || i.src), + paintings: Array.from( + document.querySelectorAll('.painting img'), + ).map((i) => i.currentSrc.split('/').pop()), + })) + if (!state.chart) fail('the retention chart never drew itself') + if (state.bars.some((t) => t !== 'none')) + fail(`bars not grown: ${state.bars.join(' ')}`) + if (state.paint !== 'inset(0px)' && state.paint !== 'none') + fail(`PathKeep's row not painted in: ${state.paint}`) + if (state.broken.length) + fail(`pictures that did not load: ${state.broken.join(', ')}`) + const hidden = await page.evaluate(hiddenParts) + if (hidden.length) + fail(`still hidden after scrolling past: ${hidden.join(' | ')}`) + console.log(' paintings:', state.paintings.join(' ')) + + // The demo: on a screen wide enough for the app it has loaded into its + // window, scaled to fit, and drawn a screen; a phone keeps the picture + // and says why. (`demo/check.ts` checks the app inside.) + await page + .locator('.demo__shot .shot__window.is-live') + .waitFor({ timeout: 15_000 }) + .catch(() => {}) + const demo = await page.evaluate(() => { + const window = document.querySelector( + '.demo__shot .shot__window', + )! + const frame = window.querySelector('iframe') + const narrow = document.querySelector('.demo__narrow')! + return { + live: window.classList.contains('is-live'), + frame: frame !== null, + fits: + frame !== null && + Math.abs(frame.getBoundingClientRect().width - window.clientWidth) < + 2, + narrow: getComputedStyle(narrow).display !== 'none', + } + }) + if (width >= 760) { + if (!demo.live) fail('the demo never came up in its window') + else if (!demo.fits) fail('the demo is not scaled to its window') + } else if (demo.frame || !demo.narrow) { + fail('a phone loads the demo instead of keeping the picture') + } + + // Over the demo the wheel scrolls the page until the window is clicked; + // clicked, the wheel and the keyboard go to the app; once the page has + // scrolled away and back, the wheel scrolls the page again. + if (width >= 760 && demo.live) { + const centre = async () => { + await page.evaluate(() => + document + .querySelector('.demo__shot .shot__window')! + .scrollIntoView({ block: 'center', behavior: 'instant' }), + ) + await page.waitForTimeout(400) + } + const app = page.frames().find((f) => f.url().includes('/app/'))! + const appScrolled = () => + app.evaluate(() => + Array.from(document.querySelectorAll('*')).some( + (el) => el.scrollTop > 0, + ), + ) + const wheelOver = async () => { + const box = (await page + .locator('.demo__shot .shot__window') + .boundingBox())! + await page.mouse.move( + box.x + box.width * 0.6, + box.y + box.height * 0.55, + ) + const before = await page.evaluate(() => scrollY) + await page.mouse.wheel(0, 400) + await page.waitForTimeout(600) + return (await page.evaluate(() => scrollY)) - before + } + await centre() + const idle = await wheelOver() + const idleApp = await appScrolled() + await centre() + await page.locator('.demo__shot .shot__start').click() + const started = await page.evaluate(() => { + const frame = document.querySelector('.demo__shot iframe') + return ( + frame instanceof HTMLIFrameElement && + !frame.inert && + document.activeElement === frame + ) + }) + const using = await wheelOver() + const usingApp = await appScrolled() + await scrollTo(0) + await centre() + const after = await wheelOver() + if (idle < 200 || idleApp) + fail('the wheel over the demo scrolls the app before it is clicked') + if (!started) fail('clicking the demo does not hand it the keyboard') + if (using !== 0 || !usingApp) + fail('the wheel over the clicked demo does not scroll the app') + if (after < 200) + fail('the demo keeps the wheel after the page scrolled away from it') + } + + await page.evaluate(() => window.scrollTo(0, 0)) + await page.waitForTimeout(300) + await page.click('[data-tab="agent"]') + await page.waitForTimeout(600) + const agent = await page.evaluate(() => + document + .querySelector('#shot-window .is-active') + ?.getAttribute('data-screen'), + ) + await page.focus('[data-tab="agent"]') + await page.keyboard.press('ArrowLeft') + await page.waitForTimeout(600) + const back = await page.evaluate(() => ({ + screen: document + .querySelector('#shot-window .is-active') + ?.getAttribute('data-screen'), + focused: document.activeElement?.getAttribute('data-tab'), + })) + if ( + agent !== 'agent' || + back.screen !== 'browsing' || + back.focused !== 'browsing' + ) { + fail( + `tabs: click → ${agent}; arrow key → ${back.screen}, focus on ${back.focused}`, + ) + } + + // A question opens to its whole answer, and closes again. + const question = page.locator('.faq__item').nth(1) + await question.locator('summary').click() + await page.waitForTimeout(600) + const opened = await question.evaluate((d) => { + const answer = d.querySelector('p')!.getBoundingClientRect() + const item = d.getBoundingClientRect() + return ( + (d as HTMLDetailsElement).open && + answer.height > 0 && + answer.bottom <= item.bottom + 1 + ) + }) + await question.locator('summary').click() + await page.waitForTimeout(600) + const closed = await question.evaluate( + (d) => !(d as HTMLDetailsElement).open, + ) + if (!opened || !closed) + fail(`a question does not open and close: ${opened}, ${closed}`) + if (problems.length) fail(problems.join('; ')) + await page.close() + } +} + +// The files beside the pages: the Markdown for language models (whole, and +// with every product token turned back into a name), the crawler rules, and +// a lost address answered with 404 and a way home in every language. +console.log('/llms.txt, /robots.txt, an unknown address') +const fetched = async (path: string) => { + const res = await fetch(`http://127.0.0.1:4391${path}`) + return { status: res.status, text: await res.text() } +} +const llms = await fetched('/llms.txt') +if (llms.status !== 200 || !llms.text.startsWith('# PathKeep')) + fail(`llms.txt: ${llms.status}`) +if (/[{}|]/.test(llms.text.replace(/\]\(.*?\)/g, ''))) + fail('llms.txt still holds copy markup') +if ((await fetched('/robots.txt')).status !== 200) fail('robots.txt missing') +const lost = await fetched('/zh-tw/catalogue/') +if (lost.status !== 404) fail(`an unknown address answers ${lost.status}`) +for (const home of ['href="/"', 'href="/zh-tw/"', 'href="/zh-cn/"']) + if (!lost.text.includes(home)) fail(`the 404 page has no link ${home}`) + +// With reduced motion nothing moves: the card rests framed from the start. +console.log('/ 1920, reduced motion') +const still = await browser.newPage({ + viewport: { width: 1920, height: 900 }, + reducedMotion: 'reduce', +}) +await still.goto('http://127.0.0.1:4391/', { waitUntil: 'networkidle' }) +if (!(await still.evaluate(probeCard)).framed) + fail('with reduced motion the opening card is not resting framed') +const stillHidden = await still.evaluate(hiddenParts) +if (stillHidden.length) + fail(`hidden with reduced motion: ${stillHidden.join(' | ')}`) +await still.close() + +// Without script every word is on the page (people and crawlers alike) and +// the card rests framed. +console.log('/ 1440, no script') +const bare = await browser.newPage({ + viewport: { width: 1440, height: 900 }, + javaScriptEnabled: false, +}) +await bare.goto('http://127.0.0.1:4391/', { waitUntil: 'networkidle' }) +const bareHidden = await bare.evaluate(hiddenParts) +if (bareHidden.length) fail(`hidden without script: ${bareHidden.join(' | ')}`) +if (!(await bare.evaluate(probeCard)).framed) + fail('without script the opening card is not resting framed') +await bare.close() +await browser.close() +console.log(failed ? 'SOME CHECKS FAILED' : 'all checks passed') +process.exit(failed ? 1 : 0) diff --git a/site/hero-lab/pageshot.ts b/site/hero-lab/pageshot.ts new file mode 100644 index 00000000..db6caae3 --- /dev/null +++ b/site/hero-lab/pageshot.ts @@ -0,0 +1,79 @@ +/** + * Screenshots site pages for review: the first screen at desktop and phone + * width as a visitor sees it, and the full page at rest. The full page is + * taken with reduced motion, so every section stands where it settles + * (nothing waits to scroll into view) and the opening card is framed. + * + * bun site/hero-lab/pageshot.ts […] [--width 1440] + */ +import { chromium, type Page } from '@playwright/test' +import { join } from 'node:path' + +const argv = process.argv.slice(2) +const width = Number( + argv.includes('--width') ? argv[argv.indexOf('--width') + 1] : 1440, +) +const paths = argv.filter( + (a, i) => !a.startsWith('--') && argv[i - 1] !== '--width', +) +const out = join(import.meta.dir, 'out', 'pages') +const browser = await chromium.launch({ channel: 'chrome', headless: true }) + +/** Opens a page with every picture loaded and the retention chart drawn. */ +const open = async ( + path: string, + options: Parameters[0], +): Promise => { + const page = await browser.newPage(options) + await page.goto(`http://127.0.0.1:4391${path}`, { waitUntil: 'networkidle' }) + await page.evaluate(async () => { + await document.fonts.ready + document.querySelector('.retention')?.classList.add('is-in') + for (const img of document.querySelectorAll('img')) img.loading = 'eager' + await Promise.all( + Array.from(document.images).map((i) => i.decode().catch(() => undefined)), + ) + }) + await page.waitForTimeout(1400) + return page +} + +for (const p of paths) { + const name = p.replace(/^\/|\/$/g, '').replace(/\//g, '-') || 'index' + const first = await open(p, { + viewport: { width, height: 900 }, + deviceScaleFactor: 1, + }) + await first.screenshot({ + path: join(out, `${name}-${width}-top.jpg`), + type: 'jpeg', + quality: 86, + }) + await first.close() + + const still = await open(p, { + viewport: { width, height: 900 }, + deviceScaleFactor: 1, + reducedMotion: 'reduce', + }) + await still.screenshot({ + path: join(out, `${name}-${width}-full.jpg`), + type: 'jpeg', + quality: 80, + fullPage: true, + }) + await still.close() + + const phone = await open(p, { + viewport: { width: 390, height: 844 }, + deviceScaleFactor: 2, + }) + await phone.screenshot({ + path: join(out, `${name}-phone.jpg`), + type: 'jpeg', + quality: 80, + }) + await phone.close() + console.log(name) +} +await browser.close() diff --git a/site/hero-lab/render.ts b/site/hero-lab/render.ts new file mode 100644 index 00000000..47155572 --- /dev/null +++ b/site/hero-lab/render.ts @@ -0,0 +1,102 @@ +/** + * Renders hero paintings to files. + * + * bun site/hero-lab/render.ts [preset[,preset…]|all] [--seed N] [--size WxH] + * [--preview 2000,1440] [--crop name:x,y,w,h] [--png] [--webp 0.9] + * + * Bundles `src/main.ts` with Bun, opens it in headless Chrome (the installed + * Chrome renders on the GPU; Playwright's bundled shell falls back to + * software GL, which works but is slow), and writes each file to + * `site/hero-lab/out//-s-x-`. + */ + +import { chromium } from '@playwright/test' +import { mkdir, writeFile } from 'node:fs/promises' +import { join } from 'node:path' +import type { PaintRequest, PaintResult } from './src/main' + +const here = import.meta.dir +const argv = process.argv.slice(2) +const flag = (name: string) => { + const i = argv.indexOf(`--${name}`) + return i >= 0 ? argv[i + 1] : undefined +} +const flags = (name: string) => + argv.flatMap((a, i) => (a === `--${name}` ? [argv[i + 1]] : [])) + +const [width, height] = (flag('size') ?? '3840x2400').split('x').map(Number) +const seeds = (flag('seed') ?? '1').split(',').map(Number) +const previews = (flag('preview') ?? '2000') + .split(',') + .filter(Boolean) + .map(Number) +const crops = flags('crop').map((spec) => { + const [name, rect] = spec.split(':') + const [x, y, w, h] = rect.split(',').map(Number) + return { name, x, y, w, h } +}) +const webp = flag('webp') + +const bundle = await Bun.build({ + entrypoints: [join(here, 'src/main.ts')], + target: 'browser', + format: 'esm', + loader: { '.glsl': 'text', '.frag': 'text', '.vert': 'text' }, +}) +if (!bundle.success) { + for (const m of bundle.logs) console.error(m) + process.exit(1) +} +const code = await bundle.outputs[0].text() + +const browser = await chromium.launch({ + channel: process.env.HERO_CHANNEL ?? 'chrome', + headless: true, +}) +const page = await browser.newPage() +page.on('console', (m) => console.log(`[page] ${m.text()}`)) +page.on('pageerror', (e) => console.error(`[page error] ${e.message}`)) +await page.setContent('') +await page.addScriptTag({ content: code, type: 'module' }) +await page.waitForFunction(() => 'heroPaint' in window) +const names = await page.evaluate( + () => (window as unknown as { heroPresets?: string[] }).heroPresets ?? [], +) + +const wanted = + argv[0] && !argv[0].startsWith('--') ? argv[0].split(',') : ['all'] +const ids = wanted.includes('all') ? names : wanted + +try { + for (const preset of ids) { + for (const seed of seeds) { + const req: PaintRequest = { + preset, + seed, + width, + height, + previews, + crops, + png: argv.includes('--png'), + } + if (webp) req.webpQuality = Number(webp) + const res = (await page.evaluate( + (r) => window.heroPaint(r), + req, + )) as PaintResult + const dir = join(here, 'out', preset) + await mkdir(dir, { recursive: true }) + const stem = `${preset}-s${seed}-${width}x${height}` + for (const f of res.files) { + const bytes = Buffer.from(f.base64, 'base64') + await writeFile(join(dir, `${stem}-${f.name}`), bytes) + console.log( + ` ${stem}-${f.name} ${(bytes.length / 1024).toFixed(0)} KB`, + ) + } + console.log(`${stem}: ${res.ms.toFixed(0)} ms (${res.log.join(', ')})`) + } + } +} finally { + await browser.close() +} diff --git a/site/hero-lab/screens-text.ts b/site/hero-lab/screens-text.ts new file mode 100644 index 00000000..4d98ca8c --- /dev/null +++ b/site/hero-lab/screens-text.ts @@ -0,0 +1,269 @@ +/** + * The words on the app screenshots in the page's other languages. The + * screens are drawn in Traditional Chinese; `capture-screens.ts` swaps every + * piece of text for its entry here before it takes the English and + * Simplified Chinese pictures, and stops on any piece without one. + * + * Keys are the text as the screen holds it, one text node, trimmed. An + * entry marked `app:` carries the app's own wording from that message in + * `src/lib/i18n/messages`; the rest are written for these pictures, in the + * same voice. English entries bring the spaces Chinese runs without. + */ + +export interface Words { + en: string + 'zh-CN': string +} + +export const words: Record = { + // The navigation and the space switcher, on every screen. + // The switcher shows a space's short name. + 瀏覽紀錄: { en: 'Browsing', 'zh-CN': '浏览记录' }, // app: spaces.browsing.shortName + 首頁: { en: 'Home', 'zh-CN': '首页' }, // app: shell.nav.home + 紀錄: { en: 'History', 'zh-CN': '记录' }, // app: shell.nav.history + 洞察: { en: 'Insights', 'zh-CN': '洞察' }, // app: insights.title + 備份: { en: 'Backup', 'zh-CN': '备份' }, // app: backup.title + 助理: { en: 'Assistant', 'zh-CN': '助理' }, // app: ask.export.assistant + 設定: { en: 'Settings', 'zh-CN': '设置' }, // app: settings.title + 專案: { en: 'Projects', 'zh-CN': '项目' }, + 搜尋與指令: { en: 'Search and commands', 'zh-CN': '搜索与指令' }, + '跳到頁面、對話或專案': { + en: 'Jump to pages, conversations or projects', + 'zh-CN': '跳到页面、对话或项目', + }, + + // Browsing history, Home. + '2026 年 11 月 13 日 星期五': { + en: 'Friday, November 13, 2026', + 'zh-CN': '2026 年 11 月 13 日 星期五', + }, + 午安: { en: 'Good afternoon', 'zh-CN': '下午好' }, // app: home.greetingAfternoon + '已保存 182 萬筆瀏覽紀錄,從 2019 年 1 月開始;這週新增 8,412 筆。': { + en: '1.82 million visits saved since January 2019; 8,412 new this week.', + 'zh-CN': + '已保存 182 万条浏览记录,从 2019 年 1 月开始;本周新增 8,412 条。', + }, + '上次備份 今天 15:02': { + en: 'Last backup today at 15:02', + 'zh-CN': '上次备份 今天 15:02', + }, + 立即備份: { en: 'Back up now', 'zh-CN': '立即备份' }, // app: shell.palette.backupNow + '最近 30 天': { en: 'Last 30 days', 'zh-CN': '最近 30 天' }, // English as the app's 30-day card on Home + '每天的造訪,共 11,877 筆': { + en: 'Visits per day, 11,877 in all', + 'zh-CN': '每天的浏览,共 11,877 次', + }, + 往年今日: { en: 'On this day', 'zh-CN': '往年今日' }, // app: home.onThisDay.title + '以前的 11 月 13 日,你在看什麼': { + en: 'What you were reading on November 13 in other years', + 'zh-CN': '以前的 11 月 13 日,你在看什么', + }, + '2025年11月13日': { en: 'Nov 13, 2025', 'zh-CN': '2025年11月13日' }, + '2024年11月13日': { en: 'Nov 13, 2024', 'zh-CN': '2024年11月13日' }, + '頁,最多在': { en: 'pages, mostly on', 'zh-CN': '页,最多在' }, + 'github.com、docs.rs': { + en: 'github.com, docs.rs', + 'zh-CN': 'github.com、docs.rs', + }, + 'www.youtube.com、zh.wikipedia.org': { + en: 'www.youtube.com, zh.wikipedia.org', + 'zh-CN': 'www.youtube.com、zh.wikipedia.org', + }, + '2026 閱讀清單': { en: '2026 reading list', 'zh-CN': '2026 阅读清单' }, + 這一年: { en: 'Your year', 'zh-CN': '这一年' }, // English as the app's year card on Home + 每天瀏覽的頁數: { en: 'Pages viewed each day', 'zh-CN': '每天浏览的页数' }, + '2026 年共 40,997 頁': { + en: '40,997 pages in 2026', + 'zh-CN': '2026 年共 40,997 页', + }, + 少: { en: 'Less', 'zh-CN': '少' }, // app: common.less + 多: { en: 'More', 'zh-CN': '多' }, // app: common.more + + // Agent conversations, Insights. + 全部時間: { en: 'all time', 'zh-CN': '全部时间' }, // app: insights.groups.all + '(': { en: ' (', 'zh-CN': '(' }, + ')': { en: ')', 'zh-CN': ')' }, + '7 天': { en: '7d', 'zh-CN': '7 天' }, // app: insights.range.d7 + '30 天': { en: '30d', 'zh-CN': '30 天' }, // app: insights.range.d30 + '90 天': { en: '90d', 'zh-CN': '90 天' }, // app: insights.range.d90 + 一年: { en: '1y', 'zh-CN': '一年' }, + 全部: { en: 'All', 'zh-CN': '全部' }, // app: common.all + 篩選: { en: 'Filter', 'zh-CN': '筛选' }, + 'Agent 工作時間': { en: 'Hours agents worked', 'zh-CN': 'Agent 工作时间' }, + '1,632 小時': { en: '1,632 hours', 'zh-CN': '1,632 小时' }, + '不眠不休 68 天': { en: '68 days nonstop', 'zh-CN': '不眠不休 68 天' }, + 分開加總: { en: 'Summed separately', 'zh-CN': '分开加总' }, + '2,215 小時': { en: '2,215 hours', 'zh-CN': '2,215 小时' }, + '平均同時開 1.4 個': { + en: '1.4 at a time on average', + 'zh-CN': '平均同时开 1.4 个', + }, + 你在場的時間: { en: 'Hours you were there', 'zh-CN': '你在场的时间' }, + '1,778 小時': { en: '1,778 hours', 'zh-CN': '1,778 小时' }, + '不眠不休 74 天': { en: '74 days nonstop', 'zh-CN': '不眠不休 74 天' }, + '估算:你在跟 Agent 來回的時段': { + en: 'Estimated: the stretches you spent going back and forth with an agent', + 'zh-CN': '估算:你在跟 Agent 来回的时段', + }, + '117 億': { en: '11.7 billion', 'zh-CN': '117 亿' }, + 段對話有: { en: 'conversations have ', 'zh-CN': '段对话有' }, + 用量: { en: 'usage', 'zh-CN': '用量' }, + '費用(按 API 牌價)': { + en: 'Cost (at API list prices)', + 'zh-CN': '费用(按 API 牌价)', + }, + '工具記下 US$2,228 · 估算 US$10,382': { + en: 'Recorded by tools US$2,228 · estimated US$10,382', + 'zh-CN': '工具记下 US$2,228 · 估算 US$10,382', + }, + 對話: { en: 'Conversations', 'zh-CN': '对话' }, // app: ask.list.label + '另有 9,948 個 subagent · 297 個專案': { + en: 'plus 9,948 subagents · 297 projects', + 'zh-CN': '另有 9,948 个 subagent · 297 个项目', + }, + '每天的 Agent 工作時間': { + en: 'Hours agents worked, day by day', + 'zh-CN': '每天的 Agent 工作时间', + }, + '一年裡的每一天,同時開的只算一次。不受上面的時間範圍影響': { + en: 'Every day of the year, with overlapping sessions counted once. The range above does not apply.', + 'zh-CN': '一年里的每一天,同时开的只算一次。不受上面的时间范围影响', + }, + '2026 年': { en: '2026', 'zh-CN': '2026 年' }, + 'Agent 工作': { en: 'Agents worked', 'zh-CN': 'Agent 工作' }, + '1,024 小時': { en: '1,024 hours', 'zh-CN': '1,024 小时' }, + 同時開的只算一次: { + en: 'overlaps counted once', + 'zh-CN': '同时开的只算一次', + }, + 有對話的日子: { en: 'Days with conversations', 'zh-CN': '有对话的日子' }, + '288 天': { en: '288 days', 'zh-CN': '288 天' }, + '今年到今天 317 天': { + en: 'of 317 so far this year', + 'zh-CN': '今年到今天 317 天', + }, + 每天平均: { en: 'Daily average', 'zh-CN': '每天平均' }, + '3.6 小時': { en: '3.6 hours', 'zh-CN': '3.6 小时' }, + 只算有對話的日子: { + en: 'on days with conversations', + 'zh-CN': '只算有对话的日子', + }, + 最長連續: { en: 'Longest streak', 'zh-CN': '最长连续' }, + '52 天': { en: '52 days', 'zh-CN': '52 天' }, + '9月17日 – 11月7日': { en: 'Sep 17 – Nov 7', 'zh-CN': '9月17日 – 11月7日' }, + 最忙的一天: { en: 'Busiest day', 'zh-CN': '最忙的一天' }, + '23 小時': { en: '23 hours', 'zh-CN': '23 小时' }, + '5月21日': { en: 'May 21', 'zh-CN': '5月21日' }, + 最忙的月份: { en: 'Busiest month', 'zh-CN': '最忙的月份' }, + '5 月': { en: 'May', 'zh-CN': '5 月' }, + '157 小時': { en: '157 hours', 'zh-CN': '157 小时' }, + 'Agent 工作的時間': { en: 'When agents worked', 'zh-CN': 'Agent 工作的时间' }, + '全部時間每月,單位:小時': { + en: 'Each month, all time, in hours', + 'zh-CN': '全部时间每月,单位:小时', + }, + 時間: { en: 'Hours', 'zh-CN': '时间' }, + 'Agent 工作時間(同時開的只算一次)': { + en: 'Hours agents worked (overlaps counted once)', + 'zh-CN': 'Agent 工作时间(同时开的只算一次)', + }, + '分開加總(同時開的各算各的)': { + en: 'Summed separately (each session counted)', + 'zh-CN': '分开加总(同时开的各算各的)', + }, + 依專案: { en: 'By project', 'zh-CN': '按项目' }, + '全部時間,Agent 花最多時間的專案(分開加總)': { + en: 'All time, the projects agents spent the most hours on (summed separately)', + 'zh-CN': '全部时间,Agent 花最多时间的项目(分开加总)', + }, + 個: { en: '', 'zh-CN': '个' }, + '150 段 · 7.84 億 token': { + en: '150 conversations · 784 million tokens', + 'zh-CN': '150 段 · 7.84 亿 token', + }, + '95 段 · 2.33 億 token': { + en: '95 conversations · 233 million tokens', + 'zh-CN': '95 段 · 2.33 亿 token', + }, + '53 段 · 4.82 億 token': { + en: '53 conversations · 482 million tokens', + 'zh-CN': '53 段 · 4.82 亿 token', + }, + '80 段 · 3.17 億 token': { + en: '80 conversations · 317 million tokens', + 'zh-CN': '80 段 · 3.17 亿 token', + }, + '358 小時': { en: '358 hours', 'zh-CN': '358 小时' }, + '160 小時': { en: '160 hours', 'zh-CN': '160 小时' }, + '91 小時': { en: '91 hours', 'zh-CN': '91 小时' }, + + // Agent conversations, History. + '今天 · 11月13日週五': { + en: 'Today · Fri, Nov 13', + 'zh-CN': '今天 · 11月13日周五', + }, + '昨天 · 11月12日週四': { + en: 'Yesterday · Thu, Nov 12', + 'zh-CN': '昨天 · 11月12日周四', + }, + '11月11日週三': { en: 'Wed, Nov 11', 'zh-CN': '11月11日周三' }, + 段: { en: '', 'zh-CN': '段' }, + '把這個資料夾裡的收據整理成表格,依類別加總,金額對不上的標出來': { + en: 'Put the receipts in this folder into a table, total them by category and flag the amounts that don’t add up', + 'zh-CN': '把这个文件夹里的收据整理成表格,按类别加总,金额对不上的标出来', + }, + 採訪逐字稿: { en: 'interview-transcripts', 'zh-CN': '采访逐字稿' }, + 清掉沒用到的依賴: { + en: 'Remove the dependencies we don’t use', + 'zh-CN': '清掉没用到的依赖', + }, + '把 Tauri 升到最新版,列出 breaking changes 跟我們要改的地方,先': { + en: 'Upgrade Tauri to the latest version, list the breaking changes and what we have to change, then', + 'zh-CN': '把 Tauri 升到最新版,列出 breaking changes 跟我们要改的地方,先', + }, + '修 dark mode 對比不足': { + en: 'Fix the weak contrast in dark mode', + 'zh-CN': '修 dark mode 对比不足', + }, + 選一段對話來看: { + en: 'Pick a conversation to read', + 'zh-CN': '选一段对话来看', + }, + 切換對話: { en: 'Switch conversations', 'zh-CN': '切换对话' }, + 搜尋全部對話: { en: 'Search all conversations', 'zh-CN': '搜索全部对话' }, + 跳到任何地方: { en: 'Jump anywhere', 'zh-CN': '跳到任何地方' }, + '搜尋所有對話…': { + en: 'Search all conversations…', + 'zh-CN': '搜索所有对话…', + }, + + // The browsing records page. + 日期: { en: 'Date', 'zh-CN': '日期' }, + 所有瀏覽器: { en: 'All browsers', 'zh-CN': '所有浏览器' }, // app: history.browser.all + 時間線: { en: 'Timeline', 'zh-CN': '时间线' }, // app: history.views.timeline + 網站: { en: 'Sites', 'zh-CN': '网站' }, // app: history.views.sites + 已加星: { en: 'Starred', 'zh-CN': '已加星' }, // app: history.views.starred + 筆: { en: 'visits', 'zh-CN': '笔' }, + '時刻表與票價 | 台灣高鐵': { + en: 'Timetable and fares | Taiwan High Speed Rail', + 'zh-CN': '时刻表与票价 | 台湾高铁', + }, + 'sqlcipher rekey progress - Google 搜尋': { + en: 'sqlcipher rekey progress - Google Search', + 'zh-CN': 'sqlcipher rekey progress - Google 搜索', + }, + '搜尋標題、網址、筆記': { + en: 'Search titles, URLs, notes', + 'zh-CN': '搜索标题、网址、笔记', + }, +} + +/** + * Pieces that read differently inside one phrase than on their own, keyed + * by the whole phrase as its element holds it (spaces collapsed). + */ +export const inPhrase: Record> = { + '1,757 / 1,942 段對話有用量紀錄': { + 紀錄: { en: ' records', 'zh-CN': '记录' }, + }, +} diff --git a/site/hero-lab/sheet.ts b/site/hero-lab/sheet.ts new file mode 100644 index 00000000..879147bd --- /dev/null +++ b/site/hero-lab/sheet.ts @@ -0,0 +1,34 @@ +/** + * Contact sheet: lays rendered previews out in a labelled grid and screenshots it. + * + * bun site/hero-lab/sheet.ts [image…] + */ + +import { chromium } from '@playwright/test' +import { readFile } from 'node:fs/promises' +import { basename } from 'node:path' + +const [out, colsArg, ...images] = process.argv.slice(2) +const cols = Number(colsArg) +const cellW = Math.floor(2400 / cols) +const cells = await Promise.all( + images.map(async (path) => { + const data = (await readFile(path)).toString('base64') + return `
${basename(path)}
` + }), +) +const html = `
${cells.join('')}
` +const browser = await chromium.launch({ channel: 'chrome', headless: true }) +const page = await browser.newPage({ + viewport: { width: cellW * cols, height: 400 }, +}) +await page.setContent(html) +await page.screenshot({ path: out, fullPage: true, type: 'jpeg', quality: 88 }) +await browser.close() +console.log(out) diff --git a/site/hero-lab/split.ts b/site/hero-lab/split.ts new file mode 100644 index 00000000..d4d72ead --- /dev/null +++ b/site/hero-lab/split.ts @@ -0,0 +1,35 @@ +/** + * Splits a tall full-page screenshot into N stacked parts for review. + * + * bun site/hero-lab/split.ts + */ +import { chromium } from '@playwright/test' +import { readFile } from 'node:fs/promises' + +const [file, partsArg] = process.argv.slice(2) +const parts = Number(partsArg ?? 3) +const src = (await readFile(file)).toString('base64') +const browser = await chromium.launch({ channel: 'chrome', headless: true }) +const page = await browser.newPage({ viewport: { width: 1440, height: 900 } }) +await page.setContent( + ``, +) +const { w, h } = await page.evaluate(() => { + const i = document.getElementById('i') as HTMLImageElement + return { w: i.naturalWidth, h: i.naturalHeight } +}) +const step = Math.ceil(h / parts) +for (let k = 0; k < parts; k++) { + await page.setViewportSize({ width: w, height: Math.min(step, h - k * step) }) + await page.evaluate((y) => { + ;(document.getElementById('i') as HTMLImageElement).style.transform = + `translateY(-${y}px)` + }, k * step) + await page.screenshot({ + path: file.replace(/\.jpg$/, `-part${k + 1}.jpg`), + type: 'jpeg', + quality: 80, + }) +} +await browser.close() +console.log(`${h}px in ${parts} parts`) diff --git a/site/hero-lab/src/brushwork.ts b/site/hero-lab/src/brushwork.ts new file mode 100644 index 00000000..7136745b --- /dev/null +++ b/site/hero-lab/src/brushwork.ts @@ -0,0 +1,278 @@ +/** + * Where the brush goes: seeded generators that place strokes the way a + * painter would fill a field or drag a dry brush across a boundary, and the + * ribbon mesh the GPU draws for them. + * + * Coordinates are composition space: y down, canvas height = 1, x from 0 to + * the aspect ratio. Widths and lengths are in the same units. + */ + +export interface Stroke { + x: number + y: number + angle: number + length: number + width: number + /** Sideways bow at the middle, as a share of the length. */ + bend: number + /** Hand tremor, as a share of the width. */ + wobble: number + load: number + decay: number + dryness: number + bristle: number + thickness: number + soft: number + /** Share of the length spent landing and lifting the brush. */ + taper: number + /** Extra paint dropped where the brush lands. */ + puddle: number + seed: number +} + +export interface Region { + x0: number + y0: number + x1: number + y1: number +} + +export type Range = readonly [number, number] + +export function rng(seed: number): () => number { + let a = seed >>> 0 + let b = (seed * 2654435761) >>> 0 + let c = (seed ^ 0x9e3779b9) >>> 0 + let d = 1 + return () => { + a >>>= 0 + b >>>= 0 + c >>>= 0 + d >>>= 0 + const t = (a + b + d) | 0 + d = (d + 1) | 0 + a = b ^ (b >>> 9) + b = (c + (c << 3)) | 0 + c = (c << 21) | (c >>> 11) + c = (c + t) | 0 + return (t >>> 0) / 4294967296 + } +} + +export type Rand = () => number + +function pick(r: Rand, range: Range | number): number { + if (typeof range === 'number') return range + return range[0] + (range[1] - range[0]) * r() +} + +function gauss(r: Rand): number { + const u = Math.max(r(), 1e-9) + return Math.sqrt(-2 * Math.log(u)) * Math.cos(2 * Math.PI * r()) +} + +export interface BrushSettings { + count: number + /** Mean angle in degrees and its spread (standard deviation). */ + angle?: readonly [number, number] + /** Share of strokes laid at a steeper, scrubbing angle. */ + scrub?: number + scrubAngle?: number + /** Stroke length as a share of the region's width. */ + length: Range + width: Range + load?: Range | number + decay?: Range | number + dryness?: Range | number + bristle?: Range | number + thickness?: Range | number + soft?: Range | number + taper?: Range | number + puddle?: Range | number + bend?: Range | number + wobble?: Range | number + /** How far stroke centres may stray outside the region (composition units). */ + margin?: number + /** Concentrate stroke centres toward the region's top (−1) or bottom (+1) edge. */ + bias?: number +} + +function make( + r: Rand, + s: BrushSettings, + cx: number, + cy: number, + regionWidth: number, + angleDeg: number, +): Stroke { + const length = pick(r, s.length) * regionWidth + const forward = r() < 0.5 ? 0 : Math.PI + const angle = (angleDeg * Math.PI) / 180 + forward + return { + x: cx - (Math.cos(angle) * length) / 2, + y: cy - (Math.sin(angle) * length) / 2, + angle, + length, + width: pick(r, s.width), + bend: pick(r, s.bend ?? [-0.04, 0.04]), + wobble: pick(r, s.wobble ?? [0.02, 0.08]), + load: pick(r, s.load ?? [0.8, 1]), + decay: pick(r, s.decay ?? [0.4, 1.2]), + dryness: pick(r, s.dryness ?? 0), + bristle: pick(r, s.bristle ?? [0.35, 0.55]), + thickness: pick(r, s.thickness ?? [0.3, 0.45]), + soft: pick(r, s.soft ?? 0.5), + taper: pick(r, s.taper ?? 0.12), + puddle: pick(r, s.puddle ?? 0), + seed: Math.floor(r() * 100000), + } +} + +/** Strokes scattered over a region, mostly along one direction. */ +export function fill(r: Rand, region: Region, s: BrushSettings): Stroke[] { + const out: Stroke[] = [] + const margin = s.margin ?? 0.02 + const [meanAngle, spread] = s.angle ?? [0, 6] + const width = region.x1 - region.x0 + for (let i = 0; i < s.count; i++) { + const cx = region.x0 - margin + (width + 2 * margin) * r() + let v = r() + if (s.bias) + v = s.bias > 0 ? 1 - (1 - v) ** (1 + s.bias * 2) : v ** (1 - s.bias * 2) + const cy = region.y0 - margin + (region.y1 - region.y0 + 2 * margin) * v + const scrub = r() < (s.scrub ?? 0) + const angle = scrub + ? (r() < 0.5 ? -1 : 1) * (s.scrubAngle ?? 35) + gauss(r) * 10 + : meanAngle + gauss(r) * spread + out.push(make(r, s, cx, cy, width, angle)) + } + return out +} + +export interface SweepSettings extends Omit { + /** Where the sweeps run: a centre line and how far strokes stray from it. */ + y: number + spread: number + /** Horizontal span the strokes start in. */ + x: Range + /** Slope of the centre line, dy per dx. */ + tilt?: number +} + +/** Long, mostly horizontal strokes along a line: dry brush over a boundary. */ +export function sweep(r: Rand, aspect: number, s: SweepSettings): Stroke[] { + const out: Stroke[] = [] + const [meanAngle, spread] = s.angle ?? [0, 1.2] + for (let i = 0; i < s.count; i++) { + const stroke = make(r, s, 0, 0, aspect, meanAngle + gauss(r) * spread) + const startX = pick(r, s.x) + const leftToRight = Math.cos(stroke.angle) > 0 + stroke.x = leftToRight ? startX : startX + stroke.length + stroke.y = s.y + gauss(r) * s.spread + (s.tilt ?? 0) * (startX - aspect / 2) + out.push(stroke) + } + return out +} + +function noise1(seed: number, x: number): number { + const h = (n: number) => { + let v = (Math.imul(n ^ seed, 0x27d4eb2d) ^ (n >>> 15)) >>> 0 + v = Math.imul(v ^ (v >>> 13), 0x165667b1) >>> 0 + return (v >>> 0) / 4294967296 + } + const i = Math.floor(x) + const f = x - i + const u = f * f * (3 - 2 * f) + return (h(i) * (1 - u) + h(i + 1) * u) * 2 - 1 +} + +export const FLOATS_PER_VERTEX = 18 +const SEGMENTS = 72 +const OVERSCAN = 1.2 + +/** Ribbon triangles for every stroke; `refHeight` turns lengths into reference pixels. */ +export function strokeMesh( + strokes: readonly Stroke[], + refHeight: number, +): Float32Array { + const verts = new Float32Array( + strokes.length * SEGMENTS * 6 * FLOATS_PER_VERTEX, + ) + let o = 0 + const centre = (st: Stroke, s: number): [number, number] => { + const dx = Math.cos(st.angle) + const dy = Math.sin(st.angle) + const along = s * st.length + const side = + st.bend * st.length * 4 * s * (1 - s) + + st.wobble * st.width * noise1(st.seed, s * 3.2) + return [st.x + dx * along - dy * side, st.y + dy * along + dx * side] + } + for (const st of strokes) { + const lenPx = st.length * refHeight + const widPx = st.width * refHeight + const hairs = Math.max(8, widPx / 4.5) + const rows: number[][] = [] + for (let i = 0; i <= SEGMENTS; i++) { + const s = -0.03 + (i / SEGMENTS) * 1.06 + const [cx, cy] = centre(st, s) + const [ax, ay] = centre(st, s - 0.002) + const [bx, by] = centre(st, s + 0.002) + let tx = bx - ax + let ty = by - ay + const tl = Math.hypot(tx, ty) || 1 + tx /= tl + ty /= tl + const press = 0.82 + 0.18 * Math.min(1, Math.max(0, s / 0.07)) + const half = + (st.width / 2) * + press * + (0.94 + 0.06 * noise1(st.seed + 7, s * 5)) * + OVERSCAN + rows.push([ + cx - ty * half, + cy + tx * half, + s, + -OVERSCAN, + cx + ty * half, + cy - tx * half, + s, + OVERSCAN, + ]) + } + const attrs = [ + st.seed % 9973, + st.load, + st.decay, + st.dryness, + st.bristle, + hairs, + st.thickness, + st.soft, + st.taper, + st.puddle, + 0, + 0, + lenPx, + widPx, + ] + const put = (x: number, y: number, s: number, t: number) => { + verts[o++] = x + verts[o++] = y + verts[o++] = s + verts[o++] = t + for (const v of attrs) verts[o++] = v + } + for (let i = 0; i < SEGMENTS; i++) { + const a = rows[i] + const b = rows[i + 1] + put(a[0], a[1], a[2], a[3]) + put(a[4], a[5], a[6], a[7]) + put(b[0], b[1], b[2], b[3]) + put(a[4], a[5], a[6], a[7]) + put(b[4], b[5], b[6], b[7]) + put(b[0], b[1], b[2], b[3]) + } + } + return verts +} diff --git a/site/hero-lab/src/gl.ts b/site/hero-lab/src/gl.ts new file mode 100644 index 00000000..dc0d514e --- /dev/null +++ b/site/hero-lab/src/gl.ts @@ -0,0 +1,220 @@ +/** + * WebGL2 plumbing for the hero painter. + * + * Responsibilities: float render targets, programs whose uniforms are found + * by introspection, a fullscreen pass that can be split into tiles, and a GPU + * fence so a long pass never runs as one multi-second draw (the browser drops + * the context when a single draw takes too long). + * Not responsible for: what any pass paints. That lives in `painter.ts`. + */ + +export type GL = WebGL2RenderingContext + +export const HEADER = `#version 300 es +precision highp float; +precision highp int; +precision highp sampler2D; +` + +export interface Target { + tex: WebGLTexture + fbo: WebGLFramebuffer + width: number + height: number +} + +export function createTarget( + gl: GL, + width: number, + height: number, + internalFormat: number, +): Target { + const tex = gl.createTexture() + const fbo = gl.createFramebuffer() + if (!tex || !fbo) throw new Error('could not allocate a render target') + gl.bindTexture(gl.TEXTURE_2D, tex) + gl.texStorage2D(gl.TEXTURE_2D, 1, internalFormat, width, height) + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST) + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST) + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE) + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE) + gl.bindFramebuffer(gl.FRAMEBUFFER, fbo) + gl.framebufferTexture2D( + gl.FRAMEBUFFER, + gl.COLOR_ATTACHMENT0, + gl.TEXTURE_2D, + tex, + 0, + ) + const status = gl.checkFramebufferStatus(gl.FRAMEBUFFER) + if (status !== gl.FRAMEBUFFER_COMPLETE) + throw new Error(`framebuffer incomplete (0x${status.toString(16)})`) + gl.bindFramebuffer(gl.FRAMEBUFFER, null) + return { tex, fbo, width, height } +} + +export type UniformValue = number | readonly number[] + +export interface Program { + prog: WebGLProgram + set: (values: Record) => void + textures: (bindings: Record) => void + attrib: (name: string) => number +} + +function compile(gl: GL, type: number, source: string): WebGLShader { + const shader = gl.createShader(type) + if (!shader) throw new Error('could not create a shader') + gl.shaderSource(shader, source) + gl.compileShader(shader) + if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { + const log = gl.getShaderInfoLog(shader) ?? '' + const lines = source.split('\n') + const wanted = new Set() + for (const m of log.matchAll(/ERROR: \d+:(\d+)/g)) { + const n = Number(m[1]) + for (let i = n - 3; i <= n + 2; i++) wanted.add(i) + } + const context = [...wanted] + .filter((n) => n >= 1 && n <= lines.length) + .sort((a, b) => a - b) + .map((n) => `${String(n).padStart(4)}| ${lines[n - 1]}`) + .join('\n') + throw new Error(`shader compile failed:\n${log}\n${context}`) + } + return shader +} + +export function createProgram( + gl: GL, + vertexSource: string, + fragmentSource: string, +): Program { + const prog = gl.createProgram() + if (!prog) throw new Error('could not create a program') + gl.attachShader(prog, compile(gl, gl.VERTEX_SHADER, vertexSource)) + gl.attachShader(prog, compile(gl, gl.FRAGMENT_SHADER, fragmentSource)) + gl.linkProgram(prog) + if (!gl.getProgramParameter(prog, gl.LINK_STATUS)) { + throw new Error(`program link failed: ${gl.getProgramInfoLog(prog)}`) + } + + const setters = new Map void>() + const samplers: string[] = [] + const count = gl.getProgramParameter(prog, gl.ACTIVE_UNIFORMS) as number + for (let i = 0; i < count; i++) { + const info = gl.getActiveUniform(prog, i) + if (!info) continue + const name = info.name.replace(/\[0\]$/, '') + const loc = gl.getUniformLocation(prog, info.name) + if (!loc) continue + const arr = (v: UniformValue) => + typeof v === 'number' ? [v] : (v as number[]) + switch (info.type) { + case gl.FLOAT: + setters.set(name, (v) => gl.uniform1fv(loc, arr(v))) + break + case gl.FLOAT_VEC2: + setters.set(name, (v) => gl.uniform2fv(loc, arr(v))) + break + case gl.FLOAT_VEC3: + setters.set(name, (v) => gl.uniform3fv(loc, arr(v))) + break + case gl.FLOAT_VEC4: + setters.set(name, (v) => gl.uniform4fv(loc, arr(v))) + break + case gl.INT: + case gl.BOOL: + setters.set(name, (v) => gl.uniform1iv(loc, arr(v))) + break + case gl.SAMPLER_2D: + samplers.push(name) + setters.set(name, (v) => gl.uniform1i(loc, v as number)) + break + default: + throw new Error( + `uniform ${name} has a type this painter does not set (0x${info.type.toString(16)})`, + ) + } + } + + return { + prog, + set(values) { + gl.useProgram(prog) + for (const [name, value] of Object.entries(values)) { + const setter = setters.get(name) + if (setter) setter(value) + } + }, + textures(bindings) { + gl.useProgram(prog) + let unit = 0 + for (const name of samplers) { + const tex = bindings[name] + if (!tex) throw new Error(`sampler ${name} has no texture bound`) + gl.activeTexture(gl.TEXTURE0 + unit) + gl.bindTexture(gl.TEXTURE_2D, tex) + setters.get(name)?.(unit) + unit++ + } + }, + attrib(name) { + return gl.getAttribLocation(prog, name) + }, + } +} + +/** Waits for the GPU to finish what has been queued, without blocking the page. */ +export async function gpuSync(gl: GL): Promise { + const sync = gl.fenceSync(gl.SYNC_GPU_COMMANDS_COMPLETE, 0) + if (!sync) { + gl.finish() + return + } + gl.flush() + for (;;) { + const status = gl.clientWaitSync(sync, 0, 0) + if (status === gl.ALREADY_SIGNALED || status === gl.CONDITION_SATISFIED) + break + if (status === gl.WAIT_FAILED) throw new Error('GPU wait failed') + await new Promise((resolve) => setTimeout(resolve, 1)) + } + gl.deleteSync(sync) + if (gl.isContextLost()) throw new Error('WebGL context lost') +} + +export const FULLSCREEN_VS = `${HEADER} +void main() { + vec2 p = vec2(float((gl_VertexID << 1) & 2), float(gl_VertexID & 2)); + gl_Position = vec4(p * 2.0 - 1.0, 0.0, 1.0); +} +` + +/** Draws a fullscreen triangle into `target`, split into `tiles` × `tiles` scissored pieces. */ +export async function fullscreen( + gl: GL, + target: Target | null, + width: number, + height: number, + tiles = 1, +): Promise { + gl.bindFramebuffer(gl.FRAMEBUFFER, target ? target.fbo : null) + gl.viewport(0, 0, width, height) + if (tiles <= 1) { + gl.drawArrays(gl.TRIANGLES, 0, 3) + await gpuSync(gl) + return + } + gl.enable(gl.SCISSOR_TEST) + const tw = Math.ceil(width / tiles) + const th = Math.ceil(height / tiles) + for (let ty = 0; ty < tiles; ty++) { + for (let tx = 0; tx < tiles; tx++) { + gl.scissor(tx * tw, ty * th, tw, th) + gl.drawArrays(gl.TRIANGLES, 0, 3) + await gpuSync(gl) + } + } + gl.disable(gl.SCISSOR_TEST) +} diff --git a/site/hero-lab/src/glsl/common.glsl b/site/hero-lab/src/glsl/common.glsl new file mode 100644 index 00000000..3fe4e685 --- /dev/null +++ b/site/hero-lab/src/glsl/common.glsl @@ -0,0 +1,122 @@ +// Shared by every pass: hashing, gradient noise, fBm, Worley cells, colour +// conversion and the two coordinate systems. +// +// `refPx()` is in reference pixels: a 3840-wide canvas, y down. Texture sizes +// (threads, paper tooth, bristles) are written in these units so a smaller +// render shows the same painting, only with less detail. +// `normCoord()` is the composition space: y down, height = 1, x up to aspect. + +#define PI 3.14159265359 + +uniform vec2 uRes; +uniform float uRef; + +vec2 refPx() { return vec2(gl_FragCoord.x, uRes.y - gl_FragCoord.y) * uRef; } +vec2 normCoord() { return vec2(gl_FragCoord.x, uRes.y - gl_FragCoord.y) / uRes.y; } + +uint pkHash(uint x) { + x ^= x >> 16u; + x *= 0x7feb352du; + x ^= x >> 15u; + x *= 0x846ca68bu; + x ^= x >> 16u; + return x; +} + +uint pkHash2(ivec2 p) { + uvec2 q = uvec2(p + ivec2(1048576)); + return pkHash(q.x ^ pkHash(q.y + 0x9e3779b9u)); +} + +float hash12(vec2 p) { return float(pkHash2(ivec2(floor(p)))) / 4294967295.0; } + +vec2 hash22(vec2 p) { + uint h = pkHash2(ivec2(floor(p))); + return vec2(float(h), float(pkHash(h ^ 0x68bc21ebu))) / 4294967295.0; +} + +vec2 seedOffset(float seed) { + return vec2(hash12(vec2(seed, 17.0)), hash12(vec2(seed, 91.0))) * 997.0; +} + +vec2 gradDir(vec2 i) { + float a = hash12(i) * 6.28318530718; + return vec2(cos(a), sin(a)); +} + +// Gradient noise, roughly in [-1, 1]. +float gnoise(vec2 p) { + vec2 i = floor(p); + vec2 f = p - i; + vec2 u = f * f * f * (f * (f * 6.0 - 15.0) + 10.0); + float a = dot(gradDir(i), f); + float b = dot(gradDir(i + vec2(1.0, 0.0)), f - vec2(1.0, 0.0)); + float c = dot(gradDir(i + vec2(0.0, 1.0)), f - vec2(0.0, 1.0)); + float d = dot(gradDir(i + vec2(1.0, 1.0)), f - vec2(1.0, 1.0)); + return mix(mix(a, b, u.x), mix(c, d, u.x), u.y) * 1.414; +} + +// Fractal sum of rotated octaves, roughly in [-1, 1] (mostly within ±0.6). +float fbm(vec2 p, int octaves) { + float sum = 0.0; + float amp = 0.5; + float norm = 0.0; + for (int i = 0; i < 9; i++) { + if (i >= octaves) break; + sum += amp * gnoise(p); + norm += amp; + p = mat2(1.6, 1.2, -1.2, 1.6) * p + vec2(37.1, 17.3); + amp *= 0.5; + } + return sum / norm; +} + +vec2 fbm2(vec2 p, int octaves) { + return vec2(fbm(p, octaves), fbm(p + vec2(41.3, 73.9), octaves)); +} + +// Distances to the nearest and second-nearest cell points. +vec2 worley(vec2 p) { + vec2 i = floor(p); + vec2 f = p - i; + float f1 = 9.0; + float f2 = 9.0; + for (int y = -1; y <= 1; y++) { + for (int x = -1; x <= 1; x++) { + vec2 g = vec2(float(x), float(y)); + vec2 r = g + hash22(i + g) - f; + float d = dot(r, r); + if (d < f1) { + f2 = f1; + f1 = d; + } else if (d < f2) { + f2 = d; + } + } + } + return sqrt(vec2(f1, f2)); +} + +vec3 srgbToLinear(vec3 c) { + return mix(c / 12.92, pow((c + 0.055) / 1.055, vec3(2.4)), step(0.04045, c)); +} + +vec3 linearToSrgb(vec3 c) { + c = max(c, vec3(0.0)); + return mix(c * 12.92, 1.055 * pow(c, vec3(1.0 / 2.4)) - 0.055, step(0.0031308, c)); +} + +// Kubelka–Munk: one paint layer of thickness x (absorption K, scattering S +// per channel) laid over a surface whose reflectance is Rg. +vec3 kmOver(vec3 K, vec3 S, float x, vec3 Rg) { + vec3 s = max(S, vec3(1e-4)); + vec3 a = 1.0 + K / s; + vec3 b = sqrt(max(a * a - 1.0, vec3(1e-8))); + vec3 bsx = min(b * s * x, vec3(15.0)); + vec3 sh = sinh(bsx); + vec3 ch = cosh(bsx); + vec3 c = a * sh + b * ch; + vec3 R = sh / c; + vec3 T = b / c; + return R + T * T * Rg / (1.0 - R * Rg); +} diff --git a/site/hero-lab/src/glsl/composite.frag b/site/hero-lab/src/glsl/composite.frag new file mode 100644 index 00000000..eb33400d --- /dev/null +++ b/site/hero-lab/src/glsl/composite.frag @@ -0,0 +1,53 @@ +// Lays one paint layer over the surface with Kubelka–Munk. The layer target +// holds the paint thickness (r) and the share of the second pigment (g). +// Optional wear takes paint off the high points of the weave inside worn +// patches, the way abrasion exposes the layers below on an old painting. + +uniform sampler2D uSurface; +uniform sampler2D uLayer; +uniform vec3 uKa; +uniform vec3 uSa; +uniform vec3 uKb; +uniform vec3 uSb; +uniform float uThickness; +uniform float uImpasto; +uniform vec4 uWear; // amount, patch size (ref px), height where wear starts, seed +uniform float uLosses; // chance of small flakes lost down to the support +uniform float uLevel; // how much a thick layer fills the weave's valleys + +out vec4 outColor; + +void main() { + ivec2 ip = ivec2(gl_FragCoord.xy); + vec4 s = texelFetch(uSurface, ip, 0); + vec4 layer = texelFetch(uLayer, ip, 0); + float x = layer.r * uThickness; + + if (uWear.x > 0.0) { + vec2 rp = refPx(); + vec2 so = seedOffset(uWear.w); + float patches = smoothstep(0.0, 0.3, fbm(rp / uWear.y + so, 5) + uWear.x - 0.55); + float peak = smoothstep(uWear.z - 0.12, uWear.z + 0.1, s.a + 0.08 * gnoise(rp / 2.0 + so)); + float rub = patches * peak; + float scuff = smoothstep(0.55, 0.85, fbm(vec2(rp.x / 140.0, rp.y / 9.0) + so + 4.0, 4) + uWear.x * 0.4); + x *= 1.0 - clamp(rub * 0.92 + scuff * peak * 0.5, 0.0, 1.0); + } + if (uLosses > 0.0) { + vec2 rp = refPx(); + vec2 so = seedOffset(uWear.w + 3.0); + vec2 w = worley(rp / 34.0 + so + fbm2(rp / 20.0 + so, 3) * 0.35); + float lost = smoothstep(0.2, 0.12, w.x) * step(1.0 - uLosses, hash12(rp / 34.0 + so + 0.5)); + x *= 1.0 - lost; + } + + if (x <= 1e-5) { + outColor = s; + return; + } + vec3 K = mix(uKa, uKb, layer.g); + vec3 S = mix(uSa, uSb, layer.g); + // Paint settles into the valleys first, so a thick layer evens the surface out. + float level = (1.0 - exp(-x * uLevel)) * 0.4; + float height = mix(s.a, 0.5 + (s.a - 0.5) * 0.25, level) + x * uImpasto; + outColor = vec4(kmOver(K, S, x, s.rgb), height); +} diff --git a/site/hero-lab/src/glsl/field.frag b/site/hero-lab/src/glsl/field.frag new file mode 100644 index 00000000..b7d3afc4 --- /dev/null +++ b/site/hero-lab/src/glsl/field.frag @@ -0,0 +1,94 @@ +// One colour field laid with a broad brush: even coverage inside a soft, +// fraying rectangle, with the brush's streaks running along its direction. +// +// The streaks are noise read in a frame turned to the brush angle and gently +// bent by a slow displacement, so they curve the way an arm sweeps, without +// the swirls a per-pixel rotation would make. Long, soft patches on top are +// the separate passes of the brush. With dryness the paint only catches the +// high points of the surface: a scumble. +// Writes thickness (r) and the share of the second pigment (g). + +uniform sampler2D uSurface; +uniform float uSeed; +uniform vec4 uRegion; // x0, y0, x1, y1 in composition space +uniform vec4 uEdge; // softness across x, softness across y, outline wander, fray +uniform vec4 uPaint; // base thickness, patchiness, streak contrast, dryness +uniform vec4 uBrush; // angle (radians), streak width (ref px), streak length (ref px), cross-stroke share +uniform vec2 uRim; // extra paint along the edge, rim width (composition units) +uniform vec4 uMix; // base share of pigment B, variation, frequency, gradient down the field + +out vec4 outColor; + +float edgeBand(float v, float lo, float hi, float soft) { + return smoothstep(lo - soft, lo + soft, v) * (1.0 - smoothstep(hi - soft, hi + soft, v)); +} + +vec2 alongAcross(vec2 p, float angle) { + float c = cos(angle); + float s = sin(angle); + return vec2(c * p.x + s * p.y, -s * p.x + c * p.y); +} + +float streaks(vec2 p, float angle, vec2 so) { + vec2 a = alongAcross(p, angle); + // Lines wander sideways along the sweep, so they are never quite parallel. + float y = a.y + gnoise(vec2(a.x / (uBrush.z * 1.7), a.y / (uBrush.y * 30.0)) + so + 9.0) * uBrush.y * 1.3; + float clumps = gnoise(vec2(a.x / (uBrush.z * 1.3), y / (uBrush.y * 1.7)) + so + 2.0); + float hairs = gnoise(vec2(a.x / (uBrush.z * 0.7), y / (uBrush.y * 0.45)) + so + 3.0); + float fine = gnoise(vec2(a.x / (uBrush.z * 0.35), y / (uBrush.y * 0.16)) + so + 4.0); + // Streaks come and go along the sweep as the brush loads and runs dry. + float presence = smoothstep(-0.45, 0.5, gnoise(vec2(a.x / (uBrush.z * 0.9), y / (uBrush.y * 6.0)) + so + 5.0)); + return (clumps * 0.5 + hairs * 0.32 + fine * 0.18) * (0.3 + 0.7 * presence); +} + +void main() { + ivec2 ip = ivec2(gl_FragCoord.xy); + vec2 nc = normCoord(); + vec2 rp = refPx(); + vec2 so = seedOffset(uSeed); + + // Outline: wanders, then frays along the brush direction. + vec2 q = nc + fbm2(nc * 2.2 + so + 29.0, 4) * uEdge.z; + vec2 fa = alongAcross(rp, uBrush.x); + float frayAcross = fbm(vec2(fa.x / 700.0, fa.y / 16.0) + so + 3.0, 4) * uEdge.w; + float frayAlong = fbm(vec2(fa.x / 40.0, fa.y / 260.0) + so + 7.0, 4) * uEdge.w; + float mx = edgeBand(q.x + frayAlong, uRegion.x, uRegion.z, uEdge.x); + float my = edgeBand(q.y + frayAcross, uRegion.y, uRegion.w, uEdge.y); + float mask = mx * my; + if (mask <= 0.0) { + outColor = vec4(0.0); + return; + } + + // The brush's sweep: a slow bend so streaks curve with the arm. + vec2 p = rp + fbm2(rp / 1500.0 + so, 3) * 70.0; + float s1 = streaks(p, uBrush.x, so); + float s2 = streaks(p, uBrush.x + 0.55, so + 11.0); + float s3 = streaks(p, uBrush.x - 0.5, so + 23.0); + float crossMask = smoothstep(0.1, 0.6, fbm(nc * 3.5 + so + 31.0, 3)); + float streak = mix(s1, mix(s2, s3, step(0.0, fbm(nc * 2.0 + so + 37.0, 2))), uBrush.w * crossMask); + + // Separate passes of the brush: long soft patches along the sweep. + vec2 a = alongAcross(p, uBrush.x); + float passes = fbm(vec2(a.x / (uBrush.z * 2.2), a.y / (uBrush.y * 12.0)) + so + 1.0, 4); + float drift = fbm(nc * 2.6 + so + 4.0, 4); + + float t = uPaint.x; + t *= 1.0 + uPaint.y * (drift * 1.2 + passes * 0.8); + t *= 1.0 + uPaint.z * streak; + + // A little more paint where the brush turned at the edge. + float inner = min(min(q.x - uRegion.x, uRegion.z - q.x), min(q.y - uRegion.y, uRegion.w - q.y)); + t *= 1.0 + uRim.x * exp(-max(inner, 0.0) / max(uRim.y, 1e-4)); + + if (uPaint.w > 0.0) { + float hgt = texelFetch(uSurface, ip, 0).a; + float load = clamp(t / max(uPaint.x, 1e-4), 0.0, 1.6); + float th = uPaint.w * (1.15 - load * 0.45); + t *= smoothstep(th - 0.07, th + 0.07, hgt + streak * 0.18); + } + + float centreY = (uRegion.y + uRegion.w) * 0.5; + float share = uMix.x + uMix.y * fbm(nc * uMix.z + so + 6.0, 4) + uMix.w * (nc.y - centreY); + outColor = vec4(max(t, 0.0) * mask, clamp(share, 0.0, 1.0), 0.0, 0.0); +} diff --git a/site/hero-lab/src/glsl/finish.frag b/site/hero-lab/src/glsl/finish.frag new file mode 100644 index 00000000..3b3808b4 --- /dev/null +++ b/site/hero-lab/src/glsl/finish.frag @@ -0,0 +1,72 @@ +// Turns the painted surface into the final image: light raking across the +// relief, an optional sheen, craquelure, a soft fall-off of light toward the +// edges, colour grading, grain, and a dithered conversion to 8-bit sRGB. + +uniform sampler2D uSurface; +uniform float uSeed; +uniform float uRelief; // how strongly height turns into light and shadow +uniform float uGloss; // oil sheen; 0 for matte media +uniform float uCrack; // craquelure darkness +uniform float uCrackSize; +uniform float uVignette; +uniform float uSaturation; +uniform vec3 uTint; // multiplies the colour (linear) +uniform vec3 uLift; // colour the darkest values are lifted toward (linear) +uniform float uLiftAmount; +uniform float uGrain; + +out vec4 outColor; + +float heightAt(ivec2 p) { + ivec2 hi = ivec2(uRes) - 1; + return texelFetch(uSurface, clamp(p, ivec2(0), hi), 0).a; +} + +void main() { + ivec2 ip = ivec2(gl_FragCoord.xy); + vec4 s = texelFetch(uSurface, ip, 0); + vec2 rp = refPx(); + vec2 so = seedOffset(uSeed); + + float dx = (heightAt(ip + ivec2(-1, 0)) - heightAt(ip + ivec2(1, 0))) / uRef; + float dy = (heightAt(ip + ivec2(0, -1)) - heightAt(ip + ivec2(0, 1))) / uRef; + vec3 n = normalize(vec3(dx * uRelief, dy * uRelief, 1.0)); + vec3 light = normalize(vec3(-0.52, 0.6, 0.6)); + float diffuse = dot(n, light) / light.z; + vec3 c = s.rgb * mix(1.0, diffuse, 0.85); + if (uGloss > 0.0) { + vec3 half_ = normalize(light + vec3(0.0, 0.0, 1.0)); + float sheenMask = smoothstep(-0.3, 0.5, fbm(rp / 700.0 + so + 3.0, 4)); + c += pow(max(dot(n, half_), 0.0), 70.0) * uGloss * sheenMask; + } + + if (uCrack > 0.0) { + vec2 q = rp / uCrackSize; + q += fbm2(q * 0.35 + so, 4) * 0.55; + vec2 w = worley(q); + float crack = 1.0 - smoothstep(0.0, 0.05, w.y - w.x); + vec2 w2 = worley(q * 2.7 + 11.0); + crack = max(crack, (1.0 - smoothstep(0.0, 0.04, w2.y - w2.x)) * 0.45); + crack *= smoothstep(-0.25, 0.35, fbm(rp / 1100.0 + so + 9.0, 3)); + c *= 1.0 - crack * uCrack; + } + + vec2 uv = gl_FragCoord.xy / uRes; + vec2 d = (uv - 0.5) * vec2(uRes.x / uRes.y, 1.0); + d += vec2(0.06, -0.04); + float fall = smoothstep(0.35, 1.3, length(d * vec2(0.8, 1.05))); + c *= 1.0 - uVignette * fall; + + float lum = dot(c, vec3(0.2126, 0.7152, 0.0722)); + c = mix(vec3(lum), c, uSaturation); + c *= uTint; + c = mix(c, uLift, uLiftAmount * (1.0 - smoothstep(0.0, 0.35, lum))); + + vec3 srgb = linearToSrgb(c); + vec2 gp = gl_FragCoord.xy + so; + float fineGrain = hash12(gp) + hash12(gp + 41.0) - 1.0; + float clumpGrain = gnoise(rp / 2.2 + so + 21.0); + srgb += (fineGrain * 0.65 + clumpGrain * 0.45) * uGrain * (0.6 + 0.4 * (1.0 - lum)); + srgb += (hash12(gp + 97.0) - hash12(gp + 13.0)) / 255.0; + outColor = vec4(clamp(srgb, 0.0, 1.0), 1.0); +} diff --git a/site/hero-lab/src/glsl/smear.frag b/site/hero-lab/src/glsl/smear.frag new file mode 100644 index 00000000..eabb575b --- /dev/null +++ b/site/hero-lab/src/glsl/smear.frag @@ -0,0 +1,61 @@ +// Drags wet paint sideways, the way a squeegee or a wide, nearly dry brush +// pulled across the canvas carries colour into what is already there. +// +// The blade never presses evenly along its edge, so the drag comes in +// streaks; it starts and lifts at different points along its path. Only +// colour moves: the relief stays, so the canvas tooth and the grain still +// read sharply through the smear. + +uniform sampler2D uSurface; +uniform float uSeed; +uniform vec4 uDrag; // angle (radians), length (ref px), strength, coverage (0..1) +uniform vec4 uRows; // streak width (ref px), streak contrast, start/stop scale (ref px), sideways wobble (ref px) +uniform vec2 uSpan; // limit to a horizontal zone: centre y, half-height (composition space); off when half <= 0 + +out vec4 outColor; + +void main() { + ivec2 ip = ivec2(gl_FragCoord.xy); + vec4 s = texelFetch(uSurface, ip, 0); + vec2 rp = refPx(); + vec2 nc = normCoord(); + vec2 so = seedOffset(uSeed); + + vec2 dir = vec2(cos(uDrag.x), sin(uDrag.x)); + vec2 a = vec2(dot(rp, dir), dot(rp, vec2(-dir.y, dir.x))); + float across = a.y + gnoise(vec2(a.x / 1600.0, a.y / 420.0) + so) * uRows.w; + + // Uneven pressure along the blade: streaks that run with the drag. + float rows = gnoise(vec2(a.x / (uRows.x * 70.0), across / uRows.x) + so + 3.0) * 0.6 + + gnoise(vec2(a.x / (uRows.x * 30.0), across / (uRows.x * 0.35)) + so + 5.0) * 0.4; + float press = smoothstep(-0.35, 0.55, rows * uRows.y + (uDrag.w - 0.5) * 2.0); + // Where along its path the blade is touching at all. + float touch = smoothstep(-0.25, 0.35, fbm(vec2(a.x / uRows.z, across / (uRows.z * 0.1)) + so + 7.0, 4) + uDrag.w - 0.5); + float zone = 1.0; + if (uSpan.y > 0.0) { + float d = abs(nc.y - uSpan.x + 0.03 * fbm(vec2(nc.x * 3.0, 0.5) + so, 3)); + zone = 1.0 - smoothstep(uSpan.y * 0.55, uSpan.y, d); + } + float k = clamp(uDrag.z * press * touch * zone, 0.0, 1.0); + if (k <= 0.002) { + outColor = s; + return; + } + + // Colour carried from behind, most from close by. Each streak carries its own distance. + float reach = 0.55 + 0.9 * (gnoise(vec2(across / (uRows.x * 3.0), 1.7) + so) * 0.5 + 0.5); + float len = uDrag.y * reach / uRef; + vec2 back = vec2(dir.x, -dir.y); + vec3 acc = vec3(0.0); + float wsum = 0.0; + ivec2 hi = ivec2(uRes) - 1; + const int N = 48; + for (int i = 1; i <= N; i++) { + float f = float(i) / float(N); + ivec2 q = clamp(ivec2(gl_FragCoord.xy - back * f * len), ivec2(0), hi); + float w = exp(-f * 2.2); + acc += texelFetch(uSurface, q, 0).rgb * w; + wsum += w; + } + outColor = vec4(mix(s.rgb, acc / wsum, k), s.a); +} diff --git a/site/hero-lab/src/glsl/stroke.frag b/site/hero-lab/src/glsl/stroke.frag new file mode 100644 index 00000000..5fdd6fdc --- /dev/null +++ b/site/hero-lab/src/glsl/stroke.frag @@ -0,0 +1,81 @@ +// One brush stroke, drawn as a ribbon and summed into the layer target. +// +// s runs along the stroke (0 where the brush lands, 1 where it lifts), t runs +// across it (-1..1). A flat brush lays paint in streaks (clumps of bristles, +// single hairs), starts loaded and runs dry along its length, and lifts off +// bristle by bristle. When it runs dry it only touches the high points of the +// surface underneath: that is the dry-brush skip. + +uniform sampler2D uSurface; +uniform vec4 uRegion; // x0, y0, x1, y1 in composition space; off when x1 < x0 +uniform vec4 uRegionSoft; // softness x, softness y, edge noise, seed + +in vec2 vST; +in vec4 vA; // seed, load, decay, dryness +in vec4 vB; // bristle contrast, hair count, thickness, edge softness +in vec4 vC; // taper (share of the length spent landing and lifting), puddle at the landing +in vec2 vDim; // length and width in reference px + +out vec4 outColor; + +float regionMask(vec2 nc) { + if (uRegion.z < uRegion.x) return 1.0; + vec2 so = seedOffset(uRegionSoft.w); + // The field's outline wanders, then frays along the direction of the brushwork. + vec2 q = nc + fbm2(nc * 2.4 + so + 29.0, 4) * uRegionSoft.z * 1.5; + float ny = fbm(vec2(q.x * 2.6, q.y * 30.0) + so, 5) * uRegionSoft.z * 0.7; + float nx = fbm(vec2(q.x * 9.0, q.y * 5.0) + so + 13.0, 5) * uRegionSoft.z * 0.7; + float mx = smoothstep(uRegion.x - uRegionSoft.x, uRegion.x + uRegionSoft.x, q.x + nx) + * (1.0 - smoothstep(uRegion.z - uRegionSoft.x, uRegion.z + uRegionSoft.x, q.x + nx)); + float my = smoothstep(uRegion.y - uRegionSoft.y, uRegion.y + uRegionSoft.y, q.y + ny) + * (1.0 - smoothstep(uRegion.w - uRegionSoft.y, uRegion.w + uRegionSoft.y, q.y + ny)); + return mx * my; +} + +void main() { + float s = vST.x; + float t = vST.y; + float seed = vA.x; + float load = vA.y; + float decay = vA.z; + float dryness = vA.w; + float bristleContrast = vB.x; + float hairs = vB.y; + float thickness = vB.z; + float soft = vB.w; + float lenPx = vDim.x; + vec2 so = seedOffset(seed); + + float across = t * 0.5 + 0.5; + // Bristle lines drift a little sideways as the hand moves. + float drift = gnoise(vec2(s * lenPx / 420.0, 0.5) + so) * 0.035; + float a = across + drift; + float clump = gnoise(vec2(a * hairs * 0.16, s * lenPx / 2600.0) + so + 3.1) * 0.5 + 0.5; + float hair = gnoise(vec2(a * hairs, s * lenPx / 1100.0) + so + 7.7) * 0.5 + 0.5; + float fine = gnoise(vec2(a * hairs * 2.7, s * lenPx / 600.0) + so + 1.9) * 0.5 + 0.5; + float br = clump * 0.5 + hair * 0.33 + fine * 0.17; + float bristle = mix(1.0, smoothstep(0.2, 0.8, br) * 1.3, bristleContrast); + + // Frayed sides. + float side = gnoise(vec2(s * lenPx / 160.0, 2.0) + so) * 0.07 + gnoise(vec2(s * lenPx / 35.0, 5.0) + so) * 0.03; + float edge = 1.0 - smoothstep(0.86 - soft * 0.45 + side, 1.0 + side, abs(t)); + + // Each bristle lands and lifts at its own moment. + float taper = vC.x; + float land = taper * 0.5 * (gnoise(vec2(a * hairs * 0.35, 3.0) + so) * 0.5 + 0.5); + float lift = 1.0 - taper * 0.8 * (gnoise(vec2(a * hairs * 0.45, 9.0) + so) * 0.5 + 0.5); + float press = smoothstep(land, land + taper, s) * (1.0 - smoothstep(lift - taper * 1.4, lift, s)); + + // Loaded at the start, starved toward the tail; maybe a puddle where it lands. + float paint = load * exp(-decay * max(s, 0.0)) + vC.y * load * exp(-max(s, 0.0) * 30.0); + paint *= bristle * press * edge; + + // Dry brush: low paint only reaches the high points underneath. + float h = texelFetch(uSurface, ivec2(gl_FragCoord.xy), 0).a; + float reach = h + (hair - 0.5) * 0.28 + (fine - 0.5) * 0.12; + float threshold = dryness * (1.05 - clamp(paint, 0.0, 1.3) * 0.75); + float deposit = dryness > 0.0 ? smoothstep(threshold - 0.05, threshold + 0.05, reach) : 1.0; + + float amount = paint * deposit * thickness * regionMask(normCoord()); + outColor = vec4(amount, 0.0, 0.0, 0.0); +} diff --git a/site/hero-lab/src/glsl/stroke.vert b/site/hero-lab/src/glsl/stroke.vert new file mode 100644 index 00000000..8425da13 --- /dev/null +++ b/site/hero-lab/src/glsl/stroke.vert @@ -0,0 +1,25 @@ +// Ribbon vertices arrive in composition space (y down, height = 1). + +uniform float uAspect; + +in vec2 aPos; +in vec2 aST; +in vec4 aA; +in vec4 aB; +in vec4 aC; +in vec2 aDim; + +out vec2 vST; +out vec4 vA; +out vec4 vB; +out vec4 vC; +out vec2 vDim; + +void main() { + gl_Position = vec4(aPos.x / uAspect * 2.0 - 1.0, 1.0 - aPos.y * 2.0, 0.0, 1.0); + vST = aST; + vA = aA; + vB = aB; + vC = aC; + vDim = aDim; +} diff --git a/site/hero-lab/src/glsl/support.frag b/site/hero-lab/src/glsl/support.frag new file mode 100644 index 00000000..7980c667 --- /dev/null +++ b/site/hero-lab/src/glsl/support.frag @@ -0,0 +1,135 @@ +// The bare support the paint goes on: raw linen, cold-pressed paper or lime +// plaster. Writes reflectance (rgb, linear) and surface height (a, about 0..1). + +uniform float uSeed; +uniform int uKind; // 0 linen, 1 paper, 2 plaster +uniform vec3 uBase; // linear colour of the bare material +uniform vec3 uFleck; // linear colour of flecks (linen shives, paper inclusions) +uniform float uScale; // texture size multiplier +uniform float uAge; // 0..1 yellowing toward the edges and foxing +uniform float uRib; // 0..1 horizontal threads heavier than vertical (a ribbed weave) + +out vec4 outColor; + +float linen(vec2 rp, vec2 so, out float shade, out float fleck) { + float P = 7.5 * uScale; + // Threads are never evenly spaced or straight: remap the coordinates. + float u = rp.x / P + fbm(vec2(rp.x / (P * 9.0), 0.37) + so, 3) * 1.9 + + gnoise(vec2(rp.x / (P * 2.3), rp.y / (P * 55.0)) + so + 5.1) * 0.3; + float v = rp.y / P + fbm(vec2(0.71, rp.y / (P * 9.0)) + so + 9.3, 3) * 1.9 + + gnoise(vec2(rp.x / (P * 55.0), rp.y / (P * 2.3)) + so + 2.7) * 0.3; + float iu = floor(u); + float fu = u - iu; + float iv = floor(v); + float fv = v - iv; + + // Linen is uneven: every thread has its own thickness and long slubs. + float slubW = max(0.0, gnoise(vec2(iu * 3.1, rp.y / (P * 13.0)) + so + 1.3) - 0.2); + float slubF = max(0.0, gnoise(vec2(rp.x / (P * 13.0), iv * 2.9) + so + 4.1) - 0.2); + float tw = (0.74 + 0.3 * hash12(vec2(iu, 11.0) + so) + 0.45 * slubW) * (1.0 - 0.3 * uRib); + float tf = (0.74 + 0.3 * hash12(vec2(13.0, iv) + so) + 0.45 * slubF) * (1.0 + 0.25 * uRib); + float dw = abs(fu - 0.5) * 2.0 / tw; + float df = abs(fv - 0.5) * 2.0 / tf; + float pw = dw < 1.0 ? pow(cos(dw * PI * 0.5), 0.8) : 0.0; + float pf = df < 1.0 ? pow(cos(df * PI * 0.5), 0.8) : 0.0; + + // Plain weave: each thread rises over one crossing and dips under the next. + float sw = mod(iu, 2.0) < 1.0 ? 1.0 : -1.0; + float sf = mod(iv, 2.0) < 1.0 ? 1.0 : -1.0; + float ew = sw * cos(PI * (v - 0.5)); + float ef = -sf * cos(PI * (u - 0.5)); + // Some threads sit proud and some lie low; the over-under depth varies too. + float liftW = (0.8 + 0.4 * hash12(vec2(iu, 29.0) + so)) * (1.0 - 0.25 * uRib); + float liftF = (0.8 + 0.4 * hash12(vec2(31.0, iv) + so)) * (1.0 + 0.2 * uRib); + float dipW = 0.1 + 0.12 * hash12(vec2(iu, 37.0) + so); + float dipF = 0.1 + 0.12 * hash12(vec2(41.0, iv) + so); + float hw = pw > 0.0 ? (0.42 + dipW * ew + 0.3 * pw + 0.14 * slubW) * liftW : 0.0; + float hf = pf > 0.0 ? (0.42 + dipF * ef + 0.3 * pf + 0.14 * slubF) * liftF : 0.0; + + float fibW = gnoise(vec2(rp.x / 0.9, rp.y / 6.0) + so + 3.3); + float fibF = gnoise(vec2(rp.x / 6.0, rp.y / 0.9) + so + 6.6); + float h; + if (hw >= hf) { + h = hw + 0.05 * fibW; + shade = 0.9 + 0.18 * hash12(vec2(iu, 5.0) + so) + 0.06 * gnoise(vec2(iu * 1.7, rp.y / 90.0) + so) + 0.03 * fibW; + } else { + h = hf + 0.05 * fibF; + shade = 0.9 + 0.18 * hash12(vec2(7.0, iv) + so) + 0.06 * gnoise(vec2(rp.x / 90.0, iv * 1.7) + so) + 0.03 * fibF; + } + h = max(h, 0.16 + 0.03 * fibW); + shade *= mix(0.86, 1.0, smoothstep(0.16, 0.45, h)); + + // Shives: now and then a dark woody bit caught in the weave. + float n1 = gnoise(vec2(rp.x / 5.0, rp.y / 13.0) + so + 11.0); + float n2 = gnoise(vec2(rp.x / 61.0, rp.y / 53.0) + so + 23.0); + fleck = smoothstep(0.72, 0.9, n1 * 0.55 + n2 * 0.75) * 0.45; + return h; +} + +float paper(vec2 rp, vec2 so, out float shade, out float fleck) { + float s = uScale; + // Cold-pressed tooth: rounded bumps of mixed sizes with winding valleys. + vec2 warp = fbm2(rp / (38.0 * s) + so, 3) * 0.9; + float tooth = fbm(rp / (9.0 * s) + warp + so, 3); + float tooth2 = fbm(rp / (23.0 * s) + warp * 0.6 + so + 3.0, 3); + float low = fbm(rp / (110.0 * s) + so + 7.0, 4) * 0.5 + 0.5; + // Fibres: short streaks in every direction. + float a = fbm(rp / (60.0 * s) + so + 2.0, 2) * PI * 2.0; + vec2 dir = vec2(cos(a), sin(a)); + vec2 fq = vec2(dot(rp, dir), dot(rp, vec2(-dir.y, dir.x))); + float fib = gnoise(vec2(fq.x / (8.0 * s), fq.y / (0.8 * s)) + so + 9.0); + float h = 0.5 * smoothstep(-0.5, 0.55, tooth) + 0.26 * smoothstep(-0.55, 0.55, tooth2) + 0.14 * low + 0.06 + 0.04 * fib; + shade = 0.985 + 0.025 * (low - 0.5) + 0.01 * fib; + shade *= mix(0.955, 1.0, smoothstep(0.15, 0.6, h)); + float n = gnoise(rp / 3.0 + so + 31.0) * gnoise(rp / 47.0 + so + 5.0); + fleck = smoothstep(0.45, 0.62, n) * 0.4; + return h; +} + +float plaster(vec2 rp, vec2 so, out float shade, out float fleck) { + float s = uScale; + float trowel = fbm(rp / (520.0 * s) + so, 4) * 0.5 + 0.5; + float mid = fbm(rp / (46.0 * s) + so + 3.0, 5) * 0.5 + 0.5; + float sand = gnoise(rp / (1.7 * s) + so + 8.0) * 0.5 + 0.5; + vec2 w = worley(rp / (19.0 * s) + so * 0.7); + float pitMask = step(0.8, hash12(rp / (19.0 * s) + so * 0.7 + 0.5)); + float pit = smoothstep(0.26, 0.04, w.x) * pitMask; + float h = 0.18 + 0.34 * trowel + 0.34 * mid + 0.12 * sand - 0.32 * pit; + shade = 0.96 + 0.06 * (mid - 0.5) + 0.03 * (sand - 0.5) - 0.12 * pit; + float n = gnoise(rp / 4.0 + so + 13.0) * gnoise(rp / 61.0 + so + 3.0); + fleck = smoothstep(0.4, 0.62, n) * 0.6; + return h; +} + +void main() { + vec2 rp = refPx(); + vec2 so = seedOffset(uSeed); + float shade = 1.0; + float fleck = 0.0; + float h; + if (uKind == 0) { + h = linen(rp, so, shade, fleck); + } else if (uKind == 1) { + h = paper(rp, so, shade, fleck); + } else { + h = plaster(rp, so, shade, fleck); + } + // Slow drifts in the material's own colour. + float drift = fbm(rp / 900.0 + so + 50.0, 4); + vec3 c = uBase * shade * (1.0 + 0.05 * drift); + c = mix(c, uFleck, fleck); + + if (uAge > 0.0) { + vec2 nc = normCoord(); + float aspect = uRes.x / uRes.y; + vec2 d = abs(nc - vec2(aspect * 0.5, 0.5)) / vec2(aspect * 0.5, 0.5); + float edge = smoothstep(0.55, 1.05, max(d.x, d.y) + 0.12 * fbm(nc * 3.0 + so, 3)); + c *= mix(vec3(1.0), vec3(0.98, 0.93, 0.82), edge * uAge); + // Foxing: a few faint brown spots. + vec2 wf = worley(rp / 260.0 + so + 77.0); + float spot = smoothstep(0.16, 0.02, wf.x) * step(0.86, hash12(rp / 260.0 + so + 77.5)); + spot *= 0.6 + 0.4 * fbm(rp / 9.0 + so, 3); + c *= mix(vec3(1.0), vec3(0.9, 0.8, 0.66), spot * uAge * 0.6); + } + outColor = vec4(c, h); +} diff --git a/site/hero-lab/src/glsl/wash.frag b/site/hero-lab/src/glsl/wash.frag new file mode 100644 index 00000000..db99998a --- /dev/null +++ b/site/hero-lab/src/glsl/wash.frag @@ -0,0 +1,171 @@ +// One watercolour wash: a band of wet paint, how far its pigment spread, where +// it dried hard, where it bloomed, and where it settled into the paper. +// +// Each edge is a stack of fractal fronts. On wet paper they spread far apart +// (a soft bleed with feathered fingers); on dry paper they sit on top of each +// other and leave a darker tide line where the pigment was carried to the rim. +// Writes thickness (r) and the share of the second pigment (g). + +uniform sampler2D uSurface; +uniform float uSeed; +uniform vec4 uBand; // top, bottom, left, right +uniform float uTilt; // slope of the top and bottom edges (dy per dx) +uniform vec4 uEdge; // edge wander amplitude, wander frequency, softness top, softness bottom +uniform vec2 uSide; // softness left, softness right +uniform float uWetVary; // how much the softness changes along an edge +uniform vec4 uDensity; // base, mottling, pooling at the bottom edge, flat-wash streaks +uniform vec4 uTexture; // granulation, flocculation, tide line, fringe +uniform vec4 uBloom; // count, radius, strength, seed +uniform vec4 uMix; // base share of pigment B, variation, frequency, gradient down the band +uniform int uShape; // 0 band, 1 pool +uniform vec4 uPool; // pool centre x, centre y, radius x, radius y +uniform vec2 uPoolShape; // pool rotation (radians), how lobed its outline is +uniform float uFringe; // faint stain just outside a dried edge, as on raw canvas +uniform vec4 uHole; // reserve left unpainted: centre x, centre y, radius x, radius y (off when rx <= 0) +uniform vec2 uHoleShape; // reserve edge softness, how lobed + +out vec4 outColor; + +float edgeCoverage(float d, float soft, vec2 nc, vec2 so, float h, out float rim) { + float spread = mix(0.0016, 0.075, soft); + float amp = mix(0.003, 0.05, soft); + float reach = spread + amp * 1.4 + 0.004; + rim = 0.0; + if (d > reach) return 1.0; + if (d < -reach) return 0.0; + float freq = mix(46.0, 5.5, soft); + float width = mix(0.0007, 0.02, soft); + float acc = 0.0; + const int K = 24; + for (int k = 0; k < K; k++) { + float fk = (float(k) + 0.5) / float(K); + vec2 o = so + vec2(float(k) * 7.31, float(k) * 3.17); + vec2 w = fbm2(nc * freq * 0.45 + o, 3) * 0.7; + float n = fbm(nc * freq * (0.7 + 0.6 * fk) + w + o, 4); + // Dried edges follow the paper's tooth. + float front = d + n * amp + (fk - 0.5) * spread * 2.0 + (h - 0.5) * 0.0024 * (1.0 - soft); + acc += smoothstep(-width, width, front); + rim += exp(-front * front / (width * width * 9.0)); + } + rim /= float(K); + return acc / float(K); +} + +float blooms(vec2 nc, vec2 so, vec4 box) { + float f = 1.0; + int count = int(uBloom.x); + for (int i = 0; i < 12; i++) { + if (i >= count) break; + float fi = float(i); + vec2 h = hash22(vec2(fi * 13.0 + uBloom.w, 7.0)); + float R = uBloom.y * (0.6 + 0.9 * hash12(vec2(fi * 5.0 + uBloom.w, 3.0))); + // Backruns start where wetter paint meets a drying edge: sit astride an edge. + float onTop = step(0.5, hash12(vec2(fi * 7.0 + uBloom.w, 11.0))); + float edgeY = mix(box.w, box.y, onTop); + float inward = mix(-1.0, 1.0, onTop) * R * (0.15 + 0.5 * h.y); + vec2 c = vec2(mix(box.x, box.z, 0.08 + 0.84 * h.x), edgeY + inward); + if (box.w - box.y > 0.8) c.y = mix(box.y, box.w, 0.15 + 0.7 * h.y); + vec2 q = (nc - c) / R; + if (dot(q, q) > 4.0) continue; + vec2 bo = so + vec2(fi * 3.3, fi * 1.7); + q *= vec2(1.0, 1.0 + 0.5 * h.x); + q += fbm2(q * 1.4 + bo, 4) * 0.55; + float r = length(q) + fbm(q * 7.0 + bo + 5.0, 5) * 0.14 + fbm(q * 23.0 + bo + 9.0, 4) * 0.045; + float inside = 1.0 - smoothstep(0.965, 1.0, r); + float rimB = exp(-pow((r - 1.0) / 0.02, 2.0)); + float pale = 0.42 + 0.34 * smoothstep(0.1, 1.0, r) + 0.16 * fbm(q * 4.0 + bo + 2.0, 3); + f *= mix(1.0, pale, inside * uBloom.z); + f *= 1.0 + rimB * uBloom.z * 1.1; + } + return f; +} + +void main() { + ivec2 ip = ivec2(gl_FragCoord.xy); + vec2 nc = normCoord(); + vec2 rp = refPx(); + vec2 so = seedOffset(uSeed); + float aspect = uRes.x / uRes.y; + float h = texelFetch(uSurface, ip, 0).a; + + float cov; + float tide; + float pool; + float halo = 0.0; + vec4 box; + float centreY; + if (uShape == 1) { + vec2 q = nc - uPool.xy; + float cr = cos(uPoolShape.x); + float sr = sin(uPoolShape.x); + q = vec2(cr * q.x + sr * q.y, -sr * q.x + cr * q.y); + vec2 qn = q / uPool.zw; + vec2 lobes = fbm2(qn * 1.2 + so + 2.0, 4) * uPoolShape.y; + float rn = length(qn + lobes); + float dist = (1.0 - rn) * min(uPool.z, uPool.w); + float soft = clamp(uEdge.z + fbm(nc * 2.4 + so + 5.0, 3) * uWetVary * 1.6, 0.0, 1.0); + float rim; + cov = edgeCoverage(dist, soft, nc, so + 1.0, h, rim); + tide = rim * (1.0 - soft); + pool = exp(-max(dist, 0.0) / 0.045) * smoothstep(-0.2, 0.7, qn.y); + halo = uFringe * exp(-max(-dist, 0.0) / 0.007) * (1.0 - soft) * step(dist, 0.004); + box = vec4(uPool.x - uPool.z, uPool.y - uPool.w, uPool.x + uPool.z, uPool.y + uPool.w); + centreY = uPool.y; + } else { + float tilt = uTilt * (nc.x - aspect * 0.5); + float wander = uEdge.x; + float eTop = uBand.x + tilt + fbm(vec2(nc.x * uEdge.y, 1.3) + so, 4) * wander; + float eBot = uBand.y + tilt + fbm(vec2(nc.x * uEdge.y, 7.9) + so, 4) * wander; + float eLeft = uBand.z + fbm(vec2(2.1, nc.y * uEdge.y) + so, 4) * wander; + float eRight = uBand.w + fbm(vec2(5.3, nc.y * uEdge.y) + so, 4) * wander; + + // Wet and dry stretches along the same edge. + float vary = uWetVary; + float softTop = clamp(uEdge.z + fbm(vec2(nc.x * 2.2, 3.3) + so, 3) * vary * 1.6, 0.0, 1.0); + float softBot = clamp(uEdge.w + fbm(vec2(nc.x * 2.2, 8.8) + so, 3) * vary * 1.6, 0.0, 1.0); + float softL = clamp(uSide.x + fbm(vec2(1.1, nc.y * 2.2) + so, 3) * vary * 1.6, 0.0, 1.0); + float softR = clamp(uSide.y + fbm(vec2(4.4, nc.y * 2.2) + so, 3) * vary * 1.6, 0.0, 1.0); + + float rimT; + float rimB = 0.0; + float rimL = 0.0; + float rimR = 0.0; + cov = edgeCoverage(nc.y - eTop, softTop, nc, so + 1.0, h, rimT); + if (cov > 0.0) cov *= edgeCoverage(eBot - nc.y, softBot, nc, so + 2.0, h, rimB); + if (cov > 0.0) cov *= edgeCoverage(nc.x - eLeft, softL, nc, so + 3.0, h, rimL); + if (cov > 0.0) cov *= edgeCoverage(eRight - nc.x, softR, nc, so + 4.0, h, rimR); + tide = rimT * (1.0 - softTop) + rimB * (1.0 - softBot) + rimL * (1.0 - softL) + rimR * (1.0 - softR); + pool = exp(-max(eBot - nc.y, 0.0) / 0.045); + box = vec4(max(uBand.z, 0.0), max(uBand.x, 0.0), min(uBand.w, aspect), min(uBand.y, 1.0)); + centreY = (uBand.x + uBand.y) * 0.5; + } + if (uHole.z > 0.0) { + vec2 hq = (nc - uHole.xy) / uHole.zw; + hq += fbm2(hq * 1.3 + so + 17.0, 4) * uHoleShape.y; + float hr = length(hq) + fbm(nc * 9.0 + so + 19.0, 4) * 0.06; + cov *= smoothstep(1.0 - uHoleShape.x, 1.0 + uHoleShape.x * 0.3, hr); + } + if (cov <= 0.0 && halo <= 0.0) { + outColor = vec4(0.0); + return; + } + + float dens = uDensity.x; + dens *= 1.0 + uDensity.y * fbm(nc * 1.5 + so + 1.0, 5) * 1.4; + dens *= 1.0 + uDensity.y * 0.6 * fbm(nc * 6.5 + so + 2.0, 4); + dens *= 1.0 + uDensity.w * fbm(vec2(nc.x * 1.1, nc.y * 36.0) + so + 3.0, 4); + dens *= 1.0 + uDensity.z * pool; + dens *= 1.0 + uTexture.z * tide * 3.2; + dens *= blooms(nc, so + 6.0, box); + + // Granulation: heavy pigment settles in the valleys of the paper, more in + // some places than others. + float settle = uTexture.x * (0.35 + 0.9 * smoothstep(-0.35, 0.45, fbm(nc * 2.6 + so + 8.0, 4))); + dens *= max(0.0, 1.0 + settle * (0.5 - h) * 2.4); + // Flocculation: pigment clumping a little above the tooth's scale. + dens *= max(0.0, 1.0 + uTexture.y * fbm(rp / 11.0 + so + 4.0, 3) * 1.4); + + float share = uMix.x + uMix.y * fbm(nc * uMix.z + so + 6.0, 4) + uMix.w * (nc.y - centreY); + float amount = max(dens, 0.0) * cov + halo * (1.0 - cov); + outColor = vec4(amount, clamp(share, 0.0, 1.0), 0.0, 0.0); +} diff --git a/site/hero-lab/src/main.ts b/site/hero-lab/src/main.ts new file mode 100644 index 00000000..e13a69c2 --- /dev/null +++ b/site/hero-lab/src/main.ts @@ -0,0 +1,317 @@ +/** + * Page entry for the renderer: `window.heroPaint(request)` paints a preset + * and hands back the encoded files (base64) for the driver to write to disk. + */ + +import { paint } from './painter' +import { presets } from './presets' + +export interface PaintRequest { + preset: string + seed: number + width: number + height: number + png?: boolean + webpQuality?: number + previews?: number[] + /** Site sizes: one WebP per width, named `w.webp`, no JPEG. */ + sizes?: number[] + sizeQuality?: number + crops?: { + name: string + x: number + y: number + w: number + h: number + outW?: number + type?: 'png' | 'webp' + quality?: number + }[] + /** How many dominant colours to pull out of the finished picture. */ + palette?: number +} + +export interface PaintResult { + ms: number + log: string[] + files: { name: string; base64: string }[] + palette: { hex: string; share: number }[] +} + +function toBlob( + canvas: HTMLCanvasElement, + type: string, + quality?: number, +): Promise { + return new Promise((resolve, reject) => + canvas.toBlob( + (b) => (b ? resolve(b) : reject(new Error(`could not encode ${type}`))), + type, + quality, + ), + ) +} + +function toBase64(blob: Blob): Promise { + return new Promise((resolve, reject) => { + const reader = new FileReader() + reader.onload = () => resolve(String(reader.result).split(',')[1] ?? '') + reader.onerror = () => reject(reader.error) + reader.readAsDataURL(blob) + }) +} + +async function heroPaint(req: PaintRequest): Promise { + const preset = presets[req.preset] + if (!preset) throw new Error(`no preset named ${req.preset}`) + const log: string[] = [] + const painted = document.createElement('canvas') + const t0 = performance.now() + const painting = preset.build(req.width / req.height) + await paint(painted, painting, { + width: req.width, + height: req.height, + seed: req.seed, + overscan: painting.overscan, + log: (line) => log.push(line), + }) + const ms = performance.now() - t0 + // Crop the overscan away so the file is exactly the requested size. + let canvas = painted + if (painted.width !== req.width || painted.height !== req.height) { + canvas = document.createElement('canvas') + canvas.width = req.width + canvas.height = req.height + const ctx = canvas.getContext('2d') + if (!ctx) throw new Error('no 2d context') + const ox = Math.round((painted.width - req.width) / 2) + const oy = Math.round((painted.height - req.height) / 2) + ctx.drawImage( + painted, + ox, + oy, + req.width, + req.height, + 0, + 0, + req.width, + req.height, + ) + } + const files: PaintResult['files'] = [] + if (req.png) + files.push({ + name: 'full.png', + base64: await toBase64(await toBlob(canvas, 'image/png')), + }) + if (req.webpQuality) { + files.push({ + name: 'full.webp', + base64: await toBase64( + await toBlob(canvas, 'image/webp', req.webpQuality), + ), + }) + } + for (const width of req.previews ?? []) { + const c = document.createElement('canvas') + c.width = width + c.height = Math.round((width * req.height) / req.width) + const ctx = c.getContext('2d') + if (!ctx) throw new Error('no 2d context') + ctx.imageSmoothingEnabled = true + ctx.imageSmoothingQuality = 'high' + ctx.drawImage(canvas, 0, 0, c.width, c.height) + files.push({ + name: `w${width}.jpg`, + base64: await toBase64(await toBlob(c, 'image/jpeg', 0.92)), + }) + files.push({ + name: `w${width}.webp`, + base64: await toBase64(await toBlob(c, 'image/webp', 0.9)), + }) + } + for (const width of req.sizes ?? []) { + const c = document.createElement('canvas') + c.width = width + c.height = Math.round((width * req.height) / req.width) + const ctx = c.getContext('2d') + if (!ctx) throw new Error('no 2d context') + ctx.imageSmoothingQuality = 'high' + ctx.drawImage(canvas, 0, 0, c.width, c.height) + files.push({ + name: `w${width}.webp`, + base64: await toBase64( + await toBlob(c, 'image/webp', req.sizeQuality ?? 0.86), + ), + }) + } + for (const crop of req.crops ?? []) { + const c = document.createElement('canvas') + c.width = crop.outW ?? crop.w + c.height = Math.round((c.width * crop.h) / crop.w) + const ctx = c.getContext('2d') + if (!ctx) throw new Error('no 2d context') + ctx.imageSmoothingQuality = 'high' + ctx.drawImage( + canvas, + crop.x, + crop.y, + crop.w, + crop.h, + 0, + 0, + c.width, + c.height, + ) + const type = crop.type ?? 'png' + const blob = await toBlob( + c, + `image/${type}`, + type === 'webp' ? (crop.quality ?? 0.92) : undefined, + ) + files.push({ + name: `crop-${crop.name}.${type}`, + base64: await toBase64(blob), + }) + } + return { + ms, + log, + files, + palette: req.palette ? dominantColours(canvas, req.palette) : [], + } +} + +// sRGB <-> OKLab, for clustering colours the way they look. +const toLinear = (c: number) => + c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4 +const toSrgb = (c: number) => + c <= 0.0031308 ? 12.92 * c : 1.055 * Math.max(c, 0) ** (1 / 2.4) - 0.055 + +function oklab(r: number, g: number, b: number): [number, number, number] { + const [lr, lg, lb] = [toLinear(r), toLinear(g), toLinear(b)] + const l = Math.cbrt(0.4122214708 * lr + 0.5363325363 * lg + 0.0514459929 * lb) + const m = Math.cbrt(0.2119034982 * lr + 0.6806995451 * lg + 0.1073969566 * lb) + const s = Math.cbrt(0.0883024619 * lr + 0.2817188376 * lg + 0.6299787005 * lb) + return [ + 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s, + 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s, + 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s, + ] +} + +function fromOklab([L, A, B]: [number, number, number]): string { + const l = (L + 0.3963377774 * A + 0.2158037573 * B) ** 3 + const m = (L - 0.1055613458 * A - 0.0638541728 * B) ** 3 + const s = (L - 0.0894841775 * A - 1.291485548 * B) ** 3 + const rgb = [ + 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s, + -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s, + -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s, + ] + return `#${rgb + .map((c) => + Math.round(Math.min(1, Math.max(0, toSrgb(c))) * 255) + .toString(16) + .padStart(2, '0'), + ) + .join('')}` +} + +function dominantColours( + source: HTMLCanvasElement, + k: number, +): { hex: string; share: number }[] { + const c = document.createElement('canvas') + c.width = 240 + c.height = Math.round((240 * source.height) / source.width) + const ctx = c.getContext('2d') + if (!ctx) return [] + ctx.imageSmoothingQuality = 'high' + ctx.drawImage(source, 0, 0, c.width, c.height) + const data = ctx.getImageData(0, 0, c.width, c.height).data + const points: [number, number, number][] = [] + for (let i = 0; i < data.length; i += 4) + points.push(oklab(data[i] / 255, data[i + 1] / 255, data[i + 2] / 255)) + // k-means++ seeding, deterministic. + const centres: [number, number, number][] = [ + points[Math.floor(points.length / 2)], + ] + const dist = (a: number[], b: number[]) => + (a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2 + (a[2] - b[2]) ** 2 + while (centres.length < k) { + let best = 0 + let bestD = -1 + for (let i = 0; i < points.length; i += 7) { + const d = Math.min(...centres.map((cc) => dist(points[i], cc))) + if (d > bestD) { + bestD = d + best = i + } + } + centres.push(points[best]) + } + const assign = new Int32Array(points.length) + for (let iter = 0; iter < 24; iter++) { + const sums = centres.map(() => [0, 0, 0, 0]) + for (let i = 0; i < points.length; i++) { + let bi = 0 + let bd = Infinity + for (let j = 0; j < centres.length; j++) { + const d = dist(points[i], centres[j]) + if (d < bd) { + bd = d + bi = j + } + } + assign[i] = bi + const sm = sums[bi] + sm[0] += points[i][0] + sm[1] += points[i][1] + sm[2] += points[i][2] + sm[3]++ + } + for (let j = 0; j < centres.length; j++) { + const sm = sums[j] + if (sm[3] > 0) centres[j] = [sm[0] / sm[3], sm[1] / sm[3], sm[2] / sm[3]] + } + } + const counts = centres.map((_, j) => + assign.reduce((n, a) => n + (a === j ? 1 : 0), 0), + ) + return centres + .map((cc, j) => ({ + hex: fromOklab(cc), + share: counts[j] / points.length, + L: cc[0], + })) + .filter((c) => c.share > 0.004) + .sort((a, b) => b.share - a.share) + .map(({ hex, share }) => ({ hex, share })) +} + +declare global { + interface Window { + heroPaint: typeof heroPaint + heroPresets: string[] + heroToWebp: typeof toWebp + } +} + +/** Re-encodes a PNG (base64) as WebP, keeping alpha. */ +async function toWebp(pngBase64: string, quality: number): Promise { + const img = new Image() + img.src = `data:image/png;base64,${pngBase64}` + await img.decode() + const c = document.createElement('canvas') + c.width = img.naturalWidth + c.height = img.naturalHeight + const ctx = c.getContext('2d') + if (!ctx) throw new Error('no 2d context') + ctx.drawImage(img, 0, 0) + return toBase64(await toBlob(c, 'image/webp', quality)) +} + +window.heroPaint = heroPaint +window.heroToWebp = toWebp +window.heroPresets = Object.keys(presets) diff --git a/site/hero-lab/src/painter.ts b/site/hero-lab/src/painter.ts new file mode 100644 index 00000000..5568ce7c --- /dev/null +++ b/site/hero-lab/src/painter.ts @@ -0,0 +1,440 @@ +/** + * Paints one picture: lays the support, then each layer in order, then the + * finishing pass, into a WebGL2 canvas. + * + * Responsibilities: running the passes and holding the surface between them + * (reflectance + height, ping-ponged). Not responsible for: what the picture + * is (`presets.ts`), where strokes go (`brushwork.ts`) or exporting files + * (`main.ts`). + */ + +import { + FLOATS_PER_VERTEX, + rng, + strokeMesh, + type Rand, + type Region, + type Stroke, +} from './brushwork' +import { + FULLSCREEN_VS, + HEADER, + createProgram, + createTarget, + fullscreen, + gpuSync, + type GL, + type Target, +} from './gl' +import common from './glsl/common.glsl' +import compositeFs from './glsl/composite.frag' +import fieldFs from './glsl/field.frag' +import smearFs from './glsl/smear.frag' +import finishFs from './glsl/finish.frag' +import strokeFs from './glsl/stroke.frag' +import strokeVs from './glsl/stroke.vert' +import supportFs from './glsl/support.frag' +import washFs from './glsl/wash.frag' +import { linear, type Pigment } from './pigments' + +export const REF_WIDTH = 3840 + +export interface Support { + kind: 'linen' | 'paper' | 'plaster' + base: string + fleck: string + scale?: number + age?: number + /** 0..1: horizontal threads heavier than vertical ones (a ribbed weave). */ + rib?: number +} + +interface LayerBase { + name: string + pigment: Pigment + /** Second pigment for wet mixing; the layer says where it takes over. */ + pigmentB?: Pigment + thickness?: number + impasto?: number + wear?: { amount: number; size: number; height: number } + losses?: number + /** How much this layer fills the weave's valleys (thick paint evens the surface). */ + level?: number +} + +export interface StrokeLayer extends LayerBase { + kind: 'strokes' + strokes: (r: Rand, aspect: number) => Stroke[] + region?: Region + /** Softness across x, softness across y, edge noise. */ + regionSoft?: readonly [number, number, number] +} + +export interface WashLayer extends LayerBase { + kind: 'wash' + /** Top, bottom, left, right in composition space (ignored for a pool). */ + band?: readonly [number, number, number, number] + tilt?: number + edge?: { wander: number; freq: number; softTop: number; softBottom: number } + side?: readonly [number, number] + wetVary?: number + density?: { base: number; mottle: number; pool: number; streaks: number } + texture?: { granulation: number; flocculation: number; tide: number } + bloom?: { count: number; radius: number; strength: number } + mix?: { base: number; vary: number; freq: number; gradient: number } + /** An organic pool instead of a band: centre, radii, rotation in degrees, how lobed. */ + pool?: { + x: number + y: number + rx: number + ry: number + rotate?: number + lobes?: number + } + /** Faint stain just outside dried edges, as on raw canvas. */ + fringe?: number + /** An area the wash goes around, left for a later colour. */ + hole?: { + x: number + y: number + rx: number + ry: number + soft?: number + lobes?: number + } +} + +export interface FieldLayer extends LayerBase { + kind: 'field' + /** Composition space; push the edges past the canvas for a full-bleed field. */ + region: Region + edge?: { softX: number; softY: number; wander: number; fray: number } + paint?: { base: number; patchiness: number; streaks: number; dryness: number } + /** Angle in degrees; streak width and length in reference px; share of cross strokes. */ + brush?: { angle: number; width: number; length: number; cross: number } + rim?: { amount: number; width: number } + mix?: { base: number; vary: number; freq: number; gradient: number } +} + +/** Drags the wet colour sideways (squeegee, starved wide brush); moves colour only. */ +export interface SmearLayer { + kind: 'smear' + name: string + /** Degrees; 0 drags to the right, 180 to the left. */ + angle?: number + /** How far colour is carried, in reference px. */ + length: number + strength: number + /** 0..1: how much of the canvas the blade touches. */ + coverage: number + rows?: { width: number; contrast: number; span: number; wobble: number } + /** Limit to a horizontal zone: centre y and half-height in composition space. */ + zone?: { y: number; half: number } +} + +export type Layer = StrokeLayer | WashLayer | FieldLayer | SmearLayer + +export interface Finish { + relief: number + gloss?: number + crack?: number + crackSize?: number + vignette?: number + saturation?: number + tint?: string + lift?: string + liftAmount?: number + grain?: number +} + +export interface Painting { + support: Support + layers: Layer[] + finish: Finish + /** Extra canvas painted on every side and cropped away (share of the size). */ + overscan?: number +} + +export interface PaintOptions { + width: number + height: number + seed: number + /** Paint this much extra on every side (share of the size) and let the caller crop it, so drags never smear a clamped edge. */ + overscan?: number + log?: (line: string) => void +} + +const SUPPORT_KIND = { linen: 0, paper: 1, plaster: 2 } as const +const STROKES_PER_DRAW = 24 + +export async function paint( + canvas: HTMLCanvasElement, + painting: Painting, + o: PaintOptions, +): Promise { + const { seed } = o + const m = o.overscan ?? 0 + const w = Math.round(o.width * (1 + 2 * m)) + const h = Math.round(o.height * (1 + 2 * m)) + const log = o.log ?? (() => {}) + canvas.width = w + canvas.height = h + const gl = canvas.getContext('webgl2', { + alpha: false, + antialias: false, + depth: false, + premultipliedAlpha: false, + preserveDrawingBuffer: true, + powerPreference: 'high-performance', + }) as GL | null + if (!gl) throw new Error('WebGL2 is not available') + if (!gl.getExtension('EXT_color_buffer_float')) + throw new Error('float render targets are not available') + + const ref = REF_WIDTH / o.width + const aspect = w / h + const tiles = Math.max(1, Math.ceil(Math.max(w, h) / 1400)) + const base = { uRes: [w, h], uRef: ref } + + const surface: [Target, Target] = [ + createTarget(gl, w, h, gl.RGBA32F), + createTarget(gl, w, h, gl.RGBA32F), + ] + const layerTarget = createTarget(gl, w, h, gl.RGBA16F) + let cur = 0 + + const fs = (body: string) => `${HEADER}${common}\n${body}` + const programs = { + support: createProgram(gl, FULLSCREEN_VS, fs(supportFs)), + wash: createProgram(gl, FULLSCREEN_VS, fs(washFs)), + field: createProgram(gl, FULLSCREEN_VS, fs(fieldFs)), + composite: createProgram(gl, FULLSCREEN_VS, fs(compositeFs)), + finish: createProgram(gl, FULLSCREEN_VS, fs(finishFs)), + smear: createProgram(gl, FULLSCREEN_VS, fs(smearFs)), + stroke: createProgram(gl, `${HEADER}${strokeVs}`, fs(strokeFs)), + } + const emptyVao = gl.createVertexArray() + const strokeVao = gl.createVertexArray() + const strokeBuffer = gl.createBuffer() + gl.bindVertexArray(strokeVao) + gl.bindBuffer(gl.ARRAY_BUFFER, strokeBuffer) + const stride = FLOATS_PER_VERTEX * 4 + const attributes: [string, number, number][] = [ + ['aPos', 2, 0], + ['aST', 2, 8], + ['aA', 4, 16], + ['aB', 4, 32], + ['aC', 4, 48], + ['aDim', 2, 64], + ] + for (const [name, size, offset] of attributes) { + const loc = programs.stroke.attrib(name) + if (loc < 0) continue + gl.enableVertexAttribArray(loc) + gl.vertexAttribPointer(loc, size, gl.FLOAT, false, stride, offset) + } + + const t0 = performance.now() + const s = painting.support + gl.bindVertexArray(emptyVao) + programs.support.set({ + ...base, + uSeed: seed, + uKind: SUPPORT_KIND[s.kind], + uBase: linear(s.base), + uFleck: linear(s.fleck), + uScale: s.scale ?? 1, + uAge: s.age ?? 0, + uRib: s.rib ?? 0, + }) + await fullscreen(gl, surface[cur], w, h, tiles) + log(`support ${(performance.now() - t0).toFixed(0)} ms`) + + const r = rng(seed * 7919 + 13) + for (const [index, layer] of painting.layers.entries()) { + const t = performance.now() + const layerSeed = seed * 131 + index * 17 + 5 + if (layer.kind === 'smear') { + gl.bindVertexArray(emptyVao) + const rows = layer.rows ?? { + width: 14, + contrast: 1.2, + span: 1400, + wobble: 24, + } + programs.smear.set({ + ...base, + uSeed: layerSeed, + uDrag: [ + ((layer.angle ?? 0) * Math.PI) / 180, + layer.length, + layer.strength, + layer.coverage, + ], + uRows: [rows.width, rows.contrast, rows.span, rows.wobble], + uSpan: layer.zone ? [layer.zone.y, layer.zone.half] : [0, 0], + }) + programs.smear.textures({ uSurface: surface[cur].tex }) + await fullscreen(gl, surface[1 - cur], w, h, tiles) + cur = 1 - cur + log(`${layer.name} ${(performance.now() - t).toFixed(0)} ms`) + continue + } + if (layer.kind === 'field') { + gl.bindVertexArray(emptyVao) + const e = layer.edge ?? { + softX: 0.03, + softY: 0.03, + wander: 0.025, + fray: 0.02, + } + const pt = layer.paint ?? { + base: 0.8, + patchiness: 0.18, + streaks: 0.25, + dryness: 0, + } + const b = layer.brush ?? { angle: 0, width: 26, length: 900, cross: 0.25 } + const rim = layer.rim ?? { amount: 0, width: 0.02 } + const m = layer.mix ?? { base: 0, vary: 0, freq: 1, gradient: 0 } + const rg = layer.region + programs.field.set({ + ...base, + uSeed: layerSeed, + uRegion: [rg.x0, rg.y0, rg.x1, rg.y1], + uEdge: [e.softX, e.softY, e.wander, e.fray], + uPaint: [pt.base, pt.patchiness, pt.streaks, pt.dryness], + uBrush: [(b.angle * Math.PI) / 180, b.width, b.length, b.cross], + uRim: [rim.amount, rim.width], + uMix: [m.base, m.vary, m.freq, m.gradient], + }) + programs.field.textures({ uSurface: surface[cur].tex }) + await fullscreen(gl, layerTarget, w, h, tiles) + } else if (layer.kind === 'wash') { + gl.bindVertexArray(emptyVao) + const e = layer.edge ?? { + wander: 0.04, + freq: 2, + softTop: 0.5, + softBottom: 0.5, + } + const d = layer.density ?? { + base: 0.4, + mottle: 0.4, + pool: 0.2, + streaks: 0.08, + } + const tx = layer.texture ?? { + granulation: 0.3, + flocculation: 0.3, + tide: 0.7, + } + const b = layer.bloom ?? { count: 0, radius: 0.08, strength: 0.7 } + const m = layer.mix ?? { base: 0, vary: 0, freq: 1, gradient: 0 } + programs.wash.set({ + ...base, + uSeed: layerSeed, + uBand: layer.band ?? [-1, 2, -1, aspect + 1], + uTilt: layer.tilt ?? 0, + uEdge: [e.wander, e.freq, e.softTop, e.softBottom], + uSide: layer.side ?? [0.6, 0.6], + uWetVary: layer.wetVary ?? 0.4, + uDensity: [d.base, d.mottle, d.pool, d.streaks], + uTexture: [tx.granulation, tx.flocculation, tx.tide, 0], + uBloom: [b.count, b.radius, b.strength, layerSeed + 0.5], + uMix: [m.base, m.vary, m.freq, m.gradient], + uShape: layer.pool ? 1 : 0, + uPool: layer.pool + ? [layer.pool.x, layer.pool.y, layer.pool.rx, layer.pool.ry] + : [0, 0, 1, 1], + uPoolShape: [ + ((layer.pool?.rotate ?? 0) * Math.PI) / 180, + layer.pool?.lobes ?? 0.35, + ], + uFringe: layer.fringe ?? 0, + uHole: layer.hole + ? [layer.hole.x, layer.hole.y, layer.hole.rx, layer.hole.ry] + : [0, 0, 0, 0], + uHoleShape: [layer.hole?.soft ?? 0.25, layer.hole?.lobes ?? 0.3], + }) + programs.wash.textures({ uSurface: surface[cur].tex }) + await fullscreen(gl, layerTarget, w, h, tiles) + } else { + const strokes = layer.strokes(r, aspect) + gl.bindFramebuffer(gl.FRAMEBUFFER, layerTarget.fbo) + gl.viewport(0, 0, w, h) + gl.clearColor(0, 0, 0, 0) + gl.clear(gl.COLOR_BUFFER_BIT) + gl.enable(gl.BLEND) + gl.blendEquation(gl.FUNC_ADD) + gl.blendFunc(gl.ONE, gl.ONE) + gl.bindVertexArray(strokeVao) + const region = layer.region + const soft = layer.regionSoft ?? [0.02, 0.02, 0.02] + programs.stroke.set({ + ...base, + uAspect: aspect, + uRegion: region + ? [region.x0, region.y0, region.x1, region.y1] + : [1, 0, 0, 0], + uRegionSoft: [soft[0], soft[1], soft[2], layerSeed + 0.25], + }) + programs.stroke.textures({ uSurface: surface[cur].tex }) + for (let i = 0; i < strokes.length; i += STROKES_PER_DRAW) { + const mesh = strokeMesh( + strokes.slice(i, i + STROKES_PER_DRAW), + REF_WIDTH / aspect, + ) + gl.bindBuffer(gl.ARRAY_BUFFER, strokeBuffer) + gl.bufferData(gl.ARRAY_BUFFER, mesh, gl.STREAM_DRAW) + gl.drawArrays(gl.TRIANGLES, 0, mesh.length / FLOATS_PER_VERTEX) + await gpuSync(gl) + } + gl.disable(gl.BLEND) + } + + gl.bindVertexArray(emptyVao) + const wear = layer.wear + programs.composite.set({ + ...base, + uKa: layer.pigment.K, + uSa: layer.pigment.S, + uKb: (layer.pigmentB ?? layer.pigment).K, + uSb: (layer.pigmentB ?? layer.pigment).S, + uThickness: layer.thickness ?? 1, + uImpasto: layer.impasto ?? 0.04, + uWear: wear + ? [wear.amount, wear.size, wear.height, layerSeed + 0.75] + : [0, 1, 1, 0], + uLosses: layer.losses ?? 0, + uLevel: layer.level ?? 0.8, + }) + programs.composite.textures({ + uSurface: surface[cur].tex, + uLayer: layerTarget.tex, + }) + await fullscreen(gl, surface[1 - cur], w, h, 1) + cur = 1 - cur + log(`${layer.name} ${(performance.now() - t).toFixed(0)} ms`) + } + + const f = painting.finish + gl.bindVertexArray(emptyVao) + programs.finish.set({ + ...base, + uSeed: seed, + uRelief: f.relief, + uGloss: f.gloss ?? 0, + uCrack: f.crack ?? 0, + uCrackSize: f.crackSize ?? 80, + uVignette: f.vignette ?? 0.1, + uSaturation: f.saturation ?? 1, + uTint: linear(f.tint ?? '#ffffff'), + uLift: linear(f.lift ?? '#000000'), + uLiftAmount: f.liftAmount ?? 0, + uGrain: f.grain ?? 0.01, + }) + programs.finish.textures({ uSurface: surface[cur].tex }) + await fullscreen(gl, null, w, h, tiles) + log(`total ${(performance.now() - t0).toFixed(0)} ms`) +} diff --git a/site/hero-lab/src/pigments.ts b/site/hero-lab/src/pigments.ts new file mode 100644 index 00000000..8b8283c4 --- /dev/null +++ b/site/hero-lab/src/pigments.ts @@ -0,0 +1,109 @@ +/** + * Paints described the way a painter tests them: a unit-thick swatch over + * white and the same swatch over black. Kubelka–Munk turns that pair into + * absorption (K) and scattering (S) per channel, so a transparent glaze, a + * chalky scumble and an opaque gouache each behave like themselves when laid + * over something else. + */ + +export interface Pigment { + K: [number, number, number] + S: [number, number, number] +} + +function hexToLinear(hex: string): [number, number, number] { + const v = hex.replace('#', '') + const c = [0, 2, 4].map((i) => parseInt(v.slice(i, i + 2), 16) / 255) + return c.map((x) => + x <= 0.04045 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4, + ) as [number, number, number] +} + +function acoth(x: number): number { + return 0.5 * Math.log((x + 1) / (x - 1)) +} + +function channel(rw: number, rb: number): [number, number] { + const w = Math.min(Math.max(rw, 0.004), 0.996) + const b = Math.min(Math.max(rb, 0.0015), w - 0.003) + const a = 0.5 * (w + (b - w + 1) / b) + const bb = Math.sqrt(a * a - 1) + const arg = (bb * bb - (a - w) * (a - 1)) / (bb * (1 - w)) + const S = acoth(arg) / bb + const K = S * (a - 1) + return [K, S] +} + +/** A paint from its look over white and over black at unit thickness (sRGB hex). */ +export function paint(overWhite: string, overBlack: string): Pigment { + const w = hexToLinear(overWhite) + const b = hexToLinear(overBlack) + const ks = [0, 1, 2].map((i) => channel(w[i], b[i])) + return { + K: ks.map((p) => p[0]) as [number, number, number], + S: ks.map((p) => p[1]) as [number, number, number], + } +} + +export function linear(hex: string): [number, number, number] { + return hexToLinear(hex) +} + +/** The palette the presets draw from. Names say what kind of paint each is. */ +export const P = { + // Transparent watercolours and glazes: dark over black. + ultramarine: paint('#4a63b4', '#0b0d1e'), + cerulean: paint('#6aa2c6', '#24404f'), + turquoise: paint('#16908f', '#031615'), + teal: paint('#1f8a8c', '#05201f'), + indigo: paint('#2d3654', '#080a12'), + paynes: paint('#4b5663', '#0d1013'), + quinGold: paint('#dc9a2c', '#1e1004'), + quinRose: paint('#cf5a86', '#1f0813'), + alizarin: paint('#b3303e', '#190306'), + burntSienna: paint('#b8562c', '#2a1208'), + pyrrole: paint('#f07a32', '#3a1606'), + rawUmber: paint('#6f5d43', '#18120a'), + sepia: paint('#5a4636', '#120d09'), + violet: paint('#6b4f8f', '#120c1c'), + // Semi-opaque: some body over black. + ochre: paint('#d8aa52', '#6a4e1e'), + lightRed: paint('#cf7d5c', '#5e2c1c'), + roseGround: paint('#dcab8f', '#5c3424'), + cadOrange: paint('#ee7a30', '#9a4416'), + cadYellow: paint('#f1c13d', '#a88016'), + maroon: paint('#6c2a30', '#1d0a0c'), + plum: paint('#4d2e48', '#160c15'), + deepTeal: paint('#2f5f62', '#0d1f20'), + // Opaque: nearly the same over black (gouache, scumbles, whites). + white: paint('#f5f2ea', '#d9dce0'), + buff: paint('#eee2c6', '#d3c4a3'), + naples: paint('#efd59a', '#c9ac6e'), + paleBlue: paint('#ccd6e1', '#9faab8'), + paleRose: paint('#ecd3c7', '#c4a598'), + apricot: paint('#f0c19e', '#c18a66'), + emberGouache: paint('#e9773a', '#c25a24'), + tealGouache: paint('#3f8a86', '#2a6461'), + greyViolet: paint('#a9a3b5', '#7d778c'), + inkGouache: paint('#2b2a33', '#1f1e25'), + // Earth colours for the dragged band paintings. + rust: paint('#b8745a', '#8e5039'), + rustDeep: paint('#90523f', '#5e3022'), + verdigris: paint('#5f8f7f', '#4f7868'), + bone: paint('#ece2d0', '#d6c9b2'), + umber: paint('#64433a', '#452a21'), + ash: paint('#a59d92', '#6e675f'), + emberRust: paint('#c0602f', '#5a240e'), + slate: paint('#7a8894', '#3c4650'), + haze: paint('#b9c3cc', '#8994a0'), + plumDeep: paint('#4a3a52', '#1b1420'), + indigoDeep: paint('#36384f', '#12131c'), + // PathKeep's own walls and heat scale, as paint. + wallBlue: paint('#d6e2f2', '#aebdd2'), + lilac: paint('#d9d2e3', '#b2a9c2'), + wallPeach: paint('#f5dccd', '#d6b4a0'), + wallApricot: paint('#f1cdb6', '#cc9f84'), + heat: paint('#f3ad84', '#cf7f55'), + nightBlue: paint('#3b3d60', '#20213a'), + plumBlack: paint('#2b1d28', '#140c13'), +} as const diff --git a/site/hero-lab/src/presets.ts b/site/hero-lab/src/presets.ts new file mode 100644 index 00000000..f3b271cd --- /dev/null +++ b/site/hero-lab/src/presets.ts @@ -0,0 +1,1611 @@ +/** + * The paintings. Each preset is a recipe: a support, the layers a painter + * would lay in order, and how the finished surface is lit and graded. + * Composition space: y down, height 1, x up to the aspect ratio (1.6 at 16:10). + */ + +import { + fill, + sweep, + type BrushSettings, + type Region, + type SweepSettings, +} from './brushwork' +import type { + FieldLayer, + Layer, + Painting, + SmearLayer, + StrokeLayer, + WashLayer, +} from './painter' +import { P, type Pigment } from './pigments' + +export interface Preset { + id: string + title: string + note: string + build: (aspect: number) => Painting +} + +const all = (aspect: number, m = 0.12): Region => ({ + x0: -m, + y0: -m, + x1: aspect + m, + y1: 1 + m, +}) +const area = (r: Region) => (r.x1 - r.x0) * (r.y1 - r.y0) + +/** A thin, scrubbed ground over the whole canvas. */ +function ground( + pigment: Pigment, + aspect: number, + thickness: readonly [number, number] = [0.1, 0.17], +): StrokeLayer { + return { + name: 'ground', + kind: 'strokes', + pigment, + impasto: 0.02, + level: 0.4, + strokes: (r) => + fill(r, all(aspect), { + count: 110, + angle: [0, 25], + length: [0.2, 0.45], + width: [0.12, 0.24], + decay: [0.3, 0.9], + taper: [0.15, 0.3], + bristle: [0.25, 0.45], + thickness, + soft: [0.7, 1], + }), + } +} + +interface FieldPaints { + body: Pigment + bodyThickness?: readonly [number, number] + glaze?: Pigment + glazeThickness?: readonly [number, number] + scumble?: Pigment + scumbleThickness?: readonly [number, number] + /** Softness across x, softness across y, edge wander. */ + soft?: readonly [number, number, number] + density?: number + /** Where the scumble gathers: −1 top, +1 bottom. */ + scumbleBias?: number + wear?: { amount: number; size: number; height: number } + losses?: number +} + +/** A colour field built the slow way: a body of soft strokes, a glaze, a broken scumble. */ +function field(name: string, region: Region, f: FieldPaints): StrokeLayer[] { + const soft = f.soft ?? [0.035, 0.03, 0.035] + const n = (k: number) => + Math.max(12, Math.round(k * area(region) * (f.density ?? 1))) + const brush = (o: Partial): BrushSettings => ({ + count: 100, + angle: [0, 5], + scrub: 0.18, + scrubAngle: 28, + length: [0.14, 0.38], + width: [0.06, 0.13], + taper: [0.18, 0.32], + soft: [0.75, 1], + bristle: [0.15, 0.35], + decay: [0.3, 1], + ...o, + }) + const layers: StrokeLayer[] = [ + { + name: `${name} body`, + kind: 'strokes', + pigment: f.body, + region, + regionSoft: soft, + impasto: 0.05, + strokes: (r) => + fill( + r, + region, + brush({ count: n(330), thickness: f.bodyThickness ?? [0.07, 0.12] }), + ), + }, + ] + if (f.glaze) { + layers.push({ + name: `${name} glaze`, + kind: 'strokes', + pigment: f.glaze, + region, + regionSoft: soft, + impasto: 0.01, + level: 0.2, + strokes: (r) => + fill( + r, + region, + brush({ + count: n(150), + width: [0.08, 0.16], + thickness: f.glazeThickness ?? [0.03, 0.07], + }), + ), + }) + } + if (f.scumble) { + layers.push({ + name: `${name} scumble`, + kind: 'strokes', + pigment: f.scumble, + region, + regionSoft: soft, + impasto: 0.08, + strokes: (r) => + fill( + r, + region, + brush({ + count: n(110), + scrub: 0.3, + dryness: [0.35, 0.65], + bristle: [0.45, 0.7], + soft: [0.5, 0.8], + taper: [0.12, 0.25], + thickness: f.scumbleThickness ?? [0.05, 0.11], + bias: f.scumbleBias, + }), + ), + }) + } + for (const layer of layers) { + layer.wear = f.wear + layer.losses = f.losses + } + return layers +} + +/** Dry brush dragged along a line: loaded start, starved tail, skipping the valleys. */ +function dryBrush( + name: string, + pigment: Pigment, + s: Partial & Pick, +): StrokeLayer { + return { + name, + kind: 'strokes', + pigment, + impasto: 0.22, + level: 0.3, + strokes: (r, a) => + sweep(r, a, { + count: 7, + spread: 0.02, + length: [0.16, 0.34], + width: [0.022, 0.05], + load: [0.8, 1], + decay: [1.6, 3], + dryness: [0.6, 0.85], + bristle: [0.85, 1], + thickness: [0.5, 0.8], + soft: 0.25, + taper: [0.04, 0.07], + puddle: [0.1, 0.3], + wobble: [0.04, 0.12], + ...s, + }), + } +} + +function wash( + name: string, + pigment: Pigment, + o: Omit, +): WashLayer { + return { name, kind: 'wash', pigment, impasto: 0, level: 0, ...o } +} + +interface PoolShape { + x: number + y: number + rx: number + ry: number + rotate?: number + lobes?: number +} + +/** An organic pool of wash; `soft` 0 dries hard with a tide line, 1 bleeds wet into wet. */ +function pool( + name: string, + pigment: Pigment, + at: PoolShape, + o: Omit & { + soft: number + }, +): WashLayer { + const { soft, ...rest } = o + return wash(name, pigment, { + pool: at, + edge: { wander: 0, freq: 1, softTop: soft, softBottom: soft }, + ...rest, + }) +} + +interface ColourField { + body: Pigment + bodyB?: Pigment + bodyMix?: FieldLayer['mix'] + base?: number + glaze?: Pigment + glazeBase?: number + /** Pull the glaze in from the body's edge (positive) so the body shows as a rim. */ + glazeInset?: number + scumble?: Pigment + scumbleBase?: number + scumbleDry?: number + patchiness?: number + streaks?: number + rim?: number + edge?: Partial> + brush?: Partial> + wear?: { amount: number; size: number; height: number } + losses?: number +} + +const inset = (r: Region, d: number): Region => ({ + x0: r.x0 + d, + y0: r.y0 + d, + x1: r.x1 - d, + y1: r.y1 - d, +}) + +/** A Rothko-style field: an even body, a thin glaze over it, a dry scumble that breaks over the weave. */ +function colourField( + name: string, + region: Region, + f: ColourField, +): FieldLayer[] { + const edge = { + softX: 0.03, + softY: 0.026, + wander: 0.022, + fray: 0.02, + ...f.edge, + } + const brush = { angle: 0, width: 26, length: 900, cross: 0.3, ...f.brush } + const layers: FieldLayer[] = [ + { + name: `${name} body`, + kind: 'field', + pigment: f.body, + pigmentB: f.bodyB, + mix: f.bodyMix, + region, + edge, + brush, + rim: { amount: f.rim ?? 0.12, width: 0.03 }, + paint: { + base: f.base ?? 0.9, + patchiness: f.patchiness ?? 0.16, + streaks: f.streaks ?? 0.22, + dryness: 0, + }, + impasto: 0.05, + }, + ] + if (f.glaze) { + layers.push({ + name: `${name} glaze`, + kind: 'field', + pigment: f.glaze, + region: inset(region, f.glazeInset ?? 0.012), + edge: { ...edge, softX: edge.softX * 1.4, softY: edge.softY * 1.4 }, + brush: { ...brush, angle: brush.angle + 2, length: brush.length * 1.3 }, + paint: { + base: f.glazeBase ?? 0.22, + patchiness: 0.45, + streaks: 0.35, + dryness: 0, + }, + impasto: 0.01, + level: 0.2, + }) + } + if (f.scumble) { + layers.push({ + name: `${name} scumble`, + kind: 'field', + pigment: f.scumble, + region: inset(region, 0.02), + edge: { + ...edge, + softX: edge.softX * 1.8, + softY: edge.softY * 1.8, + fray: edge.fray * 1.5, + }, + brush: { ...brush, angle: brush.angle - 3, cross: 0.6 }, + paint: { + base: f.scumbleBase ?? 0.3, + patchiness: 0.6, + streaks: 0.55, + dryness: f.scumbleDry ?? 0.5, + }, + impasto: 0.08, + }) + } + for (const layer of layers) { + layer.wear = f.wear + layer.losses = f.losses + } + return layers +} + +/** The ground: one thin colour over the whole canvas, brushed every which way. */ +function groundField( + pigment: Pigment, + aspect: number, + base: number, +): FieldLayer { + return { + name: 'ground', + kind: 'field', + pigment, + region: { x0: -0.3, y0: -0.3, x1: aspect + 0.3, y1: 1.3 }, + edge: { softX: 0.01, softY: 0.01, wander: 0, fray: 0 }, + brush: { angle: 0, width: 34, length: 700, cross: 0.8 }, + paint: { base, patchiness: 0.35, streaks: 0.3, dryness: 0 }, + impasto: 0.02, + level: 0.4, + } +} + +const cfDawn: Preset = { + id: 'cf-dawn', + title: 'Color field · Dawn', + note: 'Raw linen, a rose-red ground; a large orange field on top, a pale slab to its right, a thin rose band, a cream field below.', + build: (aspect) => { + const top: Region = { x0: -0.06, y0: -0.06, x1: 1.32, y1: 0.58 } + const side: Region = { x0: 1.4, y0: -0.06, x1: aspect + 0.06, y1: 0.58 } + const band: Region = { x0: 0.08, y0: 0.645, x1: aspect + 0.06, y1: 0.705 } + const low: Region = { x0: -0.06, y0: 0.77, x1: aspect + 0.06, y1: 1.06 } + return { + support: { kind: 'linen', base: '#c9b99c', fleck: '#5b4733' }, + layers: [ + groundField(P.lightRed, aspect, 0.3), + ...colourField('orange', top, { + body: P.cadOrange, + base: 0.95, + glaze: P.pyrrole, + glazeBase: 0.25, + scumble: P.apricot, + scumbleBase: 0.32, + scumbleDry: 0.45, + }), + ...colourField('pale slab', side, { + body: P.paleRose, + base: 0.85, + scumble: P.white, + scumbleBase: 0.3, + }), + ...colourField('rose band', band, { + body: P.lightRed, + bodyB: P.alizarin, + bodyMix: { base: 0.3, vary: 0.5, freq: 2, gradient: 0 }, + base: 0.8, + edge: { softY: 0.012, fray: 0.012, wander: 0.01 }, + }), + ...colourField('cream', low, { + body: P.naples, + base: 0.85, + glaze: P.ochre, + glazeBase: 0.1, + scumble: P.white, + scumbleBase: 0.3, + }), + dryBrush('orange drag', P.emberGouache, { + y: 0.605, + x: [0, 1.2], + width: [0.04, 0.075], + length: [0.2, 0.42], + }), + dryBrush('cream drag', P.buff, { + y: 0.75, + x: [0.2, 1.4], + count: 5, + width: [0.035, 0.065], + length: [0.18, 0.38], + }), + ], + finish: { + relief: 0.3, + gloss: 0.025, + vignette: 0.1, + saturation: 0.97, + tint: '#fff8f0', + lift: '#2b2320', + liftAmount: 0.03, + grain: 0.013, + }, + } + }, +} + +const cfEmber: Preset = { + id: 'cf-ember', + title: 'Color field · Ember', + note: 'A maroon ground; a deep plum field and a maroon field on the left, an ember field glowing down the right side.', + build: (aspect) => { + const dark: Region = { x0: -0.06, y0: -0.06, x1: 1.15, y1: 0.63 } + const glow: Region = { x0: 1.24, y0: 0.07, x1: aspect + 0.06, y1: 0.93 } + const low: Region = { x0: -0.06, y0: 0.71, x1: 1.15, y1: 1.06 } + return { + support: { kind: 'linen', base: '#c4b394', fleck: '#4f3d2b' }, + layers: [ + groundField(P.maroon, aspect, 0.9), + ...colourField('plum', dark, { + body: P.plum, + bodyB: P.maroon, + bodyMix: { base: 0.35, vary: 0.7, freq: 1.6, gradient: 0.5 }, + base: 0.62, + patchiness: 0.3, + glaze: P.indigo, + glazeBase: 0.12, + scumble: P.lightRed, + scumbleBase: 0.22, + scumbleDry: 0.5, + }), + ...colourField('ember', glow, { + body: P.cadOrange, + base: 1, + glaze: P.pyrrole, + glazeBase: 0.4, + scumble: P.cadYellow, + scumbleBase: 0.14, + scumbleDry: 0.55, + rim: 0.25, + }), + ...colourField('maroon', low, { + body: P.maroon, + base: 0.9, + glaze: P.alizarin, + glazeBase: 0.25, + scumble: P.lightRed, + scumbleBase: 0.25, + scumbleDry: 0.6, + }), + dryBrush('ember drag', P.emberGouache, { + y: 0.67, + x: [0.3, 1.2], + count: 6, + width: [0.04, 0.075], + length: [0.2, 0.4], + }), + ], + finish: { + relief: 0.3, + gloss: 0.04, + vignette: 0.2, + tint: '#fff4ec', + lift: '#140c10', + liftAmount: 0.04, + grain: 0.016, + }, + } + }, +} + +const cfSpaces: Preset = { + id: 'cf-spaces', + title: 'Color field · Two spaces', + note: 'Raw linen barely sized; a terracotta field on the left, a deep teal field on the right, bare linen between them.', + build: (aspect) => { + const left: Region = { x0: -0.06, y0: -0.06, x1: 0.96, y1: 1.06 } + const right: Region = { x0: 1.1, y0: -0.06, x1: aspect + 0.06, y1: 0.76 } + const corner: Region = { x0: 1.1, y0: 0.84, x1: aspect + 0.06, y1: 1.06 } + return { + support: { kind: 'linen', base: '#cbbb9e', fleck: '#5b4733' }, + layers: [ + groundField(P.ochre, aspect, 0.12), + ...colourField('terracotta', left, { + body: P.cadOrange, + base: 0.95, + glaze: P.burntSienna, + glazeBase: 0.2, + scumble: P.apricot, + scumbleBase: 0.3, + }), + ...colourField('teal', right, { + body: P.deepTeal, + base: 1, + glaze: P.teal, + glazeBase: 0.25, + scumble: P.tealGouache, + scumbleBase: 0.3, + scumbleDry: 0.55, + }), + ...colourField('linen wash', corner, { + body: P.buff, + base: 0.3, + patchiness: 0.4, + }), + dryBrush('teal drag', P.tealGouache, { + y: 0.8, + spread: 0.02, + x: [1.05, 1.6], + count: 6, + width: [0.04, 0.075], + length: [0.2, 0.4], + }), + ], + finish: { + relief: 0.34, + gloss: 0.03, + vignette: 0.12, + tint: '#fffaf4', + lift: '#22201c', + liftAmount: 0.03, + grain: 0.013, + }, + } + }, +} + +const cfFresco: Preset = { + id: 'cf-fresco', + title: 'Color field · Fresco', + note: 'Lime plaster; faded terracotta, ochre and verdigris fields, rubbed through on the high points, flaked and crazed.', + build: (aspect) => { + const upper: Region = { x0: -0.06, y0: -0.06, x1: 1.3, y1: 0.54 } + const upRight: Region = { x0: 1.38, y0: -0.06, x1: aspect + 0.06, y1: 0.54 } + const lowLeft: Region = { x0: -0.06, y0: 0.61, x1: 0.84, y1: 1.06 } + const lowRight: Region = { x0: 0.92, y0: 0.62, x1: aspect + 0.06, y1: 1.06 } + const wear = { amount: 0.45, size: 520, height: 0.56 } + return { + support: { kind: 'plaster', base: '#e8e0cf', fleck: '#8c7b62' }, + layers: [ + groundField(P.ochre, aspect, 0.15), + ...colourField('terracotta', upper, { + body: P.lightRed, + base: 0.8, + glaze: P.burntSienna, + glazeBase: 0.12, + scumble: P.paleRose, + wear, + losses: 0.03, + }), + ...colourField('pale', upRight, { + body: P.buff, + base: 0.7, + scumble: P.white, + wear, + losses: 0.03, + }), + ...colourField('ochre', lowLeft, { + body: P.ochre, + base: 0.8, + glaze: P.quinGold, + glazeBase: 0.1, + scumble: P.naples, + wear, + losses: 0.03, + }), + ...colourField('verdigris', lowRight, { + body: P.tealGouache, + base: 0.75, + glaze: P.deepTeal, + glazeBase: 0.1, + scumble: P.white, + wear, + losses: 0.03, + }), + ], + finish: { + relief: 0.45, + crack: 0.14, + crackSize: 64, + vignette: 0.12, + saturation: 0.86, + tint: '#fbf4e8', + lift: '#3b3128', + liftAmount: 0.05, + grain: 0.016, + }, + } + }, +} + +const paper = { + kind: 'paper', + base: '#f4efe5', + fleck: '#b5a68a', + scale: 1.35, +} as const + +const wcDawn: Preset = { + id: 'wc-dawn', + title: 'Watercolour · Dawn', + note: 'Cold-pressed paper; gold, rose and cerulean pools bleeding into each other on a diagonal, an orange pool dried hard at the lower left, gouache dragged through the lower half.', + build: () => ({ + support: { ...paper, age: 0.3 }, + layers: [ + pool( + 'cerulean', + P.cerulean, + { x: 1.32, y: 0.22, rx: 0.62, ry: 0.5, rotate: 18, lobes: 0.5 }, + { + soft: 0.9, + pigmentB: P.violet, + mix: { base: 0.25, vary: 0.5, freq: 1.3, gradient: 0.3 }, + density: { base: 0.2, mottle: 0.55, pool: 0.25, streaks: 0.04 }, + texture: { granulation: 0.55, flocculation: 0.15, tide: 0.7 }, + }, + ), + pool( + 'rose', + P.quinRose, + { x: 0.88, y: 0.5, rx: 0.62, ry: 0.36, rotate: -24, lobes: 0.5 }, + { + soft: 0.8, + pigmentB: P.quinGold, + mix: { base: 0.3, vary: 0.6, freq: 1.2, gradient: 0.6 }, + wetVary: 0.6, + density: { base: 0.2, mottle: 0.5, pool: 0.3, streaks: 0.05 }, + texture: { granulation: 0.12, flocculation: 0.1, tide: 0.8 }, + bloom: { count: 1, radius: 0.1, strength: 0.6 }, + }, + ), + pool( + 'orange', + P.pyrrole, + { x: 0.36, y: 0.84, rx: 0.62, ry: 0.3, rotate: -14, lobes: 0.4 }, + { + soft: 0.3, + pigmentB: P.quinGold, + mix: { base: 0.4, vary: 0.6, freq: 1.4, gradient: -0.5 }, + wetVary: 0.6, + density: { base: 0.4, mottle: 0.45, pool: 0.3, streaks: 0.08 }, + texture: { granulation: 0.3, flocculation: 0.12, tide: 1 }, + bloom: { count: 1, radius: 0.08, strength: 0.7 }, + }, + ), + pool( + 'gold', + P.quinGold, + { x: 0.05, y: 0.55, rx: 0.3, ry: 0.22, rotate: 10 }, + { + soft: 0.75, + density: { base: 0.22, mottle: 0.5, pool: 0.2, streaks: 0.04 }, + texture: { granulation: 0.1, flocculation: 0.1, tide: 0.6 }, + }, + ), + dryBrush('buff gouache', P.buff, { + y: 0.8, + spread: 0.06, + x: [-0.1, 1.1], + count: 6, + length: [0.25, 0.5], + width: [0.03, 0.065], + tilt: -0.1, + }), + dryBrush('ember gouache', P.emberGouache, { + y: 0.9, + spread: 0.03, + x: [0.1, 1.1], + count: 3, + length: [0.18, 0.36], + width: [0.018, 0.035], + tilt: -0.1, + }), + dryBrush('blue gouache', P.paleBlue, { + y: 0.56, + spread: 0.03, + x: [1, 1.5], + count: 3, + length: [0.12, 0.25], + width: [0.02, 0.035], + }), + ], + finish: { + relief: 0.28, + vignette: 0.06, + saturation: 0.96, + tint: '#fffaf3', + lift: '#3a3230', + liftAmount: 0.02, + grain: 0.011, + }, + }), +} + +const wcDusk: Preset = { + id: 'wc-dusk', + title: 'Watercolour · Dusk', + note: 'Indigo and violet washed over the whole sheet, a sienna warmth left of centre, Payne’s grey settling at the bottom, ember gouache dragged across in the dark.', + build: (aspect) => ({ + support: { ...paper, age: 0.2 }, + layers: [ + wash('indigo night', P.indigo, { + pigmentB: P.violet, + band: [-0.4, 1.4, -0.4, aspect + 0.4], + density: { base: 0.58, mottle: 0.5, pool: 0.1, streaks: 0.07 }, + texture: { granulation: 0.45, flocculation: 0.15, tide: 0.6 }, + mix: { base: 0.4, vary: 0.75, freq: 0.9, gradient: -0.3 }, + bloom: { count: 2, radius: 0.13, strength: 0.5 }, + }), + pool( + 'sienna warmth', + P.burntSienna, + { x: 0.42, y: 0.6, rx: 0.6, ry: 0.28, rotate: -8, lobes: 0.5 }, + { + soft: 0.85, + pigmentB: P.alizarin, + mix: { base: 0.3, vary: 0.6, freq: 1.3, gradient: 0 }, + density: { base: 0.3, mottle: 0.5, pool: 0.2, streaks: 0.05 }, + texture: { granulation: 0.4, flocculation: 0.1, tide: 0.5 }, + }, + ), + pool( + 'rose veil', + P.quinRose, + { x: 1.32, y: 0.22, rx: 0.5, ry: 0.36, rotate: 15, lobes: 0.5 }, + { + soft: 0.9, + pigmentB: P.violet, + mix: { base: 0.4, vary: 0.6, freq: 1.2, gradient: 0 }, + density: { base: 0.26, mottle: 0.5, pool: 0.2, streaks: 0.05 }, + texture: { granulation: 0.2, flocculation: 0.1, tide: 0.5 }, + }, + ), + wash('paynes low', P.paynes, { + band: [0.8, 1.4, -0.4, aspect + 0.4], + edge: { wander: 0.03, freq: 1.5, softTop: 0.85, softBottom: 1 }, + density: { base: 0.38, mottle: 0.4, pool: 0, streaks: 0.08 }, + texture: { granulation: 0.35, flocculation: 0.15, tide: 0.5 }, + }), + dryBrush('ember gouache', P.emberGouache, { + y: 0.72, + spread: 0.05, + x: [0, 1.15], + count: 7, + length: [0.2, 0.45], + width: [0.025, 0.055], + tilt: -0.05, + }), + dryBrush('buff gouache', P.buff, { + y: 0.86, + spread: 0.04, + x: [0.2, 1.3], + count: 3, + thickness: [0.35, 0.55], + }), + ], + finish: { + relief: 0.28, + vignette: 0.16, + tint: '#fff6ee', + lift: '#14121c', + liftAmount: 0.04, + grain: 0.014, + }, + }), +} + +const wcTide: Preset = { + id: 'wc-tide', + title: 'Watercolour · Tide', + note: 'Turquoise and cerulean sweeping in from the right, burnt sienna granulating where it meets them on a diagonal, white gouache dragged across.', + build: () => ({ + support: { ...paper, age: 0.25 }, + layers: [ + pool( + 'turquoise', + P.turquoise, + { x: 1.12, y: 0.42, rx: 0.78, ry: 0.62, rotate: 28, lobes: 0.45 }, + { + soft: 0.75, + pigmentB: P.cerulean, + mix: { base: 0.35, vary: 0.7, freq: 1.2, gradient: 0.5 }, + wetVary: 0.6, + density: { base: 0.28, mottle: 0.55, pool: 0.3, streaks: 0.05 }, + texture: { granulation: 0.45, flocculation: 0.12, tide: 0.8 }, + bloom: { count: 1, radius: 0.11, strength: 0.6 }, + }, + ), + pool( + 'sienna', + P.burntSienna, + { x: 0.28, y: 0.72, rx: 0.48, ry: 0.42, rotate: -24, lobes: 0.45 }, + { + soft: 0.45, + pigmentB: P.pyrrole, + mix: { base: 0.45, vary: 0.7, freq: 1.3, gradient: 0 }, + density: { base: 0.38, mottle: 0.45, pool: 0.3, streaks: 0.06 }, + texture: { granulation: 0.55, flocculation: 0.12, tide: 0.9 }, + bloom: { count: 1, radius: 0.09, strength: 0.7 }, + }, + ), + pool( + 'gold', + P.quinGold, + { x: 0.12, y: 0.24, rx: 0.36, ry: 0.22, rotate: -8 }, + { + soft: 0.7, + density: { base: 0.22, mottle: 0.45, pool: 0.2, streaks: 0.05 }, + texture: { granulation: 0.12, flocculation: 0.1, tide: 0.7 }, + }, + ), + dryBrush('white gouache', P.white, { + y: 0.78, + spread: 0.07, + x: [-0.1, 1.3], + count: 6, + length: [0.25, 0.5], + width: [0.03, 0.065], + tilt: -0.06, + }), + dryBrush('teal gouache', P.tealGouache, { + y: 0.9, + spread: 0.035, + x: [0.4, 1.3], + count: 3, + length: [0.15, 0.32], + width: [0.02, 0.04], + }), + ], + finish: { + relief: 0.28, + vignette: 0.07, + saturation: 0.97, + tint: '#fffaf4', + lift: '#2c3232', + liftAmount: 0.02, + grain: 0.011, + }, + }), +} + +const wcMist: Preset = { + id: 'wc-mist', + title: 'Watercolour · Mist', + note: 'Mostly bare paper: a grey-blue pool and a peach pool, barely there, and a few strokes of gouache, two of them ember.', + build: () => ({ + support: { ...paper, age: 0.45 }, + layers: [ + pool( + 'grey-blue', + P.paynes, + { x: 1.2, y: 0.26, rx: 0.74, ry: 0.42, rotate: 10, lobes: 0.5 }, + { + soft: 0.9, + pigmentB: P.cerulean, + mix: { base: 0.5, vary: 0.6, freq: 1.2, gradient: 0 }, + density: { base: 0.12, mottle: 0.6, pool: 0.25, streaks: 0.03 }, + texture: { granulation: 0.45, flocculation: 0.12, tide: 0.7 }, + }, + ), + pool( + 'peach', + P.quinRose, + { x: 0.3, y: 0.66, rx: 0.58, ry: 0.3, rotate: -8, lobes: 0.5 }, + { + soft: 0.75, + pigmentB: P.quinGold, + mix: { base: 0.55, vary: 0.5, freq: 1.2, gradient: 0 }, + wetVary: 0.6, + density: { base: 0.12, mottle: 0.55, pool: 0.3, streaks: 0.03 }, + texture: { granulation: 0.12, flocculation: 0.1, tide: 0.8 }, + }, + ), + dryBrush('buff gouache', P.buff, { + y: 0.83, + spread: 0.04, + x: [0.15, 1.1], + count: 3, + length: [0.22, 0.45], + width: [0.025, 0.05], + }), + dryBrush('ember line', P.emberGouache, { + y: 0.87, + spread: 0.02, + x: [0.4, 0.9], + count: 2, + length: [0.18, 0.32], + width: [0.014, 0.026], + }), + ], + finish: { + relief: 0.3, + vignette: 0.05, + saturation: 0.95, + tint: '#fffaf2', + lift: '#3a3230', + liftAmount: 0.01, + grain: 0.01, + }, + }), +} + +const wcStain: Preset = { + id: 'wc-stain', + title: 'Soak-stain · Raw linen', + note: 'Thinned paint poured into unprimed linen: orange and gold pools on the left, a teal pool on the right, rose below, stained halos, gouache dragged across the lower half.', + build: () => ({ + support: { kind: 'linen', base: '#cdbda1', fleck: '#5b4733' }, + layers: [ + pool( + 'orange stain', + P.pyrrole, + { x: 0.52, y: 0.4, rx: 0.66, ry: 0.4, rotate: -10, lobes: 0.55 }, + { + soft: 0.35, + pigmentB: P.quinGold, + mix: { base: 0.3, vary: 0.6, freq: 1.2, gradient: 0.3 }, + wetVary: 0.6, + density: { base: 0.48, mottle: 0.45, pool: 0.2, streaks: 0.04 }, + texture: { granulation: 0.1, flocculation: 0.05, tide: 0.7 }, + fringe: 0.25, + }, + ), + pool( + 'gold stain', + P.quinGold, + { x: 0.18, y: 0.18, rx: 0.34, ry: 0.24, rotate: 12, lobes: 0.5 }, + { + soft: 0.5, + density: { base: 0.32, mottle: 0.45, pool: 0.2, streaks: 0.04 }, + texture: { granulation: 0.08, flocculation: 0.05, tide: 0.6 }, + fringe: 0.2, + }, + ), + pool( + 'teal stain', + P.teal, + { x: 1.36, y: 0.6, rx: 0.42, ry: 0.4, rotate: 20, lobes: 0.6 }, + { + soft: 0.3, + pigmentB: P.turquoise, + mix: { base: 0.35, vary: 0.6, freq: 1.2, gradient: 0 }, + density: { base: 0.4, mottle: 0.45, pool: 0.2, streaks: 0.04 }, + texture: { granulation: 0.1, flocculation: 0.05, tide: 0.7 }, + fringe: 0.25, + }, + ), + pool( + 'rose stain', + P.quinRose, + { x: 0.26, y: 0.9, rx: 0.4, ry: 0.2, rotate: 5 }, + { + soft: 0.5, + density: { base: 0.32, mottle: 0.45, pool: 0.2, streaks: 0.04 }, + texture: { granulation: 0.1, flocculation: 0.05, tide: 0.6 }, + fringe: 0.2, + }, + ), + dryBrush('buff gouache', P.buff, { + y: 0.8, + spread: 0.05, + x: [-0.1, 1.2], + count: 6, + }), + dryBrush('ember gouache', P.emberGouache, { + y: 0.9, + spread: 0.03, + x: [0.2, 1.2], + count: 3, + }), + ], + finish: { + relief: 0.32, + vignette: 0.1, + saturation: 0.97, + tint: '#fffaf2', + lift: '#2b2320', + liftAmount: 0.02, + grain: 0.012, + }, + }), +} + +interface BandSpec { + name: string + y0: number + y1: number + body: Pigment + bodyB?: Pigment + mix?: FieldLayer['mix'] + base?: number + /** Vertical feather of the top and bottom edges (composition units). */ + soft?: number + /** Horizontal extent and its feather; full width by default. */ + x?: readonly [number, number] + softX?: number + glaze?: Pigment + scumble?: Pigment + scumbleDry?: number +} + +/** A full-width band laid with long horizontal strokes, feathered wide into its neighbours. */ +function band(aspect: number, b: BandSpec): FieldLayer[] { + const region: Region = { + x0: b.x?.[0] ?? -0.5, + y0: b.y0, + x1: b.x?.[1] ?? aspect + 0.5, + y1: b.y1, + } + const edge = { + softX: b.softX ?? 0.2, + softY: b.soft ?? 0.07, + wander: 0.035, + fray: 0.05, + } + const brush = { angle: 0, width: 20, length: 1500, cross: 0.06 } + const layers: FieldLayer[] = [ + { + name: `${b.name} body`, + kind: 'field', + pigment: b.body, + pigmentB: b.bodyB, + mix: b.mix, + region, + edge, + brush, + paint: { + base: b.base ?? 0.95, + patchiness: 0.24, + streaks: 0.68, + dryness: 0, + }, + impasto: 0.04, + level: 0.3, + }, + ] + if (b.glaze) { + layers.push({ + name: `${b.name} glaze`, + kind: 'field', + pigment: b.glaze, + region, + edge: { ...edge, softY: edge.softY * 1.3 }, + brush: { ...brush, length: 1900 }, + paint: { base: 0.18, patchiness: 0.5, streaks: 0.45, dryness: 0 }, + impasto: 0.01, + level: 0.1, + }) + } + if (b.scumble) { + layers.push({ + name: `${b.name} scumble`, + kind: 'field', + pigment: b.scumble, + region, + edge: { ...edge, softY: edge.softY * 1.4, fray: edge.fray * 1.4 }, + brush: { ...brush, width: 14, length: 1200 }, + paint: { + base: 0.3, + patchiness: 0.6, + streaks: 0.6, + dryness: b.scumbleDry ?? 0.5, + }, + impasto: 0.06, + }) + } + return layers +} + +/** Drags across the whole canvas: a very long one, a long one, one back the other way, a fine one. */ +function drags(strength = 1): SmearLayer[] { + return [ + { + kind: 'smear', + name: 'sweep', + angle: 0, + length: 2200, + strength: 0.7 * strength, + coverage: 0.7, + rows: { width: 18, contrast: 1.1, span: 2600, wobble: 30 }, + }, + { + kind: 'smear', + name: 'long drag', + angle: 0, + length: 1100, + strength: 0.8 * strength, + coverage: 0.62, + rows: { width: 12, contrast: 1.3, span: 1600, wobble: 26 }, + }, + { + kind: 'smear', + name: 'back drag', + angle: 180, + length: 600, + strength: 0.6 * strength, + coverage: 0.5, + rows: { width: 7, contrast: 1.4, span: 1100, wobble: 18 }, + }, + { + kind: 'smear', + name: 'fine drag', + angle: 0, + length: 260, + strength: 0.55 * strength, + coverage: 0.55, + rows: { width: 3.5, contrast: 2.2, span: 700, wobble: 8 }, + }, + ] +} + +const lightDrag: SmearLayer = { + kind: 'smear', + name: 'last drag', + angle: 0, + length: 420, + strength: 0.35, + coverage: 0.45, + rows: { width: 5, contrast: 1.4, span: 900, wobble: 10 }, +} + +/** Wide, starved strokes along a boundary between two bands. */ +function seam( + name: string, + pigment: Pigment, + y: number, + count = 7, +): StrokeLayer { + return dryBrush(name, pigment, { + y, + spread: 0.018, + x: [-0.3, 1.6], + count, + length: [0.4, 0.9], + width: [0.05, 0.09], + dryness: [0.55, 0.8], + decay: [1.2, 2.4], + bristle: [0.85, 1], + thickness: [0.22, 0.4], + }) +} + +const ribbedLinen = { + kind: 'linen', + base: '#c5b49a', + fleck: '#5b4733', + scale: 1.45, + rib: 0.7, +} as const +const bandFinish = { + relief: 0.62, + vignette: 0.03, + saturation: 0.95, + tint: '#fffaf4', + lift: '#241c18', + liftAmount: 0.02, + grain: 0.046, +} + +const pkFinish = { + relief: 0.62, + vignette: 0.03, + saturation: 0.96, + tint: '#fffaf4', + lift: '#2a2220', + liftAmount: 0.015, + grain: 0.044, +} + +const pkDawn: Preset = { + id: 'pk-dawn', + title: 'Dragged bands · Light wall', + note: 'The app’s light wall as paint: a pale wall blue on top, a lilac haze, peach and apricot below, one streak of PathKeep orange dragged in from the left.', + build: (aspect) => ({ + overscan: 0.05, + support: ribbedLinen, + layers: [ + groundField(P.paleRose, aspect, 0.4), + ...band(aspect, { + name: 'wall blue', + y0: -0.5, + y1: 0.33, + soft: 0.11, + body: P.wallBlue, + bodyB: P.haze, + mix: { base: 0.25, vary: 0.6, freq: 1.3, gradient: 0.4 }, + scumble: P.white, + scumbleDry: 0.62, + }), + ...band(aspect, { + name: 'lilac', + y0: 0.28, + y1: 0.5, + soft: 0.1, + body: P.lilac, + bodyB: P.wallPeach, + mix: { base: 0.3, vary: 0.6, freq: 1.4, gradient: 0.8 }, + }), + ...band(aspect, { + name: 'peach', + y0: 0.46, + y1: 0.8, + soft: 0.1, + body: P.wallPeach, + bodyB: P.wallApricot, + mix: { base: 0.4, vary: 0.6, freq: 1.3, gradient: 0.6 }, + scumble: P.white, + scumbleDry: 0.7, + }), + ...band(aspect, { + name: 'ember streak', + y0: 0.6, + y1: 0.645, + soft: 0.02, + x: [-0.5, 1.15], + softX: 0.45, + body: P.emberGouache, + base: 0.7, + }), + ...band(aspect, { + name: 'apricot', + y0: 0.78, + y1: 1.5, + soft: 0.08, + body: P.wallApricot, + bodyB: P.heat, + mix: { base: 0.2, vary: 0.6, freq: 1.4, gradient: 0.5 }, + scumble: P.naples, + scumbleDry: 0.68, + }), + seam('ember drag', P.emberGouache, 0.62, 5), + seam('blue drag', P.wallBlue, 0.31, 5), + ...drags(), + lightDrag, + ], + finish: { ...pkFinish, lift: '#3a3230', liftAmount: 0.01 }, + }), +} + +const pkDusk: Preset = { + id: 'pk-dusk', + title: 'Dragged bands · Dark wall', + note: 'The app’s dark wall as paint: deep indigo above, plum and maroon sinking below, one ember streak low down.', + build: (aspect) => ({ + overscan: 0.05, + support: ribbedLinen, + layers: [ + groundField(P.indigoDeep, aspect, 0.8), + ...band(aspect, { + name: 'indigo', + y0: -0.5, + y1: 0.52, + soft: 0.11, + body: P.nightBlue, + bodyB: P.indigoDeep, + mix: { base: 0.4, vary: 0.7, freq: 1.2, gradient: 0.5 }, + glaze: P.violet, + }), + ...band(aspect, { + name: 'violet haze', + y0: 0.34, + y1: 0.5, + soft: 0.08, + body: P.greyViolet, + bodyB: P.lilac, + mix: { base: 0.3, vary: 0.6, freq: 1.4, gradient: 0 }, + base: 0.45, + }), + ...band(aspect, { + name: 'plum', + y0: 0.48, + y1: 0.78, + soft: 0.1, + body: P.plumDeep, + bodyB: P.lightRed, + mix: { base: 0.15, vary: 0.6, freq: 1.3, gradient: 0.6 }, + }), + ...band(aspect, { + name: 'ember streak', + y0: 0.69, + y1: 0.76, + soft: 0.024, + x: [-0.5, aspect + 0.5], + softX: 0.3, + body: P.cadOrange, + bodyB: P.emberRust, + mix: { base: 0.3, vary: 0.7, freq: 1.6, gradient: 0 }, + }), + ...band(aspect, { + name: 'night low', + y0: 0.77, + y1: 1.5, + soft: 0.06, + body: P.plumBlack, + bodyB: P.maroon, + mix: { base: 0.25, vary: 0.6, freq: 1.3, gradient: -0.4 }, + }), + seam('ember drag', P.emberGouache, 0.73, 6), + ...drags(), + lightDrag, + ], + finish: { ...pkFinish, vignette: 0.06, lift: '#120d10', liftAmount: 0.03 }, + }), +} + +const pkEmber: Preset = { + id: 'pk-ember', + title: 'Dragged bands · Ember', + note: 'PathKeep orange through the whole heat scale: apricot above, a broad orange band, burnt sienna, peach at the foot.', + build: (aspect) => ({ + overscan: 0.05, + support: ribbedLinen, + layers: [ + groundField(P.lightRed, aspect, 0.4), + ...band(aspect, { + name: 'apricot', + y0: -0.5, + y1: 0.3, + soft: 0.1, + body: P.wallApricot, + bodyB: P.heat, + mix: { base: 0.35, vary: 0.6, freq: 1.3, gradient: 0.6 }, + scumble: P.naples, + scumbleDry: 0.66, + }), + ...band(aspect, { + name: 'orange', + y0: 0.26, + y1: 0.66, + soft: 0.09, + body: P.cadOrange, + bodyB: P.heat, + mix: { base: 0.3, vary: 0.6, freq: 1.4, gradient: -0.6 }, + }), + ...band(aspect, { + name: 'sienna', + y0: 0.63, + y1: 0.86, + soft: 0.07, + body: P.emberRust, + bodyB: P.cadOrange, + mix: { base: 0.3, vary: 0.6, freq: 1.4, gradient: -0.4 }, + }), + ...band(aspect, { + name: 'peach foot', + y0: 0.86, + y1: 1.5, + soft: 0.05, + body: P.wallPeach, + bodyB: P.heat, + mix: { base: 0.3, vary: 0.6, freq: 1.4, gradient: 0 }, + }), + seam('apricot drag', P.apricot, 0.29, 5), + seam('peach drag', P.wallPeach, 0.86, 5), + ...drags(), + lightDrag, + ], + finish: pkFinish, + }), +} + +const pkSpaces: Preset = { + id: 'pk-spaces', + title: 'Dragged bands · Two spaces', + note: 'Agent teal and browsing orange: deep teal above, a pale cool band, the orange band, dark teal again at the foot.', + build: (aspect) => ({ + overscan: 0.05, + support: ribbedLinen, + layers: [ + groundField(P.deepTeal, aspect, 0.5), + ...band(aspect, { + name: 'teal', + y0: -0.5, + y1: 0.48, + soft: 0.1, + body: P.deepTeal, + bodyB: P.tealGouache, + mix: { base: 0.3, vary: 0.6, freq: 1.3, gradient: 0.8 }, + glaze: P.teal, + }), + ...band(aspect, { + name: 'cool haze', + y0: 0.44, + y1: 0.57, + soft: 0.055, + body: P.haze, + bodyB: P.wallBlue, + mix: { base: 0.4, vary: 0.6, freq: 1.5, gradient: 0 }, + base: 0.8, + }), + ...band(aspect, { + name: 'orange', + y0: 0.56, + y1: 0.74, + soft: 0.075, + body: P.cadOrange, + bodyB: P.emberRust, + mix: { base: 0.35, vary: 0.6, freq: 1.4, gradient: 0.5 }, + glaze: P.pyrrole, + }), + ...band(aspect, { + name: 'teal foot', + y0: 0.72, + y1: 1.5, + soft: 0.09, + body: P.deepTeal, + bodyB: P.indigoDeep, + mix: { base: 0.3, vary: 0.6, freq: 1.3, gradient: 0.5 }, + }), + seam('haze drag', P.haze, 0.5, 5), + seam('orange drag', P.emberGouache, 0.66, 5), + ...drags(), + lightDrag, + ], + finish: pkFinish, + }), +} + +const pkPaper: Preset = { + id: 'pk-paper', + title: 'Dragged bands · Paper', + note: 'Quiet and editorial: cool bone above, a grey drag, one thin orange line, warm bone below.', + build: (aspect) => ({ + overscan: 0.05, + support: ribbedLinen, + layers: [ + groundField(P.buff, aspect, 0.35), + ...band(aspect, { + name: 'cool bone', + y0: -0.5, + y1: 0.55, + soft: 0.12, + body: P.bone, + bodyB: P.wallBlue, + mix: { base: 0.3, vary: 0.6, freq: 1.2, gradient: -0.5 }, + scumble: P.white, + scumbleDry: 0.62, + }), + ...band(aspect, { + name: 'grey', + y0: 0.5, + y1: 0.62, + soft: 0.05, + body: P.ash, + base: 0.55, + }), + ...band(aspect, { + name: 'ember line', + y0: 0.632, + y1: 0.672, + soft: 0.014, + x: [-0.5, 1.05], + softX: 0.4, + body: P.cadOrange, + base: 1.05, + }), + ...band(aspect, { + name: 'warm bone', + y0: 0.66, + y1: 1.5, + soft: 0.1, + body: P.bone, + bodyB: P.naples, + mix: { base: 0.25, vary: 0.6, freq: 1.3, gradient: 0.3 }, + scumble: P.white, + scumbleDry: 0.66, + }), + seam('grey drag', P.ash, 0.56, 4), + ...drags(), + seam('ember line drag', P.emberGouache, 0.652, 4), + lightDrag, + ], + finish: { ...pkFinish, lift: '#3a3230', liftAmount: 0.01 }, + }), +} + +/** Small painted swatches for the two spaces, in the same dragged manner. */ +const swBrowsing: Preset = { + id: 'sw-browsing', + title: 'Swatch · Browsing history', + note: 'Browsing orange: heat scale bands dragged sideways.', + build: (aspect) => ({ + overscan: 0.05, + support: ribbedLinen, + layers: [ + groundField(P.lightRed, aspect, 0.4), + ...band(aspect, { + name: 'apricot', + y0: -0.5, + y1: 0.36, + soft: 0.1, + body: P.wallApricot, + bodyB: P.heat, + mix: { base: 0.4, vary: 0.6, freq: 1.6, gradient: 0.6 }, + }), + ...band(aspect, { + name: 'orange', + y0: 0.3, + y1: 0.74, + soft: 0.1, + body: P.cadOrange, + bodyB: P.heat, + mix: { base: 0.3, vary: 0.6, freq: 1.6, gradient: -0.5 }, + }), + ...band(aspect, { + name: 'ember', + y0: 0.7, + y1: 1.5, + soft: 0.08, + body: P.emberRust, + bodyB: P.cadOrange, + mix: { base: 0.4, vary: 0.6, freq: 1.6, gradient: 0 }, + }), + ...drags(), + lightDrag, + ], + finish: pkFinish, + }), +} + +const swAgent: Preset = { + id: 'sw-agent', + title: 'Swatch · Agent conversations', + note: 'Agent teal: deep teal, a lighter teal band, dragged sideways.', + build: (aspect) => ({ + overscan: 0.05, + support: ribbedLinen, + layers: [ + groundField(P.deepTeal, aspect, 0.5), + ...band(aspect, { + name: 'teal haze', + y0: -0.5, + y1: 0.34, + soft: 0.1, + body: P.tealGouache, + bodyB: P.haze, + mix: { base: 0.3, vary: 0.6, freq: 1.6, gradient: 0.6 }, + }), + ...band(aspect, { + name: 'teal', + y0: 0.3, + y1: 0.72, + soft: 0.1, + body: P.deepTeal, + bodyB: P.tealGouache, + mix: { base: 0.35, vary: 0.6, freq: 1.6, gradient: -0.5 }, + }), + ...band(aspect, { + name: 'deep', + y0: 0.68, + y1: 1.5, + soft: 0.08, + body: P.deepTeal, + bodyB: P.indigoDeep, + mix: { base: 0.3, vary: 0.6, freq: 1.6, gradient: 0 }, + }), + ...drags(), + lightDrag, + ], + finish: pkFinish, + }), +} + +export const presets: Record = Object.fromEntries( + [ + cfDawn, + cfEmber, + cfSpaces, + cfFresco, + wcDawn, + wcDusk, + wcTide, + wcMist, + wcStain, + pkDawn, + pkDusk, + pkEmber, + pkSpaces, + pkPaper, + swBrowsing, + swAgent, + ].map((p) => [p.id, p]), +) + +export type { Layer } diff --git a/site/package.json b/site/package.json new file mode 100644 index 00000000..7d868ca9 --- /dev/null +++ b/site/package.json @@ -0,0 +1,28 @@ +{ + "name": "pathkeep-site", + "private": true, + "type": "module", + "scripts": { + "dev": "astro dev --host 127.0.0.1 --port 4391", + "build": "astro build", + "build:demo": "../node_modules/.bin/vite build --config demo/vite.config.ts --logLevel warn", + "check:demo": "node demo/check.ts && node demo/check.ts --lang zh-TW && node demo/check.ts --lang zh-CN", + "record:demo": "node demo/record.ts", + "preview": "astro preview --host 127.0.0.1 --port 4391", + "check": "astro check && ../node_modules/.bin/tsc -p demo" + }, + "dependencies": { + "@fontsource-variable/geist": "^5.3.0", + "@fontsource-variable/geist-mono": "^5.3.0", + "@fontsource-variable/noto-serif-sc": "^5.3.1", + "@fontsource-variable/noto-serif-tc": "^5.3.1", + "@fontsource/instrument-serif": "^5.3.0", + "astro": "^7.4.12", + "motion": "^14.14.0", + "simple-icons": "^16.37.0" + }, + "devDependencies": { + "@astrojs/check": "^0.9.12", + "typescript": "^6.0.3" + } +} diff --git a/site/public/_headers b/site/public/_headers new file mode 100644 index 00000000..da7262b8 --- /dev/null +++ b/site/public/_headers @@ -0,0 +1,13 @@ +# Response headers on Cloudflare Pages: +# https://developers.cloudflare.com/pages/configuration/headers/ + +# Built files whose names carry a hash of their content never change. +/_astro/* + Cache-Control: public, max-age=31536000, immutable + +/app/assets/* + Cache-Control: public, max-age=31536000, immutable + +/* + X-Content-Type-Options: nosniff + Referrer-Policy: strict-origin-when-cross-origin diff --git a/site/public/app/assets/app-CVcZz016.js b/site/public/app/assets/app-CVcZz016.js new file mode 100644 index 00000000..643f87e1 --- /dev/null +++ b/site/public/app/assets/app-CVcZz016.js @@ -0,0 +1 @@ +import{F as e,Q as t,Y as n,k as r}from"./index-CteWxeiL.js";import{t as i}from"./react-dom-BQvtGpns.js";import{C as a,E as o,O as s,T as c,b as ee,h as l,i as u,n as d,r as f,x as p,y as m}from"./query-DyHGS9i8.js";var h=class extends ee{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),c(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&p(t.mutationKey)!==p(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??l();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){m.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},g=t(n(),1);function _(e,t){let n=s(t),[r]=g.useState(()=>new h(n,e));g.useEffect(()=>{r.setOptions(e)},[r,e]);let i=g.useSyncExternalStore(g.useCallback(e=>r.subscribe(m.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),c=g.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(a)},[r]);if(i.error&&o(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:c,mutateAsync:i.mutate}}var te=t(i(),1);function v(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var ne=e=>{switch(e){case`success`:return b;case`info`:return S;case`warning`:return x;case`error`:return C;default:return null}},y=Array(12).fill(0),re=({visible:e,className:t})=>g.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},g.createElement(`div`,{className:`sonner-spinner`},y.map((e,t)=>g.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),b=g.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},g.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),x=g.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},g.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),S=g.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},g.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),C=g.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},g.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),w=g.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},g.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),g.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),ie=()=>{let[e,t]=g.useState(document.hidden);return g.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},ae=1,T=100,E=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:ae++,D=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-T;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=E(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],g.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(k(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!g.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!g.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!g.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!g.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=E(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},O=(e,t)=>D.message(e,t),k=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,A=Object.assign(O,{success:D.success,info:D.info,warning:D.warning,error:D.error,custom:D.custom,message:D.message,promise:D.promise,dismiss:D.dismiss,loading:D.loading},{getHistory:()=>D.toasts,getToasts:()=>D.getActiveToasts()});v(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function j(e){return e.label!==void 0}var M=3,N=`24px`,P=`16px`,F=4e3,I=356,L=14,oe=45,se=200;function R(...e){return e.filter(Boolean).join(` `)}function ce(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var le=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:ee,expanded:l,removeToast:u,defaultRichColors:d,closeButton:f,style:p,cancelButtonStyle:m,actionButtonStyle:h,className:_=``,descriptionClassName:te=``,duration:v,position:y,gap:b,expandByDefault:x,classNames:S,icons:C,closeButtonAriaLabel:ae=`Close toast`}=e,[T,E]=g.useState(null),[D,O]=g.useState(null),[k,A]=g.useState(!1),[M,N]=g.useState(!1),[P,I]=g.useState(!1),[L,le]=g.useState(!1),[z,B]=g.useState(!1),[ue,V]=g.useState(0),[de,H]=g.useState(0),U=g.useRef(n.duration||v||F),W=g.useRef(null),G=g.useRef(null),fe=c===0,K=c+1<=o,q=n.type,pe=q??`default`,J=n.dismissible!==!1,me=n.className||``,he=n.descriptionClassName||``,Y=g.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),ge=g.useMemo(()=>n.closeButton??f,[n.closeButton,f]),_e=g.useMemo(()=>n.duration||v||F,[n.duration,v]),ve=g.useRef(0),X=g.useRef(0),ye=g.useRef(0),Z=g.useRef(null),[be,xe]=y.split(`-`),Se=g.useMemo(()=>s.reduce((e,t,n)=>n>=Y?e:e+t.height,0),[s,Y]),Ce=ie(),Q=g.useMemo(()=>e.swipeDirections??ce(y),[e.swipeDirections,y]),we=n.invert||t,Te=q===`loading`;X.current=g.useMemo(()=>Y*b+Se,[Y,Se]),g.useEffect(()=>{U.current=_e},[_e]),g.useEffect(()=>{A(!0)},[]),g.useEffect(()=>{let e=G.current;if(e){let t=e.getBoundingClientRect().height;return H(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),g.useLayoutEffect(()=>{if(!k)return;let e=G.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,H(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[k,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let $=g.useCallback(()=>{N(!0),V(X.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{u(n)},se)},[n,u,a,X]);g.useEffect(()=>{if(n.promise&&q===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return l||i||Ce?(()=>{if(ye.current{n.onAutoClose==null||n.onAutoClose.call(n,n),$()},U.current)),()=>clearTimeout(e)},[l,i,n,q,Ce,$]),g.useEffect(()=>{n.delete&&($(),n.onDismiss==null||n.onDismiss.call(n,n))},[$,n.delete]);function Ee(){return C?.loading?g.createElement(`div`,{className:R(S?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":q===`loading`},C.loading):g.createElement(re,{className:R(S?.loader,n?.classNames?.loader),visible:q===`loading`})}let De=n.icon||C?.[q]||ne(q);return g.createElement(`li`,{tabIndex:0,ref:G,className:R(_,me,S?.toast,n?.classNames?.toast,S?.[pe],n?.classNames?.[pe]),"data-sonner-toast":``,"data-rich-colors":n.richColors??d,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":k,"data-promise":!!n.promise,"data-swiped":z,"data-removed":M,"data-visible":K,"data-y-position":be,"data-x-position":xe,"data-index":c,"data-front":fe,"data-swiping":P,"data-dismissible":J,"data-type":q,"data-invert":we,"data-swipe-out":L,"data-swipe-direction":D,"data-expanded":!!(l||x&&k),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":ee.length-c,"--offset":`${M?ue:X.current}px`,"--initial-height":x?`auto`:`${de}px`,...p,...n.style},onDragEnd:()=>{I(!1),E(null),Z.current=null},onPointerDown:e=>{e.button!==2&&!Te&&J&&(W.current=new Date,V(X.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(I(!0),Z.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(L||!J)return;Z.current=null;let e=Number(G.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(G.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-W.current?.getTime(),i=T===`x`?e:t,a=Math.abs(i)/r;if((T===`x`?Q.includes(e>0?`right`:`left`):Q.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=oe||a>.11))V(X.current),n.onDismiss==null||n.onDismiss.call(n,n),O(T===`x`?e>0?`right`:`left`:t>0?`down`:`up`),$(),le(!0);else{var o,s;(o=G.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=G.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),B(!1),I(!1),E(null)}},onPointerMove:e=>{var t,n;if(!Z.current||!J||window.getSelection()?.toString().length>0)return;let r=e.clientY-Z.current.y,i=e.clientX-Z.current.x;!T&&(Math.abs(i)>1||Math.abs(r)>1)&&E(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(T===`y`){if(Q.includes(`top`)||Q.includes(`bottom`)){if(Q.includes(`top`)&&r<0||Q.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)0||Math.abs(a.y)>0)&&B(!0),(t=G.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=G.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},ge&&!n.jsx&&q!==`loading`?g.createElement(`button`,{"aria-label":ae,"data-disabled":Te,"data-close-button":!0,onClick:Te||!J?()=>{}:()=>{$(),n.onDismiss==null||n.onDismiss.call(n,n)},className:R(S?.closeButton,n?.classNames?.closeButton)},C?.close??w):null,(q||n.icon||n.promise)&&n.icon!==null&&(C?.[q]!==null||n.icon)?g.createElement(`div`,{"data-icon":``,className:R(S?.icon,n?.classNames?.icon)},q===`loading`?n.icon||Ee():n.promise?Ee():null,q===`loading`?null:De):null,g.createElement(`div`,{"data-content":``,className:R(S?.content,n?.classNames?.content)},g.createElement(`div`,{"data-title":``,className:R(S?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?g.createElement(`div`,{"data-description":``,className:R(te,he,S?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),g.isValidElement(n.cancel)?n.cancel:n.cancel&&j(n.cancel)?g.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||m,onClick:e=>{j(n.cancel)&&J&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),$())},className:R(S?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,g.isValidElement(n.action)?n.action:n.action&&j(n.action)?g.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||h,onClick:e=>{j(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),e.defaultPrevented||$())},className:R(S?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function z(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function B(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?P:N;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var ue=g.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:ee,mobileOffset:l,theme:u=`light`,richColors:d,duration:f,style:p,visibleToasts:m=M,toastOptions:h,dir:_=z(),gap:v=L,icons:ne,customAriaLabel:y,containerAriaLabel:re=`Notifications`}=e,[b,x]=g.useState([]),S=g.useMemo(()=>n?b.filter(e=>e.toasterId===n):b.filter(e=>!e.toasterId),[b,n]),C=g.useMemo(()=>Array.from(new Set([i].concat(S.filter(e=>e.position).map(e=>e.position)))),[S,i]),[w,ie]=g.useState([]),[ae,T]=g.useState(!1),[E,O]=g.useState(!1),[k,A]=g.useState(u===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:u),j=g.useRef(null),N=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),P=g.useRef(null),F=g.useRef(!1),oe=g.useCallback(e=>{x(t=>(t.find(t=>t.id===e.id)?.delete||D.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return g.useEffect(()=>D.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{x(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{te.flushSync(()=>{x(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),g.useEffect(()=>{if(u!==`system`){A(u);return}if(u===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?A(`dark`):A(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{A(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{A(e?`dark`:`light`)}catch(e){console.error(e)}})}},[u]),g.useEffect(()=>{b.length<=1&&T(!1)},[b]),g.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;T(!0),(t=j.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===j.current||j.current?.contains(document.activeElement))&&T(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),g.useEffect(()=>{if(j.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,F.current=!1)}},[j.current]),g.createElement(`section`,{ref:t,"aria-label":y??`${re} ${N}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},C.map((t,n)=>{let[i,a]=t.split(`-`);return S.length?g.createElement(`ol`,{key:t,dir:_===`auto`?z():_,tabIndex:-1,ref:j,className:c,"data-sonner-toaster":!0,"data-sonner-theme":k,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${w[0]?.height||0}px`,"--width":`${I}px`,"--gap":`${v}px`,...p,...B(ee,l)},onBlur:e=>{F.current&&!e.currentTarget.contains(e.relatedTarget)&&(F.current=!1,P.current&&=(P.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||F.current||(F.current=!0,P.current=e.relatedTarget)},onMouseEnter:()=>T(!0),onMouseMove:()=>T(!0),onMouseLeave:()=>{E||T(!1)},onDragEnd:()=>T(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||O(!0)},onPointerUp:()=>O(!1)},S.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>g.createElement(le,{key:n.id,icons:ne,index:i,toast:n,defaultRichColors:d,duration:h?.duration??f,className:h?.className,descriptionClassName:h?.descriptionClassName,invert:r,visibleToasts:m,closeButton:h?.closeButton??s,interacting:E,position:t,style:h?.style,unstyled:h?.unstyled,classNames:h?.classNames,cancelButtonStyle:h?.cancelButtonStyle,actionButtonStyle:h?.actionButtonStyle,closeButtonAriaLabel:h?.closeButtonAriaLabel,removeToast:oe,toasts:S.filter(e=>e.position==n.position),heights:w.filter(e=>e.position==n.position),setHeights:ie,expandByDefault:o,gap:v,expanded:ae,swipeDirections:e.swipeDirections}))):null}))}),V=r();function de({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`skeleton`,className:f(`animate-pulse rounded-md bg-accent`,e),...t})}var H={getBuildInfo:()=>e(`app_build_info`),getLockStatus:()=>e(`app_lock_status`),getSnapshot:()=>e(`app_snapshot`),saveConfig:(t,n)=>e(`save_config`,n?{config:t,baseConfig:n}:{config:t}),setSessionDatabaseKey:t=>e(`set_session_database_key`,{databaseKey:t}),clearSessionDatabaseKey:()=>e(`clear_session_database_key`),unlockArchiveFromKeychain:()=>e(`unlock_archive_from_keychain`),setAppLockPasscode:t=>e(`set_app_lock_passcode`,{request:t}),clearAppLockPasscode:()=>e(`clear_app_lock_passcode`),lockAppSession:t=>e(`lock_app_session`,{reason:t}),unlockAppSession:t=>e(`unlock_app_session`,{request:t}),reconcileArchiveEncryption:()=>e(`reconcile_archive_encryption`,{})},U={getSnapshot:()=>e(`load_dashboard_snapshot`)};function W(){return u({queryKey:d.snapshot,queryFn:H.getSnapshot,staleTime:1/0}).data}function G(){return u({queryKey:d.dashboard,queryFn:U.getSnapshot})}function fe(){let e=s();return _({mutationFn:t=>{let n=K(e).config;return H.saveConfig(t(structuredClone(n)),n)},onSuccess:t=>e.setQueryData(d.snapshot,t)})}function K(e){let t=e.getQueryData(d.snapshot);if(!t)throw Error(`The app snapshot has not loaded yet.`);return t}export{H as a,A as c,W as i,_ as l,G as n,de as o,fe as r,ue as s,K as t}; \ No newline at end of file diff --git a/site/public/app/assets/archive-tDw2mIBu.js b/site/public/app/assets/archive-tDw2mIBu.js new file mode 100644 index 00000000..98f74e3c --- /dev/null +++ b/site/public/app/assets/archive-tDw2mIBu.js @@ -0,0 +1 @@ +import{F as e}from"./index-CteWxeiL.js";import{c as t}from"./button-C0JM8asg.js";var n={name:`circle-exclamation-point`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`,`circle-alert`]};n.node;var r=t(n),i={initializeArchive:(t,n)=>e(`initialize_archive`,{config:t,databaseKey:n}),assessArchiveUpgrade:t=>e(`assess_archive_upgrade`,{databaseKey:t}),runBackupNow:(t=!1)=>e(`run_backup_now`,{dueOnly:t}),previewSnapshotRestore:t=>e(`preview_snapshot_restore`,{request:t}),runSnapshotRestore:t=>e(`run_snapshot_restore`,{request:t}),previewRetentionPrune:()=>e(`preview_retention_prune`),runRetentionPrune:t=>e(`run_retention_prune`,{request:t}),exportHistory:t=>e(`export_history`,{request:t}),getExportProgress:t=>e(`get_export_progress`,{exportId:t}),cancelExport:t=>e(`cancel_export`,{exportId:t}),listRecoverySnapshots:()=>e(`list_recovery_snapshots`),runFullArchiveRestore:(t,n)=>e(`run_full_archive_restore`,{request:t,key:n})};export{r as n,i as t}; \ No newline at end of file diff --git a/site/public/app/assets/arrow-left-DBf6LAhG.js b/site/public/app/assets/arrow-left-DBf6LAhG.js new file mode 100644 index 00000000..a1030263 --- /dev/null +++ b/site/public/app/assets/arrow-left-DBf6LAhG.js @@ -0,0 +1 @@ +import{c as e}from"./button-C0JM8asg.js";var t={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};t.node;var n=e(t);export{n as t}; \ No newline at end of file diff --git a/site/public/app/assets/ask-page-dpmr3YMI.js b/site/public/app/assets/ask-page-dpmr3YMI.js new file mode 100644 index 00000000..fb15b051 --- /dev/null +++ b/site/public/app/assets/ask-page-dpmr3YMI.js @@ -0,0 +1,165 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./highlighted-body-JLMTFACH-DAcfQXX-.js","./index-CteWxeiL.js"])))=>i.map(i=>d[i]); +import{O as e,i as t,r as n}from"./query-DyHGS9i8.js";import{J as r,Q as i,X as a,Y as o,Z as s,c,k as l,m as u,p as d,s as f,t as p}from"./index-CteWxeiL.js";import{Ct as m,Dt as h,Et as g,Ft as _,It as v,Lt as y,Mt as b,Nt as x,Ot as S,Pt as C,St as w,Tt as T,Wt as E,Xt as D,_t as O,bt as ee,gt as te,ht as ne,kt as re,mt as ie,qt as ae,vt as oe,wt as k,xt as se,yt as ce}from"./main-CmsrHzbA.js";import{c as le,i as ue,o as de}from"./app-CVcZz016.js";import{t as fe}from"./title-bar-BFG00FKz.js";import{t as pe}from"./intelligence-CeVzSBj6.js";import{h as me,s as he,t as ge}from"./providers-C9r3YfIk.js";import{o as _e}from"./dist-BNmHZVEB.js";import{t as ve}from"./copy-Da1fgnNr.js";import{c as ye,m as be}from"./spaces-BqDG3Cu2.js";import{t as xe}from"./rotate-ccw-DbPdZ2ia.js";import{c as Se,t as Ce}from"./button-C0JM8asg.js";import{n as we,r as Te,t as Ee}from"./react-dom-BQvtGpns.js";import{t as De}from"./open-link-CxuCFjAI.js";import{t as Oe}from"./site-icon-9eLiTdFC.js";import{t as ke}from"./chevron-down-Cjj85Wup.js";import{t as Ae}from"./loader-circle-BRt0w1nZ.js";import{t as je}from"./useQueries-C1BwFSJv.js";import{t as Me}from"./plus-ClAV9by2.js";import{a as Ne,i as Pe,n as Fe,o as Ie,t as Le}from"./dialog-Euero0G3.js";import{n as Re,t as ze}from"./reveal-BcKh5OKz.js";import{t as Be}from"./useInfiniteQuery-_wRbirEp.js";var Ve=(function(e){if(e==null)return Ke;if(typeof e==`function`)return Ge(e);if(typeof e==`object`)return Array.isArray(e)?He(e):Ue(e);if(typeof e==`string`)return We(e);throw Error(`Expected function, string, or object as test`)});function He(e){let t=[],n=-1;for(;++n`:``))+`)`})}return u;function u(){let l=Ye,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Qe(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&de===`*`),u=n.length&&!n.every(e=>e===`*`);if(!e&&(l||u))throw Error(`defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided`);return l=>{let u=dt(e,t,n,r,i,a,o,s,c);st(l),$e(l,u)}}function nt(e,t){if(typeof e!=`string`)return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`))try{return new URL(e,`http://example.com`)}catch{return null}return null}}function rt(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}var it=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),at=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function ot(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e==`string`&&e.startsWith(`#`)&&!i)try{if(new URL(e,`http://example.com`).hash===e)return e}catch{}if(typeof e==`string`&&e.startsWith(`data:`))return i&&r&&e.startsWith(`data:image/`)?e:null;if(typeof e==`string`&&e.startsWith(`blob:`)){try{if(new URL(e).protocol===`blob:`&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&t!==`invalid`)return e}}catch{return null}return null}let o=nt(e,n);if(!o||at.has(o.protocol)||!(it.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=rt(e);return o&&t.some(e=>{let t=nt(e,n);return!t||t.origin!==o.origin?!1:o.href.startsWith(t.href)})?s?o.pathname+o.search+o.hash:o.href:t.includes(`*`)?o.protocol!==`https:`&&o.protocol!==`http:`?null:s?o.pathname+o.search+o.hash:o.href:null}function st(e){if(`children`in e&&Array.isArray(e.children)){e.children=e.children.filter(e=>e!=null);for(let t of e.children)st(t)}}var ct=Symbol(`node-seen`);function lt(e,t,n){return t===et.remove?{type:`remove`}:t===et.textOnly?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[...e.children]}}:{type:`replace`,element:{type:`element`,tagName:`span`,properties:{title:`Blocked URL: `+String(e.properties.href),class:n},children:[...e.children,{type:`text`,value:` [blocked]`}]}}}function ut(e,t,n){if(t===et.remove)return{type:`remove`};if(t===et.textOnly){let t=String(e.properties.alt||``);return t?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[{type:`text`,value:t}]}}:{type:`remove`}}return{type:`replace`,element:{type:`element`,tagName:`span`,properties:{class:n},children:[{type:`text`,value:`[Image blocked: `+String(e.properties.alt||`No description`)+`]`}]}}}var dt=(e,t,n,r,i,a,o,s,c)=>{let l=(u,d,f)=>{if(u.type!==`element`||u[ct])return!0;if(u.tagName===`a`){let n=ot(u.properties.href,t,e,!1,!1,i);if(n===null){if(u[ct]=!0,$e(u,l),f&&typeof d==`number`){let e=lt(u,s,o);if(e.type===`remove`)return f.children.splice(d,1),[Xe,d];f.children[d]=e.element}return Xe}return u.properties.href=n,u.properties.target=`_blank`,u.properties.rel=`noopener noreferrer`,!0}if(u.tagName===`img`){let t=ot(u.properties.src,n,e,r,!0,i);if(t===null){if(u[ct]=!0,$e(u,l),f&&typeof d==`number`){let e=ut(u,c,a);if(e.type===`remove`)return f.children.splice(d,1),[Xe,d];f.children[d]=e.element}return Xe}return u.properties.src=t,!0}return!0};return l},ft=typeof self==`object`?self:globalThis,pt=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new ft[e](t)},mt=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(pt(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(pt(a,o),i)};return r},ht=e=>mt(new Map,e)(0),gt=``,{toString:_t}={},{keys:vt}=Object,yt=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=_t.call(e).slice(8,-1);switch(n){case`Array`:return[1,gt];case`Object`:return[2,gt];case`Date`:return[3,gt];case`RegExp`:return[4,gt];case`Map`:return[5,gt];case`Set`:return[6,gt];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},bt=([e,t])=>e===0&&(t===`function`||t===`symbol`),xt=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=yt(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of vt(r))(e||!bt(yt(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(bt(yt(n))||bt(yt(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!bt(yt(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},St=(e,{json:t,lossy:n}={})=>{let r=[];return xt(!(t||n),!!t,new Map,r)(e),r},Ct=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?ht(St(e,t)):structuredClone(e):(e,t)=>ht(St(e,t)),wt=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};wt.prototype.normal={},wt.prototype.property={},wt.prototype.space=void 0;function Tt(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new wt(n,r,t)}function Et(e){return e.toLowerCase()}var Dt=class{constructor(e,t){this.attribute=t,this.property=e}};Dt.prototype.attribute=``,Dt.prototype.booleanish=!1,Dt.prototype.boolean=!1,Dt.prototype.commaOrSpaceSeparated=!1,Dt.prototype.commaSeparated=!1,Dt.prototype.defined=!1,Dt.prototype.mustUseProperty=!1,Dt.prototype.number=!1,Dt.prototype.overloadedBoolean=!1,Dt.prototype.property=``,Dt.prototype.spaceSeparated=!1,Dt.prototype.space=void 0;var Ot=s({boolean:()=>j,booleanish:()=>At,commaOrSpaceSeparated:()=>Nt,commaSeparated:()=>Mt,number:()=>M,overloadedBoolean:()=>jt,spaceSeparated:()=>N}),kt=0,j=Pt(),At=Pt(),jt=Pt(),M=Pt(),N=Pt(),Mt=Pt(),Nt=Pt();function Pt(){return 2**++kt}var Ft=Object.keys(Ot),It=class extends Dt{constructor(e,t,n,r){let i=-1;if(super(e,t),Lt(this,`space`,r),typeof n==`number`)for(;++i4&&n.slice(0,4)===`data`&&Xt.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Yt,$t);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Yt.test(e)){let n=e.replace(Jt,Qt);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=It}return new i(r,t)}function Qt(e){return`-`+e.toLowerCase()}function $t(e){return e.charAt(1).toUpperCase()}var en=Tt([zt,Ht,Wt,Gt,Kt],`html`),tn=Tt([zt,Ut,Wt,Gt,Kt],`svg`);function nn(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function rn(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var an=/[#.]/g;function on(e,t){let n=e||``,r={},i=0,a,o;for(;i-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=bn(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length1?n[e.line-2]:0)+e.column-1;if(r=55296&&e<=57343}function Zn(e){return e>=56320&&e<=57343}function Qn(e,t){return(e-55296)*1024+9216+t}function $n(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function er(e){return e>=64976&&e<=65007||Jn.has(e)}var F;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(F||={});var tr=65536,nr=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=tr,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(Zn(t))return this.pos++,this._addGap(),Qn(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(F.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;let n=this.html.charCodeAt(t);return n===P.CARRIAGE_RETURN?P.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;let e=this.html.charCodeAt(this.pos);return e===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):e===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Xn(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===P.LINE_FEED||e===P.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){$n(e)?this._err(F.controlCharacterInInputStream):er(e)&&this._err(F.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var ir=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),ar=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function or(e){return e>=55296&&e<=57343||e>1114111?65533:ar.get(e)??e}var sr;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(sr||={});var cr=32,lr;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(lr||={});function ur(e){return e>=sr.ZERO&&e<=sr.NINE}function dr(e){return e>=sr.UPPER_A&&e<=sr.UPPER_F||e>=sr.LOWER_A&&e<=sr.LOWER_F}function fr(e){return e>=sr.UPPER_A&&e<=sr.UPPER_Z||e>=sr.LOWER_A&&e<=sr.LOWER_Z||ur(e)}function pr(e){return e===sr.EQUALS||fr(e)}var mr;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(mr||={});var hr;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(hr||={});var gr=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=mr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=hr.Strict}startEntity(e){this.decodeMode=e,this.state=mr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case mr.EntityStart:return e.charCodeAt(t)===sr.NUM?(this.state=mr.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=mr.NamedEntity,this.stateNamedEntity(e,t));case mr.NumericStart:return this.stateNumericStart(e,t);case mr.NumericDecimal:return this.stateNumericDecimal(e,t);case mr.NumericHex:return this.stateNumericHex(e,t);case mr.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|cr)===sr.LOWER_X?(this.state=mr.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=mr.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t>14;for(;t>14,i!==0){if(a===sr.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==hr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&lr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~lr.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case mr.NamedEntity:return this.result!==0&&(this.decodeMode!==hr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case mr.NumericDecimal:return this.emitNumericEntity(0,2);case mr.NumericHex:return this.emitNumericEntity(0,3);case mr.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case mr.EntityStart:return 0}}};function _r(e,t,n,r){let i=(t&lr.BRANCH_LENGTH)>>7,a=t&lr.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(nr)s=t-1;else return e[t+i]}return-1}var L;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(L||={});var vr;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(vr||={});var yr;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(yr||={});var R;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(R||={});var z;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(z||={});var br=new Map([[R.A,z.A],[R.ADDRESS,z.ADDRESS],[R.ANNOTATION_XML,z.ANNOTATION_XML],[R.APPLET,z.APPLET],[R.AREA,z.AREA],[R.ARTICLE,z.ARTICLE],[R.ASIDE,z.ASIDE],[R.B,z.B],[R.BASE,z.BASE],[R.BASEFONT,z.BASEFONT],[R.BGSOUND,z.BGSOUND],[R.BIG,z.BIG],[R.BLOCKQUOTE,z.BLOCKQUOTE],[R.BODY,z.BODY],[R.BR,z.BR],[R.BUTTON,z.BUTTON],[R.CAPTION,z.CAPTION],[R.CENTER,z.CENTER],[R.CODE,z.CODE],[R.COL,z.COL],[R.COLGROUP,z.COLGROUP],[R.DD,z.DD],[R.DESC,z.DESC],[R.DETAILS,z.DETAILS],[R.DIALOG,z.DIALOG],[R.DIR,z.DIR],[R.DIV,z.DIV],[R.DL,z.DL],[R.DT,z.DT],[R.EM,z.EM],[R.EMBED,z.EMBED],[R.FIELDSET,z.FIELDSET],[R.FIGCAPTION,z.FIGCAPTION],[R.FIGURE,z.FIGURE],[R.FONT,z.FONT],[R.FOOTER,z.FOOTER],[R.FOREIGN_OBJECT,z.FOREIGN_OBJECT],[R.FORM,z.FORM],[R.FRAME,z.FRAME],[R.FRAMESET,z.FRAMESET],[R.H1,z.H1],[R.H2,z.H2],[R.H3,z.H3],[R.H4,z.H4],[R.H5,z.H5],[R.H6,z.H6],[R.HEAD,z.HEAD],[R.HEADER,z.HEADER],[R.HGROUP,z.HGROUP],[R.HR,z.HR],[R.HTML,z.HTML],[R.I,z.I],[R.IMG,z.IMG],[R.IMAGE,z.IMAGE],[R.INPUT,z.INPUT],[R.IFRAME,z.IFRAME],[R.KEYGEN,z.KEYGEN],[R.LABEL,z.LABEL],[R.LI,z.LI],[R.LINK,z.LINK],[R.LISTING,z.LISTING],[R.MAIN,z.MAIN],[R.MALIGNMARK,z.MALIGNMARK],[R.MARQUEE,z.MARQUEE],[R.MATH,z.MATH],[R.MENU,z.MENU],[R.META,z.META],[R.MGLYPH,z.MGLYPH],[R.MI,z.MI],[R.MO,z.MO],[R.MN,z.MN],[R.MS,z.MS],[R.MTEXT,z.MTEXT],[R.NAV,z.NAV],[R.NOBR,z.NOBR],[R.NOFRAMES,z.NOFRAMES],[R.NOEMBED,z.NOEMBED],[R.NOSCRIPT,z.NOSCRIPT],[R.OBJECT,z.OBJECT],[R.OL,z.OL],[R.OPTGROUP,z.OPTGROUP],[R.OPTION,z.OPTION],[R.P,z.P],[R.PARAM,z.PARAM],[R.PLAINTEXT,z.PLAINTEXT],[R.PRE,z.PRE],[R.RB,z.RB],[R.RP,z.RP],[R.RT,z.RT],[R.RTC,z.RTC],[R.RUBY,z.RUBY],[R.S,z.S],[R.SCRIPT,z.SCRIPT],[R.SEARCH,z.SEARCH],[R.SECTION,z.SECTION],[R.SELECT,z.SELECT],[R.SOURCE,z.SOURCE],[R.SMALL,z.SMALL],[R.SPAN,z.SPAN],[R.STRIKE,z.STRIKE],[R.STRONG,z.STRONG],[R.STYLE,z.STYLE],[R.SUB,z.SUB],[R.SUMMARY,z.SUMMARY],[R.SUP,z.SUP],[R.TABLE,z.TABLE],[R.TBODY,z.TBODY],[R.TEMPLATE,z.TEMPLATE],[R.TEXTAREA,z.TEXTAREA],[R.TFOOT,z.TFOOT],[R.TD,z.TD],[R.TH,z.TH],[R.THEAD,z.THEAD],[R.TITLE,z.TITLE],[R.TR,z.TR],[R.TRACK,z.TRACK],[R.TT,z.TT],[R.U,z.U],[R.UL,z.UL],[R.SVG,z.SVG],[R.VAR,z.VAR],[R.WBR,z.WBR],[R.XMP,z.XMP]]);function xr(e){return br.get(e)??z.UNKNOWN}var B=z,Sr={[L.HTML]:new Set([B.ADDRESS,B.APPLET,B.AREA,B.ARTICLE,B.ASIDE,B.BASE,B.BASEFONT,B.BGSOUND,B.BLOCKQUOTE,B.BODY,B.BR,B.BUTTON,B.CAPTION,B.CENTER,B.COL,B.COLGROUP,B.DD,B.DETAILS,B.DIR,B.DIV,B.DL,B.DT,B.EMBED,B.FIELDSET,B.FIGCAPTION,B.FIGURE,B.FOOTER,B.FORM,B.FRAME,B.FRAMESET,B.H1,B.H2,B.H3,B.H4,B.H5,B.H6,B.HEAD,B.HEADER,B.HGROUP,B.HR,B.HTML,B.IFRAME,B.IMG,B.INPUT,B.LI,B.LINK,B.LISTING,B.MAIN,B.MARQUEE,B.MENU,B.META,B.NAV,B.NOEMBED,B.NOFRAMES,B.NOSCRIPT,B.OBJECT,B.OL,B.P,B.PARAM,B.PLAINTEXT,B.PRE,B.SCRIPT,B.SECTION,B.SELECT,B.SOURCE,B.STYLE,B.SUMMARY,B.TABLE,B.TBODY,B.TD,B.TEMPLATE,B.TEXTAREA,B.TFOOT,B.TH,B.THEAD,B.TITLE,B.TR,B.TRACK,B.UL,B.WBR,B.XMP]),[L.MATHML]:new Set([B.MI,B.MO,B.MN,B.MS,B.MTEXT,B.ANNOTATION_XML]),[L.SVG]:new Set([B.TITLE,B.FOREIGN_OBJECT,B.DESC]),[L.XLINK]:new Set,[L.XML]:new Set,[L.XMLNS]:new Set},Cr=new Set([B.H1,B.H2,B.H3,B.H4,B.H5,B.H6]);R.STYLE,R.SCRIPT,R.XMP,R.IFRAME,R.NOEMBED,R.NOFRAMES,R.PLAINTEXT;var V;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(V||={});var H={DATA:V.DATA,RCDATA:V.RCDATA,RAWTEXT:V.RAWTEXT,SCRIPT_DATA:V.SCRIPT_DATA,PLAINTEXT:V.PLAINTEXT,CDATA_SECTION:V.CDATA_SECTION};function wr(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Tr(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function Er(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function Dr(e){return Er(e)||Tr(e)}function Or(e){return Dr(e)||wr(e)}function kr(e){return e+32}function Ar(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function jr(e){return Ar(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function Mr(e){return e===P.NULL?F.nullCharacterReference:e>1114111?F.characterReferenceOutsideUnicodeRange:Xn(e)?F.surrogateCharacterReference:er(e)?F.noncharacterCharacterReference:$n(e)||e===P.CARRIAGE_RETURN?F.controlCharacterReference:null}var Nr=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=V.DATA,this.returnState=V.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new nr(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new gr(ir,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(F.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(F.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=Mr(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t0&&this._err(F.endTagWithAttributes),e.selfClosing&&this._err(F.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case I.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case I.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case I.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:I.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){let t=Ar(e)?I.WHITESPACE_CHARACTER:e===P.NULL?I.NULL_CHARACTER:I.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(I.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=V.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?hr.Attribute:hr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===V.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===V.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===V.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case V.DATA:this._stateData(e);break;case V.RCDATA:this._stateRcdata(e);break;case V.RAWTEXT:this._stateRawtext(e);break;case V.SCRIPT_DATA:this._stateScriptData(e);break;case V.PLAINTEXT:this._statePlaintext(e);break;case V.TAG_OPEN:this._stateTagOpen(e);break;case V.END_TAG_OPEN:this._stateEndTagOpen(e);break;case V.TAG_NAME:this._stateTagName(e);break;case V.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case V.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case V.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case V.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case V.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case V.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case V.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case V.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case V.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case V.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case V.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case V.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case V.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case V.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case V.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case V.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case V.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case V.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case V.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case V.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case V.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case V.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case V.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case V.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case V.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case V.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case V.BOGUS_COMMENT:this._stateBogusComment(e);break;case V.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case V.COMMENT_START:this._stateCommentStart(e);break;case V.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case V.COMMENT:this._stateComment(e);break;case V.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case V.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case V.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case V.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case V.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case V.COMMENT_END:this._stateCommentEnd(e);break;case V.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case V.DOCTYPE:this._stateDoctype(e);break;case V.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case V.DOCTYPE_NAME:this._stateDoctypeName(e);break;case V.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case V.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case V.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case V.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case V.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case V.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case V.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case V.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case V.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case V.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case V.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case V.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case V.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case V.CDATA_SECTION:this._stateCdataSection(e);break;case V.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case V.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case V.CHARACTER_REFERENCE:this._stateCharacterReference();break;case V.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case P.LESS_THAN_SIGN:this.state=V.TAG_OPEN;break;case P.AMPERSAND:this._startCharacterReference();break;case P.NULL:this._err(F.unexpectedNullCharacter),this._emitCodePoint(e);break;case P.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case P.AMPERSAND:this._startCharacterReference();break;case P.LESS_THAN_SIGN:this.state=V.RCDATA_LESS_THAN_SIGN;break;case P.NULL:this._err(F.unexpectedNullCharacter),this._emitChars(`�`);break;case P.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case P.LESS_THAN_SIGN:this.state=V.RAWTEXT_LESS_THAN_SIGN;break;case P.NULL:this._err(F.unexpectedNullCharacter),this._emitChars(`�`);break;case P.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case P.LESS_THAN_SIGN:this.state=V.SCRIPT_DATA_LESS_THAN_SIGN;break;case P.NULL:this._err(F.unexpectedNullCharacter),this._emitChars(`�`);break;case P.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case P.NULL:this._err(F.unexpectedNullCharacter),this._emitChars(`�`);break;case P.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Dr(e))this._createStartTagToken(),this.state=V.TAG_NAME,this._stateTagName(e);else switch(e){case P.EXCLAMATION_MARK:this.state=V.MARKUP_DECLARATION_OPEN;break;case P.SOLIDUS:this.state=V.END_TAG_OPEN;break;case P.QUESTION_MARK:this._err(F.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=V.BOGUS_COMMENT,this._stateBogusComment(e);break;case P.EOF:this._err(F.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(F.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=V.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Dr(e))this._createEndTagToken(),this.state=V.TAG_NAME,this._stateTagName(e);else switch(e){case P.GREATER_THAN_SIGN:this._err(F.missingEndTagName),this.state=V.DATA;break;case P.EOF:this._err(F.eofBeforeTagName),this._emitChars(``);break;case P.NULL:this._err(F.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case P.EOF:this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=V.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===P.SOLIDUS?this.state=V.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Dr(e)?(this._emitChars(`<`),this.state=V.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=V.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Dr(e)?(this.state=V.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(``);break;case P.NULL:this._err(F.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case P.EOF:this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===P.SOLIDUS?(this.state=V.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Yn.SCRIPT,!1)&&jr(this.preprocessor.peek(Yn.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==L.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(Ur,L.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Hr,L.HTML)}clearBackToTableRowContext(){this.clearBackTo(Vr,L.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===z.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===z.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case L.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case L.SVG:if(Br.has(r))return!1;break;case L.MATHML:if(zr.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Ir)}hasInListItemScope(e){return this.hasInDynamicScope(e,Lr)}hasInButtonScope(e){return this.hasInDynamicScope(e,Rr)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case L.HTML:if(Cr.has(t))return!0;if(Ir.has(t))return!1;break;case L.SVG:if(Br.has(t))return!1;break;case L.MATHML:if(zr.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===L.HTML)switch(this.tagIDs[t]){case e:return!0;case z.TABLE:case z.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===L.HTML)switch(this.tagIDs[e]){case z.TBODY:case z.THEAD:case z.TFOOT:return!0;case z.TABLE:case z.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===L.HTML)switch(this.tagIDs[t]){case e:return!0;case z.OPTION:case z.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Pr.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Fr.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Fr.has(this.currentTagId);)this.pop()}},Kr=3,qr;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(qr||={});var Jr={type:qr.Marker},Yr=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e[e.name,e.value])),i=0;for(let e=0;er.get(e.name)===e.value)&&(i+=1,i>=Kr&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(Jr)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:qr.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:qr.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(Jr);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===qr.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===qr.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===qr.Element&&t.element===e)}},Xr={createDocument(){return{nodeName:`#document`,mode:yr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};Xr.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(Xr.isTextNode(n)){n.value+=t;return}}Xr.appendChild(e,Xr.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Xr.isTextNode(r)?r.value+=t:Xr.insertBefore(e,Xr.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;re.startsWith(t))}function oi(e){return e.name===Zr&&e.publicId===null&&(e.systemId===null||e.systemId===Qr)}function si(e){if(e.name!==Zr)return yr.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===$r)return yr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),ni.has(n))return yr.QUIRKS;let e=t===null?ti:ei;if(ai(n,e))return yr.QUIRKS;if(e=t===null?ri:ii,ai(n,e))return yr.LIMITED_QUIRKS}return yr.NO_QUIRKS}var ci={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},li=`definitionurl`,ui=`definitionURL`,di=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),fi=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:L.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:L.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:L.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:L.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:L.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:L.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:L.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:L.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:L.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:L.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:L.XMLNS}]]),pi=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),mi=new Set([z.B,z.BIG,z.BLOCKQUOTE,z.BODY,z.BR,z.CENTER,z.CODE,z.DD,z.DIV,z.DL,z.DT,z.EM,z.EMBED,z.H1,z.H2,z.H3,z.H4,z.H5,z.H6,z.HEAD,z.HR,z.I,z.IMG,z.LI,z.LISTING,z.MENU,z.META,z.NOBR,z.OL,z.P,z.PRE,z.RUBY,z.S,z.SMALL,z.SPAN,z.STRONG,z.STRIKE,z.SUB,z.SUP,z.TABLE,z.TT,z.U,z.UL,z.VAR]);function hi(e){let t=e.tagID;return t===z.FONT&&e.attrs.some(({name:e})=>e===vr.COLOR||e===vr.SIZE||e===vr.FACE)||mi.has(t)}function gi(e){for(let t=0;t0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===L.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,L.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=U.TEXT}switchToPlaintextParsing(){this.insertionMode=U.TEXT,this.originalInsertionMode=U.IN_BODY,this.tokenizer.state=H.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===R.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===L.HTML)switch(this.fragmentContextID){case z.TITLE:case z.TEXTAREA:this.tokenizer.state=H.RCDATA;break;case z.STYLE:case z.XMP:case z.IFRAME:case z.NOEMBED:case z.NOFRAMES:case z.NOSCRIPT:this.tokenizer.state=H.RAWTEXT;break;case z.SCRIPT:this.tokenizer.state=H.SCRIPT_DATA;break;case z.PLAINTEXT:this.tokenizer.state=H.PLAINTEXT}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,L.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,L.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(R.HTML,L.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,z.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===I.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===z.SVG&&this.treeAdapter.getTagName(t)===R.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===L.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===z.MGLYPH||e.tagID===z.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,L.HTML)}_processToken(e){switch(e.type){case I.CHARACTER:this.onCharacter(e);break;case I.NULL_CHARACTER:this.onNullCharacter(e);break;case I.COMMENT:this.onComment(e);break;case I.DOCTYPE:this.onDoctype(e);break;case I.START_TAG:this._processStartTag(e);break;case I.END_TAG:this.onEndTag(e);break;case I.EOF:this.onEof(e);break;case I.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return Si(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===qr.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=U.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(z.P),this.openElements.popUntilTagNamePopped(z.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case z.TR:this.insertionMode=U.IN_ROW;return;case z.TBODY:case z.THEAD:case z.TFOOT:this.insertionMode=U.IN_TABLE_BODY;return;case z.CAPTION:this.insertionMode=U.IN_CAPTION;return;case z.COLGROUP:this.insertionMode=U.IN_COLUMN_GROUP;return;case z.TABLE:this.insertionMode=U.IN_TABLE;return;case z.BODY:this.insertionMode=U.IN_BODY;return;case z.FRAMESET:this.insertionMode=U.IN_FRAMESET;return;case z.SELECT:this._resetInsertionModeForSelect(e);return;case z.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case z.HTML:this.insertionMode=this.headElement?U.AFTER_HEAD:U.BEFORE_HEAD;return;case z.TD:case z.TH:if(e>0){this.insertionMode=U.IN_CELL;return}break;case z.HEAD:if(e>0){this.insertionMode=U.IN_HEAD;return}}this.insertionMode=U.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===z.TEMPLATE)break;if(e===z.TABLE){this.insertionMode=U.IN_SELECT_IN_TABLE;return}}this.insertionMode=U.IN_SELECT}_isElementCausesFosterParenting(e){return Di.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case z.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===L.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case z.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return Sr[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)Jo(this,e);else switch(this.insertionMode){case U.INITIAL:Hi(this,e);break;case U.BEFORE_HTML:Gi(this,e);break;case U.BEFORE_HEAD:Ji(this,e);break;case U.IN_HEAD:Qi(this,e);break;case U.IN_HEAD_NO_SCRIPT:ta(this,e);break;case U.AFTER_HEAD:ia(this,e);break;case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:sa(this,e);break;case U.TEXT:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:no(this,e);break;case U.IN_TABLE_TEXT:go(this,e);break;case U.IN_COLUMN_GROUP:Co(this,e);break;case U.AFTER_BODY:zo(this,e);break;case U.AFTER_AFTER_BODY:Go(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)qo(this,e);else switch(this.insertionMode){case U.INITIAL:Hi(this,e);break;case U.BEFORE_HTML:Gi(this,e);break;case U.BEFORE_HEAD:Ji(this,e);break;case U.IN_HEAD:Qi(this,e);break;case U.IN_HEAD_NO_SCRIPT:ta(this,e);break;case U.AFTER_HEAD:ia(this,e);break;case U.TEXT:this._insertCharacters(e);break;case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:no(this,e);break;case U.IN_COLUMN_GROUP:Co(this,e);break;case U.AFTER_BODY:zo(this,e);break;case U.AFTER_AFTER_BODY:Go(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)Li(this,e);else switch(this.insertionMode){case U.INITIAL:case U.BEFORE_HTML:case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_TEMPLATE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:Li(this,e);break;case U.IN_TABLE_TEXT:_o(this,e);break;case U.AFTER_BODY:Ri(this,e);break;case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:zi(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case U.INITIAL:Vi(this,e);break;case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:this._err(e,F.misplacedDoctype);break;case U.IN_TABLE_TEXT:_o(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,F.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?Xo(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case U.INITIAL:Hi(this,e);break;case U.BEFORE_HTML:Ui(this,e);break;case U.BEFORE_HEAD:Ki(this,e);break;case U.IN_HEAD:Yi(this,e);break;case U.IN_HEAD_NO_SCRIPT:$i(this,e);break;case U.AFTER_HEAD:na(this,e);break;case U.IN_BODY:Ba(this,e);break;case U.IN_TABLE:fo(this,e);break;case U.IN_TABLE_TEXT:_o(this,e);break;case U.IN_CAPTION:yo(this,e);break;case U.IN_COLUMN_GROUP:xo(this,e);break;case U.IN_TABLE_BODY:wo(this,e);break;case U.IN_ROW:Eo(this,e);break;case U.IN_CELL:Oo(this,e);break;case U.IN_SELECT:Ao(this,e);break;case U.IN_SELECT_IN_TABLE:Mo(this,e);break;case U.IN_TEMPLATE:Po(this,e);break;case U.AFTER_BODY:Lo(this,e);break;case U.IN_FRAMESET:Bo(this,e);break;case U.AFTER_FRAMESET:Ho(this,e);break;case U.AFTER_AFTER_BODY:Wo(this,e);break;case U.AFTER_AFTER_FRAMESET:Ko(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?Zo(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case U.INITIAL:Hi(this,e);break;case U.BEFORE_HTML:Wi(this,e);break;case U.BEFORE_HEAD:qi(this,e);break;case U.IN_HEAD:Xi(this,e);break;case U.IN_HEAD_NO_SCRIPT:ea(this,e);break;case U.AFTER_HEAD:ra(this,e);break;case U.IN_BODY:Qa(this,e);break;case U.TEXT:eo(this,e);break;case U.IN_TABLE:po(this,e);break;case U.IN_TABLE_TEXT:_o(this,e);break;case U.IN_CAPTION:bo(this,e);break;case U.IN_COLUMN_GROUP:So(this,e);break;case U.IN_TABLE_BODY:To(this,e);break;case U.IN_ROW:Do(this,e);break;case U.IN_CELL:ko(this,e);break;case U.IN_SELECT:jo(this,e);break;case U.IN_SELECT_IN_TABLE:No(this,e);break;case U.IN_TEMPLATE:Fo(this,e);break;case U.AFTER_BODY:Ro(this,e);break;case U.IN_FRAMESET:Vo(this,e);break;case U.AFTER_FRAMESET:Uo(this,e);break;case U.AFTER_AFTER_BODY:Go(this,e)}}onEof(e){switch(this.insertionMode){case U.INITIAL:Hi(this,e);break;case U.BEFORE_HTML:Gi(this,e);break;case U.BEFORE_HEAD:Ji(this,e);break;case U.IN_HEAD:Qi(this,e);break;case U.IN_HEAD_NO_SCRIPT:ta(this,e);break;case U.AFTER_HEAD:ia(this,e);break;case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:$a(this,e);break;case U.TEXT:to(this,e);break;case U.IN_TABLE_TEXT:_o(this,e);break;case U.IN_TEMPLATE:Io(this,e);break;case U.AFTER_BODY:case U.IN_FRAMESET:case U.AFTER_FRAMESET:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:Bi(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===P.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.TEXT:case U.IN_COLUMN_GROUP:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:this._insertCharacters(e);break;case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:case U.AFTER_BODY:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:oa(this,e);break;case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:no(this,e);break;case U.IN_TABLE_TEXT:ho(this,e)}}};function Ai(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Za(e,t),n}function ji(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Mi(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=Ti;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=Ni(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function Ni(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Pi(e,t,n){let r=xr(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===z.TEMPLATE&&i===L.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Fi(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Ii(e,t){for(let n=0;n=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Vi(e,t){e._setDocumentType(t);let n=t.forceQuirks?yr.QUIRKS:si(t);oi(t)||e._err(t,F.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=U.BEFORE_HTML}function Hi(e,t){e._err(t,F.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,yr.QUIRKS),e.insertionMode=U.BEFORE_HTML,e._processToken(t)}function Ui(e,t){t.tagID===z.HTML?(e._insertElement(t,L.HTML),e.insertionMode=U.BEFORE_HEAD):Gi(e,t)}function Wi(e,t){let n=t.tagID;(n===z.HTML||n===z.HEAD||n===z.BODY||n===z.BR)&&Gi(e,t)}function Gi(e,t){e._insertFakeRootElement(),e.insertionMode=U.BEFORE_HEAD,e._processToken(t)}function Ki(e,t){switch(t.tagID){case z.HTML:Ba(e,t);break;case z.HEAD:e._insertElement(t,L.HTML),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD;break;default:Ji(e,t)}}function qi(e,t){let n=t.tagID;n===z.HEAD||n===z.BODY||n===z.HTML||n===z.BR?Ji(e,t):e._err(t,F.endTagWithoutMatchingOpenElement)}function Ji(e,t){e._insertFakeElement(R.HEAD,z.HEAD),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD,e._processToken(t)}function Yi(e,t){switch(t.tagID){case z.HTML:Ba(e,t);break;case z.BASE:case z.BASEFONT:case z.BGSOUND:case z.LINK:case z.META:e._appendElement(t,L.HTML),t.ackSelfClosing=!0;break;case z.TITLE:e._switchToTextParsing(t,H.RCDATA);break;case z.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,H.RAWTEXT):(e._insertElement(t,L.HTML),e.insertionMode=U.IN_HEAD_NO_SCRIPT);break;case z.NOFRAMES:case z.STYLE:e._switchToTextParsing(t,H.RAWTEXT);break;case z.SCRIPT:e._switchToTextParsing(t,H.SCRIPT_DATA);break;case z.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=U.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(U.IN_TEMPLATE);break;case z.HEAD:e._err(t,F.misplacedStartTagForHeadElement);break;default:Qi(e,t)}}function Xi(e,t){switch(t.tagID){case z.HEAD:e.openElements.pop(),e.insertionMode=U.AFTER_HEAD;break;case z.BODY:case z.BR:case z.HTML:Qi(e,t);break;case z.TEMPLATE:Zi(e,t);break;default:e._err(t,F.endTagWithoutMatchingOpenElement)}}function Zi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==z.TEMPLATE&&e._err(t,F.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(z.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,F.endTagWithoutMatchingOpenElement)}function Qi(e,t){e.openElements.pop(),e.insertionMode=U.AFTER_HEAD,e._processToken(t)}function $i(e,t){switch(t.tagID){case z.HTML:Ba(e,t);break;case z.BASEFONT:case z.BGSOUND:case z.HEAD:case z.LINK:case z.META:case z.NOFRAMES:case z.STYLE:Yi(e,t);break;case z.NOSCRIPT:e._err(t,F.nestedNoscriptInHead);break;default:ta(e,t)}}function ea(e,t){switch(t.tagID){case z.NOSCRIPT:e.openElements.pop(),e.insertionMode=U.IN_HEAD;break;case z.BR:ta(e,t);break;default:e._err(t,F.endTagWithoutMatchingOpenElement)}}function ta(e,t){let n=t.type===I.EOF?F.openElementsLeftAfterEof:F.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=U.IN_HEAD,e._processToken(t)}function na(e,t){switch(t.tagID){case z.HTML:Ba(e,t);break;case z.BODY:e._insertElement(t,L.HTML),e.framesetOk=!1,e.insertionMode=U.IN_BODY;break;case z.FRAMESET:e._insertElement(t,L.HTML),e.insertionMode=U.IN_FRAMESET;break;case z.BASE:case z.BASEFONT:case z.BGSOUND:case z.LINK:case z.META:case z.NOFRAMES:case z.SCRIPT:case z.STYLE:case z.TEMPLATE:case z.TITLE:e._err(t,F.abandonedHeadElementChild),e.openElements.push(e.headElement,z.HEAD),Yi(e,t),e.openElements.remove(e.headElement);break;case z.HEAD:e._err(t,F.misplacedStartTagForHeadElement);break;default:ia(e,t)}}function ra(e,t){switch(t.tagID){case z.BODY:case z.HTML:case z.BR:ia(e,t);break;case z.TEMPLATE:Zi(e,t);break;default:e._err(t,F.endTagWithoutMatchingOpenElement)}}function ia(e,t){e._insertFakeElement(R.BODY,z.BODY),e.insertionMode=U.IN_BODY,aa(e,t)}function aa(e,t){switch(t.type){case I.CHARACTER:sa(e,t);break;case I.WHITESPACE_CHARACTER:oa(e,t);break;case I.COMMENT:Li(e,t);break;case I.START_TAG:Ba(e,t);break;case I.END_TAG:Qa(e,t);break;case I.EOF:$a(e,t)}}function oa(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function sa(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function ca(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function la(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function ua(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,L.HTML),e.insertionMode=U.IN_FRAMESET)}function da(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML)}function fa(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Cr.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,L.HTML)}function pa(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function ma(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML),n||(e.formElement=e.openElements.current))}function ha(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===z.LI&&r===z.LI||(n===z.DD||n===z.DT)&&(r===z.DD||r===z.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==z.ADDRESS&&r!==z.DIV&&r!==z.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML)}function ga(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML),e.tokenizer.state=H.PLAINTEXT}function _a(e,t){e.openElements.hasInScope(z.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(z.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.framesetOk=!1}function va(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);n&&(Ii(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ya(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ba(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(z.NOBR)&&(Ii(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,L.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function xa(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Sa(e,t){e.treeAdapter.getDocumentMode(e.document)!==yr.QUIRKS&&e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML),e.framesetOk=!1,e.insertionMode=U.IN_TABLE}function Ca(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,L.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function wa(e){let t=rr(e,vr.TYPE);return t!=null&&t.toLowerCase()===Ci}function Ta(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,L.HTML),wa(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Ea(e,t){e._appendElement(t,L.HTML),t.ackSelfClosing=!0}function Da(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._appendElement(t,L.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Oa(e,t){t.tagName=R.IMG,t.tagID=z.IMG,Ca(e,t)}function ka(e,t){e._insertElement(t,L.HTML),e.skipNextNewLine=!0,e.tokenizer.state=H.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=U.TEXT}function Aa(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,H.RAWTEXT)}function ja(e,t){e.framesetOk=!1,e._switchToTextParsing(t,H.RAWTEXT)}function Ma(e,t){e._switchToTextParsing(t,H.RAWTEXT)}function Na(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===U.IN_TABLE||e.insertionMode===U.IN_CAPTION||e.insertionMode===U.IN_TABLE_BODY||e.insertionMode===U.IN_ROW||e.insertionMode===U.IN_CELL?U.IN_SELECT_IN_TABLE:U.IN_SELECT}function Pa(e,t){e.openElements.currentTagId===z.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML)}function Fa(e,t){e.openElements.hasInScope(z.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,L.HTML)}function Ia(e,t){e.openElements.hasInScope(z.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(z.RTC),e._insertElement(t,L.HTML)}function La(e,t){e._reconstructActiveFormattingElements(),gi(t),vi(t),t.selfClosing?e._appendElement(t,L.MATHML):e._insertElement(t,L.MATHML),t.ackSelfClosing=!0}function Ra(e,t){e._reconstructActiveFormattingElements(),_i(t),vi(t),t.selfClosing?e._appendElement(t,L.SVG):e._insertElement(t,L.SVG),t.ackSelfClosing=!0}function za(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML)}function Ba(e,t){switch(t.tagID){case z.I:case z.S:case z.B:case z.U:case z.EM:case z.TT:case z.BIG:case z.CODE:case z.FONT:case z.SMALL:case z.STRIKE:case z.STRONG:ya(e,t);break;case z.A:va(e,t);break;case z.H1:case z.H2:case z.H3:case z.H4:case z.H5:case z.H6:fa(e,t);break;case z.P:case z.DL:case z.OL:case z.UL:case z.DIV:case z.DIR:case z.NAV:case z.MAIN:case z.MENU:case z.ASIDE:case z.CENTER:case z.FIGURE:case z.FOOTER:case z.HEADER:case z.HGROUP:case z.DIALOG:case z.DETAILS:case z.ADDRESS:case z.ARTICLE:case z.SEARCH:case z.SECTION:case z.SUMMARY:case z.FIELDSET:case z.BLOCKQUOTE:case z.FIGCAPTION:da(e,t);break;case z.LI:case z.DD:case z.DT:ha(e,t);break;case z.BR:case z.IMG:case z.WBR:case z.AREA:case z.EMBED:case z.KEYGEN:Ca(e,t);break;case z.HR:Da(e,t);break;case z.RB:case z.RTC:Fa(e,t);break;case z.RT:case z.RP:Ia(e,t);break;case z.PRE:case z.LISTING:pa(e,t);break;case z.XMP:Aa(e,t);break;case z.SVG:Ra(e,t);break;case z.HTML:ca(e,t);break;case z.BASE:case z.LINK:case z.META:case z.STYLE:case z.TITLE:case z.SCRIPT:case z.BGSOUND:case z.BASEFONT:case z.TEMPLATE:Yi(e,t);break;case z.BODY:la(e,t);break;case z.FORM:ma(e,t);break;case z.NOBR:ba(e,t);break;case z.MATH:La(e,t);break;case z.TABLE:Sa(e,t);break;case z.INPUT:Ta(e,t);break;case z.PARAM:case z.TRACK:case z.SOURCE:Ea(e,t);break;case z.IMAGE:Oa(e,t);break;case z.BUTTON:_a(e,t);break;case z.APPLET:case z.OBJECT:case z.MARQUEE:xa(e,t);break;case z.IFRAME:ja(e,t);break;case z.SELECT:Na(e,t);break;case z.OPTION:case z.OPTGROUP:Pa(e,t);break;case z.NOEMBED:case z.NOFRAMES:Ma(e,t);break;case z.FRAMESET:ua(e,t);break;case z.TEXTAREA:ka(e,t);break;case z.NOSCRIPT:e.options.scriptingEnabled?Ma(e,t):za(e,t);break;case z.PLAINTEXT:ga(e,t);break;case z.COL:case z.TH:case z.TD:case z.TR:case z.HEAD:case z.FRAME:case z.TBODY:case z.TFOOT:case z.THEAD:case z.CAPTION:case z.COLGROUP:break;default:za(e,t)}}function Va(e,t){if(e.openElements.hasInScope(z.BODY)&&(e.insertionMode=U.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Ha(e,t){e.openElements.hasInScope(z.BODY)&&(e.insertionMode=U.AFTER_BODY,Ro(e,t))}function Ua(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Wa(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(z.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(z.FORM):n&&e.openElements.remove(n))}function Ga(e){e.openElements.hasInButtonScope(z.P)||e._insertFakeElement(R.P,z.P),e._closePElement()}function Ka(e){e.openElements.hasInListItemScope(z.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(z.LI),e.openElements.popUntilTagNamePopped(z.LI))}function qa(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Ja(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Ya(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Xa(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(R.BR,z.BR),e.openElements.pop(),e.framesetOk=!1}function Za(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==z.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function Qa(e,t){switch(t.tagID){case z.A:case z.B:case z.I:case z.S:case z.U:case z.EM:case z.TT:case z.BIG:case z.CODE:case z.FONT:case z.NOBR:case z.SMALL:case z.STRIKE:case z.STRONG:Ii(e,t);break;case z.P:Ga(e);break;case z.DL:case z.UL:case z.OL:case z.DIR:case z.DIV:case z.NAV:case z.PRE:case z.MAIN:case z.MENU:case z.ASIDE:case z.BUTTON:case z.CENTER:case z.FIGURE:case z.FOOTER:case z.HEADER:case z.HGROUP:case z.DIALOG:case z.ADDRESS:case z.ARTICLE:case z.DETAILS:case z.SEARCH:case z.SECTION:case z.SUMMARY:case z.LISTING:case z.FIELDSET:case z.BLOCKQUOTE:case z.FIGCAPTION:Ua(e,t);break;case z.LI:Ka(e);break;case z.DD:case z.DT:qa(e,t);break;case z.H1:case z.H2:case z.H3:case z.H4:case z.H5:case z.H6:Ja(e);break;case z.BR:Xa(e);break;case z.BODY:Va(e,t);break;case z.HTML:Ha(e,t);break;case z.FORM:Wa(e);break;case z.APPLET:case z.OBJECT:case z.MARQUEE:Ya(e,t);break;case z.TEMPLATE:Zi(e,t);break;default:Za(e,t)}}function $a(e,t){e.tmplInsertionModeStack.length>0?Io(e,t):Bi(e,t)}function eo(e,t){var n;t.tagID===z.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function to(e,t){e._err(t,F.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function no(e,t){if(e.openElements.currentTagId!==void 0&&Di.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=U.IN_TABLE_TEXT,t.type){case I.CHARACTER:go(e,t);break;case I.WHITESPACE_CHARACTER:ho(e,t)}else mo(e,t)}function ro(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,L.HTML),e.insertionMode=U.IN_CAPTION}function io(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,L.HTML),e.insertionMode=U.IN_COLUMN_GROUP}function ao(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.COLGROUP,z.COLGROUP),e.insertionMode=U.IN_COLUMN_GROUP,xo(e,t)}function oo(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,L.HTML),e.insertionMode=U.IN_TABLE_BODY}function so(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.TBODY,z.TBODY),e.insertionMode=U.IN_TABLE_BODY,wo(e,t)}function co(e,t){e.openElements.hasInTableScope(z.TABLE)&&(e.openElements.popUntilTagNamePopped(z.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function lo(e,t){wa(t)?e._appendElement(t,L.HTML):mo(e,t),t.ackSelfClosing=!0}function uo(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,L.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function fo(e,t){switch(t.tagID){case z.TD:case z.TH:case z.TR:so(e,t);break;case z.STYLE:case z.SCRIPT:case z.TEMPLATE:Yi(e,t);break;case z.COL:ao(e,t);break;case z.FORM:uo(e,t);break;case z.TABLE:co(e,t);break;case z.TBODY:case z.TFOOT:case z.THEAD:oo(e,t);break;case z.INPUT:lo(e,t);break;case z.CAPTION:ro(e,t);break;case z.COLGROUP:io(e,t);break;default:mo(e,t)}}function po(e,t){switch(t.tagID){case z.TABLE:e.openElements.hasInTableScope(z.TABLE)&&(e.openElements.popUntilTagNamePopped(z.TABLE),e._resetInsertionMode());break;case z.TEMPLATE:Zi(e,t);break;case z.BODY:case z.CAPTION:case z.COL:case z.COLGROUP:case z.HTML:case z.TBODY:case z.TD:case z.TFOOT:case z.TH:case z.THEAD:case z.TR:break;default:mo(e,t)}}function mo(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,aa(e,t),e.fosterParentingEnabled=n}function ho(e,t){e.pendingCharacterTokens.push(t)}function go(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function _o(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0&&e.openElements.currentTagId===z.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===z.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===z.OPTGROUP&&e.openElements.pop();break;case z.OPTION:e.openElements.currentTagId===z.OPTION&&e.openElements.pop();break;case z.SELECT:e.openElements.hasInSelectScope(z.SELECT)&&(e.openElements.popUntilTagNamePopped(z.SELECT),e._resetInsertionMode());break;case z.TEMPLATE:Zi(e,t)}}function Mo(e,t){let n=t.tagID;n===z.CAPTION||n===z.TABLE||n===z.TBODY||n===z.TFOOT||n===z.THEAD||n===z.TR||n===z.TD||n===z.TH?(e.openElements.popUntilTagNamePopped(z.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ao(e,t)}function No(e,t){let n=t.tagID;n===z.CAPTION||n===z.TABLE||n===z.TBODY||n===z.TFOOT||n===z.THEAD||n===z.TR||n===z.TD||n===z.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(z.SELECT),e._resetInsertionMode(),e.onEndTag(t)):jo(e,t)}function Po(e,t){switch(t.tagID){case z.BASE:case z.BASEFONT:case z.BGSOUND:case z.LINK:case z.META:case z.NOFRAMES:case z.SCRIPT:case z.STYLE:case z.TEMPLATE:case z.TITLE:Yi(e,t);break;case z.CAPTION:case z.COLGROUP:case z.TBODY:case z.TFOOT:case z.THEAD:e.tmplInsertionModeStack[0]=U.IN_TABLE,e.insertionMode=U.IN_TABLE,fo(e,t);break;case z.COL:e.tmplInsertionModeStack[0]=U.IN_COLUMN_GROUP,e.insertionMode=U.IN_COLUMN_GROUP,xo(e,t);break;case z.TR:e.tmplInsertionModeStack[0]=U.IN_TABLE_BODY,e.insertionMode=U.IN_TABLE_BODY,wo(e,t);break;case z.TD:case z.TH:e.tmplInsertionModeStack[0]=U.IN_ROW,e.insertionMode=U.IN_ROW,Eo(e,t);break;default:e.tmplInsertionModeStack[0]=U.IN_BODY,e.insertionMode=U.IN_BODY,Ba(e,t)}}function Fo(e,t){t.tagID===z.TEMPLATE&&Zi(e,t)}function Io(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(z.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Bi(e,t)}function Lo(e,t){t.tagID===z.HTML?Ba(e,t):zo(e,t)}function Ro(e,t){if(t.tagID===z.HTML){if(e.fragmentContext||(e.insertionMode=U.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===z.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else zo(e,t)}function zo(e,t){e.insertionMode=U.IN_BODY,aa(e,t)}function Bo(e,t){switch(t.tagID){case z.HTML:Ba(e,t);break;case z.FRAMESET:e._insertElement(t,L.HTML);break;case z.FRAME:e._appendElement(t,L.HTML),t.ackSelfClosing=!0;break;case z.NOFRAMES:Yi(e,t)}}function Vo(e,t){t.tagID===z.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==z.FRAMESET&&(e.insertionMode=U.AFTER_FRAMESET))}function Ho(e,t){switch(t.tagID){case z.HTML:Ba(e,t);break;case z.NOFRAMES:Yi(e,t)}}function Uo(e,t){t.tagID===z.HTML&&(e.insertionMode=U.AFTER_AFTER_FRAMESET)}function Wo(e,t){t.tagID===z.HTML?Ba(e,t):Go(e,t)}function Go(e,t){e.insertionMode=U.IN_BODY,aa(e,t)}function Ko(e,t){switch(t.tagID){case z.HTML:Ba(e,t);break;case z.NOFRAMES:Yi(e,t)}}function qo(e,t){t.chars=`�`,e._insertCharacters(t)}function Jo(e,t){e._insertCharacters(t),e.framesetOk=!1}function Yo(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==L.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Xo(e,t){if(hi(t))Yo(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===L.MATHML?gi(t):r===L.SVG&&(yi(t),_i(t)),vi(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Zo(e,t){if(t.tagID===z.P||t.tagID===z.BR)Yo(e),e._endTagOutsideForeignContent(t);else for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===L.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}R.AREA,R.BASE,R.BASEFONT,R.BGSOUND,R.BR,R.COL,R.EMBED,R.FRAME,R.HR,R.IMG,R.INPUT,R.KEYGEN,R.LINK,R.META,R.PARAM,R.SOURCE,R.TRACK,R.WBR;var Qo=es(`end`),$o=es(`start`);function es(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function ts(e){let t=$o(e),n=Qo(e);if(t&&n)return{start:t,end:n}}var ns=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,rs=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),is={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function as(e,t){let n=ys(e),r=Nn(`type`,{handlers:{root:ss,element:cs,text:ls,comment:fs,doctype:us,raw:ps},unknown:ms}),i={parser:n?new ki(is):ki.getFragmentParser(void 0,is),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),hs(i,$o());let a=wn(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&$e(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function os(e,t){let n=-1;if(e)for(;++n4&&(t.parser.tokenizer.state=0);let n={type:I.CHARACTER,chars:e.value,location:bs(e)};hs(t,$o(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function us(e,t){let n={type:I.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:bs(e)};hs(t,$o(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ds(e,t){t.stitches=!0;let n=xs(e);`children`in e&&`children`in n&&(n.children=as({type:`root`,children:e.children},t.options).children),fs({type:`comment`,value:{stitch:n}},t)}function fs(e,t){let n=e.value,r={type:I.COMMENT,data:n,location:bs(e)};hs(t,$o(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function ps(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,gs(t,$o(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(ns,`<$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function ms(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))ds(n,t);else{let e=``;throw rs.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function hs(e,t){gs(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=H.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function gs(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function _s(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===H.PLAINTEXT)return;hs(t,$o(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:xn.html;i===xn.html&&n===`svg`&&(i=xn.svg);let a=Ln({...e,children:[]},{space:i===xn.svg?`svg`:`html`}),o={type:I.START_TAG,tagName:n,tagID:xr(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:bs(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function vs(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&qn.includes(n)||t.parser.tokenizer.state===H.PLAINTEXT)return;hs(t,Qo(e));let r={type:I.END_TAG,tagName:n,tagID:xr(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:bs(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===H.RCDATA||t.parser.tokenizer.state===H.RAWTEXT||t.parser.tokenizer.state===H.SCRIPT_DATA)&&(t.parser.tokenizer.state=H.DATA)}function ys(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function bs(e){let t=$o(e)||{line:void 0,column:void 0,offset:void 0},n=Qo(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function xs(e){return`children`in e?Ct({...e,children:[]}):Ct(e)}function Ss(e){return function(t,n){return as(t,{...e,file:n})}}var Cs=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],ws={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...Cs,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...Cs],h2:[[`className`,`sr-only`]],img:[...Cs,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...Cs,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...Cs],table:[...Cs],ul:[...Cs,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},Ts={}.hasOwnProperty;function Es(e,t){let n={type:`root`,children:[]},r=Ds({schema:t?{...ws,...t}:ws,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Ds(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return Os(e,n);case`doctype`:return ks(e,n);case`element`:return As(e,n);case`root`:return js(e,n);case`text`:return Ms(e,n)}}}function Os(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return zs(r,t),r}}function ks(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return zs(e,t),e}}function As(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=Ns(e,t.children),i=Ps(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Ts.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r1){let e=!1,n=0;for(;++n-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l4&&t.slice(0,4).toLowerCase()===`data`)return n}function Vs(e){return function(t){return Es(t,e)}}function Hs(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var Us=Qs(/[A-Za-z]/),Ws=Qs(/[\dA-Za-z]/),Gs=Qs(/[#-'*+\--9=?A-Z^-~]/);function Ks(e){return e!==null&&(e<32||e===127)}var qs=Qs(/\d/),Js=Qs(/[\dA-Fa-f]/),Ys=Qs(/[!-/:-@[-`{-~]/);function W(e){return e!==null&&e<-2}function G(e){return e!==null&&(e<0||e===32)}function K(e){return e===-2||e===-1||e===32}var Xs=Qs(/\p{P}|\p{S}/u),Zs=Qs(/\s/);function Qs(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function $s(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function ec(e,t,n){let r=Ve((n||{}).ignore||[]),i=tc(t),a=-1;for(;++a0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Hs(e,`(`),a=Hs(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function yc(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Zs(n)||Xs(n))&&(!t||n!==47)}function bc(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}Ac.peek=kc;function xc(){this.buffer()}function Sc(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Cc(){this.buffer()}function wc(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Tc(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bc(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ec(e){this.exit(e)}function Dc(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bc(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Oc(e){this.exit(e)}function kc(){return`[`}function Ac(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function jc(){return{enter:{gfmFootnoteCallString:xc,gfmFootnoteCall:Sc,gfmFootnoteDefinitionLabelString:Cc,gfmFootnoteDefinition:wc},exit:{gfmFootnoteCallString:Tc,gfmFootnoteCall:Ec,gfmFootnoteDefinitionLabelString:Dc,gfmFootnoteDefinition:Oc}}}function Mc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ac},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` +`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Pc:Nc))),s(),o}}function Nc(e,t,n){return t===0?e:Pc(e,t,n)}function Pc(e,t,n){return(n?``:` `)+e}var Fc=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Bc.peek=Vc;function Ic(){return{canContainEols:[`delete`],enter:{strikethrough:Rc},exit:{strikethrough:zc}}}function Lc(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Fc}],handlers:{delete:Bc}}}function Rc(e){this.enter({type:`delete`,children:[]},e)}function zc(e){this.exit(e)}function Bc(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Vc(){return`~`}function Hc(e){return e.length}function Uc(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Hc,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++ul&&(l=e[u].length);++ac[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++dc[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),qc);return i(),o}function qc(e,t,n){return`>`+(n?``:` `)+e}function Jc(e,t){return Yc(e,t.inConstruct,!0)&&!Yc(e,t.notInConstruct,!1)}function Yc(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ro&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Qc(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^ \r\n]/.test(e.value)||/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function $c(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function el(e,t,n,r){let i=$c(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Qc(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,tl);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Zc(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:` +`,encode:["`"],...s.current()})),t()}return u+=s.move(` +`),a&&(u+=s.move(a+` +`)),u+=s.move(c),l(),u}function tl(e,t,n){return(n?``:` `)+e}function nl(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function rl(e,t,n,r){let i=nl(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:` +`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function il(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function al(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function ol(e){if(e===null||G(e)||Zs(e))return 1;if(Xs(e))return 2}function sl(e,t,n){let r=ol(e),i=ol(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}cl.peek=ll;function cl(e,t,n,r){let i=il(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=sl(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=al(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=sl(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+al(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function ll(e,t,n){return n.options.emphasis||`*`}var ul={};function dl(e,t){let n=t||ul;return fl(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function fl(e,t,n){if(ml(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return pl(e.children,t,n)}return Array.isArray(e)?pl(e,t,n):``}function pl(e,t,n){let r=[],i=-1;for(;++i`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function bl(){return`!`}xl.peek=Sl;function xl(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Sl(){return`!`}Cl.peek=wl;function Cl(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a\u007F]/.test(e.url))}El.peek=Dl;function El(e,t,n,r){let i=nl(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Tl(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Dl(e,t,n){return Tl(e,n)?`<`:`[`}Ol.peek=kl;function Ol(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function kl(){return`[`}function Al(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function jl(e){let t=Al(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Ml(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Nl(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Pl(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Ml(n):Al(n),s=e.ordered?o===`.`?`)`:`.`:jl(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),Nl(n)===o&&t){let t=-1;for(;++t-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Ll(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Rl=Ve([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function zl(e,t,n,r){return(e.children.some(function(e){return Rl(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Bl(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Vl.peek=Hl;function Vl(e,t,n,r){let i=Bl(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=sl(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=al(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=sl(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+al(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Hl(e,t,n){return n.options.strong||`*`}function Ul(e,t,n,r){return n.safe(e.value,r)}function Wl(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Gl(e,t,n){let r=(Nl(n)+(n.options.ruleSpaces?` `:``)).repeat(Wl(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Kl={blockquote:Kc,break:Xc,code:el,definition:rl,emphasis:cl,hardBreak:Xc,heading:gl,html:_l,image:yl,imageReference:xl,inlineCode:Cl,link:El,linkReference:Ol,list:Pl,listItem:Il,paragraph:Ll,root:zl,strong:Vl,text:Ul,thematicBreak:Gl},ql=document.createElement(`i`);function Jl(e){let t=`&`+e+`;`;ql.innerHTML=t;let n=ql.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function Yl(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var Xl=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Zl(e){return e.replace(Xl,Ql)}function Ql(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Yl(n.slice(t?2:1),t?16:10)}return Jl(n)||e}function $l(){return{enter:{table:eu,tableData:iu,tableHeader:iu,tableRow:nu},exit:{codeText:au,table:tu,tableData:ru,tableHeader:ru,tableRow:ru}}}function eu(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function tu(e){this.exit(e),this.data.inTable=void 0}function nu(e){this.enter({type:`tableRow`,children:[]},e)}function ru(e){this.exit(e)}function iu(e){this.enter({type:`tableCell`,children:[]},e)}function au(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ou));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ou(e,t){return t===`|`?t:e}function su(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:` +`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(` +`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Uc(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++ii?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(hu(e,e.length,0,t),e):t}var _u={}.hasOwnProperty;function vu(e){let t={},n=-1;for(;++n0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Gu(e){let t=[],n=-1,r=0,i=0;for(;++n55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Ku(e,t,n){let r=[],i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Xu(d,-c),Xu(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=gu(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=gu(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=gu(l,Ku(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=gu(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=gu(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,hu(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n0&&K(t)?q(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||W(t)?e.check(ld,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||W(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),K(t)?q(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),K(t)?q(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||W(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function fd(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var pd={name:`codeIndented`,tokenize:hd},md={partial:!0,tokenize:gd};function hd(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),q(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):W(t)?e.attempt(md,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||W(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function gd(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):q(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):W(e)?i(e):n(e)}}var _d={name:`codeText`,previous:yd,resolve:vd,tokenize:bd};function vd(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Sd(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Sd(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Sd(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Ad(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Ks(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||W(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||G(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):W(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||W(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!K(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Md(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),q(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||W(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Nd(e,t){let n;return r;function r(i){return W(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):K(i)?q(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Pd={name:`definition`,tokenize:Id},Fd={partial:!0,tokenize:Ld};function Id(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return jd.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=bc(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return G(t)?Nd(e,l)(t):l(t)}function l(t){return Ad(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Fd,d,d)(t)}function d(t){return K(t)?q(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||W(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Ld(e,t,n){return r;function r(t){return G(t)?Nd(e,i)(t):n(t)}function i(t){return Md(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return K(t)?q(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||W(e)?t(e):n(e)}}var Rd={name:`hardBreakEscape`,tokenize:zd};function zd(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return W(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Bd={name:`headingAtx`,resolve:Vd,tokenize:Hd};function Vd(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},hu(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Hd(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||G(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||W(n)?(e.exit(`atxHeading`),t(n)):K(n)?q(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||G(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Ud=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Wd=[`pre`,`script`,`style`,`textarea`],Gd={concrete:!0,name:`htmlFlow`,resolveTo:Jd,tokenize:Yd},Kd={partial:!0,tokenize:Zd},qd={partial:!0,tokenize:Xd};function Jd(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Yd(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:k):Us(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Us(a)?(e.consume(a),i=4,r.interrupt?t:k):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:k):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Us(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||G(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Wd.includes(l)?(i=1,r.interrupt?t(s):O(s)):Ud.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Ws(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return K(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Us(t)?(e.consume(t),b):K(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Ws(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):K(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):K(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||W(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||G(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||K(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||W(t)?O(t):K(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),re):t===60&&i===1?(e.consume(t),ie):t===62&&i===4?(e.consume(t),se):t===63&&i===3?(e.consume(t),k):t===93&&i===5?(e.consume(t),oe):W(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Kd,ce,ee)(t)):t===null||W(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(qd,te,ce)(t)}function te(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return t===null||W(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function re(t){return t===45?(e.consume(t),k):O(t)}function ie(t){return t===47?(e.consume(t),o=``,ae):O(t)}function ae(t){if(t===62){let n=o.toLowerCase();return Wd.includes(n)?(e.consume(t),se):O(t)}return Us(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ae):O(t)}function oe(t){return t===93?(e.consume(t),k):O(t)}function k(t){return t===62?(e.consume(t),se):t===45&&i===2?(e.consume(t),k):O(t)}function se(t){return t===null||W(t)?(e.exit(`htmlFlowData`),ce(t)):(e.consume(t),se)}function ce(n){return e.exit(`htmlFlow`),t(n)}}function Xd(e,t,n){let r=this;return i;function i(t){return W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Zd(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt($u,t,n)}}var Qd={name:`htmlText`,tokenize:$d};function $d(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Us(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Us(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):W(t)?(o=d,ie(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?re(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):W(t)?(o=h,ie(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?re(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?re(t):W(t)?(o=v,ie(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):W(t)?(o=y,ie(t)):(e.consume(t),y)}function b(e){return e===62?re(e):y(e)}function x(t){return Us(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Ws(t)?(e.consume(t),S):C(t)}function C(t){return W(t)?(o=C,ie(t)):K(t)?(e.consume(t),C):re(t)}function w(t){return t===45||Ws(t)?(e.consume(t),w):t===47||t===62||G(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),re):t===58||t===95||Us(t)?(e.consume(t),E):W(t)?(o=T,ie(t)):K(t)?(e.consume(t),T):re(t)}function E(t){return t===45||t===46||t===58||t===95||Ws(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):W(t)?(o=D,ie(t)):K(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ee):W(t)?(o=O,ie(t)):K(t)?(e.consume(t),O):(e.consume(t),te)}function ee(t){return t===i?(e.consume(t),i=void 0,ne):t===null?n(t):W(t)?(o=ee,ie(t)):(e.consume(t),ee)}function te(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||G(t)?T(t):(e.consume(t),te)}function ne(e){return e===47||e===62||G(e)?T(e):n(e)}function re(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ie(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ae}function ae(t){return K(t)?q(e,oe,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):oe(t)}function oe(t){return e.enter(`htmlTextData`),o(t)}}var ef={name:`labelEnd`,resolveAll:af,resolveTo:of,tokenize:sf},tf={tokenize:cf},nf={tokenize:lf},rf={tokenize:uf};function af(e){let t=-1,n=[];for(;++t=3&&(a===null||W(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),K(t)?q(e,s,`whitespace`)(t):s(t))}}var yf={continuation:{tokenize:Cf},exit:Tf,name:`list`,tokenize:Sf},bf={partial:!0,tokenize:Ef},xf={partial:!0,tokenize:wf};function Sf(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:qs(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(_f,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return qs(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check($u,r.interrupt?n:u,e.attempt(bf,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return K(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Cf(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check($u,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,q(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!K(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xf,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,q(e,e.attempt(yf,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function wf(e,t,n){let r=this;return q(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Tf(e){e.exit(this.containerState.type)}function Ef(e,t,n){let r=this;return q(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!K(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Df={name:`setextUnderline`,resolveTo:Of,tokenize:kf};function Of(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function kf(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),K(t)?q(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||W(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Af={tokenize:Rf,partial:!0};function jf(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Ff,continuation:{tokenize:If},exit:Lf}},text:{91:{name:`gfmFootnoteCall`,tokenize:Pf},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Mf,resolveTo:Nf}}}}function Mf(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=bc(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Nf(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Pf(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||G(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(bc(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return G(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Ff(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||G(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=bc(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return G(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),q(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function If(e,t,n){return e.check($u,t,e.attempt(Af,t,n))}function Lf(e){e.exit(`gfmFootnoteDefinition`)}function Rf(e,t,n){let r=this;return q(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function zf(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=ol(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Bf=class{constructor(){this.map=[]}add(e,t,n){Vf(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Vf(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):W(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):K(t)?q(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||G(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,K(t)?q(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return K(t)?q(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||W(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return K(t)?q(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||W(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||W(n)?(e.exit(`tableRow`),t(n)):K(n)?q(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||G(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Gf(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Bf;for(;++nn[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Jf(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function qf(e,t,n,r,i){let a=[],o=Jf(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Jf(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Yf={name:`tasklistCheck`,tokenize:Zf};function Xf(){return{text:{91:Yf}}}function Zf(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return G(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return W(r)?t(r):K(r)?e.check({tokenize:Qf},t,n)(r):n(r)}}function Qf(e,t,n){return q(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function $f(e){return vu([Au(),jf(),zf(e),Uf(),Xf()])}var ep={};function tp(e){let t=this,n=e||ep,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push($f(n)),a.push(pu()),o.push(mu(n))}var np=Object.defineProperty,rp=Object.defineProperties,ip=Object.getOwnPropertyDescriptors,ap=Object.getOwnPropertySymbols,op=Object.prototype.hasOwnProperty,sp=Object.prototype.propertyIsEnumerable,cp=(e,t,n)=>t in e?np(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lp=(e,t)=>{for(var n in t||={})op.call(t,n)&&cp(e,n,t[n]);if(ap)for(var n of ap(t))sp.call(t,n)&&cp(e,n,t[n]);return e},up=(e,t)=>rp(e,ip(t)),J={PROSE:0,FENCE_MARKER:1,FENCE_INFO:2,FENCE_BODY:3,CODE_SPAN:4,CODE_SPAN_OPEN:5},dp=/^(`{3,}|~{3,})(.*)$/,fp=e=>e!==void 0&&e>=`0`&&e<=`9`,pp=(e,t)=>{let n=t;if(e[n]===`-`||e[n]===`*`||e[n]===`+`)n+=1;else{for(;fp(e[n])&&n-t<9;)n+=1;if(n===t||e[n]!==`.`&&e[n]!==`)`)return-1;n+=1}return e[n]===` `?n+1:-1},mp=(e,t,n)=>{let r=0,i=t,a=!1,o=t;for(;;){for(;o`){r+=1,o+=e[o+1]===` `?2:1,i=o,a=!1;continue}let t=o{let i=t;for(let t=0;t`)return-1;i+=1,e[i]===` `&&(i+=1)}return i},gp=(e,t,n,r,i)=>{let a=t+r;e.fill(J.FENCE_MARKER,a,a+i),e.fill(J.FENCE_INFO,a+i,Math.min(n+1,e.length))},_p=(e,t,n,r)=>{let i=t;for(;i{let i=r>n&&e[r-1]===`\r`?r-1:r,a=mp(e,n,i),o=e.slice(a.contentStart,i).match(dp);if(!o)return null;let[,s,c]=o,l=s[0];return l==="`"&&c.includes("`")?null:(gp(t,n,r,a.contentStart-n,s.length),{char:l,length:s.length,listIndent:a.listIndent,quoteDepth:a.quoteDepth})},yp=(e,t,n,r)=>{let i=hp(e,t,n,r.quoteDepth);if(i===-1||r.listIndent===0)return i;let a=i;for(;a=r.listIndent?i:-1},bp=(e,t)=>{let n=e.length,r=null,i=0;for(;i{let n=t+1;for(;n{let n=t+1;for(;n{let r=n;for(;;){let n=e.indexOf("`",r);if(n===-1)return-1;let i=n>r&&e[n-1]===`\\`&&t[n-1]===J.PROSE;if(t[n]===J.PROSE&&!i)return n;r=n+1}},wp=(e,t)=>{let n=e.length,r=-1,i=0,a=0;for(;a=0?(t.fill(J.CODE_SPAN_OPEN,r,n),{start:r,runLength:i}):null},Tp=e=>{let t=new Uint8Array(e.length);return{text:e,regions:t,openFence:bp(e,t),openSpan:wp(e,t),mathMask:null,linkUrlMask:null,htmlTagMask:null}},Ep=null,Dp=null,Op=e=>{if(Dp!==null&&e===Ep)return Dp;let t=Tp(e);return Ep=e,Dp=t,t},kp=()=>{Ep=null,Dp=null},Ap=(e,t)=>t>=e.regions.length?e.openFence!==null||e.openSpan!==null:t<0?!1:e.regions[t]!==J.PROSE,jp=(e,t)=>e.regions[t]===J.CODE_SPAN,Mp=(e,t)=>{let n=Op(e),r=t+t,i=0;for(let t=e.indexOf(r);t!==-1;t=e.indexOf(r,t))n.regions[t]===J.PROSE?(i+=1,t+=2):t+=1;return i},Np=new Uint8Array,Pp=e=>e===`inlineLatex`||e===`blockLatex`,Fp=(e,t)=>t===`[`&&e===`none`?`blockLatex`:t===`]`&&e===`blockLatex`?`none`:t===`(`&&e===`none`?`inlineLatex`:t===`)`&&e===`inlineLatex`?`none`:null,Ip=(e,t)=>t?e===`blockDollar`?`none`:`blockDollar`:e===`blockDollar`?e:e===`inlineDollar`?`none`:`inlineDollar`,Lp=e=>e.includes(`$`)||e.includes(`\\(`)||e.includes(`\\[`),Rp=(e,t,n)=>{let r=e[t+1];if(e[t]===`\\`){if(r===`$`)return{context:n,length:2};let e=Fp(n,r);return e===null?null:{context:e,length:2}}if(e[t]===`$`&&!Pp(n)){let e=r===`$`;return{context:Ip(n,e),length:e?2:1}}return null},zp=e=>{let{text:t,regions:n}=e,r=t.length,i=new Uint8Array(r),a=`none`,o=0;for(;ot<0||t>=e.text.length?!1:(e.mathMask===null&&(e.mathMask=Lp(e.text)?zp(e):Np),e.mathMask[t]===1),Vp=(e,t,n,r)=>{let{text:i,regions:a}=e,o=new Uint8Array(n-t),s=0;for(let e=n-1;e>=t;--e)i[e]===`)`&&a[e]===J.PROSE&&(s=1),o[e-t]=s;let c=!1;for(let e=t;e0&&i[e-1]===`]`))},Hp=e=>{let{text:t}=e,n=t.length,r=new Uint8Array(n),i=0;for(;it<0||t>=e.text.length?!1:(e.linkUrlMask===null&&(e.linkUrlMask=e.text.includes(`](`)?Hp(e):Np),e.linkUrlMask[t]===1),Wp=e=>{let{text:t,regions:n}=e,r=t.length,i=new Uint8Array(r),a=!1;for(let e=0;e`)a=!1;else if(t[e]===`<`){let n=t[e+1];a=n!==void 0&&(n>=`a`&&n<=`z`||n>=`A`&&n<=`Z`||n===`/`)}}return i},Gp=(e,t)=>t<0||t>=e.text.length?!1:(e.htmlTagMask===null&&(e.htmlTagMask=e.text.includes(`<`)?Wp(e):Np),e.htmlTagMask[t]===1),Kp=(e,t)=>Ap(Op(e),t),qp=(e,t)=>jp(Op(e),t),Jp=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,Yp=e=>!e||typeof e!=`string`||!e.includes(`>`)?e:e.replace(Jp,(t,n,r,i)=>Kp(e,i)?t:`${n}\\>${r}`),Xp=(e,{delimiter:t,markerLength:n,regex:r})=>{let i=e.lastIndexOf(t,e.length-2),a=i===-1?e.length-1:i;return e.slice(Math.max(0,a-n+1)).match(r)},Zp={delimiter:`*`,markerLength:2,regex:/(\*\*)([^*]*\*?)$/},Qp={delimiter:`_`,markerLength:2,regex:/(__)([^_]*?)$/},$p={delimiter:`*`,markerLength:3,regex:/(\*\*\*)([^*]*?)$/},em={delimiter:`*`,markerLength:1,regex:/(\*)([^*]*?)$/},tm={delimiter:`_`,markerLength:1,regex:/(_)([^_]*?)$/},nm={delimiter:`~`,markerLength:2,regex:/(~~)([^~]*?)$/},rm={delimiter:`_`,markerLength:2,regex:/(__)([^_]+)_$/},im={delimiter:`~`,markerLength:2,regex:/(~~)([^~]+)~$/},am=/^[\s_~*`]*$/,om=/^[\s]*[-*+][\s]+$/,sm=/[\p{L}\p{N}_]/u,cm=/^\*{4,}$/,lm=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95||sm.test(e)},um=(e,t)=>{let n=1;for(let r=t-1;r>=0;--r)if(e[r]===`]`)n+=1;else if(e[r]===`[`&&(--n,n===0))return r;return-1},dm=(e,t)=>{let n=1;for(let r=t+1;rBp(Op(e),t),pm=(e,t,n)=>{let r=0;for(let n=t-1;n>=0;--n)if(e[n]===` +`){r=n+1;break}let i=e.length;for(let n=t;n=3&&!s},mm=(e,t,n,r)=>n===`\\`||Bp(e,t)?!0:n!==`*`&&r===`*`?(te===` `||e===` `||e===` +`,gm=(e,t)=>!!(e&&t&&lm(e)&&lm(t)),_m=(e,t,n,r)=>{let i=gm(e,t),a=!!t&&!hm(t),o=!!e&&!hm(e);return i&&n%2==0&&!r?{count:!1}:o&&n%2==1||a?{count:!0,inWordAsteriskChain:i}:{count:!1}},vm=e=>{let t=Op(e),n=0,r=!1,i=e.length;for(let a=0;a0?e[a-1]:``,s=a!!(n===`\\`||Bp(e,t)||Up(e,t)||Gp(e,t)||n===`_`||r===`_`||n&&r&&lm(n)&&lm(r)),bm=e=>{let t=Op(e),n=0,r=e.length;for(let i=0;i0?e[i-1]:``,o=i{let t=Op(e),n=0,r=0;for(let i=0;i=3&&(n+=Math.floor(r/3)),r=0);return r>=3&&(n+=Math.floor(r/3)),n},Sm=e=>Mp(e,`*`),Cm=e=>e===``||e===` `||e===` `||e===` +`,wm=(e,t,n,r,i)=>{if(!(Cm(n)&&Cm(r)))return!1;if(t>i.lineEnd){let n=e.indexOf(` +`,t);i.lineEnd=n===-1?e.length:n,i.result=pm(e,t,`_`)}return i.result},Tm=(e,t,n,r)=>{let i=e.text,a=t,o=!1;a>0&&i[a-1]===`\\`&&(a+=1,o=!0);let s=n-a;if(s<2)return!1;let c=a>0?i[a-1]:``,l=o?`\\`:c,u=n{let t=Op(e),n=e.length,r={lineEnd:-1,result:!1},i=!1,a=0;for(;a{if(!t||am.test(t))return!0;let r=e.substring(0,n).lastIndexOf(` +`),i=r===-1?0:r+1,a=e.substring(i,n);return om.test(a)&&t.includes(` +`)?!0:pm(e,n,`*`)},Om=e=>{let t=Xp(e,Zp);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Kp(e,r)||qp(e,r)||Dm(e,n,r)?e:Sm(e)%2==1?n.endsWith(`*`)?`${e}*`:`${e}**`:e},km=(e,t,n)=>{if(!t||am.test(t))return!0;let r=e.substring(0,n).lastIndexOf(` +`),i=r===-1?0:r+1,a=e.substring(i,n);return om.test(a)&&t.includes(` +`)?!0:pm(e,n,`_`)},Am=e=>{let t=Xp(e,Qp);if(!t){let t=Xp(e,rm);if(t){let n=e.lastIndexOf(t[1]);if(!(Kp(e,n)||qp(e,n))&&Em(e))return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return Kp(e,r)||qp(e,r)||km(e,n,r)?e:Em(e)?`${e}__`:e},jm=(e,t)=>{let{text:n}=e;return n[t]===`*`&&e.regions[t]===J.PROSE&&n[t-1]!==`*`&&n[t+1]!==`*`&&n[t-1]!==`\\`&&!Bp(e,t)},Mm=e=>{let t=Op(e);for(let n=e.indexOf(`*`);n!==-1;n=e.indexOf(`*`,n+1)){if(!jm(t,n))continue;let r=n>0?e[n-1]:``,i=n{if(!Xp(e,em))return e;let t=Mm(e);if(t===-1||Kp(e,t)||qp(e,t))return e;let n=e.substring(t+1);return!n||am.test(n)?e:vm(e)%2==1?`${e}*`:e},Pm=e=>{let t=Op(e);for(let n=e.indexOf(`_`);n!==-1;n=e.indexOf(`_`,n+1))if(t.regions[n]===J.PROSE&&e[n-1]!==`_`&&e[n+1]!==`_`&&e[n-1]!==`\\`&&!Bp(t,n)&&!Up(t,n)){let t=n>0?e[n-1]:``,r=n{let t=e.length;for(;t>0&&e[t-1]===` +`;)--t;return t{if(!e.endsWith(`**`))return null;let t=e.slice(0,-2);if(Sm(t)%2!=1)return null;let n=t.indexOf(`**`),r=Pm(t);return n!==-1&&r!==-1&&n{if(!Xp(e,tm))return e;let t=Pm(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||am.test(n)||Kp(e,t)||qp(e,t))return e;if(bm(e)%2==1){let t=Im(e);return t===null?Fm(e):t}return e},Rm=e=>{let t=Sm(e),n=vm(e);return t%2==0&&n%2==0},zm=(e,t,n)=>!t||am.test(t)||Kp(e,n)||qp(e,n)?!0:pm(e,n,`*`),Bm=e=>{if(cm.test(e))return e;let t=Xp(e,$p);if(!t)return e;let n=t[2];return zm(e,n,e.lastIndexOf(t[1]))?e:xm(e)%2==1?Rm(e)?e:`${e}***`:e},Vm=/<[a-zA-Z/][^>]*$/,Hm=/[a-zA-Z/]/,Um=e=>e.includes(`$`)||e.includes(`\\(`)||e.includes(`\\[`),Wm=(e,t)=>{let n=e[t+1];return n!==void 0&&Hm.test(n)},Gm=e=>{let t=e.match(Vm);if(!t||t.index===void 0)return e;let n=Um(e);for(let r=t.index;r{let t=Op(e);if(t.openFence)return e;let n=t.openSpan;if(!n)return e;let r=e.slice(n.start+n.runLength);if(!r||am.test(r))return e;let i=0,a=e.length-1;for(;a>=0&&e[a]==="`";)i+=1,--a;return i>=n.runLength?e:e+"`".repeat(n.runLength-i)},qm=e=>Mp(e,`$`),Jm=e=>{let t=Op(e),n=0;for(let r=0;r{if(e.endsWith(`$`)&&!e.endsWith(`$$`))return`${e}$`;let t=e.indexOf(`$$`);return t!==-1&&e.indexOf(` +`,t)!==-1&&!e.endsWith(` +`)?`${e} +$$`:`${e}$$`},Xm=e=>qm(e)%2==0?e:Ym(e),Zm=e=>Jm(e)%2==1?`${e}$`:e,Qm=`streamdown:incomplete-image`,$m=(e,t,n)=>{if(e.substring(t+2).includes(`)`))return null;let r=um(e,t);if(r===-1||Kp(e,r))return null;let i=r>0&&e[r-1]===`!`,a=i?r-1:r,o=e.substring(0,a),s=e.substring(r+1,t);return i?`${o}![${s}](${Qm})`:n===`text-only`?`${o}${s}`:`${o}[${s}](streamdown:incomplete-link)`},eh=(e,t)=>{for(let n=0;n0&&e[n-1]===`!`)continue;let t=dm(e,n);if(t===-1)return n;if(t+1{let r=t>0&&e[t-1]===`!`,i=r?t-1:t;if(!e.substring(t+1).includes(`]`)||dm(e,t)===-1){let a=e.substring(0,i);if(r)return`${a}![${e.substring(t+1)}](${Qm})`;if(n===`text-only`){let n=eh(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}return null},nh=(e,t)=>{let n=e.lastIndexOf(`](`);if(n!==-1&&!Kp(e,n)){let r=$m(e,n,t);if(r!==null)return r}for(let n=e.lastIndexOf(`[`);n!==-1;n=n===0?-1:e.lastIndexOf(`[`,n-1))if(!Kp(e,n)){let r=th(e,n,t);if(r!==null)return r}return e},rh=32,ih=(e,t=`protocol`)=>{let n=e;for(let e=0;e=n.length)return e;n=e}return n},ah=/^-{1,2}$/,oh=/^[\s]*-{1,2}[\s]+$/,sh=/^={1,2}$/,ch=/^[\s]*={1,2}[\s]+$/,lh=e=>{if(!e||typeof e!=`string`)return e;let t=e.lastIndexOf(` +`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(ah.test(i)&&!n.match(oh)){let t=r.split(` +`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}if(sh.test(i)&&!n.match(ch)){let t=r.split(` +`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}return e},uh=/([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu,dh=e=>!e||typeof e!=`string`||!e.includes(`~`)?e:e.replace(uh,(t,n,r)=>Kp(e,r+n.length)?t:`${n}\\~`),fh=e=>Mp(e,`~`),ph=e=>{let t=Xp(e,nm);if(t){let n=t[2];if(!n||am.test(n))return e;let r=e.lastIndexOf(t[1]);if(Kp(e,r)||qp(e,r))return e;if(fh(e)%2==1)return`${e}~~`}else{let t=Xp(e,im);if(t){let n=e.lastIndexOf(t[0].slice(0,2));if(Kp(e,n)||qp(e,n))return e;if(fh(e)%2==1)return`${e}~`}}return e},mh=e=>e!==!1,hh=e=>e===!0,gh={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},_h=[{handler:{name:`singleTilde`,handle:dh,priority:gh.SINGLE_TILDE},optionKey:`singleTilde`},{handler:{name:`comparisonOperators`,handle:Yp,priority:gh.COMPARISON_OPERATORS},optionKey:`comparisonOperators`},{handler:{name:`htmlTags`,handle:Gm,priority:gh.HTML_TAGS},optionKey:`htmlTags`},{handler:{name:`setextHeadings`,handle:lh,priority:gh.SETEXT_HEADINGS},optionKey:`setextHeadings`},{handler:{name:`links`,handle:ih,priority:gh.LINKS},optionKey:`links`,earlyReturn:e=>e.endsWith(`](streamdown:incomplete-link)`)||e.endsWith(`](streamdown:incomplete-image)`)},{handler:{name:`boldItalic`,handle:Bm,priority:gh.BOLD_ITALIC},optionKey:`boldItalic`},{handler:{name:`bold`,handle:Om,priority:gh.BOLD},optionKey:`bold`},{handler:{name:`italicDoubleUnderscore`,handle:Am,priority:gh.ITALIC_DOUBLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`italicSingleAsterisk`,handle:Nm,priority:gh.ITALIC_SINGLE_ASTERISK},optionKey:`italic`},{handler:{name:`italicSingleUnderscore`,handle:Lm,priority:gh.ITALIC_SINGLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`inlineCode`,handle:Km,priority:gh.INLINE_CODE},optionKey:`inlineCode`},{handler:{name:`strikethrough`,handle:ph,priority:gh.STRIKETHROUGH},optionKey:`strikethrough`},{handler:{name:`katex`,handle:Xm,priority:gh.KATEX},optionKey:`katex`},{handler:{name:`inlineKatex`,handle:Zm,priority:gh.INLINE_KATEX},optionKey:`inlineKatex`}],vh=e=>{let t=e?.linkMode??`protocol`;return _h.filter(({handler:t,optionKey:n})=>t.name===`links`?mh(e?.links)||mh(e?.images):t.name===`inlineKatex`?hh(e?.inlineKatex):mh(e?.[n])).map(({handler:e,earlyReturn:n})=>e.name===`links`?{handler:up(lp({},e),{handle:e=>ih(e,t)}),earlyReturn:t===`protocol`?n:void 0}:{handler:e,earlyReturn:n})},yh=(e,t)=>{if(!e||typeof e!=`string`)return e;let n=e.endsWith(` `)&&!e.endsWith(` `)?e.slice(0,-1):e,r=vh(t),i=(t?.handlers??[]).map(e=>({handler:up(lp({},e),{priority:e.priority??gh.DEFAULT}),earlyReturn:void 0})),a=[...r,...i].sort((e,t)=>(e.handler.priority??0)-(t.handler.priority??0));try{for(let{handler:e,earlyReturn:t}of a)if(n=e.handle(n),t!=null&&t(n))return n;return n.endsWith(` `)&&!n.endsWith(` `)?n.slice(0,-1):n}finally{kp()}},bh=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xh=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Sh={};function Ch(e,t){return((t||Sh).jsx?xh:bh).test(e)}var wh=/[ \t\n\f\r]/g;function Th(e){return typeof e==`object`?e.type===`text`&&Eh(e.value):Eh(e)}function Eh(e){return e.replace(wh,``)===``}var Dh=a(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(` +`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Oh=a(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(Dh());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),kh=a((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Ah=a(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Oh()),i=kh();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a}));function jh(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Nh(e.position):`start`in e||`end`in e?Nh(e):`line`in e||`column`in e?Mh(e):``}function Mh(e){return Ph(e&&e.line)+`:`+Ph(e&&e.column)}function Nh(e){return Mh(e&&e.start)+`-`+Mh(e&&e.end)}function Ph(e){return e&&typeof e==`number`?e:1}var Fh=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=jh(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Fh.prototype.file=``,Fh.prototype.name=``,Fh.prototype.reason=``,Fh.prototype.message=``,Fh.prototype.stack=``,Fh.prototype.column=void 0,Fh.prototype.line=void 0,Fh.prototype.ancestors=void 0,Fh.prototype.cause=void 0,Fh.prototype.fatal=void 0,Fh.prototype.place=void 0,Fh.prototype.ruleId=void 0,Fh.prototype.source=void 0;var Ih=i(Ah(),1),Lh={}.hasOwnProperty,Rh=new Map,zh=/[A-Z]/g,Bh=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Vh=new Set([`td`,`th`]),Hh=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Uh(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=eg(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=$h(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?tn:en,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Wh(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Wh(e,t,n){if(t.type===`element`)return Gh(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Kh(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Jh(e,t,n);if(t.type===`mdxjsEsm`)return qh(e,t);if(t.type===`root`)return Yh(e,t,n);if(t.type===`text`)return Xh(e,t)}function Gh(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=tn,e.schema=i),e.ancestors.push(t);let a=og(e,t.tagName,!1),o=tg(e,t),s=rg(e,t);return Bh.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Th(e)})),Zh(e,o,a,t),Qh(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Kh(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}sg(e,t.position)}function qh(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);sg(e,t.position)}function Jh(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=tn,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:og(e,t.name,!0),o=ng(e,t),s=rg(e,t);return Zh(e,o,a,t),Qh(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Yh(e,t,n){let r={};return Qh(r,rg(e,t)),e.create(t,e.Fragment,r,n)}function Xh(e,t){return t.value}function Zh(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Qh(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function $h(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function eg(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=$o(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function tg(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Lh.call(t.properties,i)){let a=ig(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Vh.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function ng(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else sg(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else sg(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function rg(e,t){let n=[],r=-1,i=e.passKeys?new Map:Rh;for(;++ro))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;er;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function _g(e,t,n){return q(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var vg={tokenize:yg};function yg(e){let t=this,n=e.attempt($u,r,e.attempt(this.parser.constructs.flowInitial,i,q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Td,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var bg={resolveAll:wg()},xg=Cg(`string`),Sg=Cg(`text`);function Cg(e){return{resolveAll:wg(e===`text`?Tg:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++iPg,contentInitial:()=>Og,disable:()=>Fg,document:()=>Dg,flow:()=>Ag,flowInitial:()=>kg,insideSpan:()=>Ng,string:()=>jg,text:()=>Mg}),Dg={42:yf,43:yf,45:yf,48:yf,49:yf,50:yf,51:yf,52:yf,53:yf,54:yf,55:yf,56:yf,57:yf,62:td},Og={91:Pd},kg={[-2]:pd,[-1]:pd,32:pd},Ag={35:Bd,42:_f,45:[Df,_f],60:Gd,61:Df,95:_f,96:ud,126:ud},jg={38:sd,92:ad},Mg={[-5]:hf,[-4]:hf,[-3]:hf,33:df,38:sd,42:qu,60:[Zu,Qd],91:pf,92:[Rd,ad],93:ef,95:qu,96:_d},Ng={null:[qu,bg]},Pg={null:[42,95]},Fg={null:[]};function Ig(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=gu(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Ku(a,l.events,l),l.events):[]}function f(e,t){return Rg(p(e),t)}function p(e){return Lg(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Rg(e,t){let n=-1,r=[],i;for(;++n0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Yg).call(a,void 0,e[0])}for(r.position={start:Kg(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Kg(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function e_(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function t_(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function n_(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Gu(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function r_(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function i_(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function a_(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function o_(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return a_(e,t);let i={src:Gu(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function s_(e,t){let n={src:Gu(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function c_(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function l_(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return a_(e,t);let i={href:Gu(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function u_(e,t){let n={href:Gu(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function d_(e,t,n){let r=e.all(t),i=n?f_(n):p_(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s1}function m_(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=$o(t.children[1]),o=Qo(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function y_(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(w_(t.slice(i),i>0,!1)),a.join(``)}function w_(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===x_||t===S_;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===x_||t===S_;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function T_(e,t){let n={type:`text`,value:C_(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function E_(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var D_={blockquote:Zg,break:Qg,code:$g,delete:e_,emphasis:t_,footnoteReference:n_,heading:r_,html:i_,imageReference:o_,image:s_,inlineCode:c_,linkReference:l_,link:u_,listItem:d_,list:m_,paragraph:h_,root:g_,strong:__,table:v_,tableCell:b_,tableRow:y_,text:T_,thematicBreak:E_,toml:O_,yaml:O_,definition:O_,footnoteDefinition:O_};function O_(){}function k_(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function A_(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function j_(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||k_,r=e.options.footnoteBackLabel||A_,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Ct(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:` +`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:` +`}]}}var M_={}.hasOwnProperty,N_={};function P_(e,t){let n=t||N_,r=new Map,i=new Map,a={all:s,applyData:I_,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...D_,...n.handlers},one:o,options:n,patch:F_,wrap:R_};return $e(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(M_.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Ct(n);return r.children=a.all(e),r}return Ct(e)}return(a.options.unknownHandler||L_)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r0&&n.push({type:`text`,value:` +`}),n}function z_(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function B_(e,t){let n=P_(e,t),r=n.one(e,void 0),i=j_(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` +`},i)),a}function V_(e,t){return e&&`run`in e?async function(n,r){let i=B_(n,{file:r,...t});await e.run(i,r)}:function(n,r){return B_(n,{file:r,...e||t})}}function H_(e){if(e)throw e}var U_=a(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});ft.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var q_={basename:J_,dirname:Y_,extname:X_,join:Z_,sep:`/`};function J_(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);ev(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Y_(e){if(ev(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function X_(e){ev(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Z_(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function $_(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function ev(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var tv={cwd:nv};function nv(){return`/`}function rv(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function iv(e){if(typeof e==`string`)e=new URL(e);else if(!rv(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return av(e)}function av(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n0){let[r,...a]=t,o=n[i][1];W_(o)&&W_(r)&&(r=(0,pv.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function gv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function _v(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function vv(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function yv(e){if(!W_(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function bv(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function xv(e){return Sv(e)?e:new sv(e)}function Sv(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Cv(e){return typeof e==`string`||wv(e)}function wv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Y=l(),Tv=i(Ee(),1);function Ev(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Dv=Ev();function Ov(e){Dv=e}var kv={exec:()=>null};function Av(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function X(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Mv.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var jv=((e=``)=>{try{return!!RegExp(`(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\][ \t]+\S/,listReplaceTask:/^\[[ xX]\][ \t]+/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Av(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Av(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Av(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Av(e=>RegExp(`^ {0,${e}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:Av(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Av(e=>RegExp(`^ {0,${e}}(?:)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|RegExp(`^ {0,${e}}>`)),nestedContainerMarkers:/^(?: {0,3}(?:(?:[*+-]|\d{1,9}[.)])[ \t]+|>[ \t]?))+/},Nv=/^(?:[ \t]*(?:\n|$))+/,Pv=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Fv=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*) *(?=\n|$)|$)/,Iv=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Lv=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Rv=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,zv=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/,Bv=X(zv).replace(/bull/g,Rv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Vv=X(zv).replace(/bull/g,Rv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Hv=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Uv=/^[^\n]+/,Wv=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/,Gv=X(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Wv).replace(`title`,/(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(),Kv=X(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Rv).getRegex(),qv=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Jv=/|$))/,Yv=X(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|[^\\n]*\\n*|$)|[^\\n]*\\n*|$)||$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Jv).replace(`tag`,qv).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xv=e=>X(Hv).replace(`hr`,Iv).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,` {0,3}(?:)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?| ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Qv).getRegex(),code:Pv,def:Gv,fences:Fv,heading:Lv,hr:Iv,html:Yv,lheading:Bv,list:Kv,newline:Nv,paragraph:Zv,table:kv,text:Uv},ey=X(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Iv).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,` {0,3}(?:)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,` {0,3}(?:)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|(?: *\\n{2,}|\\s*$)|\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace(`comment`,Jv).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:kv,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:X(Hv).replace(`hr`,Iv).replace(`heading`,` *#{1,6} *[^ +]`).replace(`lheading`,Bv).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},ry=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,iy=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ay=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,oy=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,jv?"(?`+)[^`]+\k(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),gy=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,_y=X(gy,`u`).replace(/punct/g,sy).getRegex(),vy=X(gy,`u`).replace(/punct/g,fy).getRegex(),yy=X(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,dy).replace(/punct/g,sy).getRegex(),by=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,xy=X(by,`gu`).replace(/notPunctSpace/g,ly).replace(/punctSpace/g,cy).replace(/punct/g,sy).getRegex(),Sy=X(by,`gu`).replace(/notPunctSpace/g,my).replace(/punctSpace/g,py).replace(/punct/g,fy).getRegex(),Cy=X(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,ly).replace(/punctSpace/g,cy).replace(/punct/g,sy).getRegex(),wy=X(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,ly).replace(/punctSpace/g,cy).replace(/punct/g,sy).getRegex(),Ty=X(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,ly).replace(/punctSpace/g,cy).replace(/punct/g,sy).getRegex(),Ey=X(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,sy).getRegex(),Dy=X(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,ly).replace(/punctSpace/g,cy).replace(/punct/g,sy).getRegex(),Oy=X(/\\(punct)/,`gu`).replace(/punct/g,sy).getRegex(),ky=X(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,`gu`).replace(/punct/g,sy).getRegex(),Ay=X(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),jy=X(Jv).replace(`(?:-->|$)`,`-->`).getRegex(),My=X(`^comment|^|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^`).replace(`comment`,jy).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ny=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Py=X(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,Ny).getRegex(),Fy=X(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace(`label`,Py).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(),Iy=X(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Py).replace(`ref`,Wv).getRegex(),Ly=X(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Wv).getRegex(),Ry=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,zy=X(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,Ny).getRegex(),By=X(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,X(/^!?\[(label)\]\[(ref)\]/).replace(`label`,zy).replace(`ref`,Ry).getRegex()).replace(`nolink`,X(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Ry).getRegex()).getRegex(),Vy=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Hy=X(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),Uy={_backpedal:kv,anyPunctuation:Oy,anyPunctuationOutsideCode:ky,autolink:Ay,blockSkip:hy,br:ay,code:iy,del:kv,delLDelim:kv,delRDelim:kv,emStrongLDelim:_y,emStrongRDelimAst:xy,emStrongRDelimUnd:wy,escape:ry,link:Fy,nolink:Ly,punctuation:uy,reflink:Iy,reflinkSearch:By,tag:My,text:oy,url:kv},Wy={...Uy,emStrongLDelim:yy,emStrongRDelimAst:Cy,emStrongRDelimUnd:Ty,link:X(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Py).getRegex(),reflink:X(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Py).getRegex()},Gy={...Uy,emStrongRDelimAst:Sy,emStrongLDelim:vy,delLDelim:Ey,delRDelim:Dy,url:X(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,Hy).replace(`protocol`,Vy).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:X(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":`>`,'"':`"`,"'":`'`},Xy=e=>Yy[e];function Zy(e,t){if(t){if(Mv.escapeTest.test(e))return e.replace(Mv.escapeReplace,Xy)}else if(Mv.escapeTestNoEncode.test(e))return e.replace(Mv.escapeReplaceNoEncode,Xy);return e}function Qy(e){return Mv.numericCharacterReference.test(e)?e.replace(Mv.numericCharacterReferenceOrAmpersand,(e,t,n)=>{if(t===void 0&&n===void 0)return`&`;let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:r===38?`&`:String.fromCodePoint(r)}):e}function $y(e){try{e=encodeURI(e).replace(Mv.percentDecode,`%`)}catch{return null}return e}function eb(e,t){let n=e.replace(Mv.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Mv.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length=0&&Mv.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(` +`)}function rb(e){return e.trim().replace(Mv.multipleSpaceGlobal,` `).toLowerCase().toUpperCase().toLowerCase()}function ib(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r0?-2:-1}var ab=new WeakMap;function ob(e){let t={"*":-1,_:-1},n=-1,r=e.length;for(let i=0;i{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(` +`)}function mb(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;it.length-i)return!0;i+=o[0].length-1}}return!1}var hb=class{options;rules;lexer;constructor(e){this.options=e||Dv}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:nb(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=pb(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=tb(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:tb(t[0],` +`),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:tb(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=tb(t[0],` +`).split(` +`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;ot+db(n,t.length)).replace(this.rules.other.blockquoteSetextReplace,` + $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n} +${s}`:s,r=r?`${r} +${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`||u?.type===`heading`||u?.type===`hr`||u?.type===`html`||u?.type===`table`)break;if(u?.type===`blockquote`){let t=u,a=e.join(` +`),o=t.raw+` +`+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s;let c=o.substring(s.raw.length).replace(/^\n/,``),l=c?c.split(` +`).length:0,d=l?e.slice(0,-l):e;if(d.length>0&&(n=`${n} +${d.join(` +`)}`),r=r.substring(0,r.length-t.text.length)+s.text,e=e.slice(d.length),e.length>0&&this.rules.other.blockquoteStart.test(e[0]))continue;break}if(u?.type===`list`){let t=u,a=t.raw+` +`+e.join(` +`),o=this.list(a);i[i.length-1]=o;let s=o.raw.length>t.raw.length?a.slice(t.raw.length+1,o.raw.length).split(` +`).length:0;if(s>0){let t=e.slice(0,s).join(` +`);n=`${n} +${t}`,r=`${r} +${t}`}e=e.slice(s)}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){if(!this.options.pedantic&&this.lexer.state.lastToken?.type===`text`&&!this.rules.other.listInterruptsParagraph.test(e))return;let n=e,r=()=>n.length-e.length,i=t[1].trim(),a=i.length>1,o={type:`list`,raw:``,ordered:a,start:a?+i.slice(0,-1):``,loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:`[*+-]`);let s=this.rules.other.listItemRegex(i),c=!1;for(;e;){let i=!1,a=``;if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;let l=r();e=e.substring(t[0].length);let u=t[2].split(` +`,1)[0],d=t[1].length,f=this.options.pedantic?db(u,d):u.replace(this.rules.other.leadingSpaceTab,e=>db(e,d)),p=e.split(` +`,1)[0],m=!f.trim(),h=0;if(this.options.pedantic?(h=2,a=f.trimStart()):m?h=d+1:(h=f.search(this.rules.other.nonSpaceChar),h=h>4?1:h,a=f.slice(h),h+=d),m&&this.rules.other.blankLine.test(p)&&(e=e.substring(p.length+1),i=!0),!i){let t=this.rules.other.nextBulletRegex(h),n=this.rules.other.hrRegex(h),r=this.rules.other.fencesBeginRegex(h),i=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(h):this.rules.other.headingBeginRegex(h),o=this.rules.other.htmlBeginRegex(h),s=this.rules.other.blockquoteBeginRegex(h),c=!1;for(;e;){let l=e.split(` +`,1)[0],u;if(p=l,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting,` `),u=p):u=p.replace(this.rules.other.leadingSpaceTab,e=>db(e)),r.test(p)||i.test(p)||o.test(p)||s.test(p)||t.test(p)||n.test(p))break;if(u.search(this.rules.other.nonSpaceChar)>=h||!p.trim())a+=` +`+u.slice(h),c=!1;else{if(m||f.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||r.test(f)||i.test(f)||o.test(f)||n.test(f))break;if(!this.options.pedantic&&!c){let e=f.replace(this.rules.other.nestedContainerMarkers,``);if(this.rules.block.fences.test(e)||this.rules.block.heading.test(e)||this.rules.block.hr.test(e))break}let e=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(p)&&this.rules.block.lheading.test(`${f} +${p}`)?` ${u.replace(/^ {0,3}/,``)}`:p;a+=` +`+e,c=!0}m=!p.trim(),e=e.substring(l.length+1),f=u.slice(h)}}let g=n.slice(l,r());o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(c=!0)),o.items.push({type:`list_item`,raw:g,task:!!this.options.gfm&&this.rules.other.listIsTask.test(a),loose:!1,text:a,tokens:[]})}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=n.slice(0,r()).trimEnd();for(let e of o.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!o.loose){let t=e.tokens.filter(e=>e.type===`space`);o.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of o.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,o.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(o.loose)for(let e of o.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return o}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=nb(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&ib(t[2],`()`)!==-1)return;let e=rb(t[1]),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:tb(t[0],` +`),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=eb(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(` +`):[],a={type:`table`,raw:tb(t[0],` +`),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:tb(t[0],` +`),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&mb(e,t[1],n,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=tb(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=ib(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let i=tb(t[0].slice(0,-1),`\\`);if((t[0].length-i.length)%2==0)return;let a=t[2],o=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(a);e&&(a=e[1],o=e[3])}else o=t[3]?t[3].slice(1,-1):``;return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(a=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?a.slice(1):a.slice(1,-1)),fb(t,{href:a&&a.replace(this.rules.inline.anyPunctuation,`$1`),title:o&&o.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&mb(e,n[1],r,this.rules))return;let i=t[rb(n[2]||n[1])];if(!i){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return fb(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||!r[1]&&!r[2]&&!r[3]&&!r[4])return;let i=r[0][0],a=n===i,o=t.length-e.length,s=o;for(;!this.options.pedantic&&s>0&&t[s-1]===i;)s--;let c=[...t.slice(Math.max(0,s-2),s)].at(-1)??``,l=c===`*`||c===`_`||!!this.rules.inline.punctuation.exec(c);sb);){if(u=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!u)continue;if(f=[...u].length,r[3]||r[4]){p+=f;continue}if(r[5]||r[6]||g){if(a&&(r[5]||r[6]))break;if(h%3&&!((h+f)%3)){m+=f;continue}}if(p-=f,p>0)continue;f=Math.min(f,f+p+m);let t=[...r[0]][0].length,i=e.slice(0,n+r.index+t+f);if(Math.min(n,f)%2){let e=i.slice(1,-1);return{type:`em`,raw:i,text:e,tokens:this.lexer.inlineTokens(e)}}let o=i.slice(2,-2);return{type:`strong`,raw:i,text:o,tokens:this.lexer.inlineTokens(o)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim,c=ub(this,t),l=t.length-e.length+n;if(cu);){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:e?t[0]:Qy(t[0]),escaped:e}}}},gb=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Dv,this.options.tokenizer=this.options.tokenizer||new hb,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:Mv,block:qy.normal,inline:Jy.normal};this.options.pedantic?(t.block=qy.pedantic,t.inline=Jy.pedantic):this.options.gfm&&(t.block=qy.gfm,t.inline=this.options.breaks?Jy.breaks:Jy.gfm),this.tokenizer.rules=t}static get rules(){return{block:qy,inline:Jy}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Mv.carriageReturn,` +`),this.blockTokens(e,this.tokens);for(let e=0;e(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=` +`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(` +`)?``:` +`)+r.raw,n.text+=` +`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if((r=this.tokenizer.fences(e))||(r=this.tokenizer.heading(e))||(r=this.tokenizer.hr(e))||(r=this.tokenizer.blockquote(e))||(r=this.tokenizer.list(e))||(r=this.tokenizer.html(e))){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(` +`)?``:` +`)+r.raw,n.text+=` +`+r.raw,this.inlineQueue.at(-1).src=n.text):(this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}),t.push(r));continue}if((r=this.tokenizer.table(e))||(r=this.tokenizer.lheading(e))){e=e.substring(r.raw.length),t.push(r);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(a))){let i=t.at(-1);n&&i?.type===`paragraph`?(i.raw+=(i.raw.endsWith(` +`)?``:` +`)+r.raw,i.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(r),n=a.length!==e.length,e=e.substring(r.raw.length)}else if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(` +`)?``:` +`)+r.raw,n.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,this.state.lastToken=r,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,rb(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(`)`);try{return this.#e(e,t)}finally{this.state.linkParenPossible=n}}#e(e,t){let n=e.includes(`*`)||e.includes(`_`)||e.includes(`~`)||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==hb.prototype.emStrong||this.tokenizer.del!==hb.prototype.del?this.#r(e):e;sb(this.tokenizer,n);try{return this.#t(e,n,t)}finally{cb(this.tokenizer)}}#t(e,t,n){let r=!1,i=``,a=1/0;for(;e;){if(e.length(o=t.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if((o=this.tokenizer.escape(e))||(o=this.tokenizer.tag(e))||(o=this.tokenizer.link(e))){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let t=n.at(-1);o.type===`text`&&t?.type===`text`?(t.raw+=o.raw,t.text+=o.text):n.push(o);continue}if((o=this.tokenizer.emStrong(e,t,i))||(o=this.tokenizer.codespan(e))||(o=this.tokenizer.br(e))||(o=this.tokenizer.del(e,t,i))||(o=this.tokenizer.autolink(e))||!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),n.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let t=n.at(-1);t?.type===`text`?(t.raw+=o.raw,t.text+=o.text):n.push(o)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}#n(e){let{blockSkip:t,tag:n,autolink:r}=this.tokenizer.rules.inline,i=``,a=0,o;for(t.lastIndex=0;o=t.exec(e);){let s=o.index+(o[2]?o[2].length:0),c=o.index+o[0].length;if(e.charAt(s)===`<`){let i=e.slice(s),a=n.exec(i)||r.exec(i);if(!a){t.lastIndex=s+1;continue}c=s+a[0].length,t.lastIndex=c}i+=e.slice(a,s)+`[`+`a`.repeat(c-s-2)+`]`,a=c}return i+e.slice(a)}#r(e){let t=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,n=t=>{let r=t.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,rb(t.slice(r+1,-1))))return t;if(r>1&&t.charAt(0)!==`!`){let i=t.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,n)+`][`+`a`.repeat(t.length-r-2)+`]`}return`[`+`a`.repeat(t.length-2)+`]`};t=t.replace(e,n)}return t=t.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(e,t,n)=>n?`+`.repeat(e.length):t?t+e.slice(t.length,-t.length).replace(/`/g,`+`)+t:e),t=this.#n(t),t=this.options.hooks?.emStrongMask?.call({lexer:this},t)??t,t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},_b=class{options;parser;constructor(e){this.options=e||Dv}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Mv.notSpaceStart)?.[0],i=e?e.replace(Mv.endingNewline,``)+` +`:``;return r?`
`+(n?i:Zy(i,!0))+`
+`:`
`+(n?i:Zy(i,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t +`+r+` +`}listitem(e){return`
  • ${this.parser.parse(e.tokens)}
  • +`}checkbox({checked:e}){return` `}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    +`}table(e){let t=``,n=``;for(let t=0;t${r}`,` + +`+t+` +`+r+`
    +`}tablerow({text:e}){return` +${e} +`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${Zy(e,!0)}`}br(e){return`
    `}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?Zy(n,!0):this.parser.parseInline(r),o=$y(e);if(o===null)return a;e=Zy(o,i);let s=`
    `+a+``,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=$y(e);if(i===null)return Zy(n);e=i;let a=`${Zy(n)}`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Zy(e.text)}},vb=class{parser;strong({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}em({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}codespan({text:e}){return e}del({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}image({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}br(){return` +`}checkbox({raw:e}){return e}},yb=class e{options;renderer;textRenderer;constructor(e){this.options=e||Dv,this.options.renderer=this.options.renderer||new _b,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vb,this.textRenderer.parser=this}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n{let i=e[r].flat(1/0);xb(n,this.walkTokens(i,t))}):e.tokens&&xb(n,this.walkTokens(e.tokens,t))}}return n}use(...e){let t=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new _b(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n===!1?``:n??``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new hb(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new bb;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=bb.passThroughHooks.has(n)?e=>{if(t.options.async&&bb.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(t.options.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return xb(n,r.call(this,e)),t&&xb(n,t.call(this,e)),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return gb.lex(e,t??this.defaults)}parser(e,t){return yb.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?gb.lex:gb.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?yb.parse:yb.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?gb.lex:gb.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?yb.parse:yb.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let e=`

    An error occurred:

    `+Zy(n.message+``,!0)+`
    `;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Z(e,t){return Sb.parse(e,t)}Z.options=Z.setOptions=function(e){return Sb.setOptions(e),Z.defaults=Sb.defaults,Ov(Z.defaults),Z},Z.getDefaults=Ev,Z.defaults=Dv;function Cb(...e){return Sb.use(...e),Z.defaults=Sb.defaults,Ov(Z.defaults),Z}Z.use=Cb,Z.walkTokens=function(e,t){return Sb.walkTokens(e,t)},Z.parseInline=Sb.parseInline,Z.Parser=yb,Z.parser=yb.parse,Z.Renderer=_b,Z.TextRenderer=vb,Z.Lexer=gb,Z.lexer=gb.lex,Z.Tokenizer=hb,Z.Hooks=bb,Z.parse=Z,Z.options,Z.setOptions,Z.walkTokens,Z.parseInline,yb.parse,gb.lex;var wb=300,Tb=`300px`,Eb=500;function Db(e={}){let{immediate:t=!1,debounceDelay:n=wb,rootMargin:r=Tb,idleTimeout:i=Eb}=e,[a,o]=(0,A.useState)(!1),s=(0,A.useRef)(null),c=(0,A.useRef)(null),l=(0,A.useRef)(null),u=(0,A.useMemo)(()=>e=>{let t=Date.now();return window.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)},[]),d=(0,A.useMemo)(()=>typeof window<`u`&&window.requestIdleCallback?(e,t)=>window.requestIdleCallback(e,t):u,[u]),f=(0,A.useMemo)(()=>typeof window<`u`&&window.cancelIdleCallback?e=>window.cancelIdleCallback(e):e=>{clearTimeout(e)},[]);return(0,A.useEffect)(()=>{if(t){o(!0);return}let e=s.current;if(!e)return;c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null);let a=()=>{c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null)},u=e=>{l.current=d(t=>{t.timeRemaining()>0||t.didTimeout?(o(!0),e.disconnect()):l.current=d(()=>{o(!0),e.disconnect()},{timeout:i/2})},{timeout:i})},p=e=>{a(),c.current=window.setTimeout(()=>{var t;let n=e.takeRecords();(n.length===0||(t=n.at(-1)?.isIntersecting)!=null&&t)&&u(e)},n)},m=(e,t)=>{e.isIntersecting?p(t):a()},h=new IntersectionObserver(e=>{for(let t of e)m(t,h)},{rootMargin:r,threshold:0});return h.observe(e),()=>{c.current&&clearTimeout(c.current),l.current&&f(l.current),h.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:s}}var Ob=320,kb=4,Ab=()=>typeof performance>`u`?Date.now():performance.now();function jb(e){let t=e?.now??Ab,n=e?.maxBacklogMs??Ob,r=0,i=0;return{now:t,beginPass(e){i=Math.min(Math.max(r,e),e+n)},mark(){return i},rewind(e){i=e},take(e,t,r){if(e<=0)return{baseDelay:0,step:Math.max(0,t)};let a=Math.max(0,t),o=a===0?0:Math.min(a,kb),s=Math.max(i,r),c=r+n,l=s+Math.max(0,e-1)*a,u=a;if(l>c&&e>1){if(stypeof e==`object`&&!!e&&`type`in e&&e.type===`element`,Rb=e=>e.some(e=>Lb(e)&&Fb.has(e.tagName)),zb=e=>{for(let t=e.length-1;t>=0;t--){let n=e[t];if(Lb(n)&&n.tagName===`li`)return n}},Bb=(e,t,n,r)=>{e.properties??={},e.properties[`data-sd-animate-marker`]=!0;let i=typeof e.properties.style==`string`?`${e.properties.style};`:``;e.properties.style=`${i}--sd-marker-duration:${t}ms;--sd-marker-delay:${Math.round(n)}ms;--sd-marker-easing:${r}`},Vb=new Set([`ul`,`ol`,`li`]),Hb=e=>{for(let t of e.children)if(Lb(t)){if(t.tagName===`input`)return t;if(Vb.has(t.tagName))continue;let e=Hb(t);if(e)return e}},Ub=(e,t,n,r)=>{e.properties??={},e.properties[`data-sd-animate`]=!0;let i=typeof e.properties.style==`string`?`${e.properties.style};`:``;e.properties.style=`${i}--sd-animation:sd-${t.animation};--sd-duration:${n}ms;--sd-easing:${t.easing};--sd-delay:${Math.round(r)}ms`},Wb=(e,t,n,r)=>{let i=Hb(e);i&&Ub(i,t,n,r)},Gb=(e,t,n,r,i,a)=>{if(Rb(t))return;let o=r.prevContentLength,s=i.count;i.count+=1;let c=o>0&&s{var t;for(let n=e.length-1;n>=0;--n){let r=e[n];if(Lb(r)){if((t=r.properties)!=null&&t[`data-sd-animated`])break;r.properties={...r.properties,"data-sd-animated":!0}}}},qb=e=>{let t=[],n=``,r=!1,i=!1;for(let a of e){let e=Mb.test(a),o=!e&&Nb.test(a);if(!e&&n!==``&&(o||i))t.push(n),n=``,r=!1;else if(e!==r&&n){if(e){n+=a,r=!0;continue}t.push(n),n=``}n+=a,r=e,i=o}return n&&t.push(n),t},Jb=e=>{let t=[],n=``;for(let r of e)Mb.test(r)?t.length>0&&!Pb.test(t.at(-1))?t[t.length-1]+=r:n+=r:(n&&=(t.push(n),``),t.push(r));return n&&(t.length>0?t[t.length-1]+=n:t.push(n)),t},Yb=/^[^\s;:'"\\/](?:[^;:'"\\/\r\n]*[^\s;:'"\\/])?$/,Xb=(e,t,n,r)=>{let i=`sd-${t.animation}`,a=`${n?0:t.duration}ms`,o;return t.styleObjects?(o={"--sd-animation":i,"--sd-duration":a,"--sd-easing":t.easing},r&&(o[`--sd-delay`]=`${Math.round(r)}ms`)):(o=`--sd-animation:${i};--sd-duration:${a};--sd-easing:${t.easing}`,r&&(o+=`;--sd-delay:${Math.round(r)}ms`)),{type:`element`,tagName:`span`,properties:{"data-sd-animate":!0,style:o},children:[{type:`text`,value:e}]}},Zb=(e,t)=>!(e>0&&tLb(e)&&Ib.has(e.tagName),$b=(e,t,n)=>{let r=0,i=0;return Ze(e,e=>e.type===`text`||Qb(e),(e,a)=>{if(Rb(a))return Xe;if(Qb(e)){Zb(n,i)&&(r+=1),i+=1;return}let o=e.value;if(!o.trim()){i+=o.length;return}let s=t.sep===`char`?Jb(o):qb(o);for(let e of s){let t=i;i+=e.length,!Pb.test(e)&&Zb(n,t)&&(r+=1)}}),r},ex=(e,t,n,r,i,a)=>{var o;let s=t.at(-1);if(!(s&&`children`in s))return;if(Rb(t))return Xe;let c=s,l=c.children.indexOf(e);if(l===-1)return;let u=e.value;if(!u.trim()){i.count+=u.length;return}let d=n.sep===`char`?Jb(u):qb(u),f=r.prevContentLength,p=!1,m=zb(t),h=!(!m||(o=m.properties)!=null&&o[`data-sd-animate-marker`]),g=!1,_=d.map(e=>{let t=i.count;if(i.count+=e.length,Pb.test(e))return{type:`text`,value:e};let r=f>0&&tix(e,!0);function ix(e,t){let n=e?.animation??`fadeIn`,r=e?.easing??`ease`,i={animation:n,duration:e?.duration??150,easing:r,sep:e?.sep??`word`,stagger:e?.stagger??40,styleObjects:t&&Yb.test(n)&&Yb.test(r),timeline:e?.timeline},a={committedCharCount:0,prevContentLength:0,lastRenderCharCount:0,pendingMark:null},o=tx++,s=()=>e=>{let t={count:0,newIndex:0};a.prevContentLength=a.committedCharCount;let n=i.timeline,r=n?.now()??Ab();n&&(a.pendingMark===null?a.pendingMark=n.mark():n.rewind(a.pendingMark));let o=n?n.take($b(e,i,a.prevContentLength),i.stagger,r):{baseDelay:0,step:i.stagger};Ze(e,e=>e.type===`text`||Qb(e),(e,n)=>{if(e.type===`text`)return ex(e,n,i,a,t,o);Gb(e,n,i,a,t,o)}),a.lastRenderCharCount=t.count,a.prevContentLength=0};return Object.defineProperty(s,"name",{value:`rehypeAnimate$${o}`}),{name:`animate`,type:`animate`,rehypePlugin:s,setPrevContentLength(e){a.committedCharCount=e,a.prevContentLength=e},getLastRenderCharCount(){return a.lastRenderCharCount},commit(){a.committedCharCount=a.lastRenderCharCount,a.pendingMark=null}}}nx();var ax=(0,A.createContext)(!1),ox=()=>(0,A.useContext)(ax),sx=(...e)=>we(Te(e)),cx=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(t=>t.startsWith(n)?t:`${e}:${t}`).join(` `)},lx=e=>e?(...t)=>cx(e,we(Te(t))):sx,ux=(e,t,n)=>{let r=typeof t==`string`&&n.startsWith(`text/csv`)?``:``,i=typeof t==`string`?new Blob([r+t],{type:n}):t,a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},dx=(0,A.createContext)(sx),Q=()=>(0,A.useContext)(dx),fx=8,px=e=>{if(e!==void 0&&e!==0&&e!==1/0){if(typeof e==`number`)return Number.isFinite(e)&&e>0?`${e}px`:void 0;if(e!==`0`&&e!==`none`&&e!==`Infinity`)return e}},mx=(e,t,n)=>{let r=(0,A.useRef)(null),i=(0,A.useRef)(!0),a=(0,A.useRef)(!1),o=(0,A.useRef)(null);return(0,A.useEffect)(()=>{let e=r.current;if(!(e&&t))return;let n=()=>{let t=e.scrollHeight-e.scrollTop-e.clientHeighte.removeEventListener(`scroll`,n)},[t]),(0,A.useEffect)(()=>{e&&!a.current&&(i.current=!0),e||(i.current=!0),a.current=e},[e]),(0,A.useEffect)(()=>()=>{o.current!==null&&cancelAnimationFrame(o.current)},[]),(0,A.useEffect)(()=>{let n=r.current;!(n&&t&&e&&i.current)||o.current!==null||(o.current=requestAnimationFrame(()=>{o.current=null,i.current&&n.scrollTo({top:n.scrollHeight,behavior:`instant`})}))},[e,t,n]),r},hx=sx(`block`),gx=sx(`block`,`before:content-[counter(line)]`,`before:inline-block`,`before:[counter-increment:line]`,`before:w-6`,`before:mr-4`,`before:text-[13px]`,`before:text-right`,`before:text-muted-foreground/50`,`before:font-mono`,`before:select-none`),_x=e=>{let t={};for(let n of e.split(`;`)){let e=n.indexOf(`:`);if(e>0){let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();r&&i&&(t[r]=i)}}return t},vx=(0,A.memo)(({children:e,result:t,language:n,className:r,maxHeight:i,startLine:a,lineNumbers:o=!0,...s})=>{let c=Q(),{isAnimating:l}=(0,A.useContext)(Nw),u=px(i),d=mx(l,!!u,t),f=(0,A.useMemo)(()=>c(gx),[c]),p=(0,A.useMemo)(()=>c(hx),[c]),m=(0,A.useMemo)(()=>{let e={};return t.bg&&(e[`--sdm-bg`]=t.bg),t.fg&&(e[`--sdm-fg`]=t.fg),t.rootStyle&&Object.assign(e,_x(t.rootStyle)),e},[t.bg,t.fg,t.rootStyle]);return(0,Y.jsx)(`div`,{className:c(r,u?`overflow-y-auto`:null,`overflow-x-auto rounded-md border border-border bg-background p-4 text-sm`),"data-language":n,"data-streamdown":`code-block-body`,ref:d,style:u?{maxHeight:u}:void 0,...s,children:(0,Y.jsx)(`pre`,{className:c(r,`bg-[var(--sdm-bg,inherit)]`,`dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit))]`),style:m,children:(0,Y.jsx)(`code`,{className:o?c(`[counter-increment:line_0] [counter-reset:line]`):void 0,style:o&&a&&a>1?{counterReset:`line ${a-1}`}:void 0,children:t.tokens.map((e,t)=>(0,Y.jsx)(`span`,{className:o?f:p,children:e.length===0||e.length===1&&e[0].content===``?` +`:e.map((e,t)=>{let n={},r=!!e.bgColor;if(e.color&&(n[`--sdm-c`]=e.color),e.bgColor&&(n[`--sdm-tbg`]=e.bgColor),e.htmlStyle)for(let[t,i]of Object.entries(e.htmlStyle))t===`color`?n[`--sdm-c`]=i:t===`background-color`?(n[`--sdm-tbg`]=i,r=!0):n[t]=i;return(0,Y.jsx)(`span`,{className:c(`text-[var(--sdm-c,inherit)]`,`dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]`,r&&`bg-[var(--sdm-tbg)]`,r&&`dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]`),style:n,...e.htmlAttrs,children:e.content},t)})},t))})})})}),yx=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let a=Q();return(0,Y.jsx)(`div`,{className:a(`relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":`code-block`,style:{contentVisibility:`auto`,containIntrinsicSize:`auto 200px`,...n},...i})},bx=(0,A.createContext)({code:``}),xx=()=>(0,A.useContext)(bx),Sx=({language:e})=>{let t=Q();return(0,Y.jsx)(`div`,{className:t(`flex h-8 items-center text-muted-foreground text-xs`),"data-language":e,"data-streamdown":`code-block-header`,children:(0,Y.jsx)(`span`,{className:t(`ml-1 font-mono lowercase`),children:e})})},Cx=e=>{let t=e.length;for(;t>0&&e[t-1]===` +`;)t--;return e.slice(0,t)},wx=(0,A.lazy)(()=>p(()=>import(`./highlighted-body-JLMTFACH-DAcfQXX-.js`).then(e=>({default:e.HighlightedCodeBlockBody})),__vite__mapDeps([0,1]),import.meta.url)),Tx=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:o,...s})=>{let c=Q(),{codeBlockMaxHeight:l}=(0,A.useContext)(Nw),u=(0,A.useMemo)(()=>Cx(e),[e]),d=(0,A.useMemo)(()=>({bg:`transparent`,fg:`inherit`,tokens:u.split(` +`).map(e=>[{content:e,color:`inherit`,bgColor:`transparent`,htmlStyle:{},offset:0}])}),[u]);return(0,Y.jsx)(bx.Provider,{value:{code:e},children:(0,Y.jsxs)(yx,{dir:`ltr`,isIncomplete:i,language:t,children:[(0,Y.jsx)(Sx,{language:t}),r?(0,Y.jsx)(`div`,{className:c(`pointer-events-none absolute top-2 right-2 z-10 flex items-center`),children:(0,Y.jsx)(`div`,{className:c(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`code-block-actions`,children:r})}):null,(0,Y.jsx)(A.Suspense,{fallback:(0,Y.jsx)(vx,{className:n,language:t,lineNumbers:o,maxHeight:l,result:d,startLine:a,...s}),children:(0,Y.jsx)(wx,{className:n,code:u,isIncomplete:i,language:t,lineNumbers:o,maxHeight:l,raw:d,startLine:a,...s})})]})})},Ex={CheckIcon:e=>(0,Y.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,Y.jsx)(`path`,{clipRule:`evenodd`,d:`M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z`,fill:`currentColor`,fillRule:`evenodd`})}),CopyIcon:e=>(0,Y.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,Y.jsx)(`path`,{clipRule:`evenodd`,d:`M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),DownloadIcon:e=>(0,Y.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,Y.jsx)(`path`,{clipRule:`evenodd`,d:`M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),ExternalLinkIcon:e=>(0,Y.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,Y.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z`,fill:`currentColor`,fillRule:`evenodd`})}),Loader2Icon:e=>(0,Y.jsxs)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:[(0,Y.jsx)(`path`,{d:`M8 0V4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,Y.jsx)(`path`,{d:`M8 16V12`,opacity:`0.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,Y.jsx)(`path`,{d:`M3.29773 1.52783L5.64887 4.7639`,opacity:`0.9`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,Y.jsx)(`path`,{d:`M12.7023 1.52783L10.3511 4.7639`,opacity:`0.1`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,Y.jsx)(`path`,{d:`M12.7023 14.472L10.3511 11.236`,opacity:`0.4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,Y.jsx)(`path`,{d:`M3.29773 14.472L5.64887 11.236`,opacity:`0.6`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,Y.jsx)(`path`,{d:`M15.6085 5.52783L11.8043 6.7639`,opacity:`0.2`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,Y.jsx)(`path`,{d:`M0.391602 10.472L4.19583 9.23598`,opacity:`0.7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,Y.jsx)(`path`,{d:`M15.6085 10.4722L11.8043 9.2361`,opacity:`0.3`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,Y.jsx)(`path`,{d:`M0.391602 5.52783L4.19583 6.7639`,opacity:`0.8`,stroke:`currentColor`,strokeWidth:`1.5`})]}),Maximize2Icon:e=>(0,Y.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,Y.jsx)(`path`,{clipRule:`evenodd`,d:`M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z`,fill:`currentColor`,fillRule:`evenodd`})}),RotateCcwIcon:e=>(0,Y.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,Y.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z`,fill:`currentColor`,fillRule:`evenodd`})}),XIcon:e=>(0,Y.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,Y.jsx)(`path`,{clipRule:`evenodd`,d:`M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomInIcon:e=>(0,Y.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,Y.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomOutIcon:e=>(0,Y.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,Y.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})})},Dx=(0,A.createContext)(Ex),Ox=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>e[n]===t[n])},kx=({icons:e,children:t})=>{let n=(0,A.useRef)(e),r=(0,A.useRef)(e?{...Ex,...e}:Ex);Ox(n.current,e)||(n.current=e,r.current=e?{...Ex,...e}:Ex);let i=r.current;return(0,Y.jsx)(Dx.Provider,{value:i,children:t})},Ax=()=>(0,A.useContext)(Dx),jx={copyCode:`Copy Code`,downloadFile:`Download file`,downloadDiagram:`Download diagram`,downloadDiagramAsSvg:`Download diagram as SVG`,downloadDiagramAsPng:`Download diagram as PNG`,downloadDiagramAsMmd:`Download diagram as MMD`,viewFullscreen:`View fullscreen`,exitFullscreen:`Exit fullscreen`,mermaidFormatSvg:`SVG`,mermaidFormatPng:`PNG`,mermaidFormatMmd:`MMD`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,resetView:`Reset zoom and pan`,mermaidAriaLabel:`Mermaid chart`,errorMermaid:`Failed to render Mermaid chart`,copyTable:`Copy table`,copyTableAsMarkdown:`Copy table as Markdown`,copyTableAsCsv:`Copy table as CSV`,copyTableAsTsv:`Copy table as TSV`,downloadTable:`Download table`,downloadTableAsCsv:`Download table as CSV`,downloadTableAsMarkdown:`Download table as Markdown`,tableFormatMarkdown:`Markdown`,tableFormatCsv:`CSV`,tableFormatTsv:`TSV`,imageNotAvailable:`Image not available`,downloadImage:`Download image`,openExternalLink:`Open external link?`,externalLinkWarning:`You're about to visit an external website.`,close:`Close`,copyLink:`Copy link`,copied:`Copied`,openLink:`Open link`},Mx=(0,A.createContext)(jx),Nx=()=>(0,A.useContext)(Mx),Px=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let s=Q(),[c,l]=(0,A.useState)(!1),u=(0,A.useRef)(0),{code:d}=xx(),{isAnimating:f}=(0,A.useContext)(Nw),p=Nx(),m=a??d,h=async()=>{var r;if(typeof window>`u`||!((r=navigator==null?void 0:navigator.clipboard)!=null&&r.writeText))t?.(Error(`Clipboard API not available`));else try{c||(await navigator.clipboard.writeText(m),l(!0),e?.(),u.current=window.setTimeout(()=>l(!1),n))}catch(e){t?.(e)}};(0,A.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]);let g=Ax(),_=c?g.CheckIcon:g.CopyIcon;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`button`,{"aria-label":p.copyCode,className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-copy-button`,disabled:f,onClick:h,title:p.copyCode,type:`button`,...o,children:r??(0,Y.jsx)(_,{"aria-hidden":`true`,size:14})}),c&&(0,Y.jsx)(`output`,{"aria-live":`polite`,className:`sr-only`,children:p.copied})]})},Fx=(e,t,n)=>{if(typeof e==`boolean`)return n;let r=e[t];if(typeof r!=`object`)return n;let i=r.download;return typeof i==`object`&&i.filename||n},Ix=(e,t)=>{if(typeof e==`boolean`)return{};let n=e[t];if(typeof n!=`object`)return{};let r=n.copy;return typeof r!=`object`||!r?{}:{onCopy:r.onCopy,onError:r.onError}},Lx={"1c":`1c`,"1c-query":`1cq`,abap:`abap`,"actionscript-3":`as`,ada:`ada`,adoc:`adoc`,"angular-html":`html`,"angular-ts":`ts`,apache:`conf`,apex:`cls`,apl:`apl`,applescript:`applescript`,ara:`ara`,asciidoc:`adoc`,asm:`asm`,astro:`astro`,awk:`awk`,ballerina:`bal`,bash:`sh`,bat:`bat`,batch:`bat`,be:`be`,beancount:`beancount`,berry:`berry`,bibtex:`bib`,bicep:`bicep`,blade:`blade.php`,bsl:`bsl`,c:`c`,"c#":`cs`,"c++":`cpp`,cadence:`cdc`,cairo:`cairo`,cdc:`cdc`,clarity:`clar`,clj:`clj`,clojure:`clj`,"closure-templates":`soy`,cmake:`cmake`,cmd:`cmd`,cobol:`cob`,codeowners:`CODEOWNERS`,codeql:`ql`,coffee:`coffee`,coffeescript:`coffee`,"common-lisp":`lisp`,console:`sh`,coq:`v`,cpp:`cpp`,cql:`cql`,crystal:`cr`,cs:`cs`,csharp:`cs`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cql`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,docker:`dockerfile`,dockerfile:`dockerfile`,dotenv:`env`,"dream-maker":`dm`,edge:`edge`,elisp:`el`,elixir:`ex`,elm:`elm`,"emacs-lisp":`el`,erb:`erb`,erl:`erl`,erlang:`erl`,f:`f`,"f#":`fs`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`f90`,f95:`f95`,fennel:`fnl`,fish:`fish`,fluent:`ftl`,for:`for`,"fortran-fixed-form":`f`,"fortran-free-form":`f90`,fs:`fs`,fsharp:`fs`,fsl:`fsl`,ftl:`ftl`,gdresource:`tres`,gdscript:`gd`,gdshader:`gdshader`,genie:`gs`,gherkin:`feature`,"git-commit":`gitcommit`,"git-rebase":`gitrebase`,gjs:`js`,gleam:`gleam`,"glimmer-js":`js`,"glimmer-ts":`ts`,glsl:`glsl`,gnuplot:`plt`,go:`go`,gql:`gql`,graphql:`graphql`,groovy:`groovy`,gts:`gts`,hack:`hack`,haml:`haml`,handlebars:`hbs`,haskell:`hs`,haxe:`hx`,hbs:`hbs`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,hs:`hs`,html:`html`,"html-derivative":`html`,http:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,jade:`jade`,java:`java`,javascript:`js`,jinja:`jinja`,jison:`jison`,jl:`jl`,js:`js`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,julia:`jl`,kotlin:`kt`,kql:`kql`,kt:`kt`,kts:`kts`,kusto:`kql`,latex:`tex`,lean:`lean`,lean4:`lean`,less:`less`,liquid:`liquid`,lisp:`lisp`,lit:`lit`,llvm:`ll`,log:`log`,logo:`logo`,lua:`lua`,luau:`luau`,make:`mak`,makefile:`mak`,markdown:`md`,marko:`marko`,matlab:`m`,md:`md`,mdc:`mdc`,mdx:`mdx`,mediawiki:`wiki`,mermaid:`mmd`,mips:`s`,mipsasm:`s`,mmd:`mmd`,mojo:`mojo`,move:`move`,nar:`nar`,narrat:`narrat`,nextflow:`nf`,nf:`nf`,nginx:`conf`,nim:`nim`,nix:`nix`,nu:`nu`,nushell:`nu`,objc:`m`,"objective-c":`m`,"objective-cpp":`mm`,ocaml:`ml`,pascal:`pas`,perl:`pl`,perl6:`p6`,php:`php`,plsql:`pls`,po:`po`,polar:`polar`,postcss:`pcss`,pot:`pot`,potx:`potx`,powerquery:`pq`,powershell:`ps1`,prisma:`prisma`,prolog:`pl`,properties:`properties`,proto:`proto`,protobuf:`proto`,ps:`ps`,ps1:`ps1`,pug:`pug`,puppet:`pp`,purescript:`purs`,py:`py`,python:`py`,ql:`ql`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,racket:`rkt`,raku:`raku`,razor:`cshtml`,rb:`rb`,reg:`reg`,regex:`regex`,regexp:`regexp`,rel:`rel`,riscv:`s`,rs:`rs`,rst:`rst`,ruby:`rb`,rust:`rs`,sas:`sas`,sass:`sass`,scala:`scala`,scheme:`scm`,scss:`scss`,sdbl:`sdbl`,sh:`sh`,shader:`shader`,shaderlab:`shader`,shell:`sh`,shellscript:`sh`,shellsession:`sh`,smalltalk:`st`,solidity:`sol`,soy:`soy`,sparql:`rq`,spl:`spl`,splunk:`spl`,sql:`sql`,"ssh-config":`config`,stata:`do`,styl:`styl`,stylus:`styl`,svelte:`svelte`,swift:`swift`,"system-verilog":`sv`,systemd:`service`,talon:`talon`,talonscript:`talon`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,terraform:`tf`,tex:`tex`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`ts`,"ts-tags":`ts`,tsp:`tsp`,tsv:`tsv`,tsx:`tsx`,turtle:`ttl`,twig:`twig`,typ:`typ`,typescript:`ts`,typespec:`tsp`,typst:`typ`,v:`v`,vala:`vala`,vb:`vb`,verilog:`v`,vhdl:`vhdl`,vim:`vim`,viml:`vim`,vimscript:`vim`,vue:`vue`,"vue-html":`html`,"vue-vine":`vine`,vy:`vy`,vyper:`vy`,wasm:`wasm`,wenyan:`wy`,wgsl:`wgsl`,wiki:`wiki`,wikitext:`wiki`,wit:`wit`,wl:`wl`,wolfram:`wl`,xml:`xml`,xsl:`xsl`,yaml:`yaml`,yml:`yml`,zenscript:`zs`,zig:`zig`,zsh:`zsh`,文言:`wy`},Rx=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let s=Q(),{code:c}=xx(),{isAnimating:l,controls:u}=(0,A.useContext)(Nw),d=Nx(),f=Ax(),p=a??c,m=n&&n in Lx?Lx[n]:`txt`,h=`${Fx(u,`code`,`file`)}.${m}`;return(0,Y.jsx)(`button`,{"aria-label":d.downloadFile,className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-download-button`,disabled:l,onClick:()=>{try{ux(h,p,`text/plain`),e?.()}catch(e){t?.(e)}},title:d.downloadFile,type:`button`,...o,children:r??(0,Y.jsx)(f.DownloadIcon,{size:14})})},zx=()=>{let{Loader2Icon:e}=Ax(),t=Q();return(0,Y.jsxs)(`div`,{className:t(`w-full divide-y divide-border overflow-hidden rounded-xl border border-border`),children:[(0,Y.jsx)(`div`,{className:t(`h-[46px] w-full bg-muted/80`)}),(0,Y.jsx)(`div`,{className:t(`flex w-full items-center justify-center p-4`),children:(0,Y.jsx)(e,{className:t(`size-4 animate-spin`)})})]})},Bx=/\.[^/.]+$/,Vx=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,showControls:o=!0,showDownloadControl:s=!0,...c})=>{let{DownloadIcon:l}=Ax(),u=Q(),d=(0,A.useRef)(null),[f,p]=(0,A.useState)(!1),[m,h]=(0,A.useState)(!1),g=Nx(),_=c.width!=null||c.height!=null,v=(f||_)&&!m&&o&&s,y=m&&!_;(0,A.useEffect)(()=>{let e=d.current;if(e!=null&&e.complete){let t=e.naturalWidth>0;p(t),h(!t)}},[]);let b=(0,A.useCallback)(e=>{p(!0),h(!1),i?.(e)},[i]),x=(0,A.useCallback)(e=>{p(!1),h(!0),a?.(e)},[a]),S=async()=>{if(n)try{let e=await(await fetch(n)).blob(),t=new URL(n,window.location.origin).pathname.split(`/`).pop()||``,i=t.split(`.`).pop(),a=t.includes(`.`)&&i!==void 0&&i.length<=4,o=``;if(a)o=t;else{let n=e.type,i=`png`;n.includes(`jpeg`)||n.includes(`jpg`)?i=`jpg`:n.includes(`png`)?i=`png`:n.includes(`svg`)?i=`svg`:n.includes(`gif`)?i=`gif`:n.includes(`webp`)&&(i=`webp`),o=`${(r||t||`image`).replace(Bx,``)}.${i}`}ux(o,e,e.type)}catch{window.open(n,`_blank`)}};return n?n===`streamdown:incomplete-image`?(0,Y.jsx)(`div`,{className:u(`group relative my-4 inline-block`),"data-incomplete":`true`,"data-streamdown":`image-wrapper`,children:(0,Y.jsx)(`div`,{className:u(`h-24 w-48 animate-pulse rounded-lg bg-muted`),"data-streamdown":`image-placeholder`})}):(0,Y.jsxs)(`div`,{className:u(`group relative my-4 inline-block`),"data-streamdown":`image-wrapper`,children:[(0,Y.jsx)(`img`,{alt:r,className:u(`max-w-full rounded-lg`,y&&`hidden`,t),"data-streamdown":`image`,onError:x,onLoad:b,ref:d,src:n,...c}),y&&(0,Y.jsx)(`span`,{className:u(`text-muted-foreground text-xs italic`),"data-streamdown":`image-fallback`,children:g.imageNotAvailable}),o&&(0,Y.jsx)(`div`,{className:u(`pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block`),"data-streamdown":`image-overlay`}),v&&(0,Y.jsx)(`button`,{className:u(`absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background`,`opacity-0 group-hover:opacity-100`),onClick:S,title:g.downloadImage,type:`button`,children:(0,Y.jsx)(l,{size:14})})]}):null},Hx=e=>(typeof e==`function`?e():e)??document.body,Ux=0,Wx=()=>{Ux+=1,Ux===1&&(document.body.style.overflow=`hidden`)},Gx=()=>{Ux=Math.max(0,Ux-1),Ux===0&&(document.body.style.overflow=``)},Kx=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:s}=Ax(),c=Q(),[l,u]=(0,A.useState)(!1),d=Nx(),{portal:f}=(0,A.useContext)(Nw),p=(0,A.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),2e3)}catch{}},[e]),m=(0,A.useCallback)(()=>{r(),n()},[r,n]);if((0,A.useEffect)(()=>{if(t){Wx();let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),Gx()}}},[t,n]),!t||typeof document>`u`)return null;let h=(0,Y.jsx)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm`),"data-streamdown":`link-safety-modal`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`button`,tabIndex:0,children:(0,Y.jsxs)(`div`,{className:c(`relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,Y.jsx)(`button`,{className:c(`absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:n,title:d.close,type:`button`,children:(0,Y.jsx)(s,{size:16})}),(0,Y.jsxs)(`div`,{className:c(`flex flex-col gap-2`),children:[(0,Y.jsxs)(`div`,{className:c(`flex items-center gap-2 font-semibold text-lg`),children:[(0,Y.jsx)(o,{size:20}),(0,Y.jsx)(`span`,{children:d.openExternalLink})]}),(0,Y.jsx)(`p`,{className:c(`text-muted-foreground text-sm`),children:d.externalLinkWarning})]}),(0,Y.jsx)(`div`,{className:c(`break-all rounded-md bg-muted p-3 font-mono text-sm`,e.length>100&&`max-h-32 overflow-y-auto`),children:e}),(0,Y.jsxs)(`div`,{className:c(`flex gap-2`),children:[(0,Y.jsx)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted`),onClick:p,type:`button`,children:l?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(i,{size:14}),(0,Y.jsx)(`span`,{children:d.copied})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(a,{size:14}),(0,Y.jsx)(`span`,{children:d.copyLink})]})}),(0,Y.jsxs)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90`),onClick:m,type:`button`,children:[(0,Y.jsx)(o,{size:14}),(0,Y.jsx)(`span`,{children:d.openLink})]})]})]})});return(0,Tv.createPortal)(h,Hx(f))},qx=(0,A.createContext)(null),Jx=()=>(0,A.useContext)(qx),Yx=()=>Jx()?.code??null,Xx=()=>Jx()?.mermaid??null,Zx=e=>{var t;let n=Jx();return n!=null&&n.renderers&&e&&(t=n.renderers.find(t=>Array.isArray(t.language)?t.language.includes(e):t.language===e))!=null?t:null},Qx=/]*>/i,$x=/\bviewBox=(['"])(.*?)\1/i,eS=/[\s,]+/,tS=/\swidth=(['"]).*?\1/gi,nS=/\sheight=(['"]).*?\1/gi,rS=/\sstyle=(['"])(.*?)\1/i,iS=/^width\s*:/i,aS=/^height\s*:/i,oS=/^max-width\s*:/i,sS=/^{let t=e.match(Qx);if(!t)return null;let n=t[0].match($x)?.[2];if(!n)return null;let r=n.trim().split(eS).map(e=>Number.parseFloat(e));if(r.length<4||r.slice(0,4).some(Number.isNaN))return null;let i=r[2],a=r[3];return i>0&&a>0?{height:a,width:i}:null},lS=e=>{let t=e.match(Qx);if(!t)return e;try{let n=t[0],r=cS(e);if(!r)return e;let{width:i,height:a}=r,o=n.replace(tS,``).replace(nS,``),s=o.match(rS),c=`width:${i}px;height:${a}px;max-width:none;`;if(s){let e=s[1],t=s[2].split(`;`).map(e=>e.trim()).filter(Boolean).filter(e=>!(iS.test(e)||aS.test(e)||oS.test(e))).join(`;`),n=`${c}${t?`${t};`:``}`;o=o.replace(rS,` style=${e}${n}${e}`)}else o=o.replace(sS,`{if(typeof DOMParser>`u`||typeof XMLSerializer>`u`)return e;let t=new DOMParser().parseFromString(e,`text/html`).querySelector(`svg`);return t?new XMLSerializer().serializeToString(t):e},dS=(e,t)=>new Promise((t,n)=>{let r=`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(e))),i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{let e=document.createElement(`canvas`),r=i.width*5,a=i.height*5;e.width=r,e.height=a;let o=e.getContext(`2d`);o?(o.drawImage(i,0,0,r,a),e.toBlob(e=>{e?t(e):n(Error(`Failed to create PNG blob`))},`image/png`)):n(Error(`Failed to create 2D canvas context for PNG export`))},i.onerror=()=>n(Error(`Failed to load SVG image`)),i.src=r}),fS=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let o=Q(),[s,c]=(0,A.useState)(!1),l=(0,A.useRef)(null),{isAnimating:u,controls:d}=(0,A.useContext)(Nw),f=Ax(),p=Xx(),m=Nx(),h=Fx(d,`mermaid`,`diagram`),g=async t=>{try{if(t===`mmd`){ux(`${h}.mmd`,e,`text/plain`),c(!1),r?.(t);return}if(!p){a?.(Error(`Mermaid plugin not available`));return}let n=p.getMermaid(i),o=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),s=`mermaid-${Math.abs(o)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:l}=await n.render(s,e);if(!l){a?.(Error(`SVG not found. Please wait for the diagram to render.`));return}let u=uS(l);if(t===`svg`){ux(`${h}.svg`,u,`image/svg+xml`),c(!1),r?.(t);return}if(t===`png`){let e=await dS(u);ux(`${h}.png`,e,`image/png`),r?.(t),c(!1);return}}catch(e){a?.(e)}};return(0,A.useEffect)(()=>{let e=e=>{let t=e.composedPath();l.current&&!t.includes(l.current)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,Y.jsxs)(`div`,{className:o(`relative`),ref:l,children:[(0,Y.jsx)(`button`,{"aria-label":m.downloadDiagram,className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,n),disabled:u,onClick:()=>c(!s),title:m.downloadDiagram,type:`button`,children:t??(0,Y.jsx)(f.DownloadIcon,{"aria-hidden":`true`,size:14})}),s?(0,Y.jsxs)(`div`,{className:o(`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,Y.jsx)(`button`,{"aria-label":m.downloadDiagramAsSvg,className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>g(`svg`),title:m.downloadDiagramAsSvg,type:`button`,children:m.mermaidFormatSvg}),(0,Y.jsx)(`button`,{"aria-label":m.downloadDiagramAsPng,className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>g(`png`),title:m.downloadDiagramAsPng,type:`button`,children:m.mermaidFormatPng}),(0,Y.jsx)(`button`,{"aria-label":m.downloadDiagramAsMmd,className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>g(`mmd`),title:m.downloadDiagramAsMmd,type:`button`,children:m.mermaidFormatMmd})]}):null]})},pS=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:o,XIcon:s}=Ax(),c=Q(),[l,u]=(0,A.useState)(!1),{isAnimating:d,controls:f,portal:p}=(0,A.useContext)(Nw),m=Nx(),h=(()=>{if(typeof f==`boolean`)return f;let e=f.mermaid;return e===!1?!1:e===!0||e===void 0||e.panZoom!==!1})(),g=(()=>{if(typeof f==`boolean`)return f;let e=f.mermaid;return e===!1?!1:e===!0||e===void 0||e.download!==!1})(),_=(()=>{if(typeof f==`boolean`)return f;let e=f.mermaid;return e===!1?!1:e===!0||e===void 0||e.copy!==!1})(),v=()=>{u(!l)};return(0,A.useEffect)(()=>{if(l){Wx();let e=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),Gx()}}},[l]),(0,A.useEffect)(()=>{l?n?.():r&&r()},[l,n,r]),(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`button`,{className:c(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),disabled:d,onClick:v,title:m.viewFullscreen,type:`button`,...a,"aria-label":m.viewFullscreen,children:(0,Y.jsx)(o,{"aria-hidden":`true`,size:14})}),l?(0,Tv.createPortal)((0,Y.jsxs)(`div`,{"aria-label":m.viewFullscreen,"aria-modal":`true`,className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm`),"data-streamdown":`mermaid-fullscreen`,onClick:v,onKeyDown:e=>{e.key===`Escape`&&v()},role:`dialog`,children:[(0,Y.jsxs)(`div`,{className:c(`absolute top-4 right-4 z-10 flex items-center gap-1`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[g?(0,Y.jsx)(fS,{chart:e,config:t}):null,_?(0,Y.jsx)(Px,{code:e}):null,(0,Y.jsx)(`button`,{"aria-label":m.exitFullscreen,className:c(`rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:v,title:m.exitFullscreen,type:`button`,children:(0,Y.jsx)(s,{"aria-hidden":`true`,size:20})})]}),(0,Y.jsx)(`div`,{className:c(`flex size-full items-center justify-center p-4`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:(0,Y.jsx)(qw,{chart:e,className:c(`size-full [&_svg]:h-auto [&_svg]:w-auto`),config:t,fullscreen:!0,showControls:h})})]}),Hx(p)):null]})};function mS(e){if(e.nodeType===Node.TEXT_NODE)return e.textContent??``;if(e.nodeType!==Node.ELEMENT_NODE)return``;let t=e;return t.tagName===`BR`?` +`:Array.from(t.childNodes).map(mS).join(``)}var hS=e=>{let t=[],n=[],r=e.querySelectorAll(`thead th`);for(let e of r)t.push(mS(e).trim());let i=e.querySelectorAll(`tbody tr`);for(let e of i){let t=[],r=e.querySelectorAll(`td`);for(let e of r)t.push(mS(e).trim());n.push(t)}return{headers:t,rows:n}},gS=e=>{if(typeof e!=`object`)return`,`;let t=e.table;return typeof t==`object`?t.csvSeparator??`,`:`,`},_S=(e,t=`,`)=>{let n;n=t===`auto`?Intl.NumberFormat().format(1.1).includes(`,`)?`;`:`,`:t;let{headers:r,rows:i}=e,a=e=>{let t=!1;for(let r of e)if(r===n||r===`"`||r===` +`||r===`\r`){t=!0;break}return t?`"${e.replace(/"/g,`""`)}"`:e},o=r.length>0?i.length+1:i.length,s=Array(o),c=0;r.length>0&&(s[c]=r.map(a).join(n),c+=1);for(let e of i)s[c]=e.map(a).join(n),c+=1;return s.join(` +`)},vS=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1;for(let n of e)if(n===` `||n===` +`||n===`\r`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===` `?n.push(`\\t`):t===` +`?n.push(`\\n`):t===`\r`?n.push(`\\r`):n.push(t);return n.join(``)},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(` `),o+=1);for(let e of n)a[o]=e.map(r).join(` `),o+=1;return a.join(` +`)},yS=e=>{let t=!1;for(let n of e)if(n===`\\`||n===`|`||n===` +`||n===`&`||n===`<`||n===`>`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===`\\`?n.push(`\\\\`):t===`|`?n.push(`\\|`):t===` +`?n.push(`
    `):t===`&`?n.push(`&`):t===`<`?n.push(`<`):t===`>`?n.push(`>`):n.push(t);return n.join(``)},bS=e=>{let{headers:t,rows:n}=e;if(t.length===0)return``;let r=Array(n.length+2),i=0,a=t.map(e=>yS(e));r[i]=`| ${a.join(` | `)} |`,i+=1;let o=Array(t.length);for(let e=0;eyS(e));r[i]=`| ${t.join(` | `)} |`,i+=1}return r.join(` +`)},xS=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=Q(),[o,s]=(0,A.useState)(!1),[c,l]=(0,A.useState)(!1),u=(0,A.useRef)(null),d=(0,A.useRef)(0),{isAnimating:f,controls:p}=(0,A.useContext)(Nw),m=Nx(),h=gS(p),g=async e=>{var t;if(typeof window>`u`||!((t=navigator==null?void 0:navigator.clipboard)!=null&&t.write))r?.(Error(`Clipboard API not available`));else try{let t=(u.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let a=hS(t),o=``;o=e===`csv`?_S(a,h):e===`tsv`?vS(a):bS(a);let c=new ClipboardItem({"text/plain":new Blob([o],{type:`text/plain`}),"text/html":new Blob([t.outerHTML],{type:`text/html`})});await navigator.clipboard.write([c]),l(!0),s(!1),n?.(e),d.current=window.setTimeout(()=>l(!1),i)}catch(e){r?.(e)}};(0,A.useEffect)(()=>{let e=e=>{let t=e.composedPath();u.current&&!t.includes(u.current)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e),window.clearTimeout(d.current)}},[]);let _=Ax(),v=c?_.CheckIcon:_.CopyIcon;return(0,Y.jsxs)(`div`,{className:a(`relative`),ref:u,children:[(0,Y.jsx)(`button`,{className:a(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:f,onClick:()=>s(!o),title:m.copyTable,type:`button`,children:e??(0,Y.jsx)(v,{height:14,width:14})}),o?(0,Y.jsxs)(`div`,{className:a(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,Y.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>g(`md`),title:m.copyTableAsMarkdown,type:`button`,children:m.tableFormatMarkdown}),(0,Y.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>g(`csv`),title:m.copyTableAsCsv,type:`button`,children:m.tableFormatCsv}),(0,Y.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>g(`tsv`),title:m.copyTableAsTsv,type:`button`,children:m.tableFormatTsv})]}):null]})},SS=({children:e,className:t,onDownload:n,onError:r})=>{let i=Q(),[a,o]=(0,A.useState)(!1),s=(0,A.useRef)(null),{isAnimating:c,controls:l}=(0,A.useContext)(Nw),u=Nx(),d=Ax(),f=gS(l),p=e=>{try{let t=(s.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=hS(t),a=e===`csv`?_S(i,f):bS(i),c=e===`csv`?`csv`:`md`;ux(`${Fx(l,`table`,`table`)}.${c}`,a,e===`csv`?`text/csv`:`text/markdown`),o(!1),n?.(e)}catch(e){r?.(e)}};return(0,A.useEffect)(()=>{let e=e=>{let t=e.composedPath();s.current&&!t.includes(s.current)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,Y.jsxs)(`div`,{className:i(`relative`),ref:s,children:[(0,Y.jsx)(`button`,{className:i(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:c,onClick:()=>o(!a),title:u.downloadTable,type:`button`,children:e??(0,Y.jsx)(d.DownloadIcon,{size:14})}),a?(0,Y.jsxs)(`div`,{className:i(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,Y.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>p(`csv`),title:u.downloadTableAsCsv,type:`button`,children:u.tableFormatCsv}),(0,Y.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>p(`markdown`),title:u.downloadTableAsMarkdown,type:`button`,children:u.tableFormatMarkdown})]}):null]})},CS=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=Ax(),o=Q(),[s,c]=(0,A.useState)(!1),{isAnimating:l,portal:u}=(0,A.useContext)(Nw),d=Nx(),f=()=>{c(!0)},p=()=>{c(!1)};return(0,A.useEffect)(()=>{if(s){Wx();let e=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),Gx()}}},[s]),(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:l,onClick:f,title:d.viewFullscreen,type:`button`,children:(0,Y.jsx)(i,{size:14})}),s?(0,Tv.createPortal)((0,Y.jsx)(`div`,{"aria-label":d.viewFullscreen,"aria-modal":`true`,className:o(`fixed inset-0 z-50 flex flex-col bg-background`),"data-streamdown":`table-fullscreen`,onClick:p,onKeyDown:e=>{e.key===`Escape`&&p()},role:`dialog`,children:(0,Y.jsxs)(`div`,{className:o(`flex h-full flex-col`),"data-streamdown":`table-wrapper`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,Y.jsxs)(`div`,{className:o(`flex items-center justify-end gap-1 p-4`),children:[n?(0,Y.jsx)(xS,{}):null,r?(0,Y.jsx)(SS,{}):null,(0,Y.jsx)(`button`,{className:o(`rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:p,title:d.exitFullscreen,type:`button`,children:(0,Y.jsx)(a,{size:20})})]}),(0,Y.jsx)(`div`,{className:o(`flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10`),children:(0,Y.jsx)(`table`,{className:o(`w-full border-collapse border border-border`),"data-streamdown":`table`,children:e})})]})}),Hx(u)):null]})},wS=({children:e,className:t,maxHeight:n,showControls:r,showCopy:i=!0,showDownload:a=!0,showFullscreen:o=!0,...s})=>{let c=Q(),{isAnimating:l}=(0,A.useContext)(Nw),u=px(n),d=mx(l,!!u,e),f=r&&i,p=r&&a,m=r&&o,h=f||p||m;return(0,Y.jsxs)(`div`,{className:c(`my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2`),"data-streamdown":`table-wrapper`,children:[h?(0,Y.jsxs)(`div`,{className:c(`flex items-center justify-end gap-1`),children:[f?(0,Y.jsx)(xS,{}):null,p?(0,Y.jsx)(SS,{}):null,m?(0,Y.jsx)(CS,{showCopy:f,showDownload:p,children:e}):null]}):null,(0,Y.jsx)(`div`,{className:c(`border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background`),ref:d,style:u?{maxHeight:u}:void 0,children:(0,Y.jsx)(`table`,{className:c(`w-full divide-y divide-border`,t),"data-streamdown":`table`,...s,children:e})})]})},TS=/startLine=(\d+)/,ES=/\bnoLineNumbers\b/,DS=(0,A.lazy)(()=>p(()=>import(`./mermaid-WFAXDIZX-Bof7Y3BF.js`).then(e=>({default:e.Mermaid})),[],import.meta.url)),OS=/language-([^\s]+)/,kS=`node`;function $(e,t){let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;let r=e,i=t;for(let e of n)if(e!==kS&&!Object.is(r[e],i[e]))return!1;return!0}function AS(e,t){return e?.properties?.metastring===t?.properties?.metastring}var jS=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,MS=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.table;return n===!1?!1:n===!0||n===void 0||n[t]!==!1},NS=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.code;return n===!1?!1:n===!0||n===void 0||n[t]!==!1},PS=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0||n[t]!==!1},FS=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.image;return n===!1?!1:n===!0||n===void 0||n[t]!==!1},IS=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`ol`,{className:i(`list-inside list-decimal whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`ordered-list`,...r,children:e})},(e,t)=>$(e,t));IS.displayName=`MarkdownOl`;var LS=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q(),a=Array.isArray(e)?e.filter(e=>e!==` +`&&e!==``):[e],o=a.length===1&&(0,A.isValidElement)(a[0])&&(a[0].type===oC||a[0].props.node?.tagname===`p`)?a[0].props.children:e;return(0,Y.jsx)(`li`,{className:i(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:o})},(e,t)=>$(e,t));LS.displayName=`MarkdownLi`;var RS=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`ul`,{className:i(`list-inside list-disc whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`unordered-list`,...r,children:e})},(e,t)=>$(e,t));RS.displayName=`MarkdownUl`;var zS=(0,A.memo)(({className:e,node:t,...n})=>{let r=Q();return(0,Y.jsx)(`hr`,{className:r(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n})},(e,t)=>$(e,t));zS.displayName=`MarkdownHr`;var BS=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`span`,{className:i(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e})},(e,t)=>$(e,t));BS.displayName=`MarkdownStrong`;var VS=(0,A.memo)(({children:e,className:t,href:n,node:r,...i})=>{let a=Q(),{linkSafety:o}=(0,A.useContext)(Nw),[s,c]=(0,A.useState)(!1),l=n===`streamdown:incomplete-link`,u=(0,A.useCallback)(async e=>{if(o!=null&&o.enabled&&n&&!l){if(e.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,`_blank`,`noreferrer`);return}c(!0)}},[o,n,l]),d=(0,A.useCallback)(()=>{n&&window.open(n,`_blank`,`noreferrer`)},[n]),f=(0,A.useCallback)(()=>{c(!1)},[]),p={url:n??``,isOpen:s,onClose:f,onConfirm:d};return o!=null&&o.enabled&&n?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`button`,{className:a(`wrap-anywhere appearance-none text-left font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,onClick:u,type:`button`,children:e}),o.renderModal?o.renderModal(p):(0,Y.jsx)(Kx,{...p})]}):(0,Y.jsx)(`a`,{className:a(`wrap-anywhere font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,href:n,rel:`noreferrer`,target:`_blank`,...i,children:e})},(e,t)=>$(e,t));VS.displayName=`MarkdownA`;var HS=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`h1`,{className:i(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e})},(e,t)=>$(e,t));HS.displayName=`MarkdownH1`;var US=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`h2`,{className:i(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e})},(e,t)=>$(e,t));US.displayName=`MarkdownH2`;var WS=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`h3`,{className:i(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e})},(e,t)=>$(e,t));WS.displayName=`MarkdownH3`;var GS=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`h4`,{className:i(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e})},(e,t)=>$(e,t));GS.displayName=`MarkdownH4`;var KS=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`h5`,{className:i(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e})},(e,t)=>$(e,t));KS.displayName=`MarkdownH5`;var qS=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`h6`,{className:i(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e})},(e,t)=>$(e,t));qS.displayName=`MarkdownH6`;var JS=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i,tableMaxHeight:a}=(0,A.useContext)(Nw),o=jS(i,`table`),s=MS(i,`copy`),c=MS(i,`download`),l=MS(i,`fullscreen`);return(0,Y.jsx)(wS,{className:t,maxHeight:a,showControls:o,showCopy:s,showDownload:c,showFullscreen:l,...r,children:e})},(e,t)=>$(e,t));JS.displayName=`MarkdownTable`;var YS=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`thead`,{className:i(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e})},(e,t)=>$(e,t));YS.displayName=`MarkdownThead`;var XS=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`tbody`,{className:i(`divide-y divide-border`,t),"data-streamdown":`table-body`,...r,children:e})},(e,t)=>$(e,t));XS.displayName=`MarkdownTbody`;var ZS=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`tr`,{className:i(`border-border`,t),"data-streamdown":`table-row`,...r,children:e})},(e,t)=>$(e,t));ZS.displayName=`MarkdownTr`;var QS=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`th`,{className:i(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e})},(e,t)=>$(e,t));QS.displayName=`MarkdownTh`;var $S=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`td`,{className:i(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e})},(e,t)=>$(e,t));$S.displayName=`MarkdownTd`;var eC=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`blockquote`,{className:i(`my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e})},(e,t)=>$(e,t));eC.displayName=`MarkdownBlockquote`;var tC=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`sup`,{className:i(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e})},(e,t)=>$(e,t));tC.displayName=`MarkdownSup`;var nC=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=Q();return(0,Y.jsx)(`sub`,{className:i(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e})},(e,t)=>$(e,t));nC.displayName=`MarkdownSub`;var rC=(0,A.memo)(({children:e,className:t,node:n,...r})=>{if(`data-footnotes`in r){let n=e=>{if(!(0,A.isValidElement)(e))return!1;let t=Array.isArray(e.props.children)?e.props.children:[e.props.children],n=!1,r=!1;for(let e of t)if(e){if(typeof e==`string`)e.trim()!==``&&(n=!0);else if((0,A.isValidElement)(e)){if(e.props?.[`data-footnote-backref`]!==void 0)r=!0;else{let t=Array.isArray(e.props.children)?e.props.children:[e.props.children];for(let e of t)if(typeof e==`string`&&e.trim()!==``||(0,A.isValidElement)(e)&&e.props?.[`data-footnote-backref`]===void 0){n=!0;break}}}}return r&&!n},i=Array.isArray(e)?e.map(e=>{if(!(0,A.isValidElement)(e))return e;if(e.type===IS){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!n(e));return t.length===0?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(i)?i.some(e=>e!==null):i!==null)?(0,Y.jsx)(`section`,{className:t,...r,children:i}):null}return(0,Y.jsx)(`section`,{className:t,...r,children:e})},(e,t)=>$(e,t));rC.displayName=`MarkdownSection`;var iC=(0,A.memo)(({node:e,className:t,children:n,...r})=>{let i=Q(),a=!(`data-block`in r),{mermaid:o,controls:s,lineNumbers:c}=(0,A.useContext)(Nw),l=Xx(),u=ox(),d=(t?.match(OS))?.at(1)??``,f=Zx(d);if(a)return(0,Y.jsx)(`code`,{className:i(`rounded bg-muted px-1.5 py-0.5 font-mono text-sm`,t),"data-streamdown":`inline-code`,...r,children:n});let p=e?.properties?.metastring,m=p?.match(TS),h=m?Number.parseInt(m[1],10):void 0,g=h!==void 0&&h>=1?h:void 0,_=!(p&&ES.test(p))&&c!==!1,v=``;if((0,A.isValidElement)(n)&&n.props&&typeof n.props==`object`&&`children`in n.props&&typeof n.props.children==`string`?v=n.props.children:typeof n==`string`&&(v=n),f){let e=f.component;return(0,Y.jsx)(A.Suspense,{fallback:(0,Y.jsx)(zx,{}),children:(0,Y.jsx)(e,{code:v,isIncomplete:u,language:d,meta:p})})}if(d===`mermaid`&&l){let e=jS(s,`mermaid`),n=PS(s,`download`),r=PS(s,`copy`),a=PS(s,`fullscreen`),c=PS(s,`panZoom`),l=e&&(n||r||a);return(0,Y.jsx)(A.Suspense,{fallback:(0,Y.jsx)(zx,{}),children:(0,Y.jsxs)(`div`,{className:i(`group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,t),"data-streamdown":`mermaid-block`,children:[(0,Y.jsx)(`div`,{className:i(`flex h-8 items-center text-muted-foreground text-xs`),children:(0,Y.jsx)(`span`,{className:i(`ml-1 font-mono lowercase`),children:`mermaid`})}),l?(0,Y.jsx)(`div`,{className:i(`pointer-events-none absolute top-2 right-2 z-10 flex items-center`),children:(0,Y.jsxs)(`div`,{className:i(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`mermaid-block-actions`,children:[n?(0,Y.jsx)(fS,{chart:v,config:o?.config}):null,r?(0,Y.jsx)(Px,{code:v,...Ix(s,`mermaid`)}):null,a?(0,Y.jsx)(pS,{chart:v,config:o?.config}):null]})}):null,(0,Y.jsx)(`div`,{className:i(`overflow-hidden rounded-md border border-border bg-background`),children:(0,Y.jsx)(DS,{chart:v,config:o?.config,showControls:c})})]})})}let y=jS(s,`code`),b=NS(s,`download`),x=NS(s,`copy`),{"data-block":S,...C}=r;return(0,Y.jsx)(Tx,{className:t,code:v,isIncomplete:u,language:d,lineNumbers:_,startLine:g,...C,children:y?(0,Y.jsxs)(Y.Fragment,{children:[b?(0,Y.jsx)(Rx,{code:v,language:d}):null,x?(0,Y.jsx)(Px,{...Ix(s,`code`)}):null]}):null})},(e,t)=>$(e,t)&&AS(e.node,t.node));iC.displayName=`MarkdownCode`;var aC=(0,A.memo)(({node:e,className:t,...n})=>{let{controls:r}=(0,A.useContext)(Nw),i=jS(r,`image`),a=i&&FS(r,`download`);return(0,Y.jsx)(Vx,{className:t,node:e,showControls:i,showDownloadControl:a,...n})},(e,t)=>$(e,t));aC.displayName=`MarkdownImg`;var oC=(0,A.memo)(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);if(r.length===1&&(0,A.isValidElement)(r[0])){let t=r[0].props.node?.tagName;if(t===`img`||t===`code`&&`data-block`in r[0].props)return(0,Y.jsx)(Y.Fragment,{children:e})}return(0,Y.jsx)(`p`,{...n,children:e})},(e,t)=>$(e,t));oC.displayName=`MarkdownParagraph`;var sC={ol:IS,li:LS,ul:RS,hr:zS,strong:BS,a:VS,h1:HS,h2:US,h3:WS,h4:GS,h5:KS,h6:qS,table:JS,thead:YS,tbody:XS,tr:ZS,th:QS,td:$S,blockquote:eC,code:iC,img:aC,pre:({children:e})=>(0,A.isValidElement)(e)?(0,A.cloneElement)(e,{"data-block":`true`}):e,sup:tC,sub:nC,p:oC,section:rC},cC=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,lC=/\p{L}/u;function uC(e){let t=e.replace(/(```|~~~)[\s\S]*?\1/g,``).replace(/^#{1,6}\s+/gm,``).replace(/(\*{1,3}|_{1,3})/g,``).replace(/`[^`]*`/g,``).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/^[\s>*\-+\d.]+/gm,``),n,r=0,i=0;for(let e of t)cC.test(e)?(n??=`rtl`,i+=1):lC.test(e)&&(n??=`ltr`,r+=1);return i>r?`rtl`:r>i?`ltr`:n??`ltr`}var dC=/^[ \t]{0,3}(`{3,}|~{3,})/,fC=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,pC=e=>{let t=e.split(` +`),n=null,r=0;for(let e of t){let t=dC.exec(e);if(n===null){if(t){let e=t[1];n=e[0],r=e.length}}else if(t){let e=t[1],i=e[0],a=e.length;i===n&&a>=r&&(n=null,r=0)}}return n!==null},mC=e=>{let t=e.split(` +`);for(let e of t){let t=e.trim();if(t.length>0&&t.includes(`|`)&&fC.test(t))return!0}return!1},hC=()=>e=>{$e(e,`html`,(e,t,n)=>{!n||typeof t!=`number`||(n.children[t]={type:`text`,value:e.value})})},gC=[],_C={allowDangerousHtml:!0},vC=new WeakMap,yC=new class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let t=`default`;return this.keyCache.set(e,t),t}let a=e=>{if(!e||e.length===0)return``;let t=``;for(let n=0;n0&&(t+=`,`),Array.isArray(r)){let[e,n]=r;if(typeof e==`function`){let n=vC.get(e);n||(n=e.name,vC.set(e,n)),t+=n}else t+=String(e);t+=`:`,t+=JSON.stringify(n)}else if(typeof r==`function`){let e=vC.get(r);e||(e=r.name,vC.set(r,e)),t+=e}else t+=String(r)}return t},o=a(n),s=`${a(r)}::${o}::${i?JSON.stringify(i):``}`;return this.keyCache.set(e,s),s}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}this.cache.set(n,t)}clear(){this.cache.clear()}},bC=e=>{let t=xC(e),n=e.children||``;return OC(t.runSync(t.parse(n),n),e)},xC=e=>{let t=yC.get(e);if(t)return t;let n=CC(e);return yC.set(e,n),n},SC=e=>e.some(e=>Array.isArray(e)?e[0]===Ss:e===Ss),CC=e=>{let t=e.rehypePlugins||gC,n=e.remarkPlugins||gC,r=SC(t)?n:[...n,hC],i=e.remarkRehypeOptions?{..._C,...e.remarkRehypeOptions}:_C;return hv().use(Xg).use(r).use(V_,i).use(t)},wC=e=>e,TC=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:`text`,value:r}},EC=(e,t)=>{for(let n in dg)if(Object.hasOwn(dg,n)&&Object.hasOwn(e.properties,n)){let r=e.properties[n],i=dg[n];(i===null||i.includes(e.tagName))&&(e.properties[n]=t(String(r||``),n,e)??void 0)}},DC=(e,t,n,r,i,a)=>{let o=!1;return r?o=!r.includes(e.tagName):i&&(o=i.includes(e.tagName)),!o&&a&&typeof t==`number`&&(o=!a(e,t,n)),o},OC=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:o,urlTransform:s}=t;if(n||r||i||a||s){let t=s||wC;$e(e,(e,s,c)=>{if(e.type===`raw`&&c&&typeof s==`number`)return TC(c,s,a,e.value),s;if(e.type===`element`&&(EC(e,t),DC(e,s,c,r,i,n)&&c&&typeof s==`number`))return o&&e.children?c.children.splice(s,1,...e.children):c.children.splice(s,1),s})}return Uh(e,{Fragment:Y.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:Y.jsx,jsxs:Y.jsxs,passKeys:!0,passNode:!0})},kC=/\[\^[\w-]{1,200}\](?!:)/,AC=/\[\^[\w-]{1,200}\]:/,jC=/<([A-Za-z][\w:-]*)[\s>/]/,MC=/^ {0,3}\[[^\]]+\]:/m,NC=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),PC=new Map,FC=new Map,IC=e=>{let t=e.toLowerCase(),n=PC.get(t);if(n)return n;let r=RegExp(`<${t}(?=[\\s>/])[^>]*>`,`gi`);return PC.set(t,r),r},LC=e=>{let t=e.toLowerCase(),n=FC.get(t);if(n)return n;let r=RegExp(`])[^>]*>`,`gi`);return FC.set(t,r),r},RC=(e,t)=>{if(NC.has(t.toLowerCase()))return 0;let n=e.match(IC(t));if(!n)return 0;let r=0;for(let e of n)e.trimEnd().endsWith(`/>`)||(r+=1);return r},zC=(e,t)=>{let n=e.match(LC(t));return n?n.length:0},BC=e=>{let t=0;for(let n=0;n{let t=new gb({gfm:!0});return{tokens:t.blockTokens(e),hasLinkDefinitions:Object.keys(t.tokens.links).length>0}},UC=null,WC=` + +`,GC=e=>{for(let t=e.length-3;t>=0;--t)if(e[t].endsWith(WC))return t+1;return 0},KC=e=>` ${e}`.slice(1),qC=e=>e.map(KC),JC=e=>{let t=[],n=[],r=!1;for(let i of e){let e=i.raw,a=t.length;if(n.length>0){t[a-1]+=e;let r=n.at(-1),i=RC(e,r),o=zC(e,r);for(let e=0;e0&&n.at(-1)===r&&n.pop()}else{if(i.type===`html`&&i.block){let t=e.match(jC);if(t){let r=t[1];RC(e,r)>zC(e,r)&&n.push(r)}}if(i.type===`space`&&a>0)t[a-1]+=e;else{if(a>0&&!r){let n=t[a-1];if(BC(n)%2==1){t[a-1]=n+e;continue}}t.push(e),i.type!==`space`&&(r=i.type===`code`)}}}return t},YC=(e,t)=>{if(t.length<=e.input.length||t.slice(0,e.input.length)!==e.input||MC.test(t))return null;let n=GC(e.blocks);if(n===0)return null;let r=e.verifiedCount,i=e.verifiedLength;if(r>n){r=n,i=0;for(let t=0;t{let t=kC.test(e),n=AC.test(e);if(t||n)return[e];let r=e.includes(`\r`)?e.replace(VC,` +`):e;if(UC?.input===r)return UC.blocks;let i=UC?YC(UC,r):null;if(!i){let{tokens:e,hasLinkDefinitions:t}=HC(r);i={input:r,blocks:t?[KC(r)]:qC(JC(e)),verifiedCount:0,verifiedLength:0}}return UC=i,i.blocks},ZC=/^\n*/,QC=/\n*$/,$C=/\n\n/g,ew=(e,t,n)=>t.includes(` +`)?`${e}${t.replace($C,` + +`).replace(ZC,` + +`).replace(QC,` + +`)}${n} + +`:e+t+n,tw=(e,t)=>{let n=RegExp(`<(${t})(?=[\\s>/])([^>]*)>`,`gi`),r=``,i=0,a=n.exec(e);for(;a;){let t=a[0],o=a[1],s=a.index+t.length,c=e.slice(s);if(RegExp(``,`i`).test(c)){a=n.exec(e);continue}if(r+=e.slice(i,a.index),c.length===0){r+=t,i=s,a=n.exec(e);continue}if(c.startsWith(` + +`)){let n=c.slice(2).replace($C,` + +`);r+=`${t} + +${n}`,i=e.length;break}if(!c.startsWith(` +`)){r+=t,i=s,a=n.exec(e);continue}let l=c.slice(1);if(l.trim().length===0){r+=t,i=s,a=n.exec(e);continue}let u=l.replace($C,` + +`);r+=`${t} + +${u}`,i=e.length;break}return i===0?e:r+e.slice(i)},nw=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)()`,`gi`);n=n.replace(t,(e,t,n,r)=>ew(t,n,r)),n=tw(n,e)}return n},rw=/([\\`*_~[\]|])/g,iw=e=>e.replace(rw,`\\$1`),aw=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)()`,`gi`);n=n.replace(t,(e,t,n,r)=>t+iw(n).replace(/\n\n/g,` `)+r)}return n},ow=new Set([`blockquote`,`dd`,`dt`,`figcaption`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`li`,`p`,`td`,`th`]),sw=new Set([`code`,`kbd`,`pre`,`samp`,`var`]);function cw(e){return e.children.map(e=>e.type===`text`?e.value:e.type===`element`&&!sw.has(e.tagName)?cw(e):``).join(``)}function lw(){return e=>{$e(e,`element`,e=>{sw.has(e.tagName)?(e.properties??={},e.properties.dir=`ltr`):ow.has(e.tagName)&&(e.properties??={},typeof e.properties.dir!=`string`&&(e.properties.dir=uC(cw(e))))})}}var uw=e=>e.type===`text`?e.value:`children`in e&&Array.isArray(e.children)?e.children.map(uw).join(``):``,dw=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(e=>e.toLowerCase()));$e(t,`element`,e=>{if(n.has(e.tagName.toLowerCase())){let t=uw(e);e.children=t?[{type:`text`,value:t}]:[]}})},fw=()=>e=>{$e(e,`code`,e=>{e.meta&&(e.data=e.data??{},e.data.hProperties={...e.data.hProperties??{},metastring:e.meta})})},pw=/^([a-zA-Z][a-zA-Z\d+\-.]*:)/,mw=e=>new Set(e.map(e=>e.trim().toLowerCase()).filter(e=>e.length>0).map(e=>e.endsWith(`:`)?e:`${e}:`));function hw(e,t,n){let r=e.position?.start?.offset;if(typeof r==`number`&&n.charCodeAt(r)===91||e.children.length!==1)return!1;let[i]=e.children;if(i.type!==`text`)return!1;let a=pw.exec(e.url);if(!a)return!1;let o=a[1].toLowerCase();return t.has(o)?o===`mailto:`?e.url===`mailto:${i.value}`:e.url===i.value||e.url===`${o}//${i.value}`:!1}var gw=(e=[])=>{let t=mw(e);return(e,n)=>{if(t.size===0)return;let r=String(n.value??``);$e(e,`link`,(e,n,i)=>{if(i&&n!==void 0&&hw(e,t,r))return i.children.splice(n,1,...e.children),n})}},_w=`data-sd-caret-hidden`,vw=()=>{},yw=()=>vw,bw=e=>{let t=(0,A.useRef)(null),n=(0,A.useRef)(null),r=(0,A.useSyncExternalStore)(yw,()=>!0,()=>!1);return(0,A.useLayoutEffect)(()=>{var r;let i=e&&(r=t.current?.lastElementChild)!=null?r:null,a=n.current;a!==i&&(a?.removeAttribute(_w),i?.setAttribute(_w,``),n.current=i)}),{containerRef:t,showCaret:r||!e}},xw=/^[a-z]/,Sw=/^[ \t]*<[\w!/?-]/,Cw=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,ww=e=>typeof e!=`string`||e.length===0||!Sw.test(e)?e:e.replace(Cw,`$1`),Tw={...ws,clobberPrefix:``,protocols:{...ws.protocols,href:[...ws.protocols?.href??[],`tel`,`streamdown`],src:[...ws.protocols?.src??[],`streamdown`]},attributes:{...ws.attributes,code:[...ws.attributes?.code??[],`metastring`]}},Ew={raw:Ss,sanitize:[Vs,Tw],harden:[tt,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},Dw={gfm:[tp,{}],codeMeta:fw},Ow=Object.values(Ew),kw=Object.values(Dw),Aw={block:` ▋`,circle:` ●`},jw=[`github-light`,`github-dark`],Mw={enabled:!0},Nw=(0,A.createContext)({codeBlockMaxHeight:400,shikiTheme:jw,controls:!0,isAnimating:!1,lineNumbers:!0,mode:`streaming`,mermaid:void 0,linkSafety:Mw,portal:void 0,tableMaxHeight:300}),Pw=(0,A.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:o,...s})=>{(0,A.useLayoutEffect)(()=>{o?.commit()});let c=typeof e==`string`&&n?ww(e):e,l=(0,Y.jsx)(bC,{...s,children:c});return(0,Y.jsx)(ax.Provider,{value:i,children:a?(0,Y.jsx)(`div`,{dir:a,style:{display:`contents`},children:l}):l})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(n=>e.components?.[n]!==t.components?.[n]))return!1}return e.rehypePlugins===t.rehypePlugins&&e.remarkPlugins===t.remarkPlugins&&!!e.animatePlugin==!!t.animatePlugin});Pw.displayName=`Block`;var Fw=e=>{let t={};for(let[n,r]of Object.entries(e))(n.startsWith(`data-`)||n.startsWith(`aria-`))&&(t[n]=r);return t},Iw=(e,t)=>{let n=Fw(e),r=Fw(t),i=Object.keys(n);return i.length===Object.keys(r).length&&i.every(e=>Object.hasOwn(r,e)&&n[e]===r[e])},Lw=(0,A.memo)(({children:e,mode:t=`streaming`,dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:o=Ow,remarkPlugins:s=kw,className:c,shikiTheme:l,mermaid:u,codeBlockMaxHeight:d=400,controls:f=!0,isAnimating:p=!1,tableMaxHeight:m=300,animated:h,BlockComponent:g=Pw,parseMarkdownIntoBlocksFn:_=XC,caret:v,plugins:y,remend:b,linkSafety:x=Mw,portal:S,lineNumbers:C=!0,allowedTags:w,fallbackComponent:T,literalTagContent:E,disableAutolinkProtocols:D,translations:O,icons:ee,prefix:te,onAnimationStart:ne,onAnimationEnd:re,...ie})=>{let ae=(0,A.useId)(),oe=Fw(ie),k=(0,A.useMemo)(()=>lx(te),[te]),se=(0,A.useRef)(null),ce=(0,A.useRef)(ne),le=(0,A.useRef)(re);ce.current=ne,le.current=re,(0,A.useEffect)(()=>{var e,n,r;if(t===`static`)return;let i=se.current;se.current=p,i===null?p&&((e=ce.current)==null||e.call(ce)):p&&!i?(n=ce.current)==null||n.call(ce):!p&&i&&((r=le.current)==null||r.call(le))},[p,t]);let ue=(0,A.useMemo)(()=>w?Object.keys(w):[],[w]),de=(0,A.useMemo)(()=>{if(typeof e!=`string`)return``;let n=t===`streaming`&&r?yh(e,b):e;return E&&E.length>0&&(n=aw(n,E)),ue.length>0&&(n=nw(n,ue)),n},[e,t,r,b,ue,E]),fe=(0,A.useMemo)(()=>_(de),[de,_]),pe=(0,A.useMemo)(()=>n===`auto`?fe.map(uC):void 0,[fe,n]),me=(0,A.useMemo)(()=>fe.map((e,t)=>`${ae}-${t}`),[fe.length,ae]),he=(0,A.useMemo)(()=>h===!0?`true`:h?JSON.stringify(h):``,[h]),ge=(0,A.useRef)(null),_e=(0,A.useRef)([]),ve=(0,A.useRef)([]),ye=(0,A.useRef)(null),be=(0,A.useRef)(``);he?(be.current===he?ge.current||=jb():(be.current=he,ge.current=jb({maxBacklogMs:he===`true`?void 0:h.maxBacklogMs}),_e.current=[],ve.current=[]),p&&ge.current&&ge.current.beginPass(ge.current.now())):(ge.current=null,_e.current=[],ve.current=[],be.current=``),(0,A.useLayoutEffect)(()=>{var e;p&&((e=ge.current)==null||e.commitPass())});let xe=(0,A.useMemo)(()=>({codeBlockMaxHeight:d,shikiTheme:l??(y?.code)?.getThemes()??jw,controls:f,isAnimating:p,lineNumbers:C,mode:t,mermaid:u,linkSafety:x,portal:S,tableMaxHeight:m}),[d,l,f,p,C,t,u,x,S,y?.code,m]),Se=(0,A.useMemo)(()=>O?JSON.stringify(O):``,[O]),Ce=(0,A.useMemo)(()=>({...jx,...O}),[Se]),we=(0,A.useMemo)(()=>{let{inlineCode:e,...t}=a??{},n={...sC,...t};if(e){let t=n.code;n.code=n=>`data-block`in n?t?(0,A.createElement)(t,n):null:(0,A.createElement)(e,n)}if(T){if(w)for(let e of Object.keys(w))Object.hasOwn(n,e)||(n[e]=T);let e={configurable:!0,enumerable:!1,value:T,writable:!1};return new Proxy(n,{getOwnPropertyDescriptor(t,n){let r=Object.getOwnPropertyDescriptor(t,n);if(r)return r;if(typeof n==`string`&&xw.test(n))return e},get(e,t,n){return typeof t==`string`&&xw.test(t)&&!Object.hasOwn(e,t)?T:Reflect.get(e,t,n)}})}return n},[a,T,w]),Te=(0,A.useMemo)(()=>{let e=[];return y!=null&&y.cjk&&(e=[...e,...y.cjk.remarkPluginsBefore]),e=[...e,...s],D&&D.length>0&&(e=[...e,[gw,D]]),y!=null&&y.cjk&&(e=[...e,...y.cjk.remarkPluginsAfter]),y!=null&&y.math&&(e=[...e,y.math.remarkPlugin]),e},[s,y?.math,y?.cjk,D]),Ee=(0,A.useMemo)(()=>{let e=o;if(w&&Object.keys(w).length>0&&o===Ow){let t={...Tw,tagNames:[...Tw.tagNames??[],...Object.keys(w)],attributes:{...Tw.attributes,...w}};e=[Ew.raw,[Vs,t],Ew.harden]}return E&&E.length>0&&(e=[...e,[dw,E]]),y!=null&&y.math&&(e=[...e,y.math.rehypePlugin]),n===`auto`&&t===`static`&&(e=[...e,lw]),e},[o,y?.math,w,E,n,t]),De=(0,A.useMemo)(()=>v&&p?{"--streamdown-caret":`"${Aw[v]}"`}:void 0,[v,p]),{containerRef:Oe,showCaret:ke}=bw((0,A.useMemo)(()=>{if(!p||fe.length===0)return!1;let e=fe.at(-1);return pC(e)||mC(e)},[p,fe])),Ae=e=>{let t=null;if(ge.current&&p){if(!_e.current[e]){let{maxBacklogMs:t,...n}=he&&he!==`true`?h:{};_e.current[e]=rx({...n,timeline:ge.current})}t=_e.current[e]}ye.current!==Ee&&(ve.current=[],ye.current=Ee),t&&!ve.current[e]&&(ve.current[e]=[...Ee,t.rehypePlugin]);let n=t&&ve.current[e]?ve.current[e]:Ee;return{blockAnimatePlugin:t,blockRehypePlugins:n}};return t===`static`?(0,Y.jsx)(Mx.Provider,{value:Ce,children:(0,Y.jsx)(qx.Provider,{value:y??null,children:(0,Y.jsx)(Nw.Provider,{value:xe,children:(0,Y.jsx)(kx,{icons:ee,children:(0,Y.jsx)(dx.Provider,{value:k,children:(0,Y.jsx)(`div`,{...oe,className:k(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,c),dir:n===`auto`?void 0:n,children:(0,Y.jsx)(bC,{components:we,rehypePlugins:Ee,remarkPlugins:Te,...ie,children:de})})})})})})}):(0,Y.jsx)(Mx.Provider,{value:Ce,children:(0,Y.jsx)(qx.Provider,{value:y??null,children:(0,Y.jsx)(Nw.Provider,{value:xe,children:(0,Y.jsx)(kx,{icons:ee,children:(0,Y.jsx)(dx.Provider,{value:k,children:(0,Y.jsxs)(`div`,{...oe,className:k(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,v&&ke?`[&>*:last-child:not([data-sd-caret-hidden])]:after:inline [&>*:last-child:not([data-sd-caret-hidden])]:after:align-baseline [&>*:last-child:not([data-sd-caret-hidden])]:after:content-[var(--streamdown-caret)]`:null,c),ref:Oe,style:De,children:[fe.length===0&&v&&p&&(0,Y.jsx)(`span`,{}),fe.map((e,t)=>{let a=t===fe.length-1,o=p&&a&&pC(e),{blockAnimatePlugin:s,blockRehypePlugins:c}=Ae(t);return(0,Y.jsx)(g,{animatePlugin:s,components:we,content:e,dir:pe?.[t]??(n===`auto`?void 0:n),index:t,isIncomplete:o,rehypePlugins:c,remarkPlugins:Te,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...ie},me[t])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.codeBlockMaxHeight===t.codeBlockMaxHeight&&e.tableMaxHeight===t.tableMaxHeight&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&e.disableAutolinkProtocols===t.disableAutolinkProtocols&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir&&e.fallbackComponent===t.fallbackComponent&&Iw(e,t));Lw.displayName=`Streamdown`;var Rw=e=>e>0?e:null,zw=(e,t)=>{if(e.endsWith(`px`))return Rw(Number.parseFloat(e));if(e.endsWith(`rem`)){let t=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||`16`);return Rw(Number.parseFloat(e)*t)}if(e.endsWith(`em`)){let n=Number.parseFloat(getComputedStyle(t).fontSize||`16`);return Rw(Number.parseFloat(e)*n)}if(e.endsWith(`vh`))return Rw(Number.parseFloat(e)/100*window.innerHeight);if(e.endsWith(`%`)){let n=t.parentElement;return n&&n.clientHeight>0?Rw(Number.parseFloat(e)/100*n.clientHeight):null}return null},Bw=(e,t)=>{let n=t.trim().toLowerCase();return!n||n===`none`||n===`auto`?null:zw(n,e)},Vw=/^min\(\s*([^,]+)\s*,\s*([^)]+)\s*\)$/i,Hw=(e,t)=>{let n=Bw(e,t);if(n!=null)return n;let r=t.trim().match(Vw);if(!r)return null;let i=Bw(e,r[1].trim()),a=Bw(e,r[2].trim());return i==null||a==null?null:Math.min(i,a)},Uw=(e,t,n)=>{let r=t.clientWidth;if(!(r>0))return null;if(n){let n=t.clientHeight;if(!(n>0))return null;let i=Math.min(r/e.width,n/e.height,1);return!(i>0)||Number.isNaN(i)?null:{fitZoom:i,viewportHeight:null}}let i=Math.min(r/e.width,1);if(!(i>0)||Number.isNaN(i))return null;let a=e.height*i,o=null,s=t;for(;s&&o==null;){let e=getComputedStyle(s);o=Hw(s,e.maxHeight),s=s.parentElement}let c=o==null?a:Math.min(a,o),l=Math.min(i,c/e.height,1);return!(l>0)||Number.isNaN(l)?null:{fitZoom:l,viewportHeight:c}},Ww=({children:e,className:t,contentSize:n,fitKey:r,minZoom:i=.5,maxZoom:a=3,zoomStep:o=.1,showControls:s=!0,initialZoom:c=1,isAutoFit:l=!1,fullscreen:u=!1})=>{let{RotateCcwIcon:d,ZoomInIcon:f,ZoomOutIcon:p}=Ax(),m=Q(),h=Nx(),g=(0,A.useRef)(null),_=(0,A.useRef)(null),v=(0,A.useRef)(!1),[y,b]=(0,A.useState)(c),[x,S]=(0,A.useState)(i),[C,w]=(0,A.useState)(c),[T,E]=(0,A.useState)({x:0,y:0}),[D,O]=(0,A.useState)(!1),[ee,te]=(0,A.useState)({x:0,y:0}),[ne,re]=(0,A.useState)({x:0,y:0}),[ie,ae]=(0,A.useState)(null),oe=(0,A.useCallback)(e=>{let t=g.current;if(!t)return;let n=Uw(e,t,u);if(!n)return;let{fitZoom:r,viewportHeight:a}=n;ae(a),b(r),S(Math.min(i,r)),v.current||(w(r),E({x:0,y:0}))},[u,i]),k=(0,A.useCallback)(e=>{w(t=>Math.max(x,Math.min(a,t+e))),v.current=!0},[x,a]),se=(0,A.useCallback)(()=>{k(o)},[k,o]),ce=(0,A.useCallback)(()=>{k(-o)},[k,o]),le=(0,A.useCallback)(()=>{w(y),E({x:0,y:0}),v.current=!1},[y]),ue=(0,A.useCallback)(e=>{e.preventDefault();let t=e.deltaY>0?-o:o;k(t)},[k,o]),de=(0,A.useCallback)(e=>{if(e.button!==0||e.isPrimary===!1)return;O(!0),v.current=!0,te({x:e.clientX,y:e.clientY}),re(T);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[T]),fe=(0,A.useCallback)(e=>{if(!D)return;e.preventDefault();let t=e.clientX-ee.x,n=e.clientY-ee.y;E({x:ne.x+t,y:ne.y+n})},[D,ee,ne]),pe=(0,A.useCallback)(e=>{O(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);(0,A.useEffect)(()=>{S(i),l||(b(c),w(c),ae(null))},[c,l,i]),(0,A.useLayoutEffect)(()=>{if(!(l&&n))return;oe(n);let e=g.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>{oe(n)});return t.observe(e),()=>{t.disconnect()}},[oe,n,l]),(0,A.useEffect)(()=>{l&&(v.current=!1)},[r,l]),(0,A.useEffect)(()=>{let e=g.current;if(e)return e.addEventListener(`wheel`,ue,{passive:!1}),()=>{e.removeEventListener(`wheel`,ue)}},[ue]),(0,A.useEffect)(()=>{let e=_.current;if(e&&D)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,fe,{passive:!1}),e.addEventListener(`pointerup`,pe),e.addEventListener(`pointercancel`,pe),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,fe),e.removeEventListener(`pointerup`,pe),e.removeEventListener(`pointercancel`,pe)}},[D,fe,pe]);let me=!u&&l&&ie!=null?{height:ie}:void 0;return(0,Y.jsxs)(`div`,{className:m(`relative flex flex-col`,u?`h-full w-full`:`min-h-28 w-full`,t),ref:g,style:{cursor:D?`grabbing`:`grab`,...me},children:[s?(0,Y.jsxs)(`div`,{className:m(`absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm`,u?`bottom-4 left-4`:`bottom-2 left-2`),children:[(0,Y.jsx)(`button`,{"aria-label":h.zoomIn,className:m(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:C>=a,onClick:se,title:h.zoomIn,type:`button`,children:(0,Y.jsx)(f,{"aria-hidden":`true`,size:16})}),(0,Y.jsx)(`button`,{"aria-label":h.zoomOut,className:m(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:C<=x,onClick:ce,title:h.zoomOut,type:`button`,children:(0,Y.jsx)(p,{"aria-hidden":`true`,size:16})}),(0,Y.jsx)(`button`,{"aria-label":h.resetView,className:m(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`),onClick:le,title:h.resetView,type:`button`,children:(0,Y.jsx)(d,{"aria-hidden":`true`,size:16})})]}):null,(0,Y.jsx)(`div`,{className:m(`flex h-full w-full flex-1 origin-center items-center justify-center transition-transform duration-150 ease-out`),onPointerDown:de,ref:_,role:`application`,style:{transform:`translate(${T.x}px, ${T.y}px) scale(${C})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},Gw=(e,t)=>new Promise(n=>{let r=setTimeout(n,e);t(()=>{clearTimeout(r),n()})}),Kw=async(e,{chart:t,config:n},r,i)=>{try{let i=e.getMermaid(n),a=t.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),o=`mermaid-${Math.abs(a)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:s}=await i.render(o,t),c=cS(s);return{ok:!0,svg:r?s:lS(s),size:c}}catch(e){return{ok:!1,error:e instanceof Error?e.message:i}}},qw=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=Q(),[o,s]=(0,A.useState)(null),[c,l]=(0,A.useState)(!1),[u,d]=(0,A.useState)(``),[f,p]=(0,A.useState)(null),m=Nx(),[h,g]=(0,A.useState)(``),[_,v]=(0,A.useState)(0),{mermaid:y}=(0,A.useContext)(Nw),b=Xx(),x=y?.errorComponent,{shouldRender:S,containerRef:C}=Db({immediate:r}),w=(0,A.useRef)(null),T=(0,A.useRef)(!1),E=(0,A.useRef)(!1),D=ox(),O=(0,A.useRef)(D),ee=(0,A.useRef)(null);(0,A.useEffect)(()=>(E.current=!0,()=>{var e;E.current=!1,(e=ee.current)==null||e.call(ee)}),[]),(0,A.useEffect)(()=>{var e;O.current=D,D||(e=ee.current)==null||e.call(ee)},[D]);let te=async e=>{O.current&&(await Gw(e,e=>{ee.current=e}),ee.current=null)};if((0,A.useEffect)(()=>{if(!S)return;if(!b){s(`Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.`);return}if(w.current={chart:e,config:n},T.current)return;let t=(e,t)=>{t.ok?(d(t.svg),p(t.size),g(t.svg)):e===w.current&&s(t.error)};(async()=>{T.current=!0,s(null),l(!0);try{let e=w.current;for(;e;){let n=performance.now(),i=await Kw(b,e,r,m.errorMermaid);if(!E.current||(t(e,i),i.ok&&await te(performance.now()-n),!E.current||e===w.current))return;e=w.current}}finally{T.current=!1,E.current&&l(!1)}})()},[e,n,_,S,b]),!(S||u||h))return(0,Y.jsx)(`div`,{className:a(`my-4 min-h-[200px]`,t),ref:C});if(c&&!u&&!h)return(0,Y.jsx)(`div`,{className:a(`my-4 flex justify-center p-4`,t),ref:C,children:(0,Y.jsxs)(`div`,{className:a(`flex items-center space-x-2 text-muted-foreground`),children:[(0,Y.jsx)(`div`,{className:a(`h-4 w-4 animate-spin rounded-full border-current border-b-2`)}),(0,Y.jsx)(`span`,{className:a(`text-sm`),children:`Loading diagram...`})]})});if(o&&!u&&!h)return x?(0,Y.jsx)(`div`,{ref:C,children:(0,Y.jsx)(x,{chart:e,error:o,retry:()=>v(e=>e+1)})}):(0,Y.jsxs)(`div`,{className:a(`rounded-md bg-red-50 p-4`,t),ref:C,children:[(0,Y.jsxs)(`p`,{className:a(`font-mono text-red-700 text-sm`),children:[`Mermaid Error: `,o]}),(0,Y.jsxs)(`details`,{className:a(`mt-2`),children:[(0,Y.jsx)(`summary`,{className:a(`cursor-pointer text-red-600 text-xs`),children:`Show Code`}),(0,Y.jsx)(`pre`,{className:a(`mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs`),children:e})]})]});let ne=u||h;return(0,Y.jsx)(`div`,{className:a(r?`size-full`:`max-h-[min(70vh,40rem)] w-full`,t),"data-streamdown":`mermaid`,ref:C,children:(0,Y.jsx)(Ww,{className:a(r?`size-full overflow-hidden`:`max-h-[min(70vh,40rem)] overflow-hidden`,t),contentSize:f,fitKey:e,fullscreen:r,isAutoFit:!0,maxZoom:3,minZoom:.1,showControls:i,zoomStep:.1,children:(0,Y.jsx)(`div`,{"aria-label":m.mermaidAriaLabel,className:a(`flex justify-center`,r?`size-full items-center`:null),dangerouslySetInnerHTML:{__html:ne},role:`img`})})})},Jw={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};Jw.node;var Yw=Se(Jw),Xw={name:`corner-down-right`,size:24,node:[[`path`,{d:`m15 10 5 5-5 5`,key:`qqa56n`}],[`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`,key:`z08zvw`}]]};Xw.node;var Zw=Se(Xw),Qw={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};Qw.node;var $w=Se(Qw),eT={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};eT.node;var tT=Se(eT),nT={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};nT.node;var rT=Se(nT),iT={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};iT.node;var aT=Se(iT),oT={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};oT.node;var sT=Se(oT),cT=n(`text-[15px] leading-[1.65] break-words`,`[&_p]:my-2 [&_p:first-child]:mt-0 [&_p:last-child]:mb-0`,`[&_ul]:my-2 [&_ul]:list-disc [&_ul]:pl-5 [&_ol]:my-2 [&_ol]:list-decimal [&_ol]:pl-5 [&_li]:my-0.5`,`[&_h1]:mt-4 [&_h1]:mb-2 [&_h1]:text-lg [&_h1]:font-semibold`,`[&_h2]:mt-4 [&_h2]:mb-2 [&_h2]:text-base [&_h2]:font-semibold`,`[&_h3]:mt-3 [&_h3]:mb-1.5 [&_h3]:font-semibold`,`[&_a]:text-brand [&_a]:underline [&_a]:underline-offset-2`,`[&_blockquote]:my-2 [&_blockquote]:border-l-2 [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground`,`[&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[13px]`,`[&_pre]:my-2 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:bg-muted [&_pre]:p-3`,`[&_pre_code]:bg-transparent [&_pre_code]:p-0`,`[&_table]:my-2 [&_table]:w-full [&_table]:border-collapse [&_table]:text-[13px]`,`[&_th]:border-b [&_th]:px-2 [&_th]:py-1.5 [&_th]:text-left [&_th]:font-medium`,`[&_td]:border-b [&_td]:px-2 [&_td]:py-1.5`);function lT({href:e,children:t}){let{t:n}=r(),i=De();return(0,Y.jsx)(`a`,{href:e,onClick:t=>{t.preventDefault(),e&&i(e,n(`common.linkFailed`))},children:t})}var uT={a:lT},dT=(0,A.memo)(function({content:e,streaming:t}){return(0,Y.jsx)(`div`,{className:cT,children:(0,Y.jsx)(Lw,{mode:t?`streaming`:`static`,controls:!1,lineNumbers:!1,linkSafety:{enabled:!1},components:uT,children:e})})});function fT(e){try{return new URL(e).hostname.replace(/^www\./,``)}catch{return e}}function pT(e){let t=e.title?.trim()||fT(e.url);return ye(`browsing`,`history`,`?q=${encodeURIComponent(t)}&visit=${e.historyId}`)}function mT(e){let t=new Set;return e.filter(e=>{let n=e.canonicalUrl||e.url;return!t.has(n)&&(t.add(n),!0)})}var hT=6;function gT({citations:e}){let{t}=r(),n=u(),[i,a]=(0,A.useState)(!1),o=i?e:e.slice(0,hT),s=e.length-hT;return(0,Y.jsxs)(`div`,{role:`group`,"aria-label":t(`ask.turn.sources`),className:`flex flex-wrap gap-1.5`,children:[o.map(e=>{let r=fT(e.url),i=e.title?.trim()||r;return(0,Y.jsxs)(ae,{to:pT(e),title:e.visitedAt?t(`ask.turn.sourceTitle`,{title:i,date:n.date(e.visitedAt)}):i,className:`flex h-[26px] max-w-[240px] items-center gap-1.5 rounded-full border px-2.5 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground hover:no-underline`,children:[(0,Y.jsx)(Oe,{domain:r,className:`size-3.5 rounded-[4px]`}),(0,Y.jsx)(`span`,{className:`truncate`,children:i})]},e.canonicalUrl||e.url)}),s>0&&(0,Y.jsx)(`button`,{type:`button`,onClick:()=>a(e=>!e),className:`h-[26px] rounded-full px-2.5 text-xs text-muted-foreground hover:text-foreground`,children:i?t(`ask.turn.lessSources`):t(`ask.turn.moreSources`,{count:s})})]})}function _T(e,t){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t)}…`:n}function vT({step:e}){let{t}=r();return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Y.jsxs)(`code`,{className:`font-mono text-xs break-all text-foreground/80`,children:[e.name,`(`,_T(e.arguments,240),`)`]}),e.pending?(0,Y.jsxs)(`span`,{className:`flex items-center gap-1.5 font-mono text-xs`,children:[(0,Y.jsx)(Ae,{className:`size-3 animate-spin`}),t(`ask.turn.toolPending`)]}):(0,Y.jsxs)(`code`,{className:n(`font-mono text-xs break-all`,e.isError&&`text-destructive`),children:[`→ `,e.isError?`${t(`ask.turn.toolFailed`)}: `:``,_T(e.result??``,280)]}),e.codeSource&&(0,Y.jsxs)(`details`,{className:`text-xs`,children:[(0,Y.jsx)(`summary`,{className:`cursor-pointer select-none`,children:t(`ask.turn.code`)}),(0,Y.jsx)(`pre`,{className:`mt-1 max-h-48 overflow-auto rounded-md bg-background/60 p-2 font-mono`,children:e.codeSource})]})]})}var yT=(0,A.memo)(function({turn:e}){let{t}=r(),[n,i]=(0,A.useState)(null),a=e.status===`streaming`,o=e.tools.length,s=e.reasoning.trim().length>0;if(!s&&o===0)return null;let c=n??(a&&e.content===``),l=!a&&o===0?t(`ask.turn.thinking`):o>0?t(s?`ask.turn.thinkingSearched`:`ask.turn.searchedOnly`,{count:o}):t(`ask.turn.thinking`);return(0,Y.jsxs)(C,{open:c,onOpenChange:i,className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(v,{className:`flex items-center gap-1.5 self-start text-[13px] text-muted-foreground hover:text-foreground`,children:[(0,Y.jsx)(c?ke:E,{className:`size-3.5`}),l]}),(0,Y.jsx)(_,{children:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2.5 rounded-[10px] bg-muted px-3.5 py-3 text-[13px] text-muted-foreground`,children:[s&&(0,Y.jsx)(`p`,{className:`whitespace-pre-wrap`,children:e.reasoning.trim()}),e.tools.map(e=>(0,Y.jsx)(vT,{step:e},e.id))]})})]})}),bT=(0,A.memo)(function({turn:e,canRetry:t,onRetry:i}){let{t:a}=r(),[o,s]=(0,A.useState)(!1),c=e.status===`streaming`,l=mT(e.citations),u=c&&e.content===``&&e.tools.length===0&&!e.reasoning,d=e.status===`error`,f=e.status===`cancelled`,p=async()=>{await navigator.clipboard.writeText(e.content),s(!0),window.setTimeout(()=>s(!1),1500)};return(0,Y.jsxs)(`div`,{className:`flex animate-rise flex-col gap-2.5`,children:[(0,Y.jsx)(yT,{turn:e}),u&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 text-[13px] text-muted-foreground`,children:[(0,Y.jsx)(`span`,{className:`size-1.5 animate-pulse rounded-full bg-brand`}),a(`ask.turn.working`)]}),e.content.trim()!==``&&(0,Y.jsx)(`div`,{className:`rounded-xl bg-popover px-[18px] py-3.5 shadow-card`,children:(0,Y.jsx)(dT,{content:e.content,streaming:c})}),e.notes.map(e=>(0,Y.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:a(`ask.turn.notes.${e.code}`)},e.code)),d&&(0,Y.jsxs)(`div`,{role:`alert`,className:`flex items-start gap-2.5 rounded-xl border border-destructive/30 bg-destructive/5 px-4 py-3 text-[13px]`,children:[(0,Y.jsx)(y,{className:`mt-0.5 size-4 shrink-0 text-destructive`}),(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Y.jsx)(`span`,{className:`font-medium`,children:a(`ask.turn.failedTitle`)}),(0,Y.jsx)(`span`,{className:`break-words text-muted-foreground`,children:e.error||a(`ask.turn.interrupted`)})]})]}),f&&(0,Y.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:a(`ask.turn.cancelled`)}),l.length>0&&!c&&(0,Y.jsx)(gT,{citations:l}),!c&&(0,Y.jsxs)(`div`,{className:n(`flex flex-wrap items-center gap-1.5`,d&&`order-last`),children:[l.length>0&&(0,Y.jsx)(Ce,{variant:`outline`,size:`sm`,asChild:!0,children:(0,Y.jsxs)(ae,{to:pT(l[0]),children:[(0,Y.jsx)(be,{}),a(`ask.turn.openInHistory`)]})}),e.content.trim()!==``&&(0,Y.jsxs)(Ce,{variant:`ghost`,size:`sm`,onClick:()=>void p(),children:[o?(0,Y.jsx)(_e,{}):(0,Y.jsx)(ve,{}),a(o?`ask.turn.copied`:`ask.turn.copy`)]}),t&&(0,Y.jsxs)(Ce,{variant:`ghost`,size:`sm`,onClick:i,children:[(0,Y.jsx)(xe,{}),a(e.status===`done`?`ask.turn.regenerate`:`ask.turn.retry`)]}),(e.model||e.usage)&&(0,Y.jsxs)(`span`,{className:`ml-auto flex min-w-0 items-center gap-2 font-mono text-[11px] text-muted-foreground`,children:[e.model&&(0,Y.jsx)(`span`,{className:`truncate`,title:a(`ask.turn.writtenBy`),children:e.model}),e.usage&&(0,Y.jsx)(`span`,{className:`shrink-0`,children:a(`ask.turn.tokens`,{prompt:e.usage.promptTokens,completion:e.usage.completionTokens})})]})]})]})});function xT(e){return`${e}-${crypto.randomUUID()}`}function ST(e){return wT(xT(`user`),`user`,e,`done`)}function CT(e,t){return{...wT(xT(`assistant`),`assistant`,``,`streaming`),providerId:e,model:t}}function wT(e,t,n,r){return{id:e,role:t,content:n,reasoning:``,tools:[],citations:[],notes:[],status:r}}function TT(e,t){let n=[];t.trim()&&n.push({role:`system`,content:t});for(let t of e)t.role===`user`?n.push({role:`user`,content:t.content}):t.content&&n.push({role:`assistant`,content:t.content});return n}function ET(e){let t=e.tools.length>0||e.notes.length>0,n={tools:e.tools,notes:e.notes};return{id:e.id,role:e.role,content:e.content,reasoning:e.reasoning||null,toolCallsJson:t?JSON.stringify(n):null,status:e.role===`assistant`?e.status:null}}function DT(e){if(!e)return{tools:[],notes:[]};try{let t=JSON.parse(e);if(Array.isArray(t))return{tools:t,notes:[]};if(t&&typeof t==`object`){let e=t;return{tools:e.tools??[],notes:e.notes??[]}}}catch{}return{tools:[],notes:[]}}function OT(e){let t=e.role===`assistant`,n=DT(e.toolCallsJson),r=e.status??`done`;return{id:e.id,role:t?`assistant`:`user`,content:e.content,reasoning:e.reasoning??``,tools:n.tools.map(e=>({...e,pending:!1})),citations:(e.citations??[]).map(e=>({historyId:e.historyId,profileId:e.profileId,url:e.url,title:e.title??null,visitedAt:e.visitedAt,score:e.score??null,canonicalUrl:e.canonicalUrl??null})),notes:n.notes,usage:e.usage??void 0,providerId:e.providerId??void 0,model:e.model??void 0,status:t?r===`streaming`?`cancelled`:r:`done`}}function kT(e){let t=0,n=0;for(let r of e){let e=r.codePointAt(0)??0;e>=12352&&e<=12543||e>=13312&&e<=40959||e>=44032&&e<=55215||e>=63744&&e<=64255?t+=1:n+=e<128?1:e<2048?2:e<65536?3:4}return t+Math.ceil(n/4)}function AT(e,t,n){return e+t.filter(e=>e.role===`user`||e.content).reduce((e,t)=>e+4+kT(t.content),0)+(n.trim()?4+kT(n):0)}function jT(e,t){return t?e>t?`over`:e>=t*.8?`near`:`ok`:`unknown`}function MT(e){return e<1024?String(e):e<10240?`${(e/1024).toFixed(1)}K`:ge(e)}function NT({used:e,contextLength:t,service:i}){let{t:a}=r(),o=jT(e,t),s=t?a(`ask.composer.context`,{used:MT(e),limit:ge(t)}):a(`ask.composer.contextUnknown`,{used:MT(e)}),c=t?a(`ask.composer.contextTitle`,{used:e.toLocaleString(),limit:t.toLocaleString()}):a(`ask.composer.contextUnknownTitle`,{used:e.toLocaleString(),service:i});return(0,Y.jsx)(`span`,{title:c,"aria-label":c,className:n(`shrink-0 font-mono text-[11px] tabular-nums`,o===`over`?`text-destructive`:o===`near`?`text-brand`:`text-muted-foreground`),children:s})}function PT({used:e,contextLength:t}){let{t:i}=r(),a=jT(e,t);return!t||a!==`near`&&a!==`over`?null:(0,Y.jsx)(`p`,{role:a===`over`?`alert`:`status`,className:n(`text-xs leading-5`,a===`over`?`text-destructive`:`text-brand`),children:i(a===`over`?`ask.composer.contextOver`:`ask.composer.contextNear`,{limit:ge(t)})})}var FT=200;function IT({streaming:e,picker:t,context:n,onSend:i,onStop:a,focusKey:o,initialText:s=``}){let{t:c}=r(),[l,u]=(0,A.useState)(s),d=(0,A.useRef)(null);(0,A.useEffect)(()=>{let e=d.current;e&&(e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,FT)}px`)},[l]),(0,A.useEffect)(()=>d.current?.focus(),[o]);let f=l.trim().length>0&&!e,p=n?AT(n.fixedTokens,n.turns,l):null,m=()=>{f&&(i(l),u(``))};return(0,Y.jsx)(`div`,{className:`px-8 pb-5`,children:(0,Y.jsxs)(`div`,{className:`mx-auto flex max-w-[780px] flex-col gap-2 rounded-2xl border bg-popover px-4 pt-3 pb-2.5 shadow-float`,children:[(0,Y.jsx)(`textarea`,{ref:d,rows:1,value:l,"aria-label":c(`ask.composer.label`),title:c(`ask.composer.hint`),placeholder:c(`ask.composer.placeholder`),onChange:e=>u(e.target.value),onKeyDown:e=>{e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),m())},className:`max-h-[200px] w-full resize-none bg-transparent leading-6 outline-none placeholder:text-muted-foreground`}),n&&p!==null&&(0,Y.jsx)(PT,{used:p,contextLength:n.contextLength}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Y.jsx)(`div`,{className:`min-w-0 flex-1`,children:t}),n&&p!==null&&(0,Y.jsx)(NT,{used:p,contextLength:n.contextLength,service:n.service}),e?(0,Y.jsx)(Ce,{size:`icon-sm`,variant:`secondary`,"aria-label":c(`ask.composer.stop`),onClick:a,className:`rounded-full`,children:(0,Y.jsx)(aT,{className:`fill-current`})}):(0,Y.jsx)(Ce,{size:`icon-sm`,"aria-label":c(`ask.composer.send`),disabled:!f,onClick:m,className:`rounded-full`,children:(0,Y.jsx)(Yw,{})})]})]})})}function LT({services:e,value:t,onChange:n,disabled:i}){let{t:a}=r(),[o,s]=(0,A.useState)(!1),c=je({queries:e.map(e=>({queryKey:[`ask-models`,e.id,e.baseUrl],queryFn:()=>pe.listProviderModels({purpose:`llm`,requestFormat:e.requestFormat,baseUrl:e.baseUrl??null,providerId:e.id}),enabled:o,staleTime:0}))}),l=e.find(e=>e.id===t.providerId);return(0,Y.jsxs)(T,{open:o,onOpenChange:s,children:[(0,Y.jsxs)(x,{disabled:i,"aria-label":a(`ask.composer.model`),className:`flex min-w-0 items-center gap-1 rounded-md px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none`,children:[(0,Y.jsx)(`span`,{className:`truncate`,children:l?`${l.name} · ${t.model}`:t.model}),(0,Y.jsx)(ke,{className:`size-3 shrink-0`})]}),(0,Y.jsx)(g,{align:`start`,className:`max-h-80 min-w-64`,children:e.map((e,r)=>{let i=c[r],s=RT(i.data,e,t);return(0,Y.jsxs)(h,{children:[r>0&&(0,Y.jsx)(b,{}),(0,Y.jsx)(re,{className:`text-xs text-muted-foreground`,children:e.name}),s.map(r=>{let i=t.providerId===e.id&&t.model===r.id;return(0,Y.jsxs)(S,{onSelect:()=>n({providerId:e.id,model:r.id}),className:`flex items-center gap-2`,children:[(0,Y.jsx)(_e,{className:i?`size-3.5`:`size-3.5 opacity-0`}),(0,Y.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs`,children:r.id}),(0,Y.jsx)(`span`,{className:`shrink-0 text-[11px] text-muted-foreground`,children:r.loadedContextLength?a(`ask.composer.modelLoaded`,{size:ge(r.loadedContextLength)}):r.maxContextLength?a(`ask.composer.modelUpTo`,{size:ge(r.maxContextLength)}):``})]},r.id)}),i.isPending&&o&&(0,Y.jsx)(`p`,{className:`px-2 py-1.5 text-xs text-muted-foreground`,children:a(`ask.composer.modelsLoading`)}),i.isError&&(0,Y.jsx)(`p`,{className:`px-2 py-1.5 text-xs text-muted-foreground`,children:a(`ask.composer.modelsFailed`,{service:e.name})})]},e.id)})})]})}function RT(e,t,n){let r=(e??[]).filter(e=>e.kind!==`embedding`),i=new Set(r.map(e=>e.id)),a=[t.defaultModel,n.providerId===t.id?n.model:``].filter(e=>e&&!i.has(e)).filter((e,t,n)=>n.indexOf(e)===t).map(e=>({id:e,kind:`chat`,loaded:null,loadedContextLength:null,maxContextLength:null}));return[...r,...a]}var zT=[`ask`,`conversations`],BT=100;function VT(){return Be({queryKey:zT,initialPageParam:null,queryFn:({pageParam:e})=>pe.listConversations({limit:BT,cursor:e}),getNextPageParam:e=>e.nextCursor??void 0,select:e=>e.pages.flatMap(e=>e.conversations),staleTime:3e4})}function HT(e){let t=[];for(let n of e){let e=d(n.updatedAt),r=t[t.length-1];r&&r.day.getTime()===e.getTime()?r.items.push(n):t.push({day:e,items:[n]})}return t}function UT({conversations:t,activeId:i,draftTitle:a,onSelect:o,onNew:s,onDeleted:l}){let{t:f}=r(),p=u(),h=e(),[g,_]=(0,A.useState)(null),[v,y]=(0,A.useState)(null),b=t.data??[],x=a!==null&&!b.some(e=>e.id===i),S=HT(b),C=d(new Date).getTime(),T=e=>{let t=Math.round((C-e.getTime())/864e5);return t===0?f(`common.today`):t===1?f(`common.yesterday`):p.date(e,{dateStyle:`medium`})},E=()=>h.invalidateQueries({queryKey:zT}),D=async e=>{try{let t=await pe.exportConversation({id:e,labels:{untitled:f(`ask.untitled`),you:f(`ask.export.you`),assistant:f(`ask.export.assistant`),pagesUsed:f(`ask.turn.sources`)}});if(t.status===`cancelled`)return;if(t.status===`gone`){le.error(f(`ask.export.gone`)),E();return}le.success(f(`ask.export.done`),{description:t.path,action:{label:f(Re()),onClick:()=>void ze(t.path,f(`settingsStorage.location.failed`))}})}catch(e){le.error(f(`ask.export.failed`),{description:c(e,`export_ai_conversation`)})}};return(0,Y.jsxs)(`aside`,{...te(),"aria-label":f(`ask.list.label`),className:`flex w-[240px] shrink-0 flex-col gap-1.5 overflow-y-auto border-r p-3.5`,children:[(0,Y.jsxs)(Ce,{variant:`secondary`,onClick:s,className:`h-10 shrink-0 gap-2 rounded-[10px] bg-muted text-sm font-medium text-foreground hover:bg-muted/70`,children:[(0,Y.jsx)(Me,{className:`size-4`}),f(`ask.newChat`),(0,Y.jsx)(`kbd`,{className:`font-mono text-[11px] text-muted-foreground`,children:`⌘N`})]}),x&&(0,Y.jsxs)(`div`,{className:`mt-3`,children:[(0,Y.jsx)(GT,{children:f(`common.today`)}),(0,Y.jsx)(KT,{active:!0,title:a||f(`ask.untitled`),time:p.time(new Date)})]}),t.isPending&&(0,Y.jsx)(`div`,{className:`mt-3 flex flex-col gap-2`,children:[0,1,2].map(e=>(0,Y.jsx)(de,{className:`h-[52px] rounded-[10px]`},e))}),t.isError&&(0,Y.jsx)(`p`,{className:`px-2 pt-4 text-[13px] text-muted-foreground`,children:f(`ask.list.loadFailed`)}),t.isSuccess&&b.length===0&&!x&&(0,Y.jsx)(`p`,{className:`px-2 pt-4 text-[13px] text-muted-foreground`,children:f(`ask.list.empty`)}),S.map((e,t)=>(0,Y.jsxs)(`div`,{className:n(t===0&&!x?`mt-3`:`mt-1`),children:[(0,Y.jsx)(GT,{children:T(e.day)}),e.items.map(e=>(0,Y.jsx)(KT,{active:e.id===i,title:e.title||f(`ask.untitled`),time:p.time(e.updatedAt),onSelect:()=>o(e.id),onRename:()=>_(e),onExport:()=>void D(e.id),onDelete:()=>y(e)},e.id))]},e.day.getTime())),(0,Y.jsx)(WT,{enabled:t.hasNextPage&&!t.isFetchingNextPage,onVisible:t.fetchNextPage}),t.isFetchingNextPage&&(0,Y.jsx)(de,{className:`mt-1 h-[52px] rounded-[10px]`}),(0,Y.jsx)(qT,{conversation:g,onClose:()=>_(null),onRenamed:E}),(0,Y.jsx)(O,{open:v!==null,onOpenChange:e=>!e&&y(null),children:(0,Y.jsxs)(ee,{children:[(0,Y.jsxs)(m,{children:[(0,Y.jsx)(k,{children:f(`ask.list.deleteTitle`)}),(0,Y.jsx)(se,{children:f(`ask.list.deleteBody`,{title:v?.title||f(`ask.untitled`)})})]}),(0,Y.jsxs)(w,{children:[(0,Y.jsx)(ce,{children:f(`common.cancel`)}),(0,Y.jsx)(oe,{variant:`destructive`,onClick:async()=>{if(v)try{await pe.deleteConversation(v.id),l(v.id),await E()}catch{le.error(f(`ask.list.deleteFailed`))}},children:f(`ask.list.delete`)})]})]})})]})}function WT({enabled:e,onVisible:t}){let n=(0,A.useRef)(null);return(0,A.useEffect)(()=>{let r=n.current;if(!e||!r)return;let i=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&t()});return i.observe(r),()=>i.disconnect()},[e,t]),(0,Y.jsx)(`div`,{ref:n,"aria-hidden":!0,className:`h-px`})}function GT({children:e}){return(0,Y.jsx)(`div`,{className:`px-2 pt-2.5 pb-1 text-xs text-muted-foreground`,children:e})}function KT({active:e,title:t,time:i,onSelect:a,onRename:o,onExport:s,onDelete:c}){let{t:l}=r();return(0,Y.jsxs)(`div`,{className:n(`group relative rounded-[10px] transition-colors`,e?`bg-card shadow-card`:`hover:bg-muted/60`),children:[(0,Y.jsxs)(`button`,{type:`button`,onClick:a,"aria-current":e?`true`:void 0,className:`flex w-full flex-col gap-0.5 rounded-[10px] px-3 py-2.5 pr-8 text-left`,children:[(0,Y.jsx)(`span`,{className:`truncate font-medium`,children:t}),(0,Y.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:i})]}),o&&c&&(0,Y.jsxs)(T,{children:[(0,Y.jsx)(x,{asChild:!0,children:(0,Y.jsx)(Ce,{variant:`ghost`,size:`icon-xs`,"aria-label":l(`ask.list.options`),className:`absolute top-2 right-1.5 opacity-0 group-focus-within:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100`,children:(0,Y.jsx)(tT,{})})}),(0,Y.jsxs)(g,{align:`end`,children:[(0,Y.jsxs)(S,{onSelect:o,children:[(0,Y.jsx)(rT,{}),l(`ask.list.rename`)]}),s&&(0,Y.jsxs)(S,{onSelect:s,children:[(0,Y.jsx)($w,{}),l(`ask.list.export`)]}),(0,Y.jsxs)(S,{variant:`destructive`,onSelect:c,children:[(0,Y.jsx)(sT,{}),l(`ask.list.delete`)]})]})]})]})}function qT({conversation:e,onClose:t,onRenamed:n}){let{t:i}=r();return(0,Y.jsx)(Le,{open:e!==null,onOpenChange:e=>!e&&t(),children:(0,Y.jsx)(Fe,{className:`sm:max-w-sm`,children:e&&(0,Y.jsx)(JT,{conversation:e,onDone:()=>{t(),n()},onCancel:t,labels:{title:i(`ask.list.renameTitle`),field:i(`ask.list.renameLabel`),cancel:i(`common.cancel`),save:i(`common.save`),failed:i(`ask.list.renameFailed`)}},e.id)})})}function JT({conversation:e,onDone:t,onCancel:n,labels:r}){let[i,a]=(0,A.useState)(e.title),[o,s]=(0,A.useState)(!1),c=i.trim().length>0,l=async()=>{if(c&&!o){s(!0);try{await pe.renameConversation({id:e.id,title:i.trim()}),t()}catch{le.error(r.failed),s(!1)}}};return(0,Y.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),l()},className:`flex flex-col gap-4`,children:[(0,Y.jsx)(Ne,{children:(0,Y.jsx)(Ie,{children:r.title})}),(0,Y.jsx)(ne,{autoFocus:!0,"aria-label":r.field,value:i,maxLength:120,onChange:e=>a(e.target.value)}),(0,Y.jsxs)(Pe,{children:[(0,Y.jsx)(Ce,{type:`button`,variant:`ghost`,onClick:n,children:r.cancel}),(0,Y.jsx)(Ce,{type:`submit`,disabled:!c||o,children:r.save})]})]})}function YT({remoteProvider:e,onPick:t}){let{t:n}=r(),i=[n(`ask.empty.example1`),n(`ask.empty.example2`),n(`ask.empty.example3`),n(`ask.empty.example4`)];return(0,Y.jsxs)(`div`,{className:`mx-auto flex max-w-[600px] flex-col items-center gap-[18px] px-8 pt-[16vh] pb-8 text-center animate-rise`,children:[(0,Y.jsx)(ie,{className:`size-10`}),(0,Y.jsx)(`h1`,{className:`text-[22px] font-semibold tracking-[-0.01em]`,children:n(`ask.empty.title`)}),(0,Y.jsx)(`p`,{className:`max-w-[440px] text-[13px] leading-[1.55] text-muted-foreground`,children:e?n(`ask.empty.bodyRemote`,{provider:e}):n(`ask.empty.bodyLocal`)}),(0,Y.jsx)(`div`,{className:`flex w-full flex-col gap-1.5`,role:`group`,"aria-label":n(`ask.empty.examplesLabel`),children:i.map(e=>(0,Y.jsxs)(`button`,{type:`button`,onClick:()=>t(e),className:`flex items-center gap-2.5 rounded-[10px] border bg-card px-3.5 py-3 text-left transition-colors hover:bg-popover`,children:[(0,Y.jsx)(Zw,{className:`size-3.5 shrink-0 text-muted-foreground`}),e]},e))})]})}function XT(){let{t:e}=r();return(0,Y.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8`,children:(0,Y.jsxs)(`div`,{className:`flex max-w-[440px] flex-col items-center gap-4 text-center animate-rise`,children:[(0,Y.jsx)(ie,{className:`size-10`}),(0,Y.jsx)(`h1`,{className:`text-[22px] font-semibold tracking-[-0.01em]`,children:e(`ask.setup.title`)}),(0,Y.jsx)(`p`,{className:`text-[13px] leading-[1.6] text-muted-foreground`,children:e(`ask.setup.body`)}),(0,Y.jsx)(Ce,{asChild:!0,children:(0,Y.jsx)(ae,{to:`/settings/ai`,children:e(`ask.setup.action`)})}),(0,Y.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`ask.setup.optional`)})]})})}var ZT=`pathkeep://ai-stream`;function QT(e){return f(ZT,t=>{t&&e(t)})}function $T(e){let[t,n]=(0,A.useState)(()=>xT(`conv`)),[r,i]=(0,A.useState)([]),[a,o]=(0,A.useState)(!1),s=(0,A.useRef)([]),l=(0,A.useRef)(t),u=(0,A.useRef)(null),d=(0,A.useRef)(0),f=(0,A.useRef)(e);(0,A.useEffect)(()=>{f.current=e});let p=(0,A.useCallback)(e=>{s.current=e,i(e)},[]),m=(0,A.useCallback)((e,t)=>{let{providerId:n,titleFor:r,onSaved:i}=f.current;pe.saveConversation({id:t,title:r(t)??null,providerId:n,messages:e.map(ET)}).then(i).catch(()=>void 0)},[]),h=(0,A.useCallback)(e=>{e.frame=null;let t={...e.turn};p(s.current.map(e=>e.id===t.id?t:e))},[p]),g=(0,A.useCallback)(e=>{e.frame===null&&(e.frame=requestAnimationFrame(()=>h(e)))},[h]),_=(0,A.useCallback)((e,t,n)=>{if(u.current!==e)return;e.frame!==null&&cancelAnimationFrame(e.frame),e.unsubscribe?.(),u.current=null,d.current+=1;let r={...e.turn,status:t,error:n},i=s.current.map(e=>e.id===r.id?r:e);p(i),o(!1),m(i,l.current)},[p,m]),v=(0,A.useCallback)((e,t)=>{if(u.current!==e)return;let n=e.turn;switch(t.kind){case`token`:n.content+=t.text;break;case`reasoning`:n.reasoning+=t.text;break;case`toolCall`:n.content.trim()&&(n.reasoning+=`${n.reasoning?` + +`:``}${n.content.trim()}`),n.content=``,n.tools=[...n.tools,{id:xT(`tool`),callId:t.callId,name:t.name,arguments:t.arguments,pending:!0}];break;case`toolResult`:n.tools=n.tools.map(e=>e.pending&&(e.callId?e.callId===t.callId:e.name===t.name)?{...e,pending:!1,result:t.result,isError:t.isError,codeSource:t.codeSource}:e);break;case`usage`:n.usage={promptTokens:(n.usage?.promptTokens??0)+t.promptTokens,completionTokens:(n.usage?.completionTokens??0)+t.completionTokens};break;case`citations`:n.citations=t.citations;break;case`note`:n.notes=[...n.notes,t.code];break;case`done`:_(e,`done`);return;case`error`:_(e,`error`,t.message);return}g(e)},[_,g]),y=(0,A.useCallback)(e=>{let{providerId:t,model:n,systemPrompt:r}=f.current,i=CT(t??``,n??``),a={generation:++d.current,runId:null,turn:i,unsubscribe:null,frame:null};u.current=a,p([...e,i]),o(!0),(async()=>{let o=[],s=await QT(e=>{a.runId===null?o.push(e):e.runId===a.runId&&v(a,e.chunk)});if(u.current!==a)return s();a.unsubscribe=s;let d;try{d=(await pe.sendChat({messages:TT(e,r),providerId:t,model:n,toolsEnabled:!0,conversationId:l.current,messageId:i.id})).runId}catch(e){_(a,`error`,c(e));return}if(u.current!==a)pe.cancelChat(d).catch(()=>void 0);else{a.runId=d;for(let e of o.splice(0))e.runId===d&&v(a,e.chunk)}})()},[v,p,_]),b=(0,A.useCallback)(e=>{let t=e.trim();t&&!u.current&&y([...s.current,ST(t)])},[y]),x=(0,A.useCallback)(()=>{let e=u.current;e&&(e.runId&&pe.cancelChat(e.runId).catch(()=>void 0),_(e,`cancelled`))},[_]),S=(0,A.useCallback)((e,t)=>{let n=t.trim();if(!n||u.current)return;let r=s.current,i=r.findIndex(t=>t.id===e);i<0||r[i].role!==`user`||y([...r.slice(0,i),ST(n)])},[y]),C=(0,A.useCallback)(()=>{if(u.current)return;let e=s.current;e[e.length-1]?.role===`assistant`&&y(e.slice(0,-1))},[y]),w=(0,A.useCallback)((e,t)=>{x(),l.current=e,n(e),p(t)},[p,x]),T=(0,A.useCallback)(()=>w(xT(`conv`),[]),[w]);return(0,A.useEffect)(()=>()=>{let e=u.current;e?.runId&&pe.cancelChat(e.runId).catch(()=>void 0),e&&_(e,`cancelled`)},[_]),{conversationId:t,turns:r,streaming:a,send:b,edit:S,stop:x,retry:C,open:w,startNew:T}}var eE=(0,A.memo)(function({turn:e,canEdit:t,dropsLater:n,onEdit:i}){let{t:a}=r(),[o,s]=(0,A.useState)(null),c=(0,A.useRef)(null),l=o!==null;if((0,A.useEffect)(()=>{if(o===null)return;let e=c.current;e&&(e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,240)}px`)},[o]),(0,A.useEffect)(()=>{l&&c.current?.focus()},[l]),o!==null){let e=()=>{o.trim()&&(i(o),s(null))};return(0,Y.jsxs)(`div`,{className:`flex w-full max-w-[80%] flex-col gap-2 self-end rounded-[18px] border bg-popover px-4 py-3 shadow-card animate-rise`,children:[(0,Y.jsx)(`textarea`,{ref:c,value:o,"aria-label":a(`ask.edit.label`),onChange:e=>s(e.target.value),onKeyDown:t=>{t.key===`Escape`?(t.preventDefault(),s(null)):t.key!==`Enter`||t.shiftKey||t.nativeEvent.isComposing||(t.preventDefault(),e())},className:`max-h-[240px] w-full resize-none bg-transparent leading-normal outline-none`}),n&&(0,Y.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:a(`ask.edit.dropsLater`)}),(0,Y.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,Y.jsx)(Ce,{variant:`ghost`,size:`sm`,onClick:()=>s(null),children:a(`common.cancel`)}),(0,Y.jsx)(Ce,{size:`sm`,disabled:!o.trim(),onClick:e,children:a(`ask.edit.send`)})]})]})}return(0,Y.jsxs)(`div`,{className:`group flex max-w-[80%] items-start gap-1 self-end`,children:[t&&(0,Y.jsx)(Ce,{variant:`ghost`,size:`icon-xs`,"aria-label":a(`ask.edit.action`),onClick:()=>s(e.content),className:`mt-2 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100`,children:(0,Y.jsx)(rT,{})}),(0,Y.jsx)(`div`,{className:`rounded-[18px] bg-user-bubble px-4 py-2.5 leading-normal whitespace-pre-wrap text-user-bubble-foreground animate-rise`,children:e.content})]})}),tE=64;function nE(){let e=(0,A.useRef)(null),t=(0,A.useRef)(null),n=(0,A.useRef)(!0),r=(0,A.useCallback)(()=>{let t=e.current;t&&(t.scrollTop=t.scrollHeight)},[]),i=(0,A.useCallback)(()=>{n.current=!0,r()},[r]),a=(0,A.useCallback)(()=>{let t=e.current;t&&(n.current=t.scrollHeight-t.scrollTop-t.clientHeight{let e=t.current;if(!e)return;let i=new ResizeObserver(()=>{n.current&&r()});return i.observe(e),()=>i.disconnect()},[r]),{scrollRef:e,contentRef:t,onScroll:a,pin:i}}var rE=s({default:()=>iE});function iE(){let e=ue();return(0,Y.jsx)(oE,{services:me(e.config.ai),systemPrompt:e.config.ai.assistantSystemPrompt})}var aE=[`ask-context`];function oE({services:n,systemPrompt:i}){let{t:a}=r(),o=e(),s=n[0],[c,l]=(0,A.useState)(null),u=c&&n.some(e=>e.id===c.providerId)?c:s?{providerId:s.id,model:s.defaultModel}:null,d=n.find(e=>e.id===u?.providerId),f=u?.providerId??null,p=d&&!he(d)?d.name:null,m=t({queryKey:[...aE,u?.providerId,u?.model],queryFn:()=>pe.chatContext({providerId:u?.providerId,model:u?.model}),enabled:u!==null,staleTime:3e4}),h=VT(),[g,_]=D(),[v,y]=(0,A.useState)(!1),b=(0,A.useRef)(0),{scrollRef:x,contentRef:S,onScroll:C,pin:w}=nE(),T=$T({providerId:f??``,model:u?.model??null,systemPrompt:i,titleFor:e=>h.data?.find(t=>t.id===e)?.title,onSaved:()=>{o.invalidateQueries({queryKey:zT}),o.invalidateQueries({queryKey:aE})}}),{open:E,startNew:O,send:ee}=T,te=(0,A.useCallback)(()=>{b.current+=1,y(!1),O()},[O]),ne=(0,A.useCallback)(async e=>{let t=++b.current;y(!0);try{let n=await pe.loadConversation(e);if(t!==b.current)return;if(!n)throw Error(`missing`);let r=n.messages.map(OT);E(e,r);let i=r.findLast(e=>e.model&&e.providerId);l(i?.model&&i.providerId?{providerId:i.providerId,model:i.model}:null),w()}catch{t===b.current&&le.error(a(`ask.loadFailed`))}finally{t===b.current&&y(!1)}},[E,w,a]),[re]=(0,A.useState)(()=>g.get(`q`)??``);(0,A.useEffect)(()=>{(g.get(`new`)===`1`||g.get(`q`))&&(te(),_({},{replace:!0}))},[g,_,te]),(0,A.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`n`&&(e.preventDefault(),te())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[te]);let ie=e=>{w(),ee(e)},oe=T.turns.find(e=>e.role===`user`)?.content??``,k=T.turns.length-1;return(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-1`,children:[(0,Y.jsx)(UT,{conversations:h,activeId:T.conversationId,draftTitle:oe.slice(0,60),onSelect:e=>{e!==T.conversationId&&ne(e)},onNew:te,onDeleted:e=>{e===T.conversationId&&te()}}),(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Y.jsxs)(`div`,{ref:x,onScroll:C,className:`flex-1 overflow-y-auto`,children:[(0,Y.jsx)(fe,{}),(0,Y.jsx)(`div`,{ref:S,children:v?(0,Y.jsx)(sE,{label:a(`ask.loadingConversation`)}):T.turns.length===0?f?(0,Y.jsx)(YT,{remoteProvider:p,onPick:ie}):(0,Y.jsx)(XT,{}):(0,Y.jsx)(`div`,{className:`mx-auto flex max-w-[760px] flex-col gap-5 px-8 py-7`,children:T.turns.map((e,t)=>e.role===`user`?(0,Y.jsx)(eE,{turn:e,canEdit:f!==null&&!T.streaming,dropsLater:t{w(),T.edit(e.id,t)}},e.id):(0,Y.jsx)(bT,{turn:e,canRetry:f!==null&&t===k&&!T.streaming,onRetry:T.retry},e.id))})})]}),u?(0,Y.jsx)(IT,{initialText:re,streaming:T.streaming,picker:(0,Y.jsx)(LT,{services:n,value:u,onChange:l,disabled:T.streaming}),context:m.data?{turns:T.turns,fixedTokens:m.data.fixedTokens,contextLength:m.data.contextLength,service:d?.name??``}:null,onSend:ie,onStop:T.stop,focusKey:T.conversationId}):T.turns.length>0&&(0,Y.jsxs)(`p`,{className:`border-t px-8 py-4 text-center text-[13px] text-muted-foreground`,children:[a(`ask.setup.toContinue`),` `,(0,Y.jsx)(ae,{to:`/settings/ai`,className:`text-foreground underline`,children:a(`ask.setup.action`)})]})]})]})}function sE({label:e}){return(0,Y.jsxs)(`div`,{role:`status`,"aria-label":e,className:`mx-auto flex max-w-[760px] flex-col gap-4 px-8 py-7`,children:[(0,Y.jsx)(de,{className:`h-10 w-1/2 self-end rounded-[18px]`}),(0,Y.jsx)(de,{className:`h-5 w-40`}),(0,Y.jsx)(de,{className:`h-24 rounded-xl`})]})}export{qw as a,iE as default,Yx as i,vx as n,Nw as r,rE as t}; \ No newline at end of file diff --git a/site/public/app/assets/atlas-Cjq-yNEQ.png b/site/public/app/assets/atlas-Cjq-yNEQ.png new file mode 100644 index 00000000..56aa5d78 Binary files /dev/null and b/site/public/app/assets/atlas-Cjq-yNEQ.png differ diff --git a/site/public/app/assets/audit-CvU9jKUz.js b/site/public/app/assets/audit-CvU9jKUz.js new file mode 100644 index 00000000..d94e5301 --- /dev/null +++ b/site/public/app/assets/audit-CvU9jKUz.js @@ -0,0 +1 @@ +import{F as e}from"./index-CteWxeiL.js";var t={getRunDetail:t=>e(`load_audit_run_detail`,{runId:t}),getHealthReport:()=>e(`doctor_report`),repairHealth:()=>e(`repair_health`)};export{t}; \ No newline at end of file diff --git a/site/public/app/assets/backup-button-BkjMcbWN.js b/site/public/app/assets/backup-button-BkjMcbWN.js new file mode 100644 index 00000000..fedd023d --- /dev/null +++ b/site/public/app/assets/backup-button-BkjMcbWN.js @@ -0,0 +1 @@ +import{_ as e,i as t}from"./schedule-BcYH--Ck.js";import{dt as n,ft as r,pt as i,qt as a,ut as o}from"./main-CmsrHzbA.js";import{t as s}from"./button-C0JM8asg.js";import{r as c}from"./query-DyHGS9i8.js";import{J as l,k as u,m as d}from"./index-CteWxeiL.js";import{i as f}from"./app-CVcZz016.js";import{c as p}from"./spaces-BqDG3Cu2.js";var m=u();function h(){let{t:e}=l(),s=d(),u=f(),h=r(),g=t(),_=i(),v=u.archiveStatus.lastSuccessfulBackupAt,y=u.recentRuns[0]?.status===`failed`,b=o(h.data,_),x=h.data?.dueAfterHours??24,S=v&&_-Date.parse(v)void i.run(),disabled:i.running,className:c(`h-9`,n),children:[(0,m.jsx)(e,{className:c(i.running&&`animate-spin`)}),i.running?a==null?r(`shell.backup.running`):`${r(`shell.backup.running`)} ${Math.round(a)}%`:r(`shell.backup.now`)]})}export{h as n,g as t}; \ No newline at end of file diff --git a/site/public/app/assets/backup-page-CTH5R1oe.js b/site/public/app/assets/backup-page-CTH5R1oe.js new file mode 100644 index 00000000..8a85c34a --- /dev/null +++ b/site/public/app/assets/backup-page-CTH5R1oe.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dist-js-stWNT68W.js","./index-CteWxeiL.js","./webview-CaUlr0Qq.js","./window-DVG07HkV.js","./event-CTND-agQ.js"])))=>i.map(i=>d[i]); +import{t as e}from"./backup-button-BkjMcbWN.js";import{i as t,n,r}from"./section-card-BTUr59O6.js";import{_ as i,d as a,f as o,i as s,l as c,m as l,p as u,r as d}from"./schedule-BcYH--Ck.js";import{J as f,N as p,P as m,Q as h,Y as g,c as _,k as v,m as y,t as b,z as ee}from"./index-CteWxeiL.js";import{Ft as te,Ht as ne,It as re,Lt as x,Pt as ie,Ut as ae,Vt as oe,Wt as se,Xt as ce,at as le,ct as ue,dt as de,et as fe,ft as pe,ht as S,it as me,nt as he,ot as C,pt as ge,qt as _e,rt as w,st as ve,tt as ye,ut as be}from"./main-CmsrHzbA.js";import{m as xe}from"./spaces-BqDG3Cu2.js";import{t as T}from"./loader-circle-BRt0w1nZ.js";import{a as Se,c as E,i as D,l as Ce,o as O,r as we}from"./app-CVcZz016.js";import{c as Te,t as k}from"./button-C0JM8asg.js";import{a as Ee,i as De,n as Oe,r as ke,t as Ae}from"./select-BpsmShuc.js";import{O as je,i as Me,n as A,r as j}from"./query-DyHGS9i8.js";import{c as Ne,n as Pe,o as Fe,r as Ie,s as Le,t as M}from"./schedule-copy-DPACeJ9I.js";import{n as Re}from"./queries-DuRWdcwY.js";import{a as N,c as ze,d as Be,f as Ve,i as P,l as He,n as F,o as I,p as Ue,r as L,s as We,t as Ge,u as Ke}from"./dialog-Euero0G3.js";import{o as qe}from"./dist-BNmHZVEB.js";import{t as Je}from"./copy-Da1fgnNr.js";import{a as Ye,c as Xe,i as Ze,l as R,n as Qe,o as $e,r as et,s as tt,t as nt,u as rt}from"./schedule-actions-CWE6basD.js";import{t as it}from"./x-G5NChC4d.js";import{i as z,n as B,r as at,t as ot}from"./tabs-ClQDWUQ9.js";import{t as st}from"./audit-CvU9jKUz.js";import{n as ct,t as lt}from"./toggle-group-D1jg9t1c.js";import{n as ut}from"./archive-tDw2mIBu.js";import{n as dt,t as ft}from"./switch-BQ_KsZoI.js";import{t as pt}from"./browser-icons-DSlRrt_0.js";var mt={name:`circle-dashed`,size:24,node:[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]};mt.node;var ht=Te(mt),gt={name:`file-archive`,size:24,node:[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]};gt.node;var _t=Te(gt),vt={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};vt.node;var yt=Te(vt),V=h(g(),1),H=ee;async function bt(e){let{open:t}=await b(async()=>{let{open:e}=await import(`./dist-js-stWNT68W.js`);return{open:e}},__vite__mapDeps([0,1]),import.meta.url),n=await t({title:e,multiple:!1,directory:!1,filters:[{name:`Google Takeout`,extensions:[`zip`]}]});return typeof n==`string`?n:null}async function xt(e,t){let{open:n}=await b(async()=>{let{open:e}=await import(`./dist-js-stWNT68W.js`);return{open:e}},__vite__mapDeps([0,1]),import.meta.url),r=await n({title:e,multiple:!1,directory:t});return typeof r==`string`?r:null}var St=new Set([`history`,`history.db`,`places.sqlite`]);function Ct(e){let t=e.split(/[\\/]/).filter(Boolean).pop()?.toLowerCase()??``;return St.has(t)||/\.(sqlite|db)$/.test(t)?`browser`:/\.(zip|json)$/.test(t)||t.includes(`takeout`)||/\.[a-z0-9]+$/.test(t)?`takeout`:`browser`}function wt(e,t){let[n,r]=(0,V.useState)(!1),i=(0,V.useRef)(e);return(0,V.useLayoutEffect)(()=>{i.current=e},[e]),(0,V.useEffect)(()=>{if(!t||!H())return;let e=!1,n;return b(async()=>{let{getCurrentWebview:e}=await import(`./webview-CaUlr0Qq.js`);return{getCurrentWebview:e}},__vite__mapDeps([2,3,1,4]),import.meta.url).then(({getCurrentWebview:e})=>e().onDragDropEvent(({payload:e})=>{e.type===`enter`?r(!0):e.type===`leave`?r(!1):e.type===`drop`&&(r(!1),e.paths[0]&&i.current(e.paths[0]))})).then(t=>e?t():n=t).catch(()=>void 0),()=>{e=!0,r(!1),n?.()}},[t]),n}function Tt(e){return m.openExternalUrl(Fe).catch(t=>{E.error(e,{description:_(t,`open_external_url`)})})}function Et(e,t){if(t.evidence===`message`)return e.message;if(t.evidence===`diagnostic`)return e.diagnostic??void 0}function Dt(e,t,n){let r={warnings:[],notes:[]};for(let i of e){let e=n(i);if(u(i.code)){let n=c[i.code];r.notes.push({text:t(`backupRuns.notes.${i.code}`,e),evidence:Et(i,n),action:n.action})}else if(l(i.code)){let n=a[i.code];r.warnings.push({text:t(`backupRuns.warnings.${i.code}`,e),evidence:Et(i,n),action:n.action})}else i.code.startsWith(`parser-`)?r.warnings.push({text:t(`backupRuns.warnings.parser`),evidence:i.diagnostic??i.message}):r.warnings.push({text:t(`backupRuns.warnings.other`),evidence:i.message})}return r}function Ot(){let e=D(),t=Re();return(0,V.useMemo)(()=>{let n=new Map;for(let e of t.data??[])n.set(e.profileId,`${e.browserName} ${e.profileName}`);for(let t of e.browserProfiles)n.set(t.profileId,`${t.browserName} ${t.profileName}`);return e=>e?n.get(e)??e:``},[t.data,e.browserProfiles])}var kt=[];function At({warnings:e,warningDetails:t},n=kt){let{t:r}=f(),i=y(),a=Ot();return(0,V.useMemo)(()=>Dt(o({warnings:e,warningDetails:t}).filter(e=>!n.includes(e.code)),r,e=>({profile:a(e.profileId),count:e.count??0,succeeded:e.succeeded??0,bytes:i.bytes(e.bytes??0)})),[e,t,n,r,i,a])}var U=v();function jt({action:e}){let{t}=f();return e===`full-disk-access`?(0,U.jsx)(k,{size:`sm`,variant:`outline`,className:`self-start`,onClick:()=>void Tt(t(`backup.sources.grantFailed`)),children:t(`backup.sources.grant`)}):(0,U.jsx)(k,{asChild:!0,size:`sm`,variant:`outline`,className:`self-start`,children:(0,U.jsx)(_e,{to:e===`ai-settings`?`/settings/ai`:`/settings/background`,children:t(e===`ai-settings`?`backupRuns.actions.aiSettings`:`backupRuns.actions.backgroundSettings`)})})}function Mt({entry:e,icon:t}){return(0,U.jsxs)(`li`,{className:`flex gap-2 rounded-lg bg-muted px-3 py-2`,children:[t,(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1.5`,children:[(0,U.jsx)(`p`,{className:`break-words`,children:e.text}),e.evidence&&(0,U.jsx)(`p`,{className:`font-mono text-[11px] break-words whitespace-pre-wrap text-muted-foreground`,children:e.evidence}),e.action&&(0,U.jsx)(jt,{action:e.action})]})]})}var Nt=(0,U.jsx)(x,{className:`mt-0.5 size-4 shrink-0 text-brand`}),Pt=(0,U.jsx)(oe,{className:`mt-0.5 size-4 shrink-0 text-muted-foreground`});function W({entries:e,icon:t}){return(0,U.jsx)(`ul`,{className:`flex flex-col gap-1.5 text-[13px]`,children:e.map((e,n)=>(0,U.jsx)(Mt,{entry:e,icon:t},`${n}-${e.text}`))})}function Ft({entries:e}){let{t}=f();return e.length===0?(0,U.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:t(`backup.runs.detail.noWarnings`)}):(0,U.jsx)(W,{entries:e,icon:Nt})}function It({entries:e}){let{t}=f();return e.length===0?null:(0,U.jsxs)(`section`,{className:`flex flex-col gap-1.5`,children:[(0,U.jsx)(`h3`,{className:`text-[13px] font-medium`,children:t(`backupRuns.notes.title`)}),(0,U.jsx)(W,{entries:e,icon:Pt})]})}function Lt({recorded:e,skip:t}){let{warnings:n,notes:r}=At({warnings:e.notes,warningDetails:e.noteDetails},t);return n.length===0&&r.length===0?null:(0,U.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[n.length>0&&(0,U.jsx)(W,{entries:n,icon:Nt}),r.length>0&&(0,U.jsx)(W,{entries:r,icon:Pt})]})}var Rt=e=>e.split(/[\\/]/).filter(Boolean).pop()??e;function zt({hovering:e,disabled:t,onPath:n}){let{t:r}=f(),[i,a]=(0,V.useState)(``),o=H();async function s(){try{let e=await bt(r(`backup.import.pickerTitle`));e&&n(e)}catch(e){E.error(r(`backup.import.pickFailed`),{description:_(e,`dialog_open`)})}}return(0,U.jsxs)(`div`,{className:j(`flex flex-col items-center gap-3 rounded-lg border border-dashed px-4 py-5 text-center transition-colors`,e&&`border-brand bg-brand-soft`),children:[(0,U.jsx)(_t,{className:`size-5 text-muted-foreground`}),(0,U.jsx)(`p`,{className:`text-[13px]`,children:r(e?`backup.import.dropActive`:`backup.import.drop`)}),o?(0,U.jsx)(k,{size:`sm`,variant:`outline`,disabled:t,onClick:()=>void s(),children:r(`backup.import.choose`)}):(0,U.jsxs)(`form`,{className:`flex w-full gap-2`,onSubmit:e=>{e.preventDefault(),n(i)},children:[(0,U.jsx)(S,{value:i,onChange:e=>a(e.target.value),placeholder:r(`backup.import.pathPlaceholder`),"aria-label":r(`backup.import.pathLabel`),className:`h-8 font-mono text-xs`}),(0,U.jsx)(k,{size:`sm`,variant:`outline`,type:`submit`,disabled:t||!i.trim(),children:r(`backup.import.inspect`)})]})]})}function Bt(){let{t:e}=f(),t=[e(`backup.import.steps.open`),e(`backup.import.steps.chrome`),e(`backup.import.steps.zip`),e(`backup.import.steps.drop`)];return(0,U.jsxs)(ie,{className:`group/steps flex flex-col gap-2`,children:[(0,U.jsxs)(re,{className:`flex items-center gap-1.5 self-start text-[13px] text-muted-foreground hover:text-foreground`,children:[(0,U.jsx)(se,{className:`size-3.5 transition-transform group-data-[state=open]/steps:rotate-90`,"aria-hidden":!0}),e(`backup.import.steps.title`)]}),(0,U.jsx)(te,{className:`overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg bg-muted px-3.5 py-3 text-[13px]`,children:[(0,U.jsx)(`ol`,{className:`flex list-decimal flex-col gap-1 pl-4`,children:t.map(e=>(0,U.jsx)(`li`,{children:e},e))}),(0,U.jsx)(`p`,{className:`text-muted-foreground`,children:e(`backup.import.steps.note`)})]})})]})}var Vt=e=>e.quarantinedFiles.some(e=>e.reasonCode?.startsWith(`chrome-my-activity`)),Ht=[`no-importable-files`];function Ut({inspection:e,path:t}){let{t:n}=f(),r=y(),i=e.candidateItems===0,a=Vt(e);return(0,U.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-lg bg-muted p-3 text-[13px]`,children:[(0,U.jsx)(`span`,{className:`truncate font-mono text-xs text-muted-foreground`,title:t,children:Rt(t)}),(0,U.jsx)(`span`,{className:`text-base font-semibold tabular`,children:i?n(`backup.import.nothing`):n(`backup.import.found`,{count:e.candidateItems})}),!i&&e.previewRangeStart&&e.previewRangeEnd&&(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:n(`backup.import.range`,{start:r.date(e.previewRangeStart),end:r.date(e.previewRangeEnd)})}),e.quarantinedFiles.length>0&&(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:n(`backup.import.setAside`,{count:e.quarantinedFiles.length})}),a&&(0,U.jsx)(`span`,{children:n(`backup.import.myActivity`)}),i&&!a&&(0,U.jsx)(`span`,{children:n(`backup.import.nothingHint`)}),!i&&(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:n(`backup.import.dedupe`)})]})}function Wt({progress:e}){let{t}=f(),n=y(),r=e?.progressPercent;return(0,U.jsxs)(`div`,{className:`flex flex-col gap-2.5 rounded-lg bg-muted p-3 text-[13px]`,children:[(0,U.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,U.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(T,{className:`size-3.5 animate-spin`,"aria-hidden":!0}),t(`backup.import.running`)]}),e?.processedRecords!=null&&e.totalRecords?(0,U.jsxs)(`span`,{className:`font-mono text-xs text-muted-foreground tabular`,children:[n.number(e.processedRecords),` /`,` `,n.number(e.totalRecords)]}):null]}),(0,U.jsx)(`div`,{role:`progressbar`,"aria-label":t(`backup.import.running`),"aria-valuenow":r==null?void 0:Math.round(r),className:`h-1 overflow-hidden rounded-full bg-background/60`,children:(0,U.jsx)(`div`,{className:j(`h-full rounded-full bg-brand`,r==null?`w-1/3 animate-indeterminate`:`transition-[width]`),style:r==null?void 0:{width:`${Math.min(100,Math.max(2,r))}%`}})})]})}function Gt({stopping:e,onStop:t}){let{t:n}=f();return(0,U.jsxs)(k,{size:`sm`,variant:`outline`,disabled:e,onClick:t,children:[e&&(0,U.jsx)(T,{className:`size-3.5 animate-spin`,"aria-hidden":!0}),n(e?`backup.import.stopping`:`backup.import.stop`)]})}function Kt({takeout:e,hovering:n}){let{t:r}=f(),i=y(),a=s(),{state:o,inspect:c,confirm:l,reset:u}=e;return(0,U.jsxs)(t,{title:r(`backup.import.title`),subtitle:r(`backup.import.subtitle`),children:[o.step===`idle`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(zt,{hovering:n,disabled:a.running,onPath:e=>void c(e)}),(0,U.jsx)(Bt,{}),o.error&&(0,U.jsxs)(`p`,{role:`alert`,className:`text-[13px] break-words text-destructive`,children:[(0,U.jsx)(`strong`,{className:`font-medium`,children:r(`backup.import.inspectFailed`)}),` `,o.error]})]}),o.step===`inspecting`&&(0,U.jsxs)(`p`,{className:`flex items-center gap-2 text-[13px] text-muted-foreground`,children:[(0,U.jsx)(T,{className:`size-3.5 animate-spin`,"aria-hidden":!0}),r(`backup.import.inspecting`,{name:Rt(o.path)})]}),o.step===`preview`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Ut,{inspection:o.inspection,path:o.path}),(0,U.jsx)(Lt,{recorded:o.inspection,skip:o.inspection.candidateItems===0?Ht:void 0}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[o.inspection.candidateItems>0&&(0,U.jsx)(k,{size:`sm`,disabled:a.running,onClick:()=>void l(),children:r(`backup.import.confirm`)}),(0,U.jsx)(k,{size:`sm`,variant:`ghost`,onClick:u,children:r(`common.cancel`)})]})]}),o.step===`importing`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Wt,{progress:o.progress}),(0,U.jsx)(`div`,{children:(0,U.jsx)(Gt,{stopping:o.stopping,onStop:()=>void e.stop()})})]}),o.step===`done`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-lg bg-muted p-3 text-[13px]`,children:[(0,U.jsx)(`span`,{className:`text-base font-semibold tabular`,children:o.result.stopped?r(`backup.import.stopped`,{count:o.result.importedItems}):r(`backup.import.imported`,{count:o.result.importedItems})}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:r(`backup.import.duplicates`,{count:o.result.duplicateItems})}),(o.result.sameVisitItems??0)>0&&(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:r(`backup.import.sameVisits`,{count:o.result.sameVisitItems??0})}),o.result.continuedFrom&&!o.result.stopped&&(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:r(`backup.import.continued`,{date:i.date(o.result.continuedFrom)})}),o.result.stopped&&(0,U.jsx)(`span`,{children:r(`backup.import.stoppedNext`)})]}),(0,U.jsx)(`div`,{children:(0,U.jsx)(k,{size:`sm`,variant:`outline`,onClick:u,children:r(`backup.import.another`)})})]})]})}var qt=e=>e.split(/[\\/]/).filter(Boolean).pop()??e,Jt={"chromium-history-db":`chromium`,"firefox-places-db":`firefox`,"safari-history-db":`safari`};function Yt({hovering:e,disabled:t,source:n,onSource:r,onPath:i}){let{t:a}=f(),[o,s]=(0,V.useState)(``),c=H();async function l(e){try{let t=await xt(a(e?`backupImport.browser.folderPickerTitle`:`backupImport.browser.pickerTitle`),e);t&&i(t)}catch(e){E.error(a(`backup.import.pickFailed`),{description:_(e,`dialog_open`)})}}return(0,U.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,U.jsxs)(`div`,{className:j(`flex flex-col items-center gap-3 rounded-lg border border-dashed px-4 py-5 text-center transition-colors`,e&&`border-brand bg-brand-soft`),children:[(0,U.jsx)(xe,{className:`size-5 text-muted-foreground`}),(0,U.jsx)(`p`,{className:`text-[13px]`,children:a(e?`backup.import.dropActive`:`backupImport.browser.drop`)}),c?(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(k,{size:`sm`,variant:`outline`,disabled:t,onClick:()=>void l(!1),children:a(`backupImport.browser.chooseFile`)}),(0,U.jsxs)(k,{size:`sm`,variant:`outline`,disabled:t,onClick:()=>void l(!0),children:[(0,U.jsx)(ne,{}),a(`backupImport.browser.chooseFolder`)]})]}):(0,U.jsxs)(`form`,{className:`flex w-full gap-2`,onSubmit:e=>{e.preventDefault(),i(o)},children:[(0,U.jsx)(S,{value:o,onChange:e=>s(e.target.value),placeholder:a(`backupImport.browser.pathPlaceholder`),"aria-label":a(`backupImport.browser.pathLabel`),className:`h-8 font-mono text-xs`}),(0,U.jsx)(k,{size:`sm`,variant:`outline`,type:`submit`,disabled:t||!o.trim(),children:a(`backupImport.browser.inspect`)})]})]}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-[13px]`,children:[(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:a(`backupImport.browser.from`)}),(0,U.jsxs)(Ae,{value:n,onValueChange:e=>r(e),children:[(0,U.jsx)(De,{size:`sm`,className:`w-48`,"aria-label":a(`backupImport.browser.from`),children:(0,U.jsx)(Ee,{})}),(0,U.jsx)(Oe,{children:me.map(e=>(0,U.jsx)(ke,{value:e,children:a(`backupImport.browser.sources.${e}`)},e))})]})]})]})}function Xt({path:e,source:t,inspection:n}){let{t:r}=f(),i=y(),a=le(n),o=Jt[n.recognizedFiles[0]?.kind??``],s=t===`detect`?o?r(`backupImport.browser.detected.${o}`):null:r(`backupImport.browser.sources.${t}`),c=n.previewEntries.slice(0,5);return(0,U.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-lg bg-muted p-3 text-[13px]`,"data-testid":`browser-import-preview`,children:[(0,U.jsxs)(`span`,{className:`truncate font-mono text-xs text-muted-foreground`,title:n.recognizedFiles[0]?.path??e,children:[qt(n.recognizedFiles[0]?.path??e),s&&` · ${s}`]}),(0,U.jsx)(`span`,{className:`text-base font-semibold tabular`,children:r(`backupImport.browser.newVisits`,{count:a})}),(0,U.jsx)(`span`,{className:`text-muted-foreground tabular`,children:r(`backupImport.browser.already`,{count:n.duplicateItems})}),C(n)>0&&(0,U.jsx)(`span`,{className:`text-muted-foreground tabular`,children:r(`backupImport.browser.syncCopies`,{count:C(n)})}),(0,U.jsxs)(`span`,{className:`text-muted-foreground tabular`,children:[r(`backupImport.browser.inFile`,{count:n.candidateItems}),n.previewRangeStart&&n.previewRangeEnd&&` · ${r(`backupImport.browser.range`,{start:i.date(n.previewRangeStart),end:i.date(n.previewRangeEnd)})}`]})]}),c.length>0&&(0,U.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:r(`backupImport.browser.sample`)}),(0,U.jsx)(`ul`,{className:`flex flex-col text-[13px]`,children:c.map(e=>(0,U.jsxs)(`li`,{className:`flex items-baseline gap-2 py-0.5`,children:[(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:e.url,children:e.title||e.url||r(`backupImport.browser.untitled`)}),e.status===`duplicate`&&(0,U.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:r(`backupImport.browser.alreadySaved`)}),e.status===`same-visit`&&(0,U.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:r(`backupImport.browser.syncCopy`)}),(0,U.jsx)(`span`,{className:`shrink-0 font-mono text-xs text-muted-foreground tabular`,children:i.dayAndTime(e.visitedAt)})]},`${e.sourceVisitId}-${e.visitedAt}`))})]}),(0,U.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[o!==`chromium`&&`${r(`backupImport.browser.historyOnly`)} `,r(`backupImport.browser.copyOnly`)]})]})}function Zt({progress:e}){let{t}=f(),n=y(),r=e?.progressPercent;return(0,U.jsxs)(`div`,{className:`flex flex-col gap-2.5 rounded-lg bg-muted p-3 text-[13px]`,children:[(0,U.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,U.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(T,{className:`size-3.5 animate-spin`,"aria-hidden":!0}),t(`backupImport.browser.running`)]}),e?.processedRecords!=null&&(0,U.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground tabular`,children:e.totalRecords?t(`backupImport.browser.processed`,{done:n.number(e.processedRecords),total:n.number(e.totalRecords)}):n.number(e.processedRecords)})]}),(0,U.jsx)(`div`,{role:`progressbar`,"aria-label":t(`backupImport.browser.running`),"aria-valuenow":r==null?void 0:Math.round(r),className:`h-1 overflow-hidden rounded-full bg-background/60`,children:(0,U.jsx)(`div`,{className:j(`h-full rounded-full bg-brand`,r==null?`w-1/3 animate-indeterminate`:`transition-[width]`),style:r==null?void 0:{width:`${Math.min(100,Math.max(2,r))}%`}})})]})}function Qt({state:e,hovering:n,onInspect:r,onConfirm:i,onStop:a,onReset:o}){let{t:c}=f(),l=s(),[u,d]=(0,V.useState)(`detect`);return(0,U.jsxs)(t,{title:c(`backupImport.browser.title`),subtitle:c(`backupImport.browser.subtitle`),children:[e.step===`idle`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Yt,{hovering:n,disabled:l.running,source:u,onSource:d,onPath:e=>r(e,u)}),e.error&&(0,U.jsxs)(`p`,{role:`alert`,className:`text-[13px] break-words text-destructive`,children:[(0,U.jsx)(`strong`,{className:`font-medium`,children:c(`backupImport.browser.inspectFailed`)}),` `,e.error]})]}),e.step===`inspecting`&&(0,U.jsxs)(`p`,{className:`flex items-center gap-2 text-[13px] text-muted-foreground`,children:[(0,U.jsx)(T,{className:`size-3.5 animate-spin`,"aria-hidden":!0}),c(`backupImport.browser.inspecting`,{name:qt(e.path)})]}),e.step===`preview`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Xt,{path:e.path,source:e.source,inspection:e.inspection}),ve(e.inspection)===0&&(0,U.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:c(`backupImport.browser.nothingNew`)}),l.running&&(0,U.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:c(`backupImport.browser.busy`)}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[ve(e.inspection)>0&&(0,U.jsx)(k,{size:`sm`,disabled:l.running,onClick:i,children:c(`backupImport.browser.confirm`,{count:ve(e.inspection)})}),(0,U.jsx)(k,{size:`sm`,variant:`ghost`,onClick:o,children:c(`common.cancel`)})]})]}),e.step===`importing`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Zt,{progress:e.progress}),(0,U.jsx)(`div`,{children:(0,U.jsx)(Gt,{stopping:e.stopping,onStop:a})})]}),e.step===`done`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-lg bg-muted p-3 text-[13px]`,children:[(0,U.jsx)(`span`,{className:`text-base font-semibold tabular`,children:e.result.stopped?c(`backup.import.stopped`,{count:e.result.importedItems}):c(`backupImport.browser.done`,{count:e.result.importedItems})}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:c(`backup.import.duplicates`,{count:e.result.duplicateItems})}),C(e.result)>0&&(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:c(`backupImport.browser.syncCopies`,{count:C(e.result)})}),e.result.stopped&&(0,U.jsx)(`span`,{children:c(`backupImport.browser.stoppedNext`)})]}),(0,U.jsx)(`div`,{children:(0,U.jsx)(k,{size:`sm`,variant:`outline`,onClick:o,children:c(`backupImport.browser.another`)})})]})]})}function $t(e){return e.startsWith(`/`)||/^[A-Za-z]:[\\/]/.test(e)}function en({text:e,label:t,className:n}){let{t:r}=f(),[i,a]=(0,V.useState)(!1);return(0,V.useEffect)(()=>{if(!i)return;let e=window.setTimeout(()=>a(!1),1500);return()=>window.clearTimeout(e)},[i]),(0,U.jsx)(k,{type:`button`,size:`icon-xs`,variant:`ghost`,"aria-label":i?r(`backupSchedule.change.copied`):t,title:t,className:j(`text-muted-foreground`,n),onClick:()=>void navigator.clipboard.writeText(e).then(()=>a(!0),e=>E.error(r(`backupSchedule.change.copyFailed`),{description:_(e)})),children:i?(0,U.jsx)(qe,{}):(0,U.jsx)(Je,{})})}function tn({path:e}){let{t}=f();return(0,U.jsx)(k,{type:`button`,size:`icon-xs`,variant:`ghost`,"aria-label":t(`backupSchedule.verify.reveal`),title:t(`backupSchedule.verify.reveal`),className:`text-muted-foreground`,onClick:()=>void m.openPathInFileManager(e).catch(e=>E.error(t(`backupSchedule.verify.revealFailed`),{description:_(e,`open_path_in_file_manager`)})),children:(0,U.jsx)(ne,{})})}function G({path:e,className:t}){let{t:n}=f();return(0,U.jsxs)(`div`,{className:j(`flex items-start gap-1`,t),children:[(0,U.jsx)(`span`,{className:`min-w-0 flex-1 pt-0.5 font-mono text-xs leading-5 break-all`,children:e}),(0,U.jsx)(en,{text:e,label:n(`backupSchedule.change.copyPath`)}),$t(e)&&(0,U.jsx)(tn,{path:e})]})}var nn=e=>e.split(/[\\/]/).filter(Boolean).pop()??e;function rn(){let{t:e}=f();return t=>t.sourceKind.includes(`takeout`)?e(`backup.import.batches.takeout`):e(`backup.import.batches.browserFile`)}function an(e){switch(e){case`running`:return null;case`reverted`:return{action:`restore`,finishing:!1};case`reverting`:return{action:`revert`,finishing:!0};case`restoring`:return{action:`restore`,finishing:!0};default:return{action:`revert`,finishing:!1}}}var on=e=>e===`interrupted`||e===`stopped`;function sn(){let{t:e}=f();return({action:t,finishing:n})=>e(n?t===`revert`?`backupImport.batches.finishUndo`:`backupImport.batches.finishRestore`:t===`revert`?`backup.import.batches.undo`:`backup.import.batches.restore`)}function cn(){let{t:e}=f(),n=y(),r=rn(),i=sn(),a=D().recentImportBatches,[o,s]=(0,V.useState)(null);return(0,U.jsxs)(t,{title:e(`backup.import.batches.title`),subtitle:e(`backupImport.batches.subtitle`),children:[a.length===0?(0,U.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:e(`backupImport.batches.empty`)}):(0,U.jsx)(`ul`,{className:`-my-1.5 flex flex-col`,children:a.map(t=>{let a=an(t.status);return(0,U.jsxs)(`li`,{className:`flex items-center gap-3 py-1.5 text-[13px]`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,U.jsxs)(`span`,{className:`truncate`,title:t.sourcePath,children:[r(t),(0,U.jsxs)(`span`,{className:`text-muted-foreground`,children:[` · `,nn(t.sourcePath)]})]}),(0,U.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular`,children:[n.dayAndTime(t.importedAt??t.createdAt),` · `,t.status===`running`?e(`backupImport.batches.importing`):t.status===`reverted`?e(`backup.import.batches.undone`):t.status===`reverting`?e(`backupImport.batches.undoStopped`):t.status===`restoring`?e(`backupImport.batches.restoreStopped`):on(t.status)?e(`backupImport.batches.stopped`,{imported:n.number(t.importedItems)}):e(`backup.import.batches.summary`,{imported:n.number(t.importedItems),duplicates:n.number(t.duplicateItems)})]})]}),a&&(0,U.jsx)(k,{size:`sm`,variant:`ghost`,onClick:()=>s(t),children:i(a)})]},t.id)})}),(0,U.jsx)(ln,{batch:o,onClose:()=>s(null)})]})}function ln({batch:e,onClose:t}){return(0,U.jsx)(Ge,{open:e!==null,onOpenChange:e=>!e&&t(),children:e&&an(e.status)&&(0,U.jsx)(dn,{batch:e,onClose:t})})}function un({label:e,value:t}){return(0,U.jsxs)(`div`,{className:`flex flex-col gap-0.5 rounded-lg bg-muted px-3 py-2`,children:[(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),(0,U.jsx)(`span`,{className:`text-lg font-semibold tabular`,children:t})]})}function dn({batch:e,onClose:t}){let{t:n}=f(),r=y(),i=rn(),a=sn(),o=an(e.status)??{action:`revert`,finishing:!1},s=o.action===`restore`,c=Me({queryKey:[...A.archiveData,`import-batch`,e.id],queryFn:()=>ue.previewBatch(e.id),staleTime:0}),l=Ce({mutationFn:async()=>{s?await ue.restoreBatch(e.id):await ue.revertBatch(e.id),await d()},onSuccess:()=>{E.success(n(s?`backup.import.batches.restoreDone`:`backup.import.batches.revertDone`)),t()}}),u=c.data?.batch??e;return(0,U.jsxs)(F,{className:`sm:max-w-lg`,showCloseButton:!l.isPending,onInteractOutside:e=>l.isPending&&e.preventDefault(),onEscapeKeyDown:e=>l.isPending&&e.preventDefault(),children:[(0,U.jsxs)(N,{children:[(0,U.jsx)(I,{children:n(`backupImport.batches.reviewTitle`,{time:r.dayAndTime(e.importedAt??e.createdAt)})}),(0,U.jsxs)(L,{children:[o.finishing?n(s?`backupImport.batches.finishRestoreNote`:`backupImport.batches.finishUndoNote`):s?n(`backupImport.batches.restoreNote`,{count:u.importedItems}):n(`backupImport.batches.undoNote`,{count:u.visibleItems}),on(u.status)&&` ${n(`backupImport.batches.stoppedNote`)}`]})]}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4 text-[13px]`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,U.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[n(`backupImport.batches.source`),` · `,i(u)]}),(0,U.jsx)(G,{path:u.sourcePath})]}),(0,U.jsxs)(`div`,{className:`grid grid-cols-3 gap-2`,"data-testid":`batch-counts`,children:[(0,U.jsx)(un,{label:n(`backupImport.batches.added`),value:r.number(u.importedItems)}),(0,U.jsx)(un,{label:n(`backupImport.batches.already`),value:r.number(u.duplicateItems)}),(0,U.jsx)(un,{label:n(`backupImport.batches.visible`),value:r.number(u.visibleItems)})]}),c.isPending?(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(O,{className:`h-4 w-1/2`}),(0,U.jsx)(O,{className:`h-16 w-full`})]}):c.isError?(0,U.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:`${n(`backupImport.batches.loadFailed`)} ${_(c.error,`preview_import_batch`)}`}):(0,U.jsx)(fn,{detail:c.data}),l.error&&(0,U.jsx)(`p`,{role:`alert`,className:`[overflow-wrap:anywhere] text-destructive`,children:`${n(s?`backup.import.batches.restoreFailed`:`backup.import.batches.revertFailed`)}: ${_(l.error,s?`restore_import_batch`:`revert_import_batch`)}`})]}),(0,U.jsxs)(P,{children:[(0,U.jsx)(k,{variant:`ghost`,disabled:l.isPending,onClick:t,children:n(`common.cancel`)}),(0,U.jsxs)(k,{variant:s?`default`:`destructive`,disabled:l.isPending||!c.isSuccess,onClick:()=>l.mutate(),children:[l.isPending&&(0,U.jsx)(w,{}),l.isPending?n(`backupImport.batches.working`):o.finishing?a(o):n(s?`backupImport.batches.restoreConfirm`:`backup.import.batches.undoConfirm`)]})]})]})}function fn({detail:e}){let{t}=f(),n=y(),r=e.previewEntries.slice(0,5);return(0,U.jsxs)(U.Fragment,{children:[e.previewRangeStart&&e.previewRangeEnd&&(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:t(`backup.import.range`,{start:n.date(e.previewRangeStart),end:n.date(e.previewRangeEnd)})}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t(`backupImport.batches.sample`)}),r.length===0?(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:t(`backupImport.batches.noSample`)}):(0,U.jsx)(`ul`,{className:`flex flex-col`,children:r.map(e=>(0,U.jsxs)(`li`,{className:`flex items-baseline gap-2 py-0.5`,children:[(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:e.url,children:e.title||e.url}),(0,U.jsx)(`span`,{className:`shrink-0 font-mono text-xs text-muted-foreground tabular`,children:n.dayAndTime(e.visitedAt)})]},`${e.sourceVisitId}-${e.visitedAt}`))})]}),(0,U.jsx)(Lt,{recorded:e}),e.batch.auditPath&&(0,U.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t(`backupImport.batches.record`)}),(0,U.jsx)(G,{path:e.batch.auditPath})]})]})}function pn({status:e}){return e===`success`?(0,U.jsx)(ae,{className:`size-4 shrink-0 text-green`}):e===`running`?(0,U.jsx)(T,{className:`size-4 shrink-0 animate-spin text-muted-foreground`}):(0,U.jsx)(x,{className:e===`failed`?`size-4 shrink-0 text-red`:`size-4 shrink-0 text-brand`})}function mn(e,t){if(!e.finishedAt)return null;let n=(Date.parse(e.finishedAt)-Date.parse(e.startedAt))/1e3;return!Number.isFinite(n)||n<0?null:n<60?t(`backup.runs.seconds`,{value:n.toFixed(1)}):t(`backup.runs.minutes`,{minutes:Math.floor(n/60),seconds:Math.round(n%60)})}function hn({...e}){return(0,U.jsx)(We,{"data-slot":`sheet`,...e})}function gn({...e}){return(0,U.jsx)(Ve,{"data-slot":`sheet-portal`,...e})}function _n({className:e,...t}){return(0,U.jsx)(Be,{"data-slot":`sheet-overlay`,className:j(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function vn({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,U.jsxs)(gn,{children:[(0,U.jsx)(_n,{}),(0,U.jsxs)(He,{"data-slot":`sheet-content`,className:j(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,n===`top`&&`inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,n===`bottom`&&`inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,e),...i,children:[t,r&&(0,U.jsxs)(ze,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,U.jsx)(it,{className:`size-4`}),(0,U.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function yn({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`sheet-header`,className:j(`flex flex-col gap-1.5 p-4`,e),...t})}function bn({className:e,...t}){return(0,U.jsx)(Ue,{"data-slot":`sheet-title`,className:j(`font-semibold text-foreground`,e),...t})}function xn({className:e,...t}){return(0,U.jsx)(Ke,{"data-slot":`sheet-description`,className:j(`text-sm text-muted-foreground`,e),...t})}var Sn=p.en.backupRuns.reasons,Cn=`before-rekey`;function wn({label:e,value:t}){let n=y();return(0,U.jsxs)(`div`,{className:`flex flex-col gap-0.5 rounded-lg bg-muted px-3 py-2`,children:[(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),(0,U.jsx)(`span`,{className:`text-lg font-semibold tabular`,children:n.number(t)})]})}function K({label:e,children:t}){return(0,U.jsxs)(`div`,{className:`flex justify-between gap-4`,children:[(0,U.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,U.jsx)(`dd`,{className:`text-right`,children:t})]})}function Tn({artifact:e}){let{t}=f(),n=y(),r=e.reason&&e.reason in Sn?t(`backupRuns.reasons.${e.reason}`):e.reason;return(0,U.jsxs)(`li`,{className:`flex flex-col gap-1 rounded-lg bg-muted px-3 py-2`,children:[(0,U.jsx)(`span`,{className:`text-[13px] font-medium`,children:r??t(`backupRuns.kinds.snapshot`)}),(0,U.jsx)(G,{path:e.path}),(0,U.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular`,children:[n.dayAndTime(e.createdAt),e.sizeBytes!=null&&` · ${t(`backupRuns.size`)} ${n.bytes(e.sizeBytes)}`]})]})}function En({detail:e,notes:t}){let{t:n}=f(),r=y(),{run:i}=e,a=e.trigger===`manual`||e.trigger===`schedule`?e.trigger:null,o=e.artifacts.find(e=>e.reason===Cn);return(0,U.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[i.status===`partial`&&(0,U.jsxs)(`div`,{role:`status`,className:`rounded-lg bg-brand-soft p-3 text-[13px]`,children:[(0,U.jsx)(`p`,{className:`font-medium`,children:n(`backupRuns.incomplete`)}),(0,U.jsx)(`p`,{className:`mt-1 text-muted-foreground`,children:n(`backupRuns.incompleteBody`)})]}),(0,U.jsxs)(`dl`,{className:`flex flex-col gap-2 text-[13px]`,children:[(0,U.jsx)(K,{label:n(`backup.runs.detail.started`),children:r.dayAndTime(i.startedAt)}),(0,U.jsx)(K,{label:n(`backup.runs.detail.duration`),children:mn(i,n)??`—`}),(0,U.jsxs)(K,{label:n(`backup.runs.detail.trigger`),children:[a?n(`backup.runs.detail.triggers.${a}`):e.trigger,e.dueOnly&&(0,U.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:n(`backupRuns.dueOnly`)})]}),e.timezone&&(0,U.jsx)(K,{label:n(`backupRuns.timezone`),children:e.timezone})]}),(0,U.jsxs)(`div`,{className:`grid grid-cols-3 gap-2`,children:[(0,U.jsx)(wn,{label:n(`backup.runs.detail.newVisits`),value:i.newVisits}),(0,U.jsx)(wn,{label:n(`backup.runs.detail.newPages`),value:i.newUrls}),(0,U.jsx)(wn,{label:n(`backup.runs.detail.sources`),value:i.profilesProcessed})]}),o&&(0,U.jsxs)(`section`,{className:`flex flex-col gap-1.5 rounded-lg bg-brand-soft p-3 text-[13px]`,"aria-label":n(`backupRuns.safety.title`),children:[(0,U.jsxs)(`h3`,{className:`flex items-center gap-1.5 font-medium`,children:[(0,U.jsx)(yt,{className:`size-4 text-brand`}),n(`backupRuns.safety.title`)]}),(0,U.jsx)(`p`,{className:`text-muted-foreground`,children:n(`backupRuns.safety.body`)}),(0,U.jsx)(G,{path:o.path})]}),(e.errorMessage??i.errorMessage)&&(0,U.jsxs)(`section`,{className:`flex flex-col gap-1.5`,children:[(0,U.jsx)(`h3`,{className:`text-[13px] font-medium text-destructive`,children:n(`backup.runs.detail.error`)}),(0,U.jsx)(`p`,{className:`rounded-lg bg-muted p-3 font-mono text-xs break-words whitespace-pre-wrap`,children:e.errorMessage??i.errorMessage})]}),e.manifestPath&&(0,U.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,U.jsx)(`h3`,{className:`text-[13px] font-medium`,children:n(`backupRuns.manifest`)}),(0,U.jsx)(G,{path:e.manifestPath})]}),(0,U.jsx)(It,{entries:t})]})}function Dn({detail:e}){let{t}=f();return(0,U.jsxs)(`div`,{className:`flex flex-col gap-4 text-[13px]`,children:[(0,U.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,U.jsx)(`h3`,{className:`font-medium`,children:t(`backupRuns.manifest`)}),e.manifestPath?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(G,{path:e.manifestPath}),e.manifestHash&&(0,U.jsxs)(`span`,{className:`font-mono text-[11px] break-all text-muted-foreground`,children:[t(`backupRuns.manifestHash`),` `,e.manifestHash]})]}):(0,U.jsx)(`p`,{className:`text-muted-foreground`,children:t(`backupRuns.noManifest`)})]}),e.artifacts.length===0?(0,U.jsx)(`p`,{className:`text-muted-foreground`,children:t(`backupRuns.noFiles`)}):(0,U.jsx)(`ul`,{className:`flex flex-col gap-2`,children:e.artifacts.map(e=>(0,U.jsx)(Tn,{artifact:e},e.path))})]})}function On({detail:e}){let{t}=f(),{warnings:n,notes:r}=At(e);return(0,U.jsxs)(ot,{defaultValue:`summary`,className:`gap-4 px-4 pb-6`,children:[(0,U.jsxs)(at,{className:`w-full`,children:[(0,U.jsx)(z,{value:`summary`,children:t(`backupRuns.tabs.summary`)}),(0,U.jsx)(z,{value:`files`,children:t(`backupRuns.tabs.files`)}),(0,U.jsx)(z,{value:`warnings`,children:t(`backupRuns.tabs.warnings`,{count:n.length})})]}),(0,U.jsx)(B,{value:`summary`,children:(0,U.jsx)(En,{detail:e,notes:r})}),(0,U.jsx)(B,{value:`files`,children:(0,U.jsx)(Dn,{detail:e})}),(0,U.jsx)(B,{value:`warnings`,children:(0,U.jsx)(Ft,{entries:n})})]})}function kn({runId:e,onClose:t}){let{t:n}=f(),r=Me({queryKey:[...A.archiveData,`run-detail`,e],queryFn:()=>st.getRunDetail(e),enabled:e!==null});return(0,U.jsx)(hn,{open:e!==null,onOpenChange:e=>!e&&t(),children:(0,U.jsxs)(vn,{className:`w-[460px] overflow-y-auto sm:max-w-[460px]`,children:[(0,U.jsxs)(yn,{children:[(0,U.jsxs)(bn,{className:`flex items-center gap-2`,children:[r.data&&(0,U.jsx)(pn,{status:r.data.run.status}),n(`backup.runs.detail.title`)]}),(0,U.jsx)(xn,{children:n(`backup.runs.detail.description`)})]}),r.isPending?(0,U.jsxs)(`div`,{className:`flex flex-col gap-3 px-4`,children:[(0,U.jsx)(O,{className:`h-16 w-full`}),(0,U.jsx)(O,{className:`h-24 w-full`})]}):r.isError?(0,U.jsx)(`p`,{role:`alert`,className:`px-4 text-[13px] break-words text-destructive`,children:_(r.error,`load_audit_run_detail`)}):(0,U.jsx)(On,{detail:r.data})]})})}var An=[`backup`,`import`,`rekey`,`doctor`,`archive_restore`,`snapshot_restore`,`retention_prune`,`rollback`,`restore`,`same-visit`],jn=[`import`,`snapshot_restore`];function Mn(e,t){if(e.status===`failed`)return e.errorMessage||t(`backup.runs.failed`);let n=An.includes(e.runType)?e.runType:`backup`,r=e.status===`interrupted`;if(n===`backup`){let n=t(`backup.runs.summary`,{sources:t(`backup.runs.sources`,{count:e.profilesProcessed}),visits:t(`backup.runs.newVisits`,{count:e.newVisits})});return e.status===`partial`?t(`backup.runs.incomplete`,{summary:n}):r?t(`backup.runs.stoppedBackup`,{summary:n}):n}let i=t(`backup.runs.types.${n}`);return r?t(`backup.runs.stopped`,{label:i}):jn.includes(n)&&e.newVisits>0?t(`backup.runs.summary`,{sources:i,visits:t(`backup.runs.newVisits`,{count:e.newVisits})}):i}function Nn(){let{t:e}=f(),t=y(),n=D().recentRuns,[r,i]=ce(),a=Number(r.get(`run`))||null,o=e=>i(e===null?{}:{run:String(e)},{replace:e===null});return(0,U.jsxs)(`section`,{className:`overflow-hidden rounded-xl border bg-card shadow-card`,children:[(0,U.jsx)(`h2`,{className:`px-5 py-3.5 text-sm font-semibold`,children:e(`backup.runs.title`)}),n.length===0?(0,U.jsx)(`p`,{className:`border-t px-5 py-4 text-[13px] text-muted-foreground`,children:e(`backup.runs.empty`)}):(0,U.jsx)(`ul`,{className:`border-t`,children:n.map(n=>(0,U.jsx)(`li`,{className:`border-t first:border-t-0`,children:(0,U.jsxs)(`button`,{type:`button`,onClick:()=>o(n.id),className:`flex w-full items-center gap-3.5 px-5 py-2.5 text-left text-[13px] transition-colors hover:bg-accent/60`,children:[(0,U.jsx)(pn,{status:n.status}),(0,U.jsx)(`span`,{className:`w-32 shrink-0 font-mono text-xs text-muted-foreground tabular`,children:t.dayAndTime(n.startedAt)}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:Mn(n,e)}),(0,U.jsx)(`span`,{className:`shrink-0 font-mono text-xs text-muted-foreground tabular`,children:mn(n,e)??`—`})]})},n.id))}),(0,U.jsx)(kn,{runId:a,onClose:()=>o(null)})]})}var q={minutes:1,hours:60,days:1440};function Pn(e){return Math.round(e*60)}function Fn(e){return e>=q.days&&e%q.days===0?{amount:e/q.days,unit:`days`}:e>=q.hours&&e%q.hours===0?{amount:e/q.hours,unit:`hours`}:{amount:e,unit:`minutes`}}function J(e,t){let{amount:n,unit:r}=Fn(Pn(e));return t(`backupSchedule.interval.${r}`,{count:n})}function In(e,t){if(!Number.isInteger(e))return null;let n=e*q[t];return n<1||n>43200?null:n/60}function Ln(e,t,n){return e.manualStepDetails?.find(e=>e.fileContents===t)?.filePath??n}function Rn({path:e,contents:t}){let{t:n}=f();return(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,U.jsx)(G,{path:e}),(0,U.jsxs)(`div`,{className:`relative`,children:[(0,U.jsx)(`pre`,{"aria-label":n(`backupSchedule.change.contents`),className:`max-h-56 overflow-auto rounded-lg bg-muted p-3 pr-10 font-mono text-[11px] leading-relaxed whitespace-pre`,children:t}),(0,U.jsx)(en,{text:t,label:n(`backupSchedule.change.copyFile`),className:`absolute top-1.5 right-1.5 bg-muted`})]})]})}function zn({plan:e}){return(0,U.jsx)(`div`,{className:`flex flex-col gap-3`,children:e.generatedFiles.map(t=>(0,U.jsx)(Rn,{path:Ln(e,t.contents,t.absolutePath??t.relativePath),contents:t.contents},t.relativePath))})}function Bn({step:e}){let{t}=f(),n=e.command?.join(` `);return(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:M(t,e.titleKey)??e.id}),M(t,e.summaryKey)&&(0,U.jsxs)(`span`,{className:`text-muted-foreground`,children:[M(t,e.summaryKey),` `,M(t,e.whyKey)]}),e.fileContents&&e.filePath&&(0,U.jsx)(Rn,{path:e.filePath,contents:e.fileContents}),n&&(0,U.jsxs)(`div`,{className:`flex items-start gap-1 rounded-lg bg-muted px-3 py-2`,children:[(0,U.jsx)(`code`,{className:`min-w-0 flex-1 font-mono text-[11px] leading-5 break-all`,children:n}),(0,U.jsx)(en,{text:n,label:t(`backupSchedule.verify.copyCommand`)})]})]})}function Y({details:e,steps:t}){return e&&e.length>0?(0,U.jsx)(`ol`,{className:`flex list-decimal flex-col gap-3 pl-4 text-[13px]`,children:e.map(e=>(0,U.jsx)(`li`,{children:(0,U.jsx)(Bn,{step:e})},e.id))}):(0,U.jsx)(`ol`,{className:`flex list-decimal flex-col gap-1 pl-4 font-mono text-xs break-all`,children:t.map(e=>(0,U.jsx)(`li`,{children:e},e))})}function X({title:e,children:t}){return(0,U.jsxs)(`section`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,U.jsx)(`h3`,{className:`text-[13px] font-medium`,children:e}),t]})}function Z({children:e}){return(0,U.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:e})}var Vn={ok:(0,U.jsx)(ae,{className:`size-4 text-green`}),warning:(0,U.jsx)(x,{className:`size-4 text-brand`}),error:(0,U.jsx)(ut,{className:`size-4 text-destructive`}),pending:(0,U.jsx)(ht,{className:`size-4 text-muted-foreground`})};function Hn({check:e}){let{t}=f(),n=e.status in Vn?e.status:`pending`;return(0,U.jsxs)(`li`,{className:`flex items-start gap-2.5 py-1.5`,children:[(0,U.jsx)(`span`,{className:`mt-0.5`,"aria-hidden":!0,children:Vn[n]}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5 text-[13px]`,children:[(0,U.jsxs)(`span`,{className:`flex items-baseline justify-between gap-3`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:M(t,e.labelKey)??e.key}),(0,U.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:t(`backupSchedule.verify.status.${n}`)})]}),M(t,e.detailKey)&&(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:M(t,e.detailKey)}),e.evidence.length>0&&(0,U.jsx)(`span`,{className:`font-mono text-[11px] break-all text-muted-foreground`,children:e.evidence.join(` · `)})]})]})}function Un({issue:e}){let{t}=f();return(0,U.jsxs)(`li`,{className:j(`flex flex-col gap-0.5 rounded-lg p-3 text-[13px]`,e.severity===`error`?`bg-destructive/10`:`bg-brand-soft`),children:[(0,U.jsx)(`span`,{className:`font-medium`,children:M(t,e.titleKey)??e.code}),[e.detailKey,e.consequenceKey].map(e=>{let n=M(t,e);return n?(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:n},e):null}),e.evidence.length>0&&(0,U.jsx)(`span`,{className:`font-mono text-[11px] break-all text-muted-foreground`,children:e.evidence.join(` · `)})]})}var Wn=[`running`,`success`,`partial`,`skipped`,`deferred`,`failed`,`interrupted`];function Gn({status:e}){let{t}=f(),n=y(),r=e.lastAction;if(!r)return(0,U.jsx)(Z,{children:t(`backupSchedule.verify.noLastChange`)});let i=[`apply`,`remove`,`repair`].find(e=>e===r.action),a=[`ok`,`failed`,`unknown`].find(e=>e===r.status);return(0,U.jsxs)(`div`,{className:`flex flex-col gap-1.5 text-[13px]`,children:[(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`span`,{className:`font-medium`,children:i?t(`backupSchedule.verify.action.${i}`):r.action}),(0,U.jsxs)(`span`,{className:`text-muted-foreground`,children:[` · `,t(`backupSchedule.verify.outcome.${a??`unknown`}`),` · `,n.dayAndTime(r.at)]})]}),(r.files??[]).map(e=>(0,U.jsx)(G,{path:e},e)),r.auditPath&&(0,U.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t(`backupSchedule.verify.record`)}),(0,U.jsx)(G,{path:r.auditPath})]})]})}function Kn({open:e,status:t,checking:n,onCheck:r,onClose:a}){let{t:o}=f(),s=y(),c=t.verificationChecks??[],l=t.issues??[],u=t.recentAttempts??[];return(0,U.jsx)(hn,{open:e,onOpenChange:e=>!e&&a(),children:(0,U.jsxs)(vn,{className:`w-[460px] overflow-y-auto sm:max-w-[460px]`,children:[(0,U.jsxs)(yn,{children:[(0,U.jsx)(bn,{children:o(`backupSchedule.verify.title`)}),(0,U.jsx)(xn,{children:o(`backupSchedule.verify.description`)})]}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-5 px-4 pb-6`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-[13px] text-muted-foreground`,children:[(0,U.jsx)(`span`,{children:t.checkedAt?o(`backupSchedule.verify.checkedAt`,{time:s.dayAndTime(t.checkedAt)}):null}),(0,U.jsxs)(k,{size:`sm`,variant:`outline`,disabled:n,onClick:r,children:[(0,U.jsx)(i,{className:j(n&&`animate-spin`)}),o(n?`backupSchedule.verify.checking`:`backupSchedule.verify.checkAgain`)]})]}),l.length>0&&(0,U.jsx)(X,{title:o(`backupSchedule.verify.problems`),children:(0,U.jsx)(`ul`,{className:`flex flex-col gap-2`,children:l.map(e=>(0,U.jsx)(Un,{issue:e},`${e.code}-${e.titleKey}`))})}),(0,U.jsx)(X,{title:o(`backupSchedule.verify.checks`),children:c.length===0?(0,U.jsx)(Z,{children:o(`backupSchedule.verify.noChecks`)}):(0,U.jsx)(`ul`,{className:`flex flex-col`,children:c.map(e=>(0,U.jsx)(Hn,{check:e},e.key))})}),(0,U.jsx)(X,{title:o(`backupSchedule.verify.files`),children:t.detectedFiles.length===0?(0,U.jsx)(Z,{children:o(`backupSchedule.verify.noFiles`)}):(0,U.jsx)(`div`,{className:`flex flex-col gap-1`,children:t.detectedFiles.map(e=>(0,U.jsx)(G,{path:e},e))})}),(0,U.jsx)(X,{title:o(`backupSchedule.verify.lastChange`),children:(0,U.jsx)(Gn,{status:t})}),(0,U.jsx)(X,{title:o(`backupSchedule.verify.attempts`),children:u.length===0?(0,U.jsx)(Z,{children:o(`backupSchedule.verify.noAttempts`)}):(0,U.jsx)(`ul`,{className:`flex flex-col text-[13px]`,children:u.slice(0,8).map(e=>{let t=Wn.find(t=>t===e.outcome);return(0,U.jsxs)(`li`,{className:`flex justify-between gap-3 py-1`,children:[(0,U.jsx)(`span`,{className:j(t===`partial`&&`text-brand`,(t===`failed`||t===`interrupted`)&&`text-destructive`),children:t?o(`backupSchedule.verify.attempt.${t}`):e.outcome}),(0,U.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground tabular`,children:s.dayAndTime(e.startedAt)})]},e.id)})})}),(0,U.jsxs)(X,{title:o(`backupSchedule.verify.manual`),children:[(0,U.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:o(`backupSchedule.verify.manualBody`)}),(0,U.jsx)(Y,{details:t.manualStepDetails,steps:t.manualSteps})]})]})]})})}var qn={macos:`launchd`,windows:`Task Scheduler`,linux:`systemd`};function Jn({intent:e,status:t,onClose:n}){return(0,U.jsx)(Ge,{open:e!==null,onOpenChange:e=>!e&&n(),children:e?.kind===`set`||e?.kind===`custom`?(0,U.jsx)(Zn,{intent:e,onClose:n}):e?(0,U.jsx)(Qn,{kind:e.kind,status:t,onClose:n}):null})}function Q({children:e}){return(0,U.jsx)(`p`,{role:`alert`,className:`text-[13px] [overflow-wrap:anywhere] text-destructive`,children:e})}function Yn(){let{t:e}=f();return(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,"aria-busy":!0,"aria-label":e(`backupSchedule.change.loading`),children:[(0,U.jsx)(O,{className:`h-4 w-2/3`}),(0,U.jsx)(O,{className:`h-40 w-full`})]})}function Xn({amount:e,unit:t,onAmount:n,onUnit:r,invalid:i}){let{t:a}=f();return(0,U.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2 text-[13px]`,children:[(0,U.jsx)(`span`,{children:a(`backupSchedule.change.every`)}),(0,U.jsx)(S,{type:`number`,inputMode:`numeric`,min:1,step:1,value:e,onChange:e=>n(e.target.value),"aria-label":a(`backupSchedule.change.amount`),"aria-invalid":i,className:`h-8 w-24 tabular`}),(0,U.jsxs)(Ae,{value:t,onValueChange:e=>r(e),children:[(0,U.jsx)(De,{size:`sm`,"aria-label":a(`backupSchedule.change.unit`),className:`w-28`,children:(0,U.jsx)(Ee,{})}),(0,U.jsx)(Oe,{children:[`minutes`,`hours`,`days`].map(e=>(0,U.jsx)(ke,{value:e,children:a(`backupSchedule.change.units.${e}`)},e))})]})]}),i&&(0,U.jsx)(Q,{children:a(`backupSchedule.change.invalid`)})]})}function Zn({intent:e,onClose:t}){let{t:n}=f(),r=Fn(Pn(e.hours)),[i,a]=(0,V.useState)(String(r.amount)),[o,s]=(0,V.useState)(r.unit),c=e.kind===`custom`?In(Number(i),o):e.hours,l=he(c,250),u=tt(l),d=et(),p=l===c,m=e.mode===`install`?n(`backupSchedule.change.installTitle`):e.mode===`reinstall`?n(`backupSchedule.change.reinstallTitle`):n(`backupSchedule.change.updateTitle`),h=u.data?.applySupported??!0,g=h?e.mode===`install`?n(`backupSchedule.change.install`):e.mode===`reinstall`?n(`backupSchedule.change.reinstall`):n(`backupSchedule.change.update`):n(`backupSchedule.change.save`),v=l!==null&&p&&u.isSuccess&&!u.isFetching;function y(e,r){d.mutate({hours:r,plan:e},{onSuccess:()=>{E.success(e.applySupported?n(`backupSchedule.change.installed`,{interval:J(r,n)}):n(`backupSchedule.change.saved`)),t()}})}return(0,U.jsxs)(F,{className:`sm:max-w-xl`,showCloseButton:!d.isPending,onInteractOutside:e=>d.isPending&&e.preventDefault(),onEscapeKeyDown:e=>d.isPending&&e.preventDefault(),children:[(0,U.jsxs)(N,{children:[(0,U.jsx)(I,{children:m}),(0,U.jsx)(L,{children:n(h?`backupSchedule.change.intro`:`backupSchedule.change.manualIntro`)})]}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[e.kind===`custom`&&(0,U.jsx)(Xn,{amount:i,unit:o,onAmount:a,onUnit:s,invalid:c===null&&i!==``}),c===null||u.isError?null:v?(0,U.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:n(`backupSchedule.change.when`,{interval:J(c,n),check:J(u.data.wakeIntervalSeconds/3600,n)})}):(0,U.jsxs)(`div`,{className:`flex flex-col gap-1.5 py-0.5`,"aria-hidden":!0,children:[(0,U.jsx)(O,{className:`h-3.5 w-full`}),(0,U.jsx)(O,{className:`h-3.5 w-3/4`})]}),l===null?null:u.isPending||!p?(0,U.jsx)(Yn,{}):u.isError?(0,U.jsx)(Q,{children:`${n(`backupSchedule.change.previewFailed`)} ${_(u.error,`preview_schedule`)}`}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 text-[13px]`,children:[(0,U.jsx)(`dt`,{className:`text-muted-foreground`,children:n(`backupSchedule.change.scheduler`)}),(0,U.jsxs)(`dd`,{className:`font-mono text-xs leading-5 break-all`,children:[qn[u.data.platform]??u.data.platform,` ·`,` `,u.data.label]})]}),u.data.applySupported?(0,U.jsx)(zn,{plan:u.data}):(0,U.jsx)(Y,{details:u.data.manualStepDetails,steps:u.data.manualSteps})]}),d.error&&(0,U.jsx)(Q,{children:`${n(`backupSchedule.change.failed`)} ${_(d.error,`apply_schedule`)}`})]}),(0,U.jsxs)(P,{children:[(0,U.jsx)(k,{variant:`ghost`,disabled:d.isPending,onClick:t,children:n(`common.cancel`)}),(0,U.jsxs)(k,{disabled:!v||d.isPending,onClick:()=>u.data&&l!==null&&y(u.data,l),children:[d.isPending&&(0,U.jsx)(w,{}),d.isPending?n(`backupSchedule.change.working`):g]})]})]})}function Qn({kind:e,status:t,onClose:n}){let{t:r}=f(),i=Ze(!0),a=Ye(),o=$e(),s=e===`off`?a:o,c=t?.detectedFiles??[];function l(t){s.mutate(t,{onSuccess:()=>{E.success(r(e===`off`?`backup.schedule.turnedOff`:`backup.schedule.repaired`)),n()}})}return(0,U.jsxs)(F,{className:`sm:max-w-lg`,showCloseButton:!s.isPending,onInteractOutside:e=>s.isPending&&e.preventDefault(),onEscapeKeyDown:e=>s.isPending&&e.preventDefault(),children:[(0,U.jsxs)(N,{children:[(0,U.jsx)(I,{children:r(e===`off`?`backupSchedule.off.title`:`backupSchedule.legacy.title`)}),(0,U.jsx)(L,{children:r(e===`off`?`backupSchedule.off.body`:`backupSchedule.legacy.body`)})]}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2 text-[13px]`,children:[c.length>0?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:r(`backupSchedule.off.removes`)}),(0,U.jsx)(`div`,{className:`flex flex-col gap-1 rounded-lg bg-muted px-3 py-2`,children:c.map(e=>(0,U.jsx)(G,{path:e},e))})]}):(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:r(`backupSchedule.off.noFiles`)}),i.isError&&(0,U.jsx)(Q,{children:`${r(`backupSchedule.change.previewFailed`)} ${_(i.error,`preview_schedule`)}`}),s.error&&(0,U.jsx)(Q,{children:`${r(`backupSchedule.change.failed`)} ${_(s.error,e===`off`?`remove_schedule`:`repair_schedule`)}`})]}),(0,U.jsxs)(P,{children:[(0,U.jsx)(k,{variant:`ghost`,disabled:s.isPending,onClick:n,children:r(`common.cancel`)}),(0,U.jsxs)(k,{variant:e===`off`?`destructive`:`default`,disabled:!i.isSuccess||s.isPending,onClick:()=>i.data&&l(i.data),children:[s.isPending&&(0,U.jsx)(w,{}),s.isPending?r(`backupSchedule.change.working`):r(e===`off`?`backupSchedule.off.confirm`:`backupSchedule.legacy.confirm`)]})]})]})}var $n={macos:`launchd`,windows:`Task Scheduler`,linux:`systemd`},er={installed:`installed`,"not-installed":`notInstalled`,mismatch:`mismatch`,"permission-warning":`permissionWarning`,"legacy-install-detected":`legacy`,"manual-review":`manual`};function tr({label:e,children:t}){return(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-4 text-[13px]`,children:[(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:e}),(0,U.jsx)(`span`,{className:`text-right font-mono text-[13px]`,children:t})]})}var nr=`h-8 flex-1 rounded-md px-2 text-[13px] font-normal text-muted-foreground hover:bg-transparent data-[state=on]:bg-card data-[state=on]:text-foreground data-[state=on]:shadow-card`;function rr(){let{t:e}=f(),n=y(),r=D(),i=pe(),a=i.data,o=ge(),[s,c]=(0,V.useState)(null),[l,u]=(0,V.useState)(!1),d=a?.applySupported??!0,p=a?de(a)||Le(a):!1,m=r.config.dueAfterHours,h=nt(m),g=a?d&&!p?`off`:h??`custom`:null,_=be(a,o),v=Ne(a?.platform),b=d&&p?`update`:`install`;function ee(e){e!==g&&c(e===`off`?{kind:`off`}:e===`custom`?{kind:`custom`,hours:m,mode:b}:{kind:`set`,hours:Qe[e],mode:b})}let te=d?[`hourly`,`sixHours`,`daily`,`custom`,`off`]:[`hourly`,`sixHours`,`daily`,`custom`];return(0,U.jsxs)(t,{title:e(`backup.schedule.title`),subtitle:e(`backup.schedule.subtitle`),children:[a?(0,U.jsx)(lt,{type:`single`,spacing:1,value:g??``,onValueChange:e=>e&&ee(e),"aria-label":e(`backup.schedule.label`),className:`w-full rounded-lg bg-muted p-[3px]`,children:te.map(t=>(0,U.jsx)(ct,{value:t,className:nr,children:e(t===`custom`?`backupSchedule.custom`:`backup.schedule.${t}`)},t))}):(0,U.jsx)(O,{className:`h-9 w-full`}),a&&g===`custom`&&(0,U.jsxs)(`p`,{className:`flex items-center justify-between gap-3 text-[13px] text-muted-foreground`,children:[e(`backupSchedule.customActive`,{interval:J(m,e)}),(0,U.jsx)(k,{size:`xs`,variant:`ghost`,onClick:()=>c({kind:`custom`,hours:m,mode:b}),children:e(`backupSchedule.changeCustom`)})]}),a&&(0,U.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,U.jsx)(tr,{label:e(`backup.schedule.next`),children:_?n.dayAndTime(_):`—`}),p&&(0,U.jsx)(tr,{label:e(`backupSchedule.lastRun`),children:a.lastScheduledSuccessAt?n.dayAndTime(a.lastScheduledSuccessAt):e(`backupSchedule.lastRunNever`)}),(0,U.jsxs)(tr,{label:e(`backup.schedule.scheduler`),children:[$n[v],` ·`,` `,e(`backup.schedule.state.${er[a.installState]??`manual`}`)]})]}),a&&d&&Le(a)&&(0,U.jsx)(ir,{status:a,onFix:()=>c(a.installState===`legacy-install-detected`?{kind:`legacy`}:{kind:`set`,hours:m,mode:`reinstall`})}),a&&!d&&(0,U.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg bg-muted p-3 text-[13px]`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:e(`backup.schedule.manual.title`)}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:e(`backup.schedule.manual.body`)}),(0,U.jsx)(Y,{details:a.manualStepDetails,steps:a.manualSteps})]}),a&&(0,U.jsxs)(k,{size:`sm`,variant:`ghost`,className:`-ml-2 w-fit text-muted-foreground`,onClick:()=>u(!0),children:[e(`backupSchedule.details`),(0,U.jsx)(se,{})]}),(0,U.jsx)(Jn,{intent:s,status:a,onClose:()=>c(null)}),a&&(0,U.jsx)(Kn,{open:l,status:a,checking:i.isFetching,onCheck:()=>void i.refetch(),onClose:()=>u(!1)})]})}function ir({status:e,onFix:t}){let{t:n}=f(),r=e.installState===`legacy-install-detected`?n(`backupSchedule.legacy.attention`):e.installState===`permission-warning`?n(`backup.schedule.attention.permission`):n(`backup.schedule.attention.mismatch`);return(0,U.jsxs)(`div`,{className:`flex items-start gap-3 rounded-lg bg-brand-soft p-3`,children:[(0,U.jsx)(x,{className:`mt-0.5 size-4 shrink-0 text-brand`}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5 text-[13px]`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:n(`backup.schedule.attention.title`)}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:r})]}),(0,U.jsx)(k,{size:`sm`,variant:`outline`,onClick:t,children:n(`backup.schedule.attention.repair`)})]})}function ar(e,t){return e.historyExists?Ie(e)?`needsPermission`:t?`ok`:`paused`:`notFound`}var or={needsPermission:3,paused:2,notFound:1,ok:0},sr={ok:`bg-green/12 text-green`,needsPermission:`bg-brand-soft text-brand`,paused:`bg-muted text-muted-foreground`,notFound:`bg-muted text-muted-foreground`};function $(){let e=je(),{t}=f();return Ce({mutationFn:Se.getSnapshot,onSuccess:n=>{e.setQueryData(A.snapshot,n),E.success(t(`backup.sources.rescanDone`,{count:n.browserProfiles.length}))},onError:e=>E.error(t(`backup.sources.rescanFailed`),{description:_(e,`app_snapshot`)})})}function cr({profile:e,stat:t,statsState:n,selected:r,busy:i,onToggle:a,nested:o=!1}){let{t:s}=f(),c=y(),l=ar(e,r),u=$(),d=l===`needsPermission`&&e.browserFamily===`safari`,p=`${e.browserName} ${e.profileName}`;return(0,U.jsxs)(`li`,{className:j(`flex items-center gap-3.5 border-t py-3 pr-5 first:border-t-0`,o?`pl-[68px]`:`pl-5`),children:[!o&&(0,U.jsx)(pt,{browserName:e.browserName,className:`size-7`,decorative:!0}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,U.jsx)(`span`,{className:`truncate text-sm font-medium`,children:o?e.profileName:e.browserName}),!o&&(0,U.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.profileName})]}),(0,U.jsx)(`div`,{className:`hidden min-w-24 flex-col items-end text-right sm:flex`,children:n===`loading`?(0,U.jsx)(O,{className:`h-3.5 w-16`}):t?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`font-mono text-[13px] text-muted-foreground tabular`,children:c.number(t.visitCount)}),(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t.lastVisitAt?s(`backup.sources.lastVisit`,{ago:c.relative(t.lastVisitAt)}):s(`backup.sources.noVisits`)})]}):(0,U.jsx)(`span`,{className:`text-muted-foreground`,title:n===`failed`?s(`backup.sources.statsFailed`):void 0,children:`—`})}),d&&(0,U.jsx)(k,{size:`sm`,variant:`outline`,onClick:()=>void Tt(s(`backup.sources.grantFailed`)),children:s(`backup.sources.grant`)}),d&&(0,U.jsx)(k,{size:`sm`,variant:`ghost`,disabled:u.isPending,onClick:()=>u.mutate(),children:s(`backup.sources.checkAgain`)}),(0,U.jsxs)(dt,{variant:`secondary`,className:j(`min-w-[76px] justify-center rounded-md border-0 font-normal`,sr[l]),title:l===`needsPermission`?e.accessIssue??void 0:void 0,children:[l===`needsPermission`&&(0,U.jsx)(R,{}),s(`backup.sources.status.${l}`)]}),(0,U.jsx)(ft,{checked:r&&l!==`notFound`,disabled:i||l===`notFound`,onCheckedChange:a,"aria-label":s(`backup.sources.toggle`,{name:p})})]})}function lr({label:e,browserName:t,profiles:n,missing:r=!1,hint:i,rows:a}){let{t:o}=f(),s=y(),c=n.map(e=>ar(e,a.selected.has(e.profileId))).reduce((e,t)=>or[t]>or[e]?t:e),[l,u]=(0,V.useState)(!r&&(n.length<=3||c===`needsPermission`)),d=n.filter(e=>e.historyExists&&a.selected.has(e.profileId)).length,p=n.reduce((e,t)=>e+(a.statById.get(t.profileId)?.visitCount??0),0),m=`sources-${e.replace(/\W+/g,`-`)}`;return(0,U.jsxs)(`li`,{className:`border-t first:border-t-0`,children:[(0,U.jsxs)(`button`,{type:`button`,"aria-expanded":l,"aria-controls":m,"aria-label":o(l?`backup.sources.group.hide`:`backup.sources.group.show`,{browser:e}),onClick:()=>u(e=>!e),className:`flex w-full items-center gap-3.5 px-5 py-3 text-left transition-colors hover:bg-muted/50`,children:[(0,U.jsx)(se,{className:j(`size-4 shrink-0 text-muted-foreground transition-transform duration-150`,l&&`rotate-90`),"aria-hidden":!0}),t&&(0,U.jsx)(pt,{browserName:t,className:`size-7`,decorative:!0}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,U.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e}),(0,U.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:r?i:o(`backup.sources.group.profiles`,{count:n.length})})]}),!r&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`hidden min-w-24 text-right font-mono text-[13px] text-muted-foreground tabular sm:block`,children:a.statsState===`ready`?s.number(p):`—`}),(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:o(`backup.sources.group.on`,{on:d,total:n.length})}),(0,U.jsxs)(dt,{variant:`secondary`,className:j(`min-w-[76px] justify-center rounded-md border-0 font-normal`,sr[c]),children:[c===`needsPermission`&&(0,U.jsx)(R,{}),o(`backup.sources.status.${c}`)]})]})]}),l&&(0,U.jsx)(`ul`,{id:m,className:`border-t`,children:n.map(e=>(0,U.jsx)(cr,{profile:e,stat:a.statById.get(e.profileId),statsState:a.statsState,selected:a.selected.has(e.profileId),busy:a.busy,onToggle:t=>a.onToggle(e.profileId,t),nested:!r},e.profileId))})]})}function ur(e){let t=new Map,n=[];for(let r of e){if(!r.historyExists){n.push(r);continue}let e=t.get(r.browserName)??[];e.push(r),t.set(r.browserName,e)}return{browsers:[...t],missing:n}}function dr({kind:e}){let{t}=f(),n=$(),r=e===`full-disk-access`?`fullDiskAccess`:e===`empty`?`empty`:`error`;return(0,U.jsxs)(`div`,{className:`flex items-start gap-3 border-t px-5 py-4 first:border-t-0`,children:[(0,U.jsx)(e===`empty`?rt:e===`full-disk-access`?R:x,{className:j(`mt-0.5 size-4 shrink-0`,e===`empty`?`text-muted-foreground`:`text-brand`)}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,U.jsx)(`span`,{className:`text-sm font-medium`,children:t(`backup.sources.notice.${r}.title`)}),(0,U.jsx)(`span`,{className:`text-[13px] text-muted-foreground`,children:t(`backup.sources.notice.${r}.body`)})]}),e===`full-disk-access`&&(0,U.jsx)(k,{size:`sm`,variant:`outline`,onClick:()=>void Tt(t(`backup.sources.grantFailed`)),children:t(`backup.sources.grant`)}),(0,U.jsx)(k,{size:`sm`,variant:`ghost`,disabled:n.isPending,onClick:()=>n.mutate(),children:t(e===`full-disk-access`?`backup.sources.checkAgain`:`backup.sources.rescan`)})]})}function fr(){let{t:e}=f(),t=D(),n=Re(),r=we(),i=$(),a=new Set(t.config.selectedProfileIds),o=new Map((n.data??[]).map(e=>[e.profileId,e])),s=n.isPending?`loading`:n.isError?`failed`:`ready`,c=Pe(t.browserDiscoveryIssue,t.browserProfiles.length),{browsers:l,missing:u}=ur(t.browserProfiles),d={statById:o,statsState:s,selected:a,busy:r.isPending,onToggle:(e,t)=>p(e,t)};function p(t,n){r.mutate(e=>({...e,selectedProfileIds:n?[...new Set([...e.selectedProfileIds,t])]:e.selectedProfileIds.filter(e=>e!==t)}),{onError:t=>E.error(e(`backup.sources.saveFailed`),{description:_(t,`save_config`)})})}return(0,U.jsxs)(`section`,{className:`overflow-hidden rounded-xl border bg-card shadow-card`,children:[(0,U.jsxs)(`header`,{className:`flex items-center justify-between px-5 py-3.5`,children:[(0,U.jsx)(`h2`,{className:`text-sm font-semibold`,children:e(`backup.sources.title`)}),(0,U.jsxs)(k,{size:`sm`,variant:`outline`,disabled:i.isPending,onClick:()=>i.mutate(),children:[(0,U.jsx)(rt,{className:j(i.isPending&&`animate-pulse`)}),e(`backup.sources.rescan`)]})]}),(0,U.jsxs)(`ul`,{className:`border-t`,children:[c===`full-disk-access`||c===`discovery-error`?(0,U.jsx)(dr,{kind:c}):null,c===`empty`&&(0,U.jsx)(dr,{kind:`empty`}),l.map(([e,t])=>t.length===1?(0,U.jsx)(cr,{profile:t[0],stat:o.get(t[0].profileId),statsState:s,selected:a.has(t[0].profileId),busy:r.isPending,onToggle:e=>p(t[0].profileId,e)},t[0].profileId):(0,U.jsx)(lr,{label:e,browserName:e,profiles:t,rows:d},e)),u.length>0&&(0,U.jsx)(lr,{label:e(`backup.sources.group.notFound`,{count:u.length}),browserName:null,profiles:u,missing:!0,hint:e(`backup.sources.group.notFoundHint`),rows:d})]})]})}function pr(){let{t}=f(),i=s(),a=ye(),o=fe(),c=a.state.step===`idle`,l=o.state.step===`idle`,u=wt(e=>{Ct(e)===`browser`?l&&o.inspect(e,`detect`):c&&a.inspect(e)},(c||l)&&!i.running);return(0,U.jsxs)(r,{children:[(0,U.jsx)(n,{title:t(`backup.title`),subtitle:t(`backup.subtitle`),actions:(0,U.jsx)(e,{})}),(0,U.jsx)(Xe,{}),(0,U.jsx)(fr,{}),(0,U.jsxs)(`div`,{className:`grid grid-cols-1 gap-5 lg:grid-cols-2`,children:[(0,U.jsx)(rr,{}),(0,U.jsx)(Kt,{takeout:a,hovering:u&&c}),(0,U.jsx)(Qt,{state:o.state,hovering:u&&l,onInspect:(e,t)=>void o.inspect(e,t),onConfirm:()=>void o.confirm(),onStop:()=>void o.stop(),onReset:o.reset}),(0,U.jsx)(cn,{})]}),(0,U.jsx)(Nn,{})]})}export{pr as default}; \ No newline at end of file diff --git a/site/public/app/assets/browser-icons-DSlRrt_0.js b/site/public/app/assets/browser-icons-DSlRrt_0.js new file mode 100644 index 00000000..94077d44 --- /dev/null +++ b/site/public/app/assets/browser-icons-DSlRrt_0.js @@ -0,0 +1 @@ +import{k as e}from"./index-CteWxeiL.js";var t=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAXHSURBVHgB7VdpbFRVFP7mzcybme4DHVrsJumipGxCK4uKLGUJETDxB/5AjAbcQJFoCFGJCSHBHwoI+otogkER04DBEoKS0oWlpdISFWqlZUppgS4w01nfm3mL505n2pnOa21J/KVfcnLOu/ee9Z5373vAfx06PARUVV1MrIzIRtREdFqn07Xj3wY5NhIdJVIVv6DK9x1qGAGizXgIjKsC5OQgsS3e8goEGq5CFURwE9OQ8Nxy8LOnqzQ3nypRPx6b3FgXkvNHib0uXGiAWFsfcs6g3HfC+8NJKP0ulsxujBNjDoDwMYJBo3C2Jm5C9QsQfqllYhkFuihuXlVfCG9dNdFXRMXjCoAUsoltEC81Qnng1FwjnK8H9QUT34/SszGnJJYrLteLUmfnQsXne5We/6DxXWyNAWPDmyxYf9UFjBIlxHMXYVm1ZCUZn0q90EyjO4kW+quqEGhpCS3T6fUwlZbCNHPmTlp3gRuWKevyyUTmqLEsYm+Jl5tovx0YDULNJVYFPYl7SC+N6QWamwedh+zJMoS6Osh9fexxBxd2MpHoRxK7ie4Quej5MtEUkl8jSvOfrsQ/IdQLleeZuJaIlVof7TwawY4OxuYZyEkeCWfdXqngxJleXG/1Inuy2fj8svTS7EzzFRZM8FrLiHs/HIG6K7AsfRo6s3mP4nZD7u7WXMfxPGNu1gMvExWs33Yt5DyCb07cQcWhWdZJE3mr79RZjBWKy0MN2QBL2TN8sK1txHX6zEzGrrAt2HCqsi/GOYPDKWHXQTsCjb9B7rqH8YC9qnJvL8TGRs15zmqFPj2diUdZAHk3b/s1F56pvo+qIw0YOYtJmuOy14f+I8egBoOa88acnIhYwwLoKi5M1FwYDMrYUpWJP92WuDl+VjFStm6MG1cUBT63C+7rN6gr421Sb4CfPp2Jx9gFxgL4esmCCcjPHeaElP3eILr9BqyuL8EBey5EeejqMJXMhC7BAn7OjKGAAyLcTgcCooCgxwfxXl9cAOa5c8ElJckk7mDPLIAvifrf3pATs1CWFAQCUkiWFBX7b+RiWV0J9rXlUefkwfFIPvrdEjoKnoTXL8LjcsLT7yS9obILPQ9ibOptNvBFRUzcH7m+QynRq/gusX27v7Dj8PG7oew9bhE+byAuA1JEqpUyN+kHx95LrkZZwk1owfrE4zCkJoFLTkbimjUs+3YankZ2vJEKMKP7iVV8uHkK1iy1QaLsRb+kadBo4GDk9TFjp32PYaSb3WfvGnC+ejVz3kNDiyPOBwMI4yVK7udPPyjErGwRMjWTVvaWRJ547Ph1KROXhSxoKNAbIYKfMZsFwcq5YviXExdlnB11js4OJ5pO1sLY0wqdHPsaGY0clV7j/qKAvvfMQHQVdBwHk8mMpJRUBGpC3yjs6MsZrjoYAPVBKbF1e3dVQvAHYXDcgcn+K/Hb0NFNx7I3J1D2I1zgzXIGfhcnhRzzJhOSU61ITEkBR7dfsKUVUms7W/YZ+eE0AyBsv93uQPm3V4eyoAoYe+wUSAPyLb1YuciGpER9nHOjQYfiokQoS1eFHafBYDTGVESorWOskGhetG50PTPa/uqjd1mOc6ALCtj2RhHWb5oaer7V5Ufvg4EmnZBmRKaNR4J5IBfXgWZIbe1xNqS2WxGRfQ1d1AqAU2SNo4tgy0jC+o1sh1BOVJGXZZmTl4V8DFSQvezMOivdIfOiBSkejQBg4iNSzLkfHUBTyfzcpzImJ6P7rjtGd9PWBZFqbqdesBM/DA3Q/k7ji4t2GnKzIXV0xszxU4siYmv0eHQPfJ6SZu4+fm4jZs/NDjWdNT0BH32yAu/seJbN7ws7Hw17ode3J72yDoYC+pahhtRRQ5rmzYFl7XI2X0426kbUpgxKiDrZnwZdRGoUvsMYQWsLieyhnxeZbMiDdn4iirv1dBoG2Ikyn6iEiM5lNFDUFzEOkA224UvCdtipV082qvE/NPA3/beZxtWRPvUAAAAASUVORK5CYII=`,n=new URL(`atlas-Cjq-yNEQ.png`,import.meta.url).href,r=`data:image/svg+xml,%3csvg%20width='56'%20height='64'%20viewBox='0%200%2056%2064'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M53.292%2015.321l1.5-3.676s-1.909-2.043-4.227-4.358c-2.317-2.315-7.225-.953-7.225-.953L37.751%200H18.12l-5.589%206.334s-4.908-1.362-7.225.953C2.988%209.602%201.08%2011.645%201.08%2011.645l1.5%203.676-1.91%205.447s5.614%2021.236%206.272%2023.83c1.295%205.106%202.181%207.08%205.862%209.668%203.68%202.587%2010.36%207.08%2011.45%207.762%201.091.68%202.455%201.84%203.682%201.84%201.227%200%202.59-1.16%203.68-1.84%201.091-.681%207.77-5.175%2011.452-7.762%203.68-2.587%204.567-4.562%205.862-9.668.657-2.594%206.27-23.83%206.27-23.83l-1.908-5.447z'%20fill='url(%23paint0_linear)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M34.888%2011.508c.818%200%206.885-1.157%206.885-1.157s7.189%208.68%207.189%2010.536c0%201.534-.619%202.134-1.347%202.842-.152.148-.31.3-.467.468l-5.39%205.717a9.42%209.42%200%2001-.176.18c-.538.54-1.33%201.336-.772%202.658l.115.269c.613%201.432%201.37%203.2.407%204.99-1.025%201.906-2.78%203.178-3.905%202.967-1.124-.21-3.766-1.589-4.737-2.218-.971-.63-4.05-3.166-4.05-4.137%200-.809%202.214-2.155%203.29-2.81.214-.13.383-.232.48-.298.111-.075.297-.19.526-.332.981-.61%202.754-1.71%202.799-2.197.055-.602.034-.778-.758-2.264-.168-.316-.365-.654-.568-1.004-.754-1.295-1.598-2.745-1.41-3.784.21-1.173%202.05-1.845%203.608-2.415.194-.07.385-.14.567-.209l1.623-.609c1.556-.582%203.284-1.229%203.57-1.36.394-.181.292-.355-.903-.468a54.655%2054.655%200%2001-.58-.06c-1.48-.157-4.209-.446-5.535-.077-.261.073-.553.152-.86.235-1.49.403-3.317.897-3.493%201.182-.03.05-.06.093-.089.133-.168.238-.277.394-.091%201.406.055.302.169.895.31%201.629.41%202.148%201.053%205.498%201.134%206.25.011.106.024.207.036.305.103.84.171%201.399-.805%201.622l-.255.058c-1.102.252-2.717.623-3.3.623-.584%200-2.2-.37-3.302-.623l-.254-.058c-.976-.223-.907-.782-.804-1.622.012-.098.024-.2.035-.305.081-.753.725-4.112%201.137-6.259.14-.73.253-1.32.308-1.62.185-1.012.076-1.168-.092-1.406a3.743%203.743%200%2001-.09-.133c-.174-.285-2-.779-3.491-1.182-.307-.083-.6-.162-.86-.235-1.327-.37-4.055-.08-5.535.077-.226.024-.422.045-.58.06-1.196.113-1.297.287-.903.468.285.131%202.013.778%203.568%201.36.597.223%201.17.437%201.624.609.183.069.373.138.568.21%201.558.57%203.398%201.241%203.608%202.414.187%201.039-.657%202.489-1.41%203.784-.204.35-.4.688-.569%201.004-.791%201.486-.812%201.662-.757%202.264.044.488%201.816%201.587%202.798%202.197.229.142.415.257.526.332.098.066.266.168.48.298%201.076.654%203.29%202%203.29%202.81%200%20.97-3.078%203.507-4.05%204.137-.97.63-3.612%202.008-4.737%202.218-1.124.21-2.88-1.061-3.904-2.966-.963-1.791-.207-3.559.406-4.99l.115-.27c.559-1.322-.233-2.118-.772-2.658a9.377%209.377%200%2001-.175-.18l-5.39-5.717c-.158-.167-.316-.32-.468-.468-.728-.707-1.346-1.308-1.346-2.842%200-1.855%207.189-10.536%207.189-10.536s6.066%201.157%206.884%201.157c.653%200%201.913-.433%203.227-.885.333-.114.669-.23%201-.34%201.635-.545%202.726-.549%202.726-.549s1.09.004%202.726.549c.33.11.667.226%201%20.34%201.313.452%202.574.885%203.226.885zm-1.041%2030.706c1.282.66%202.192%201.128%202.536%201.343.445.278.174.803-.232%201.09-.405.285-5.853%204.499-6.381%204.965l-.215.191c-.509.459-1.159%201.044-1.62%201.044-.46%200-1.11-.586-1.62-1.044l-.213-.191c-.53-.466-5.977-4.68-6.382-4.966-.405-.286-.677-.81-.232-1.09.344-.214%201.255-.683%202.539-1.344l1.22-.629c1.92-.992%204.315-1.837%204.689-1.837.373%200%202.767.844%204.689%201.837.436.226.845.437%201.222.63z'%20fill='%23fff'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M43.34%206.334L37.751%200H18.12l-5.589%206.334s-4.908-1.362-7.225.953c0%200%206.544-.59%208.793%203.064%200%200%206.066%201.157%206.884%201.157.818%200%202.59-.68%204.226-1.225%201.636-.545%202.727-.549%202.727-.549s1.09.004%202.726.549%203.408%201.225%204.226%201.225c.818%200%206.885-1.157%206.885-1.157%202.249-3.654%208.792-3.064%208.792-3.064-2.317-2.315-7.225-.953-7.225-.953z'%20fill='url(%23paint1_linear)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear'%20x1='.671'%20y1='64.319'%20x2='55.2'%20y2='64.319'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F50'/%3e%3cstop%20offset='.41'%20stop-color='%23F50'/%3e%3cstop%20offset='.582'%20stop-color='%23FF2000'/%3e%3cstop%20offset='1'%20stop-color='%23FF2000'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear'%20x1='6.278'%20y1='11.466'%20x2='50.565'%20y2='11.466'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF452A'/%3e%3cstop%20offset='1'%20stop-color='%23FF2000'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e`,i=new URL(`chrome-CTqC3lDf.png`,import.meta.url).href,a=new URL(`chromium-Dnf4fmVW.png`,import.meta.url).href,o=new URL(`comet-WzM1XkGo.png`,import.meta.url).href,s=new URL(`edge-BDohVkL2.png`,import.meta.url).href,c=new URL(`edge-BDohVkL2.png`,import.meta.url).href,l=new URL(`firefox-EOqxoGBZ.svg`,import.meta.url).href,u=new URL(`floorp-BOjICP9Z.png`,import.meta.url).href,d=new URL(`librewolf-Cl9rHKex.svg`,import.meta.url).href,f=new URL(`opera-gx-cbGB2yjU.png`,import.meta.url).href,p=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAA+VBMVEX/////Gy3/S0v8GSzvFSiyAxb//f2kBQbQCx+0ERL0Fym6FxfZLC2gAgLDBxvEHR+4BBjeECP4GCrJISH//Py9BhqqARSsCwvrOzvjNTXrFCfeMTHnEyb/HjDvPj75RkfWDiHPJSbkEiXyQEGuARX2Q0OpCAj/+vrKCR2vDg7nNzfaDyLhESTTKSn/EiXBGhz/P0LICh2+Ghr/UVLRKCj4xcf/Cx/96uv4iY/63d/gMzPzmp7909WZAAD/XmXYDiH1uLv+8/T3aXHdIin/qq79Lz/aAxb9eoD+SEjWcHXsCBz2DSHXgoXoqKzDNTzJV1/xIjHoVVrRSE/UYfkCAAANWklEQVR42tSdC1vaSheFR7RBBKRKWrQaFX0k1VaIpiGJ5EvDPSIq+v9/zNmTYL3LmpCx/Rae1mO5vKys2XNJGBlLQYqqK/F3uu1ZvZYzHHZ83+90hkOn1bM8W7+/n6qwf0GKEoPortUa+kZfq7+Q1jfMjhN47egBfx2crON/2ZbjG1q92STChXtp2p9v6cfNZnOh7zuBGz9M+bvEOgH3OS/HfOB8Ii3+N0Kva+EwsP8at8KJ20GHgMnet3CfwXPyZr3v99woJx+MzH3SY2IQ+JHtdFw0v2dPn+YjTfYcIyJeSKDI8H7H+jhsjqwE/kJS4ntuessht/sDsDlyu0cmz0P8kJO+8wHYHLnVn8/kx9z1pjZ05WLTc+scOR3iqd2EbUduSEtGz0iEvDgteE/0CNtpU88qKRmWmdBlQpx016rlfC5SPpcvV9e6kyk5Yfd7MjJCRtjDehJkzlvK1Yr/e6FiLVfi5FG2TS/1jNAwrddPUDEIuHEU8xaL9DVV/F3848pZZHmz7uipmk1ptn3xZGiTai4b4b4nukM2V51QRgwrRbPpiYJ+UxNNRTefnQX8AJ7Nd2lQ60THNJ1o6MJpJpOPUOJ77kp5Ug/dVCJC0fCMpmguSlkh4il3trSkURmZm5qeoKeJ2RwjZ7OizPQIjj2cO9j0cEewz9bKEXIyEfZ3354v2CrTfbFoaN2jxMRT7q+b7jzUOrNDoaqhTfLFKfP9IU+CnQ+SN0edeX2BOC8uaNVasVaLeGu5PClXidFrQtC1YraVdCxCzGJNcHKW5cS564uW5dptXW/brnU1vstnBbnpWcbJqHVmCTFr3VyRjuxFNNnmVUeZ3ljbGl9nCVtAlWTUxLwgxPwrW6zcBLwFKbqqKlOp08Un64LeUkWE+kKcWpi5VKxc8IUB/WUTUlT+VuxxvliryPRajHlxYZIr3rjvLXlxbnt8lK1UahVEdK/sWKyXEWuDi9rk6zWN0PR3jVEI273J1o4qqIotkXpNI9G+CHP3aIxMPDj2VS4rQH2FU9P01cCZNe3nNToQptGXe5c9ArHpbhZKTY75Av2gtnZjz0jG0ynQOFtBqWt5F8y1yoYifff+mIlFj10RDqjstQ6NVHXWE6l1k5bgAJiSHeRQ6tzXG+TZacwvMqqbBEn6AC9fyaHU49nHUawRLqwHSUbsMTWkoxzQGFXWEQh0PUg2yyBqwsFUKbVnJEQo0FqzlXRmxHONqjIj1gqztTrOPEw+m9PZ1SeU+tP7fYwiUKG1pj/PxFln4095kPrMfeeFKBx4oOv99jyTfao5N0QN3T69ExCFDznwRmjNN2mmVyvlMK/z7wREpHJoTWfeFSzeGPOYcm9WEJVZeCOsm/Mvg0exxlR5u4sJBcqdm8bqlX4Ne/3666kCrZBX6BSWN0UC8mpbVFgbb4V1Q2FprH+r7CJ3hjCf5XOvdb4qcwTKnZXO6jevIJjTjdzdS5tEyh3vVlI6z0BtMdeAqM9esVrI6AUvLWjeFvNniBr5F1aLJFprdtI7NaKzVq4BUj+3WmUtAaNdltpZqMjqBqJS/lkBiYb+f8PoyOp8CaR+2vxFanSKiZ4G8/qsBCl/8QRaYSbaGWp1n6V6PpgKSL4MQTfKj3OpMK8ufYr1ttUuxlwq5x8P0kRWOhaNtK9yoG4Rtfpa/WO1WL1z0j7vTqPLRhmhLpcbD01RFZrNuizlSxx41SOg2SqVTx+aosDMMPVmGJs2bkRMM77oj2t7+vJiw45e+lfuUB0og2pcTV9epEgvajaTcd3OXQOEvs9HlI5FSFLSEY3WGlUIunodTxbj2gFCJ19Tej8fFgdCbqW4fvD5LGg0UXsynOb1o4xYXa1O8xGNpNF0GEyKqH8pVSGV7h4m4Wg6hnKu+lPZFQhdrbrRaWAbD4eMgjcdf4DIv0q86KksQNOxuJ5+d3gPrd5VfyHQJyUeal0o0rIuZOWhPvmFqHonVKXXU56zPJvugdC/CvwqB6rSi3+1Sk8rdfUEU5Vf4O4twolOa43m1VWbAsZcKLXo/v9AO4yw76oQdqF6Qfd2cOi+Lg1aYZ1qAdFJ9Zbu3oGLx6Uvz2jqlwn6BLndtRkzL+HiMZR2FTzvEzGnC4Utl+kCxcORCW11QeiCxWctaDO87MmDpo4cs7lQ6F4xT1tHnb60JBYPZm8VZt+IeqvrsABNB3ntyYRu30VQM43m0L3LxX+hTBP2bXcL0kmHtS7XQdX7tkRohUHQha3z7i1zYOhLiX1L1LuAThdu2RCGXunL/GCYwi665wjzOUF3cKcNicy8S+xunp+fbxH52190O9/aEYE2ZbbDe+jZ2tr4t6AhnR8z/3IF0frKinTowiYoFHrlA5xGoY8pHiugRtKhjzHoDQHoy/9L6F0mtU47hY1jRJu8c4GhJXcuQxzaGWHISyvSu3EMeoOgWyPU6SXJA6bO8Qak4w7rjZZQTSQPTTHo480hC3DoJbmTgFvUaYd5OLPk6dbBBgjdYvYEhh7JndiCzDvHAdP7cD5GTlof2311BfJ4B9OGxZiJQ0tdrAlQ6AOXsQ4ObcpcFmsdH2BGm3S4HRxa6gLkEIM+oDLNBGreN5mFWrndOYC06fBFdbzmjWQuqu+C0Me96PTF6BumpZHE0xceyHy440WLJKMlFFriiaLeziHEfLBr84u1HNTp7dGBvHbo7BxC2vHjAolCk6S1RMVHofkiOTWByfbUyXdu8b+PAmmnmTHkw92dCEFhu6NtTN9G0k7oBzu7IHV0sGlGiULvjw7kRXoXkuHfD1VQ6O39bVkXqfhGiDCHO3HVpeF3YR/Nx0DS5UDeYQg6PR3Tq6wz2N6HtD26lXPhVcsIIe2a7XvoYLAParsrZ3LbAaEN5+FiwsJPlHpwJeNiQjcMM2Fmd+Z/GePP6Idm77DVMvLB05EhqNkKzT+f4Yry8RPUvoROUfWNDKQ/6YjrxxoKPUj9XDPVDpA5YzyquNS/DGDoDTVlq6lnQY321SfvdQ3Vz0Hql9fbJmr0kzUMGlQPfqLQKTfFuBlCMp/UW94UYa/X0v7IiB8KN8P4keomTD1Idf5CcxbU6PCZW3SMcKt/pPsxKNjo4bOX5VXvx9+wWsBo48X6J00VB2s/MP3eS/OjfaDR5gujY6t/g9A/0isgcxkdW/0Dpk7v46pgjX7N6OhAFQa/QQ020/lgMN4ZPunBHx+pq8HvPUy/B6ksVasCo47hWy7dDfZgufMHJJoagtCZN8qsyiwcenA3/waTAh248ebclE8Wceq5AyIQjtB/c1sOasvd5b1lSHS3ubfKgAcdj2ZZL6VTWwShl/cGhbnmuPTQ4fyt8H6IugxrrlgLBDo07feh7SoO/f1ino12ArhwGDOmHRSQ7wLUiTfM0JmXgZmdWQeUKogA9XKQjJqYzXD+yvG4N8epv+9ZybbpcmFmPvRXZzcQl2DA2/Jp10qyIZpr4oGGTsjzWMNaXu2KbuPG94bGfX6/2j32+mIVx17t9oT2XiaEIIMzd8CTxHSnWyFqp43vB0xvD67PLxYNZjTG69Xvp6CIuuOB3Uy0cb8Ac8bDD6JKfczqKazVrtljQLL5r3QITAFmQ6g2UfturJ7SDRFRFwxu9vsZ4chkcyjA3BPdQtZaxXW6Wg1D/ktOlDftjn6lSkvEZs6siNZSEerV1dKukXGi3zz0kluJftWO3fNFkPm4P8m2yCJef1ndIRuHVrSV83QnZxZv5hy9sueYIslIxizs9ZcvBTNjGH7Laj9/prbX6oRCLidljqgbn2Fm+irtmpnQMMxhK/Cm25PbXtAa+vTDjCBzL/mm6m7pM1kIisA3+NILIRK56ZNMk/8PxcIUQg7DIPlufDqzrz9/EdDnKpkdE8bn/TJJFGbmutRSZ/qNGPWXgqCrL3vuw9s511TowePPYtiNjXmoTbPwX3NnsOIgDIRhKaRBUOKhHexFEQMeZRGR4h7sMRAj+P4PszNau932Yqy2O6cWJfn4TVMbbL6+enUdCIdWe7SjDkS0GLuIvtR+hbUr/FVgGLHMrCt2sSTlNA9aZ5Wlzcw5KBbMp6Zi+cl2bBe7UDBzXstTRJtz5yywo2ZHL50fN4bs5YxpZ73nhkms1DFLbOTOvXgOd1HEnsDTTbmuxSpbEDZhB7kXIdTwnfM8He+GQ5GX45ks0Nn8/eRnzyIXhS0z25IsEF4YE15RTLlPb+KQIpbUbF9uIZTDsMseO7AvKRErT5JTFIYpPYiUhmF0ShLixUOIDKJ11o759z6+NbAEeySXIOX0GqSUU0vg6suot9yicDba12Ip9jRc5N/LBYzsJJv92WCc/TLEhleg76nlFXlbFyVJN7LaAMUtXysMGVx1fo/1k65k00mO3K8wAwdTV+/zqxL2WRvsljq3roGYu13jbD4wHj+SzqHpXM6RwRIZkFj2FPJbkW9xXxolwOc2zNzHjOuPaI7HeXsUSuveJbHWDF4EBqM+KJS+43aqRncCyGzG4RmeD7i+D65R7afV3dNNSXaVpDe16o1LhA8FrjCdbv+LJP0WeDZuzOgcqu+mrbVS3VBK6bptypuOPlsH+AdsjdiGzbZGjgAAAABJRU5ErkJggg==`,m=new URL(`safari-CKP33lKk.png`,import.meta.url).href,h=new URL(`vivaldi-CVXcaOiL.png`,import.meta.url).href,g=new URL(`waterfox--1W7ATIm.png`,import.meta.url).href,_=e(),v=[{key:`chrome`,name:`Google Chrome`},{key:`chromium`,name:`Chromium`},{key:`edge`,name:`Microsoft Edge`},{key:`edge-dev`,name:`Microsoft Edge Dev`},{key:`brave`,name:`Brave`},{key:`vivaldi`,name:`Vivaldi`},{key:`arc`,name:`Arc`},{key:`atlas`,name:`ChatGPT Atlas`},{key:`comet`,name:`Perplexity Comet`},{key:`opera`,name:`Opera`},{key:`opera-gx`,name:`Opera GX`},{key:`firefox`,name:`Firefox`},{key:`librewolf`,name:`LibreWolf`},{key:`floorp`,name:`Floorp`},{key:`waterfox`,name:`Waterfox`},{key:`safari`,name:`Safari`}],y=new Map(v.map(e=>[e.name,e.key])),b={arc:t,atlas:n,brave:r,chrome:i,chromium:a,comet:o,edge:c,"edge-dev":s,firefox:l,floorp:u,librewolf:d,opera:p,"opera-gx":f,safari:m,vivaldi:h,waterfox:g};function x(e){return y.get(e)??`generic`}function S(e){let t=x(e);return t===`generic`?null:b[t]}function C({browserName:e,className:t,decorative:n=!1,title:r}){let i=S(e),a=n?{alt:``,"aria-hidden":!0}:{alt:r??`${e} icon`},o=[`browserIcon`,t].filter(Boolean).join(` `);return i?(0,_.jsx)(`img`,{className:o,src:i,decoding:`async`,draggable:!1,...a}):(0,_.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:o,...n?{"aria-hidden":!0}:{role:`img`,"aria-label":r??`${e} icon`},children:[(0,_.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9.5`,fill:`#334155`}),(0,_.jsx)(`path`,{d:`M4.5 12h15M12 4.5a11 11 0 0 1 0 15M12 4.5a11 11 0 0 0 0 15`,fill:`none`,stroke:`#e2e8f0`,strokeLinecap:`round`,strokeWidth:`1.2`})]})}export{v as n,C as t}; \ No newline at end of file diff --git a/site/public/app/assets/button-C0JM8asg.js b/site/public/app/assets/button-C0JM8asg.js new file mode 100644 index 00000000..ac302262 --- /dev/null +++ b/site/public/app/assets/button-C0JM8asg.js @@ -0,0 +1 @@ +import{Q as e,Y as t,k as n}from"./index-CteWxeiL.js";import{r}from"./react-dom-BQvtGpns.js";import{r as i}from"./query-DyHGS9i8.js";var a=e(t(),1),o=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function s(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:o(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var c=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},l=e=>{let t=c(e);return t.charAt(0).toUpperCase()+t.slice(1)},u=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),d={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function f(e){return e!=null}function p(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??d.width,a=e.size??e.height??d.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?u(...c):u(`lucide`,...s,...c),p=t.absoluteStrokeWidth?Number(t.strokeWidth??d[`stroke-width`])*Number(e.size??e.width??d.width)/Number(t.size??t.width??d.width):t.strokeWidth??d[`stroke-width`];return[`svg`,{...Object.entries(d).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&f(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&f(t.width)&&{[r(`width`)]:t.width},...`height`in t&&f(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:p,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function m(e,t={}){return p(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var h=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},g=(0,a.createContext)({}),_=()=>(0,a.useContext)(g),v=(0,a.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:o,nonScalingStroke:s,className:c=``,children:l,iconNode:d=[],icon:f={node:d,aliases:[],size:24},...p},g)=>{let{size:v=24,strokeWidth:y=2,absoluteStrokeWidth:b=!1,nonScalingStroke:x=!1,color:S=`currentColor`,className:C=``}=_()??{},w=!!l||h(p),[T,E,D=[]]=m(f,{color:e??S,width:n??t??v,height:r??t??v,strokeWidth:i??y,absoluteStrokeWidth:o??b,nonScalingStroke:s??x,className:u(C,c),hasA11yProp:w,attributes:p});return(0,a.createElement)(T,{ref:g,...E},[...D.map(([e,t])=>(0,a.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function y(e,t=[],n=[]){let r=typeof e==`string`?s(e,t,n):e,i=(0,a.forwardRef)(({className:e,...t},n)=>(0,a.createElement)(v,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=l(r.name)),i}var b={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};b.node;var x=y(b),S=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,C=r,w=(e,t)=>n=>{if(t?.variants==null)return C(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=S(t)||S(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return C(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},T=Object.defineProperty,E=(e,t)=>T(e,`name`,{value:t,configurable:!0});function D(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}E(D,`setRef`);function O(...e){return t=>{let n=!1,r=e.map(e=>{let r=D(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;tA(e,`name`,{value:t,configurable:!0});function M(e){let t=a.forwardRef((t,n)=>{let{children:r,...i}=t,o=null,s=!1,c=[];r=U(r),a.Children.forEach(r,e=>{if(z(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;V(n)&&typeof q==`function`;)n=q(n._payload);o=I(t,n),c.push(o?.props?.children)}else c.push(e)}),o?o=a.cloneElement(o,void 0,c):!s&&a.Children.count(r)===1&&a.isValidElement(r)&&(o=r);let l=o?R(o):void 0,u=k(n,l);if(!o){if(r||r===0)throw Error(s?K(e):G(e));return r}let d=L(i,o.props??{});return o.type!==a.Fragment&&(d.ref=n?u:l),a.cloneElement(o,d)});return t.displayName=`${e}.Slot`,t}j(M,`createSlot`);var N=M(`Slot`),P=Symbol.for(`radix.slottable`);function F(e){let t=j(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=P,t}j(F,`createSlottable`);var I=j((e,t)=>`child`in e.props?a.isValidElement(t)?a.cloneElement(t,void 0,e.props.children(t.props.children)):null:a.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function L(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=W(a,i))}return{...e,...n}}j(L,`mergeProps`);function R(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}j(R,`getElementRef`);function z(e){return a.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===P}j(z,`isSlottable`);var B=Symbol.for(`react.lazy`);function V(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===B&&`_payload`in e&&H(e._payload)}j(V,`isLazyComponent`);function H(e){return typeof e==`object`&&!!e&&`then`in e}j(H,`isPromiseLike`);function U(e){let t=e;for(;V(t)&&typeof q==`function`;)t=q(t._payload);return t}j(U,`useUnwrappedLazy`);function W(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}j(W,`concatAriaDescribedby`);var G=j(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),K=j(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),q=a.use,J=n(),Y=w(`inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function X({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...a}){let o=r?N:`button`;return(0,J.jsx)(o,{"data-slot":`button`,"data-variant":t,"data-size":n,className:i(Y({variant:t,size:n,className:e})),...a})}export{F as a,y as c,M as i,Y as n,w as o,N as r,x as s,X as t}; \ No newline at end of file diff --git a/site/public/app/assets/chevron-down-Cjj85Wup.js b/site/public/app/assets/chevron-down-Cjj85Wup.js new file mode 100644 index 00000000..3db81bc8 --- /dev/null +++ b/site/public/app/assets/chevron-down-Cjj85Wup.js @@ -0,0 +1 @@ +import{c as e}from"./button-C0JM8asg.js";var t={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};t.node;var n=e(t);export{n as t}; \ No newline at end of file diff --git a/site/public/app/assets/chrome-CTqC3lDf.png b/site/public/app/assets/chrome-CTqC3lDf.png new file mode 100644 index 00000000..32a6a4ea Binary files /dev/null and b/site/public/app/assets/chrome-CTqC3lDf.png differ diff --git a/site/public/app/assets/chromium-Dnf4fmVW.png b/site/public/app/assets/chromium-Dnf4fmVW.png new file mode 100644 index 00000000..4899f69a Binary files /dev/null and b/site/public/app/assets/chromium-Dnf4fmVW.png differ diff --git a/site/public/app/assets/circle-C2ges-Y_.js b/site/public/app/assets/circle-C2ges-Y_.js new file mode 100644 index 00000000..ce2734a4 --- /dev/null +++ b/site/public/app/assets/circle-C2ges-Y_.js @@ -0,0 +1 @@ +import{c as e}from"./button-C0JM8asg.js";var t={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};t.node;var n=e(t);export{n as t}; \ No newline at end of file diff --git a/site/public/app/assets/comet-WzM1XkGo.png b/site/public/app/assets/comet-WzM1XkGo.png new file mode 100644 index 00000000..497f0043 Binary files /dev/null and b/site/public/app/assets/comet-WzM1XkGo.png differ diff --git a/site/public/app/assets/copy-Da1fgnNr.js b/site/public/app/assets/copy-Da1fgnNr.js new file mode 100644 index 00000000..5aeca547 --- /dev/null +++ b/site/public/app/assets/copy-Da1fgnNr.js @@ -0,0 +1 @@ +import{c as e}from"./button-C0JM8asg.js";var t={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};t.node;var n=e(t);export{n as t}; \ No newline at end of file diff --git a/site/public/app/assets/day-page-BKgMGOzZ.js b/site/public/app/assets/day-page-BKgMGOzZ.js new file mode 100644 index 00000000..5e25150c --- /dev/null +++ b/site/public/app/assets/day-page-BKgMGOzZ.js @@ -0,0 +1 @@ +import{t as e}from"./chevron-down-Cjj85Wup.js";import{Ft as t,Gt as n,It as r,Pt as i,Wt as a,Yt as o,qt as s}from"./main-CmsrHzbA.js";import{c,t as l}from"./button-C0JM8asg.js";import{t as u}from"./search-C-9jHG2I.js";import{J as d,Q as f,S as p,T as m,Y as h,g,k as _}from"./index-CteWxeiL.js";import{t as v}from"./recharts-bar-chart-Dd_fYVwX.js";import{t as y}from"./site-icon-9eLiTdFC.js";import{i as b,r as x}from"./section-card-BTUr59O6.js";import{r as S}from"./query-DyHGS9i8.js";import{a as C,c as w,i as T,l as E,n as D,o as O,p as k,r as A,s as j,t as M,u as N}from"./parts-CrmjhOE3.js";import{a as P,i as F,m as I,o as L,r as R,t as z}from"./links-4-O_q9FA.js";import{n as B,r as V}from"./mix-card-PK6D6caA.js";import{t as H}from"./share-bar-BJplRG-f.js";import{i as U,r as W}from"./zone-CAMroIcN.js";var G={name:`repeat`,size:24,node:[[`path`,{d:`m17 2 4 4-4 4`,key:`nntrym`}],[`path`,{d:`M3 11v-1a4 4 0 0 1 4-4h14`,key:`84bu3i`}],[`path`,{d:`m7 22-4-4 4-4`,key:`1wqhfi`}],[`path`,{d:`M21 13v1a4 4 0 0 1-4 4H3`,key:`1rx37r`}]]};G.node;var K=c(G),q=f(h(),1),J=_();function Y(e,t){return{range:`custom`,dates:{start:e,end:e},profileId:null,zone:t}}function X(){let{t:e}=d(),t=W(),{date:r=``}=o(),[i]=I(),c=p(r),u=m(U().shown),f=c&&r<=u;return(0,J.jsxs)(x,{wide:!0,children:[(0,J.jsx)(M,{back:F(i),eyebrow:e(`insights.day.eyebrow`),title:c?t.day(r,{weekday:`long`,month:`long`,day:`numeric`}):r,subtitle:c?r.slice(0,4):void 0,actions:c&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,J.jsx)(l,{variant:`outline`,size:`icon-sm`,asChild:!0,children:(0,J.jsx)(s,{to:z(g(r,-1),i),"aria-label":e(`insights.day.previous`),children:(0,J.jsx)(n,{})})}),(0,J.jsx)(l,{variant:`outline`,size:`icon-sm`,disabled:r>=u,"aria-label":e(`insights.day.next`),asChild:r!1,empty:``,children:()=>null})}):(0,J.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1.5fr)_minmax(0,1fr)] gap-4 max-[900px]:grid-cols-1`,children:[(0,J.jsx)(ee,{date:e}),(0,J.jsx)(te,{date:e})]}),(0,J.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1.5fr)_minmax(0,1fr)] gap-4 max-[900px]:grid-cols-1`,children:[(0,J.jsx)(ne,{date:e}),(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,J.jsx)(oe,{date:e}),(0,J.jsx)(V,{scope:Y(e,r),empty:t(`insights.day.noCompared`)}),(0,J.jsx)(Q,{date:e}),(0,J.jsx)($,{date:e})]})]})]})}function Q({date:e}){let{t}=d(),n=w(e);return(0,J.jsx)(b,{title:t(`insights.mix.title`),action:(0,J.jsx)(C,{meta:n.data?.meta,explain:`${t(`insights.mix.explain`)} ${t(`insights.day.mixCompared`)}`}),children:(0,J.jsx)(T,{query:n,skeleton:(0,J.jsx)(A,{rows:4}),isEmpty:e=>e.data.activityMix.categories.length===0,empty:t(`insights.day.empty`),children:e=>(0,J.jsx)(B,{mix:e.data.activityMix,compared:!0})})})}function $({date:e}){let{t}=d(),n=W(),r=w(e);return(0,J.jsx)(b,{title:t(`insights.day.reopened`),subtitle:t(`insights.day.reopenedHint`),children:(0,J.jsx)(T,{query:r,skeleton:(0,J.jsx)(A,{rows:3}),isEmpty:e=>e.data.refindPages.items.length===0,empty:t(`insights.day.reopenedEmpty`),children:e=>(0,J.jsx)(`ul`,{className:`-mx-2 flex flex-col`,children:e.data.refindPages.items.slice(0,5).map(e=>(0,J.jsx)(`li`,{children:(0,J.jsxs)(s,{to:P(e.canonicalUrl,void 0,e.profileId),className:j,children:[(0,J.jsx)(K,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`flex-1 truncate`,children:e.title||e.url}),(0,J.jsx)(`span`,{className:`text-xs text-muted-foreground tabular`,children:t(`insights.refind.days`,{count:e.crossDayCount,days:n.number(e.crossDayCount)})})]})},`${e.profileId}:${e.canonicalUrl}`))})})})}function ee({date:e}){let{t}=d(),n=W(),r=w(e),i=(0,q.useMemo)(()=>({visits:{label:t(`insights.day.visits`),colors:{light:[`var(--brand)`],dark:[`var(--brand)`]}}}),[t]),a=(0,q.useMemo)(()=>(r.data?.data.hourlyActivity??[]).map(e=>({hour:n.hour(e.hour),visits:e.visitCount})),[r.data,n]);return(0,J.jsx)(b,{title:t(`insights.day.hours`),action:(0,J.jsx)(C,{meta:r.data?.meta}),children:(0,J.jsx)(`div`,{className:`h-[200px]`,children:(0,J.jsxs)(v,{data:a,config:i,xDataKey:`hour`,isLoading:r.data===void 0,className:`aspect-auto h-full`,barRadius:3,children:[(0,J.jsx)(v.Grid,{vertical:!1,strokeDasharray:`3 4`}),(0,J.jsx)(v.XAxis,{dataKey:`hour`,tickLine:!1,axisLine:!1,interval:5,className:`font-mono`}),(0,J.jsx)(v.Tooltip,{}),(0,J.jsx)(v.Bar,{dataKey:`visits`})]})})})}function te({date:e}){let{t}=d(),n=W(),r=w(e);return(0,J.jsx)(b,{title:t(`insights.topSites.title`),children:(0,J.jsx)(T,{query:r,skeleton:(0,J.jsx)(A,{rows:6}),isEmpty:e=>e.data.topSites.items.length===0,empty:t(`insights.day.empty`),children:r=>{let i=r.data.topSites.items.slice(0,6),a=Math.max(1,...i.map(e=>e.visitCount));return(0,J.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:i.map(r=>(0,J.jsx)(`li`,{children:(0,J.jsxs)(s,{to:R({date:e,domain:r.registrableDomain}),title:t(`insights.day.siteInHistory`),className:`relative flex h-8 items-center gap-2.5 rounded-md px-2 text-[13px] hover:no-underline`,children:[(0,J.jsx)(y,{domain:r.registrableDomain}),(0,J.jsx)(`span`,{className:`flex-1 truncate font-medium`,children:r.registrableDomain}),(0,J.jsx)(H,{value:r.visitCount,max:a}),(0,J.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:n.number(r.visitCount)})]})},r.registrableDomain))})}})})}function ne({date:e}){let{t}=d(),n=N(e);return(0,J.jsx)(b,{title:t(`insights.day.sessions`),subtitle:t(`insights.day.sessionsHint`),children:(0,J.jsx)(T,{query:n,skeleton:(0,J.jsx)(A,{rows:4,height:44}),isEmpty:e=>e.sessions.length===0,empty:t(`insights.day.noSessions`),children:t=>(0,J.jsx)(`ul`,{className:`-mx-2 flex flex-col`,children:[...t.sessions].sort((e,t)=>e.firstVisitMs-t.firstVisitMs).map(t=>(0,J.jsx)(re,{session:t,date:e},t.sessionId))})})})}function re({session:n,date:a}){let{t:o}=d(),s=W(),[c,l]=(0,q.useState)(!1);return(0,J.jsx)(`li`,{children:(0,J.jsxs)(i,{open:c,onOpenChange:l,children:[(0,J.jsxs)(r,{className:`flex w-full items-start gap-3 rounded-lg p-2 text-left transition-colors hover:bg-muted`,children:[(0,J.jsxs)(`span`,{className:`min-w-[92px] pt-0.5 font-mono text-xs text-muted-foreground tabular`,children:[s.time(n.firstVisitMs),`–`,s.time(n.lastVisitMs)]}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,J.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`truncate text-[13px] font-medium`,children:n.autoTitle||o(`insights.day.untitledSession`)}),n.isDeepDive&&(0,J.jsx)(`span`,{title:o(`insights.kpi.deepDivesDetail`),className:`shrink-0 rounded-full bg-brand/12 px-1.5 py-px text-[11px] font-medium text-brand`,children:o(`insights.day.deepDive`)})]}),(0,J.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[o(`insights.day.sessionMeta`,{pages:o(`common.pages`,{count:n.visitCount}),sites:o(`common.sites`,{count:n.domainCount})}),n.searchCount>0&&` · ${o(`insights.day.searchCount`,{count:n.searchCount})}`]})]}),(0,J.jsx)(e,{"aria-hidden":!0,className:S(`mt-1 size-4 shrink-0 text-muted-foreground transition-transform duration-200`,c&&`rotate-180`)})]}),(0,J.jsx)(t,{className:`overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down`,children:c&&(0,J.jsx)(ie,{sessionId:n.sessionId,date:a})})]})})}function ie({sessionId:e,date:t}){let{t:n}=d(),r=W(),i=k(e,!0);return(0,J.jsx)(`div`,{className:`pb-2 pl-[104px] pr-2`,children:(0,J.jsx)(T,{query:i,skeleton:(0,J.jsx)(A,{rows:3,height:24}),isEmpty:e=>e.visits.length===0,empty:n(`insights.day.noVisits`),children:e=>(0,J.jsx)(`ol`,{className:`flex flex-col border-l pl-3`,children:e.visits.map(i=>(0,J.jsx)(`li`,{children:i.isSearchEvent&&i.searchQuery?(0,J.jsxs)(s,{to:L(i.searchQuery),className:j,children:[(0,J.jsx)(`span`,{className:`w-10 font-mono text-[11px] text-muted-foreground tabular`,children:r.time(i.visitTimeMs)}),(0,J.jsx)(u,{className:`size-3.5 shrink-0 text-blue`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`flex-1 truncate`,children:n(`insights.day.searched`,{query:i.searchQuery})}),(0,J.jsx)(ae,{trail:e.trails.find(e=>e.firstVisitMs===i.visitTimeMs)})]}):(0,J.jsxs)(s,{to:R({date:t,visit:i.visitId}),className:j,children:[(0,J.jsx)(`span`,{className:`w-10 font-mono text-[11px] text-muted-foreground tabular`,children:r.time(i.visitTimeMs)}),(0,J.jsx)(y,{domain:i.registrableDomain,className:`size-4`}),(0,J.jsx)(`span`,{className:`truncate`,children:i.title||i.url})]})},i.visitId))})})})}function ae({trail:e}){let{t}=d();if(!e)return null;let n=[];return e.maxDepth>0&&n.push(t(`insights.day.trailAfter`,{pages:t(`common.pages`,{count:e.maxDepth})})),e.reformulationCount>0&&n.push(t(`insights.search.reworded`,{count:e.reformulationCount})),n.length===0?null:(0,J.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:n.join(` · `)})}function oe({date:e}){let{t}=d(),n=W(),r=E(e);return(0,J.jsx)(b,{title:t(`insights.day.searches`),action:(0,J.jsx)(C,{meta:r.data?.meta}),children:(0,J.jsx)(T,{query:r,skeleton:(0,J.jsx)(A,{rows:4}),isEmpty:e=>e.data.rows.length===0,empty:t(`insights.day.noSearches`),children:e=>(0,J.jsx)(`ul`,{className:`-mx-2 flex flex-col`,children:e.data.rows.map(e=>(0,J.jsx)(`li`,{children:(0,J.jsxs)(s,{to:L(e.rawQuery),className:j,children:[(0,J.jsx)(u,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`flex-1 truncate`,children:e.rawQuery}),e.familyCount>e.exactRepeatCount&&(0,J.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t(`insights.day.timesInAll`,{count:e.familyCount})}),(0,J.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground tabular`,children:n.time(e.searchedAtMs)})]})},`${e.searchEngine}-${e.normalizedQuery}`))})})})}export{X as default}; \ No newline at end of file diff --git a/site/public/app/assets/dialog-Euero0G3.js b/site/public/app/assets/dialog-Euero0G3.js new file mode 100644 index 00000000..0693497c --- /dev/null +++ b/site/public/app/assets/dialog-Euero0G3.js @@ -0,0 +1 @@ +import{Q as e,Y as t,k as n}from"./index-CteWxeiL.js";import{r}from"./query-DyHGS9i8.js";import{t as i}from"./x-G5NChC4d.js";import{a,c as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,t as _,u as v}from"./es2015-Do4eDMnQ.js";import{t as ee}from"./react-dom-BQvtGpns.js";import{i as y,t as b}from"./button-C0JM8asg.js";var x=e(t(),1),te=Object.defineProperty,S=(e,t)=>te(e,`name`,{value:t,configurable:!0});function C(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}S(C,`setRef`);function w(...e){return t=>{let n=!1,r=e.map(e=>{let r=C(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;tne(e,`name`,{value:t,configurable:!0}),ie=x.useId||(()=>void 0),E=0;function D(e){let[t,n]=x.useState(ie());return l(()=>{e||n(e=>e??String(E++))},[e]),e||(t?`radix-${t}`:``)}re(D,`useId`);var O=e(ee(),1),k=n(),A=Object.defineProperty,j=(e,t)=>A(e,`name`,{value:t,configurable:!0}),M=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=y(`Primitive.${t}`),r=x.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,k.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ae(e,t){e&&O.flushSync(()=>e.dispatchEvent(t))}j(ae,`dispatchDiscreteCustomEvent`);var oe=Object.defineProperty,N=(e,t)=>oe(e,`name`,{value:t,configurable:!0}),P=`Dialog`,[F,se]=c(P),[ce,I]=F(P),L=N(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,c=x.useRef(null),l=x.useRef(null),{nodes:u,registry:d}=o(),[f,p]=h({prop:r,defaultProp:i??!1,onChange:a,caller:P}),[m,g]=x.useState(0),[_,v]=x.useState(0);return(0,k.jsx)(ce,{scope:t,triggerRef:c,contentRef:l,contentId:D(),titleId:D(),descriptionId:D(),titlePresent:m>0,descriptionPresent:_>0,setTitleCount:g,setDescriptionCount:v,open:f,onOpenChange:p,onOpenToggle:x.useCallback(()=>p(e=>!e),[p]),modal:s,branchNodes:u,branchRegistry:d,children:n})},`Dialog`),R=`DialogPortal`,[z,B]=F(R,{forceMount:void 0}),V=N(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=I(R,t);return(0,k.jsx)(z,{scope:t,forceMount:n,children:x.Children.map(r,e=>(0,k.jsx)(s,{present:n||a.open,children:(0,k.jsx)(u,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),H=`DialogOverlay`,U=x.forwardRef(N(function(e,t){let n=B(H,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=I(H,e.__scopeDialog);return a.modal?(0,k.jsx)(s,{present:r||a.open,children:(0,k.jsx)(le,{...i,ref:t})}):null},`DialogOverlay`)),W=y(`DialogOverlay.RemoveScroll`),le=x.forwardRef(N(function(e,t){let{__scopeDialog:n,...r}=e,i=I(H,n),a=T(t,v());return(0,k.jsx)(p,{as:W,allowPinchZoom:!0,shards:x.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,k.jsx)(M.div,{"data-state":Q(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),G=`DialogContent`,K=x.forwardRef(N(function(e,t){let n=B(G,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=I(G,e.__scopeDialog);return(0,k.jsx)(s,{present:r||a.open,children:a.modal?(0,k.jsx)(ue,{...i,ref:t}):(0,k.jsx)(de,{...i,ref:t})})},`DialogContent`)),ue=x.forwardRef(N(function(e,t){let n=I(G,e.__scopeDialog),r=x.useRef(null),i=T(t,n.contentRef,r);return x.useEffect(()=>{let e=r.current;if(e)return _(e)},[]),(0,k.jsx)(q,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:f(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:f(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:f(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),de=x.forwardRef(N(function(e,t){let n=I(G,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return(0,k.jsx)(q,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),q=x.forwardRef(N(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,"aria-describedby":s,children:c,...l}=e,u=I(G,n);return g(),(0,k.jsx)(m,{registry:u.branchRegistry,children:(0,k.jsx)(a,{asChild:!0,loop:!0,trapped:r,branches:u.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:o,children:(0,k.jsx)(d,{role:`dialog`,id:u.contentId,"aria-labelledby":u.titlePresent?u.titleId:void 0,"aria-describedby":u.descriptionPresent?Z(s,u.descriptionId):s,"data-state":Q(u.open),...l,ref:t,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1),children:c})})})},`DialogContentImpl`)),J=x.forwardRef(N(function(e,t){let{__scopeDialog:n,...r}=e,i=I(`DialogTitle`,n),{setTitleCount:a}=i;return l(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,k.jsx)(M.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),Y=x.forwardRef(N(function(e,t){let{__scopeDialog:n,...r}=e,i=I(`DialogDescription`,n),{setDescriptionCount:a}=i;return l(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,k.jsx)(M.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),fe=`DialogClose`,X=x.forwardRef(N(function(e,t){let{__scopeDialog:n,...r}=e,i=I(fe,n);return(0,k.jsx)(M.button,{type:`button`,...r,ref:t,onClick:f(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function Z(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}N(Z,`concatAriaDescribedby`);function Q(e){return e?`open`:`closed`}N(Q,`getState`);function pe({...e}){return(0,k.jsx)(L,{"data-slot":`dialog`,...e})}function me({...e}){return(0,k.jsx)(V,{"data-slot":`dialog-portal`,...e})}function he({className:e,...t}){return(0,k.jsx)(U,{"data-slot":`dialog-overlay`,className:r(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function ge({className:e,children:t,showCloseButton:n=!0,...a}){return(0,k.jsxs)(me,{"data-slot":`dialog-portal`,children:[(0,k.jsx)(he,{}),(0,k.jsxs)(K,{"data-slot":`dialog-content`,className:r(`fixed top-[50%] left-[50%] z-50 grid max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] translate-x-[-50%] overflow-y-auto translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg`,e),...a,children:[t,n&&(0,k.jsxs)(X,{"data-slot":`dialog-close`,className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,k.jsx)(i,{}),(0,k.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function $({className:e,...t}){return(0,k.jsx)(`div`,{"data-slot":`dialog-header`,className:r(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function _e({className:e,showCloseButton:t=!1,children:n,...i}){return(0,k.jsxs)(`div`,{"data-slot":`dialog-footer`,className:r(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...i,children:[n,t&&(0,k.jsx)(X,{asChild:!0,children:(0,k.jsx)(b,{variant:`outline`,children:`Close`})})]})}function ve({className:e,...t}){return(0,k.jsx)(J,{"data-slot":`dialog-title`,className:r(`text-lg leading-none font-semibold`,e),...t})}function ye({className:e,...t}){return(0,k.jsx)(Y,{"data-slot":`dialog-description`,className:r(`text-sm text-muted-foreground`,e),...t})}export{$ as a,X as c,U as d,V as f,_e as i,K as l,ge as n,ve as o,J as p,ye as r,L as s,pe as t,Y as u}; \ No newline at end of file diff --git a/site/public/app/assets/dist-BNmHZVEB.js b/site/public/app/assets/dist-BNmHZVEB.js new file mode 100644 index 00000000..b0faab63 --- /dev/null +++ b/site/public/app/assets/dist-BNmHZVEB.js @@ -0,0 +1 @@ +import{Q as e,Y as t,k as n}from"./index-CteWxeiL.js";import{t as r}from"./react-dom-BQvtGpns.js";import{c as i,i as a}from"./button-C0JM8asg.js";import{d as o,g as s,h as c,m as l,p as u}from"./es2015-Do4eDMnQ.js";var d={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};d.node;var f=i(d),p=e(t(),1),m=Object.defineProperty,h=(e,t)=>m(e,`name`,{value:t,configurable:!0});function g(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}h(g,`setRef`);function _(...e){return t=>{let n=!1,r=e.map(e=>{let r=g(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;tb(e,`name`,{value:t,configurable:!0});function S(e){let t=e+`CollectionProvider`,[n,r]=s(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=x(e=>{let{scope:t,children:n}=e,r=p.useRef(null),a=p.useRef(new Map).current;return(0,y.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);c.displayName=t;let l=e+`CollectionSlot`,u=a(l),d=p.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=v(t,o(l,n).collectionRef);return(0,y.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,m=`data-radix-collection-item`,h=a(f),g=p.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=p.useRef(null),s=v(t,a),c=o(f,n);return p.useEffect(()=>(c.itemMap.set(a,{ref:a,...i}),()=>void c.itemMap.delete(a))),(0,y.jsx)(h,{[m]:``,ref:s,children:r})});g.displayName=f;function _(t){let n=o(e+`CollectionConsumer`,t);return p.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return x(_,`useCollection`),[{Provider:c,Slot:d,ItemSlot:g},_,r]}x(S,`createCollection`);var C=new WeakMap,w=class e extends Map{static{x(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],C.set(this,!0)}set(e,t){return C.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=D(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function T(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=E(e,t);return n===-1?void 0:e[n]}x(T,`at`);function E(e,t){let n=e.length,r=D(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}x(E,`toSafeIndex`);function D(e){return e!==e||e===0?0:Math.trunc(e)}x(D,`toSafeInteger`);function O(e){let t=e+`CollectionProvider`,[n,r]=s(t),[i,o]=n(t);i.displayName=e+`CollectionStableContextProvider`;let[l,u]=n(t);l.displayName=e+`CollectionStatefulContextProvider`;let d=x(({state:e,...t})=>e?(0,y.jsx)(m,{...t,state:e}):(0,y.jsx)(f,{...t}),`CollectionProvider`);d.displayName=t;let f=x(e=>{let t=T();return(0,y.jsx)(m,{...e,state:t})},`CollectionInit`);f.displayName=e+`CollectionInit`;let m=x(e=>{let{scope:t,children:n,state:r}=e,a=p.useRef(null),[o,s]=p.useState(null),c=v(a,s),[u,d]=r,f=p.useRef(new w),m=p.useCallback(()=>{let e=f.current;return j(e)||e.sort(M),e},[]);return p.useEffect(()=>{if(!o)return;let e=N(()=>{d(e=>{let t=e.toSorted(M);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o,d]),(0,y.jsx)(i,{scope:t,collectionElementRef:c,collectionElementRefObject:a,getCollection:m,setCollection:d,registryRef:f,children:(0,y.jsx)(l,{scope:t,collectionElement:o,collection:u,children:n})})},`CollectionProviderImpl`);m.displayName=e+`CollectionProviderImpl`;let h=e+`CollectionSlot`,g=a(h),_=p.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=v(t,o(h,n).collectionElementRef);return(0,y.jsx)(g,{ref:i,children:r})});_.displayName=h;let b=e+`CollectionItemSlot`,S=a(b),C=p.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=p.useRef(null),{setCollection:s,registryRef:l}=o(b,n),u=p.useRef(i);k(u.current,i)||(u.current=i);let d=u.current,f=v(t,p.useCallback(e=>{let t=l.current;e?t.set(e,{...u.current,element:e}):a.current&&t.delete(a.current)},[l]),a);c(()=>{let e=a.current,t=l.current;e&&t.has(e)&&t.set(e,{...d,element:e})},[d,l]);let m=p.useRef(null);return p.useEffect(()=>{let e=a.current,t=m.current;((t?.element??null)!==e||e&&t?.itemData!==d)&&(m.current=e?{element:e,itemData:d}:null,s(n=>{let r=new w(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...d,element:e}),r.sort(M)}))}),p.useEffect(()=>()=>{let e=m.current;m.current=null,e&&s(t=>{if(!t.has(e.element))return t;let n=new w(t);return n.delete(e.element),n})},[s]),(0,y.jsx)(S,{"data-radix-collection-item":``,ref:f,children:r})});C.displayName=b;function T(){return p.useState(new w)}x(T,`useInitCollection`);function E(t){let{collection:n}=u(e+`CollectionConsumer`,t);return n}x(E,`useCollection`);function D(t){let{getCollection:n}=o(e+`CollectionConsumer`,t);return n}return x(D,`useGetCollection`),[{Provider:d,Slot:_,ItemSlot:C},{createCollectionScope:r,useCollection:E,useGetCollection:D,useInitCollection:T}]}x(O,`createCollection`);function k(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}x(k,`shallowEqual`);function A(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}x(A,`isElementPreceding`);function j(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}x(j,`isInDocumentOrder`);function M(e,t){return!e[1].element||!t[1].element?0:A(e[1].element,t[1].element)?-1:1}x(M,`sortByDocumentPosition`);function N(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}x(N,`getChildListObserver`);var ee=e(r(),1),te=Object.defineProperty,ne=(e,t)=>te(e,`name`,{value:t,configurable:!0}),re={LTR:`ltr`,RTL:`rtl`},ie=p.createContext(void 0);function P(e){let t=p.useContext(ie);return e||t||re.LTR}ne(P,`useDirection`);var ae=Object.defineProperty,F=(e,t)=>ae(e,`name`,{value:t,configurable:!0});function I(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}F(I,`setRef`);function L(...e){return t=>{let n=!1,r=e.map(e=>{let r=I(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;toe(e,`name`,{value:t,configurable:!0}),ce=p.useId||(()=>void 0),le=0;function z(e){let[t,n]=p.useState(ce());return c(()=>{e||n(e=>e??String(le++))},[e]),e||(t?`radix-${t}`:``)}se(z,`useId`);var ue=Object.defineProperty,de=(e,t)=>ue(e,`name`,{value:t,configurable:!0}),B=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=a(`Primitive.${t}`),r=p.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,y.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function fe(e,t){e&&ee.flushSync(()=>e.dispatchEvent(t))}de(fe,`dispatchDiscreteCustomEvent`);var pe=Object.defineProperty,V=(e,t)=>pe(e,`name`,{value:t,configurable:!0}),H=!1;function U(){let[e,t]=p.useState(H);return p.useEffect(()=>{H||(H=!0,t(!0))},[]),e}V(U,`useIsHydrated`);var W=p.useSyncExternalStore;function G(){return()=>{}}V(G,`subscribe`);function K(){return W(G,()=>!0,()=>!1)}V(K,`useIsHydratedModern`);var me=typeof W==`function`?K:U,he=Object.defineProperty,q=(e,t)=>he(e,`name`,{value:t,configurable:!0}),J=`rovingFocusGroup.onEntryFocus`,ge={bubbles:!1,cancelable:!0},Y=`RovingFocusGroup`,[X,Z,_e]=S(Y),[ve,ye]=s(Y,[_e]),Q={Vertical:`vertical`,Horizontal:`horizontal`},be={LTR:`ltr`,RTL:`rtl`},[xe,Se]=ve(Y),Ce=p.forwardRef(q(function(e,t){return(0,y.jsx)(X.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,y.jsx)(X.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,y.jsx)(we,{...e,ref:t})})})},`RovingFocusGroup`)),we=p.forwardRef(q(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...h}=e,g=p.useRef(null),_=R(t,g),v=P(a),[b,x]=u({prop:s,defaultProp:c??null,onChange:d,caller:Y}),[S,C]=p.useState(!1),w=o(f),T=Z(n),E=p.useRef(!1),[D,O]=p.useState(0);return p.useEffect(()=>{let e=g.current;if(e)return e.addEventListener(J,w),()=>e.removeEventListener(J,w)},[w]),(0,y.jsx)(xe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:b,onItemFocus:p.useCallback(e=>x(e),[x]),onItemShiftTab:p.useCallback(()=>C(!0),[]),onFocusableItemAdd:p.useCallback(()=>O(e=>e+1),[]),onFocusableItemRemove:p.useCallback(()=>O(e=>e-1),[]),children:(0,y.jsx)(B.div,{tabIndex:S||D===0?-1:0,"data-orientation":r,...h,ref:_,style:{outline:`none`,...e.style},onMouseDown:l(e.onMouseDown,()=>{E.current=!0}),onFocus:l(e.onFocus,e=>{let t=!E.current;if(e.target===e.currentTarget&&t&&!S){let t=new CustomEvent(J,ge);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=T().filter(e=>e.focusable);$([e.find(e=>e.active),e.find(e=>e.id===b),...e].filter(Boolean).map(e=>e.ref.current),m)}}E.current=!1}),onBlur:l(e.onBlur,()=>C(!1))})})},`RovingFocusGroupImpl`)),Te=`RovingFocusGroupItem`,Ee=p.forwardRef(q(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,u=z(),d=a||u,f=Se(Te,n),m=f.currentTabStopId===d,h=Z(n),{onFocusableItemAdd:g,onFocusableItemRemove:_,currentTabStopId:v}=f,b=me();return c(()=>{if(b&&r)return g(),()=>_()},[b,r,g,_]),p.useEffect(()=>{if(!b&&r)return g(),()=>_()},[b,r,g,_]),(0,y.jsx)(X.ItemSlot,{scope:n,id:d,focusable:r,active:i,children:(0,y.jsx)(B.span,{tabIndex:m?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:l(e.onMouseDown,e=>{r?f.onItemFocus(d):e.preventDefault()}),onFocus:l(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:l(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){f.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=ke(e,f.orientation,f.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=f.loop?Ae(n,r+1):n.slice(r+1)}setTimeout(()=>$(n))}}),children:typeof o==`function`?o({isCurrentTabStop:m,hasTabStop:v!=null}):o})})},`RovingFocusGroupItem`)),De={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Oe(e,t){return t===be.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}q(Oe,`getDirectionAwareKey`);function ke(e,t,n){let r=Oe(e.key,n);if(!(t===Q.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===Q.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return De[r]}q(ke,`getFocusIntent`);function $(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}q($,`focusFirst`);function Ae(e,t){return e.map((n,r)=>e[(t+r)%e.length])}q(Ae,`wrapArray`);export{S as a,P as i,Ee as n,f as o,ye as r,Ce as t}; \ No newline at end of file diff --git a/site/public/app/assets/dist-Bj5Hol67.js b/site/public/app/assets/dist-Bj5Hol67.js new file mode 100644 index 00000000..32e47fc2 --- /dev/null +++ b/site/public/app/assets/dist-Bj5Hol67.js @@ -0,0 +1 @@ +import{Q as e,Y as t,k as n}from"./index-CteWxeiL.js";import{t as r}from"./react-dom-BQvtGpns.js";import{i}from"./button-C0JM8asg.js";import{d as a,g as o,h as s}from"./es2015-Do4eDMnQ.js";var c=n(),l=e(r(),1),u=e(t(),1),d=Object.defineProperty,f=(e,t)=>d(e,`name`,{value:t,configurable:!0});function p(e){let[t,n]=u.useState(void 0);return s(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}f(p,`useSize`);var m=[`top`,`right`,`bottom`,`left`],h=Math.min,g=Math.max,_=Math.round,v=Math.floor,y=e=>({x:e,y:e}),b={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function x(e,t,n){return g(e,h(t,n))}function S(e,t){return typeof e==`function`?e(t):e}function C(e){return e.split(`-`)[0]}function w(e){return e.split(`-`)[1]}function T(e){return e===`x`?`y`:`x`}function E(e){return e===`y`?`height`:`width`}function D(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function O(e){return T(D(e))}function k(e,t,n){n===void 0&&(n=!1);let r=w(e),i=O(e),a=E(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=R(o)),[o,R(o)]}function A(e){let t=R(e);return[j(e),t,j(t)]}function j(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var M=[`left`,`right`],N=[`right`,`left`],P=[`top`,`bottom`],F=[`bottom`,`top`];function I(e,t,n){switch(e){case`top`:case`bottom`:return n?t?N:M:t?M:N;case`left`:case`right`:return t?P:F;default:return[]}}function L(e,t,n,r){let i=w(e),a=I(C(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(j)))),a}function R(e){let t=C(e);return b[t]+e.slice(t.length)}function z(e){return{top:0,right:0,bottom:0,left:0,...e}}function ee(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:z(e)}function B(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function te(e,t,n){let{reference:r,floating:i}=e,a=D(t),o=O(t),s=E(o),c=C(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(w(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1)}return p}async function ne(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=S(t,e),p=ee(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=B(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=B(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var re=50,ie=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ne},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=te(l,r,c),f=r,p=0,m={};for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=S(e,t)||{};if(l==null)return{};let d=ee(u),f={x:n,y:r},p=O(i),m=E(p),g=await o.getDimensions(l),_=p===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,C=a.reference[m]+a.reference[p]-f[p]-a.floating[m],T=f[p]-a.reference[p],D=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),k=D?D[b]:0;k&&await(o.isElement==null?void 0:o.isElement(D))||(k=s.floating[b]||a.floating[m]);let A=C/2-T/2,j=k/2-g[m]/2-1,M=h(d[v],j),N=h(d[y],j),P=M,F=k-g[m]-N,I=k/2-g[m]/2+A,L=x(P,I,F),R=!c.arrow&&w(i)!=null&&I!==L&&a.reference[m]/2-(Ie<=0)){let e=(i.flip?.index||0)+1,t=w[e];if(t&&(u!==`alignment`||_===D(t)||O.every(e=>D(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:O},reset:{placement:t}};let n=O.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=O.filter(e=>{if(x){let t=D(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function se(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ce(e){return m.some(t=>e[t]>=0)}var le=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=S(e,t);switch(i){case`referenceHidden`:{let e=se(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ce(e)}}}case`escaped`:{let e=se(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ce(e)}}}default:return{}}}}},ue=new Set([`left`,`top`]);async function de(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=C(n),s=w(n),c=D(n)===`y`,l=ue.has(o)?-1:1,u=a&&c?-1:1,d=S(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var fe=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await de(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},pe=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=S(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=D(C(i)),p=T(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=x(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=x(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},me=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=S(e,t),u={x:n,y:r},d=D(i),f=T(d),p=u[f],m=u[d],h=S(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;pn&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=ue.has(C(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},he=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=S(e,t),u=await o.detectOverflow(t,l),d=C(i),f=w(i),p=D(i)===`y`,{width:m,height:_}=a.floating,v,y;d===`top`||d===`bottom`?(v=d,y=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(y=d,v=f===`end`?`top`:`bottom`);let b=_-u.top-u.bottom,x=m-u.left-u.right,T=h(_-u[v],b),E=h(m-u[y],x),O=!t.middlewareData.shift,k=T,A=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=b),O&&!f){let e=g(u.left,0),t=g(u.right,0),n=g(u.top,0),r=g(u.bottom,0);p?A=m-2*(e!==0||t!==0?e+t:g(u.left,u.right)):k=_-2*(n!==0||r!==0?n+r:g(u.top,u.bottom))}await c({...t,availableWidth:A,availableHeight:k});let j=await o.getDimensions(s.floating);return m!==j.width||_!==j.height?{reset:{rects:!0}}:{}}}};function ge(){return typeof window<`u`}function V(e){return _e(e)?(e.nodeName||``).toLowerCase():`#document`}function H(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function U(e){return((_e(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function _e(e){return ge()?e instanceof Node||e instanceof H(e).Node:!1}function W(e){return ge()?e instanceof Element||e instanceof H(e).Element:!1}function G(e){return ge()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function ve(e){return!ge()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}function K(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ye(e){return/^(table|td|th)$/.test(V(e))}function be(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var xe=/transform|translate|scale|rotate|perspective|filter/,Se=/paint|layout|strict|content/,q=e=>!!e&&e!==`none`,Ce;function we(e){let t=W(e)?Y(e):e;return q(t.transform)||q(t.translate)||q(t.scale)||q(t.rotate)||q(t.perspective)||!Ee()&&(q(t.backdropFilter)||q(t.filter))||xe.test(t.willChange||``)||Se.test(t.contain||``)}function Te(e){let t=X(e);for(;G(t)&&!J(t);){if(we(t))return t;if(be(t))return null;t=X(t)}return null}function Ee(){return Ce??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ce}function J(e){return/^(html|body|#document)$/.test(V(e))}function Y(e){return H(e).getComputedStyle(e)}function De(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function X(e){if(V(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ve(e)&&e.host||U(e);return ve(t)?t.host:t}function Oe(e){let t=X(e);return J(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&K(t)?t:Oe(t)}function ke(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Oe(e),i=r===e.ownerDocument?.body,a=H(r);if(i){let e=Ae(a);return t.concat(a,a.visualViewport||[],K(r)?r:[],e&&n?ke(e):[])}return t.concat(r,ke(r,[],n))}function Ae(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function je(e){let t=Y(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=G(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=_(n)!==a||_(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Me(e){return W(e)?e:e.contextElement}function Z(e){let t=Me(e);if(!G(t))return y(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=je(t),o=(a?_(n.width):n.width)/r,s=(a?_(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var Ne=y(0);function Pe(e){let t=H(e);return!Ee()||!t.visualViewport?Ne:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Fe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==H(e)?!1:t}function Q(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Me(e),o=y(1);t&&(r?W(r)&&(o=Z(r)):o=Z(e));let s=Fe(a,n,r)?Pe(a):y(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=H(a),t=r&&W(r)?H(r):r,n=e,i=Ae(n);for(;i&&r&&t!==n;){let e=Z(i),t=i.getBoundingClientRect(),r=Y(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=H(i),i=Ae(n)}}return B({width:u,height:d,x:c,y:l})}function Ie(e,t){let n=De(e).scrollLeft;return t?t.left+n:Q(U(e)).left+n}function Le(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ie(e,n),y:n.top+t.scrollTop}}function Re(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=U(r),s=t?be(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=y(1),u=y(0),d=G(r);if((d||!d&&!a)&&((V(r)!==`body`||K(o))&&(c=De(r)),d)){let e=Q(r);l=Z(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Le(o,c):y(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ze(e){return Array.from(e.getClientRects())}function Be(e){let t=U(e),n=De(e),r=e.ownerDocument.body,i=g(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=g(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Ie(e),s=-n.scrollTop;return Y(r).direction===`rtl`&&(o+=g(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Ve=25;function He(e,t){let n=H(e),r=U(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ee();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Ie(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Ve&&(a-=o)}else l<=Ve&&(a+=l);return{width:a,height:o,x:s,y:c}}function Ue(e,t){let n=Q(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=G(e)?Z(e):y(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function We(e,t,n){let r;if(t===`viewport`)r=He(e,n);else if(t===`document`)r=Be(U(e));else if(W(t))r=Ue(t,n);else{let n=Pe(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return B(r)}function Ge(e,t){let n=X(e);return n===t||!W(n)||J(n)?!1:Y(n).position===`fixed`||Ge(n,t)}function Ke(e,t){let n=t.get(e);if(n)return n;let r=ke(e,[],!1).filter(e=>W(e)&&V(e)!==`body`),i=null,a=Y(e).position===`fixed`,o=a?X(e):e;for(;W(o)&&!J(o);){let t=Y(o),n=we(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||K(o)&&!n&&Ge(e,o))?r=r.filter(e=>e!==o):i=t,o=X(o)}return t.set(e,r),r}function qe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?be(t)?[]:Ke(t,this._c):[].concat(n),r],o=We(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{o(!1,1e-7)},1e3)}n===1&&!nt(l,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(C,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return o(!0),a}function it(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Me(e),u=i||a?[...l?ke(l):[],...t?ke(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?rt(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Q(e):null;c&&g();function g(){let t=Q(e);h&&!nt(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var at=fe,ot=pe,st=oe,ct=he,lt=le,ut=ae,dt=me,ft=(e,t,n)=>{let r=new Map,i={platform:tt,...n},a={...i.platform,_c:r};return ie(e,t,{...i,platform:a})},pt=typeof document<`u`?u.useLayoutEffect:function(){};function mt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!mt(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!mt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ht(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gt(e,t){let n=ht(e);return Math.round(t*n)/n}function _t(e){let t=u.useRef(e);return pt(()=>{t.current=e}),t}function vt(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:d}=e,[f,p]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=u.useState(r);mt(m,r)||h(r);let[g,_]=u.useState(null),[v,y]=u.useState(null),b=u.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=u.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||g,C=o||v,w=u.useRef(null),T=u.useRef(null),E=u.useRef(f),D=c!=null,O=_t(c),k=_t(i),A=_t(d),j=u.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:m};k.current&&(e.platform=k.current),ft(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!mt(E.current,t)&&(E.current=t,l.flushSync(()=>{p(t)}))})},[m,t,n,k,A]);pt(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);let M=u.useRef(!1);pt(()=>(M.current=!0,()=>{M.current=!1}),[]),pt(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=u.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=u.useMemo(()=>({reference:S,floating:C}),[S,C]),F=u.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=gt(P.floating,f.x),r=gt(P.floating,f.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ht(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,f.x,f.y]);return u.useMemo(()=>({...f,update:j,refs:N,elements:P,floatingStyles:F}),[f,j,N,P,F])}var yt=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:ut({element:r.current,padding:i}).fn(n):r?ut({element:r,padding:i}).fn(n):{}}}},bt=(e,t)=>{let n=at(e);return{name:n.name,fn:n.fn,options:[e,t]}},xt=(e,t)=>{let n=ot(e);return{name:n.name,fn:n.fn,options:[e,t]}},St=(e,t)=>({fn:dt(e).fn,options:[e,t]}),Ct=(e,t)=>{let n=st(e);return{name:n.name,fn:n.fn,options:[e,t]}},wt=(e,t)=>{let n=ct(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tt=(e,t)=>{let n=lt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Et=(e,t)=>{let n=yt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Dt=Object.defineProperty,Ot=(e,t)=>Dt(e,`name`,{value:t,configurable:!0}),kt=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=i(`Primitive.${t}`),r=u.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,c.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function At(e,t){e&&l.flushSync(()=>e.dispatchEvent(t))}Ot(At,`dispatchDiscreteCustomEvent`);var jt=Object.defineProperty,Mt=u.forwardRef(((e,t)=>jt(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,c.jsx)(kt.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,c.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),Nt=Object.defineProperty,Pt=(e,t)=>Nt(e,`name`,{value:t,configurable:!0});function Ft(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Pt(Ft,`setRef`);function It(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ft(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;tRt(e,`name`,{value:t,configurable:!0}),Bt=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=i(`Primitive.${t}`),r=u.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,c.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Vt(e,t){e&&l.flushSync(()=>e.dispatchEvent(t))}zt(Vt,`dispatchDiscreteCustomEvent`);var Ht=Object.defineProperty,$=(e,t)=>Ht(e,`name`,{value:t,configurable:!0}),Ut={Partial:`partial`,Always:`always`},Wt={Optimized:`optimized`,Always:`always`},Gt=`Popper`,[Kt,qt]=o(Gt),[Jt,Yt]=Kt(Gt),Xt=$(e=>{let{__scopePopper:t,children:n}=e,[r,i]=u.useState(null),[a,o]=u.useState(void 0);return(0,c.jsx)(Jt,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),Zt=`PopperAnchor`,Qt=u.forwardRef($(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Yt(Zt,n),o=u.useRef(null),s=a.onAnchorChange,l=Lt(t,u.useCallback(e=>{o.current=e,e&&s(e)},[s])),d=u.useRef(null);u.useEffect(()=>{if(!r)return;let e=d.current;d.current=r.current,e!==d.current&&s(d.current)});let f=a.placementState&&ln(a.placementState),p=f?.[0],m=f?.[1];return r?null:(0,c.jsx)(Bt.div,{"data-radix-popper-side":p,"data-radix-popper-align":m,...i,ref:l})},`PopperAnchor`)),$t=`PopperContent`,[en,tn]=Kt($t),nn=u.forwardRef($(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:o=`center`,alignOffset:l=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:m=[],collisionPadding:h=0,sticky:g=Ut.Partial,hideWhenDetached:_=!1,updatePositionStrategy:v=Wt.Optimized,onPlaced:y,...b}=e,x=Yt($t,n),[S,C]=u.useState(null),w=Lt(t,C),[T,E]=u.useState(null),D=p(T),O=D?.width??0,k=D?.height??0,A=r+(o===`center`?``:`-`+o),j=typeof h==`number`?h:{top:0,right:0,bottom:0,left:0,...h},M=Array.isArray(m)?m:[m],N=M.length>0,P={padding:j,boundary:M.filter(sn),altBoundary:N},{refs:F,floatingStyles:I,placement:L,isPositioned:R,middlewareData:z}=vt({strategy:`fixed`,placement:A,whileElementsMounted:$((...e)=>it(...e,{animationFrame:v===Wt.Always}),`whileElementsMounted`),elements:{reference:x.anchor},middleware:[bt({mainAxis:i+k,alignmentAxis:l}),f&&xt({mainAxis:!0,crossAxis:!1,...g===Ut.Partial?{limiter:St()}:{},...P}),f&&Ct({...P}),wt({...P,apply:$(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),T&&Et({element:T,padding:d}),cn({arrowWidth:O,arrowHeight:k}),_&&Tt(N?{strategy:`referenceHidden`,...P}:{strategy:`referenceHidden`,padding:P.padding,altBoundary:P.altBoundary})]}),ee=x.setPlacementState;s(()=>(ee(L),()=>{ee(void 0)}),[L,ee]);let[B,te]=ln(L),ne=a(y);s(()=>{R&&ne?.()},[R,ne]);let re=z.arrow?.x,ie=z.arrow?.y,ae=z.arrow?.centerOffset!==0,[oe,se]=u.useState();return s(()=>{S&&se(window.getComputedStyle(S).zIndex)},[S]),(0,c.jsx)(`div`,{ref:F.setFloating,"data-radix-popper-content-wrapper":``,style:{...I,transform:R?I.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:oe,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(` `),...z.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,c.jsx)(en,{scope:n,placedSide:B,placedAlign:te,onArrowChange:E,arrowX:re,arrowY:ie,shouldHideArrow:ae,children:(0,c.jsx)(Bt.div,{"data-side":B,"data-align":te,...b,ref:w,style:{...b.style,animation:R?b.style?.animation:`none`}})})})},`PopperContent`)),rn=`PopperArrow`,an={top:`bottom`,right:`left`,bottom:`top`,left:`right`},on=u.forwardRef($(function(e,t){let{__scopePopper:n,...r}=e,i=tn(rn,n),a=an[i.placedSide];return(0,c.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,c.jsx)(Mt,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function sn(e){return e!==null}$(sn,`isNotNull`);var cn=$(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=ln(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function ln(e){let[t,n=`center`]=e.split(`-`);return[t,n]}$(ln,`getSideAndAlignFromPlacement`);export{qt as a,nn as i,Qt as n,p as o,on as r,Xt as t}; \ No newline at end of file diff --git a/site/public/app/assets/dist-DjbtVayB.js b/site/public/app/assets/dist-DjbtVayB.js new file mode 100644 index 00000000..3a77ede3 --- /dev/null +++ b/site/public/app/assets/dist-DjbtVayB.js @@ -0,0 +1 @@ +import{Q as e,Y as t,k as n}from"./index-CteWxeiL.js";import{t as r}from"./react-dom-BQvtGpns.js";import{i}from"./button-C0JM8asg.js";var a=e(t(),1),o=e(r(),1),s=n(),c=Object.defineProperty,l=(e,t)=>c(e,`name`,{value:t,configurable:!0}),u=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=i(`Primitive.${t}`),r=a.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,s.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function d(e,t){e&&o.flushSync(()=>e.dispatchEvent(t))}l(d,`dispatchDiscreteCustomEvent`);var f=Object.defineProperty,p=(e,t)=>f(e,`name`,{value:t,configurable:!0}),m=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),h=a.forwardRef(p(function(e,t){return(0,s.jsx)(u.span,{...e,ref:t,style:{...m,...e.style}})},`VisuallyHidden`));export{h as n,m as t}; \ No newline at end of file diff --git a/site/public/app/assets/dist-js-stWNT68W.js b/site/public/app/assets/dist-js-stWNT68W.js new file mode 100644 index 00000000..f121c4eb --- /dev/null +++ b/site/public/app/assets/dist-js-stWNT68W.js @@ -0,0 +1 @@ +import{W as e}from"./index-CteWxeiL.js";function t(e){if(e!==void 0){if(typeof e==`string`)return e;if(`ok`in e&&`cancel`in e)return{OkCancelCustom:[e.ok,e.cancel]};if(`yes`in e&&`no`in e&&`cancel`in e)return{YesNoCancelCustom:[e.yes,e.no,e.cancel]};if(`ok`in e)return{OkCustom:e.ok}}}async function n(t={}){return typeof t==`object`&&Object.freeze(t),await e(`plugin:dialog|open`,{options:t})}async function r(t={}){return typeof t==`object`&&Object.freeze(t),await e(`plugin:dialog|save`,{options:t})}async function i(n,r){return await e(`plugin:dialog|message`,{message:n,title:r?.title,kind:r?.kind,buttons:t(r?.buttons)})}async function a(e,t){let n=typeof t==`string`?{title:t}:t;return n&&!n.buttons&&n.okLabel&&(n.buttons={ok:n.okLabel}),i(e,n)}async function o(e,t){let n=typeof t==`string`?{title:t}:t,r=n?.okLabel||n?.cancelLabel,a=n?.okLabel??`Yes`;return await i(e,{title:n?.title,kind:n?.kind,buttons:r?{ok:a,cancel:n.cancelLabel??`No`}:`YesNo`})===a}async function s(e,t){let n=typeof t==`string`?{title:t}:t,r=n?.okLabel||n?.cancelLabel,a=n?.okLabel??`Ok`;return await i(e,{title:n?.title,kind:n?.kind,buttons:r?{ok:a,cancel:n.cancelLabel??`Cancel`}:`OkCancel`})===a}export{o as ask,s as confirm,a as message,n as open,r as save}; \ No newline at end of file diff --git a/site/public/app/assets/edge-BDohVkL2.png b/site/public/app/assets/edge-BDohVkL2.png new file mode 100644 index 00000000..5ea9bae4 Binary files /dev/null and b/site/public/app/assets/edge-BDohVkL2.png differ diff --git a/site/public/app/assets/es2015-Do4eDMnQ.js b/site/public/app/assets/es2015-Do4eDMnQ.js new file mode 100644 index 00000000..1cf5e132 --- /dev/null +++ b/site/public/app/assets/es2015-Do4eDMnQ.js @@ -0,0 +1,41 @@ +import{Q as e,Y as t,k as n}from"./index-CteWxeiL.js";import{t as r}from"./react-dom-BQvtGpns.js";import{i}from"./button-C0JM8asg.js";var a=e(t(),1),o=n(),s=Object.defineProperty,c=(e,t)=>s(e,`name`,{value:t,configurable:!0});function l(e,t){let n=a.createContext(t);n.displayName=e+`Context`;let r=c(e=>{let{children:t,...r}=e,i=a.useMemo(()=>r,Object.values(r));return(0,o.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:o=!1}=i,s=a.useContext(n);if(s)return s;if(t!==void 0)return t;if(!o)throw Error(`\`${r}\` must be used within \`${e}\``)}return c(i,`useContext`),[r,i]}c(l,`createContext`);function u(e,t=[]){let n=[];function r(t,r){let i=a.createContext(r);i.displayName=t+`Context`;let s=n.length;n=[...n,r];let l=c(t=>{let{scope:n,children:r,...c}=t,l=n?.[e]?.[s]||i,u=a.useMemo(()=>c,Object.values(c));return(0,o.jsx)(l.Provider,{value:u,children:r})},`Provider`);l.displayName=t+`Provider`;function u(n,o,c={}){let{optional:l=!1}=c,u=o?.[e]?.[s]||i,d=a.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return c(u,`useContext`),[l,u]}c(r,`createContext`);let i=c(()=>{let t=n.map(e=>a.createContext(e));return c(function(n){let r=n?.[e]||t;return a.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,d(i,...t)]}c(u,`createContextScope`);function d(...e){let t=e[0];if(e.length===1)return t;let n=c(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return c(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}c(d,`composeContextScopes`);var f=globalThis?.document?a.useLayoutEffect:()=>{},p=Object.defineProperty,m=(e,t)=>p(e,`name`,{value:t,configurable:!0}),h=!!(typeof window<`u`&&window.document&&window.document.createElement);function g(e,t,{checkForDefaultPrevented:n=!0}={}){return m(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}m(g,`composeEventHandlers`);function _(e){if(!h)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}m(_,`getOwnerWindow`);function v(e){if(!h)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}m(v,`getOwnerDocument`);function y(e,t=!1){let{activeElement:n}=v(e);if(!n?.nodeName)return null;if(b(n)&&n.contentDocument)return y(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=v(n).getElementById(e);if(t)return t}}return n}m(y,`getActiveElement`);function b(e){return e.tagName===`IFRAME`}m(b,`isFrame`);var ee=Object.defineProperty,x=(e,t)=>ee(e,`name`,{value:t,configurable:!0}),S=a.useEffectEvent,C=a.useInsertionEffect;function w(e){if(typeof S==`function`)return S(e);let t=a.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof C==`function`?C(()=>{t.current=e}):f(()=>{t.current=e}),a.useMemo(()=>((...e)=>t.current?.(...e)),[])}x(w,`useEffectEvent`);var te=Object.defineProperty,T=(e,t)=>te(e,`name`,{value:t,configurable:!0}),ne=a.useInsertionEffect||f;function E({prop:e,defaultProp:t,onChange:n=T(()=>{},`onChange`),caller:r}){let[i,o,s]=re({defaultProp:t,onChange:n}),c=e!==void 0;return[c?e:i,a.useCallback(t=>{if(c){let n=ie(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}T(E,`useControllableState`);function re({defaultProp:e,onChange:t}){let[n,r]=a.useState(e),i=a.useRef(n),o=a.useRef(t);return ne(()=>{o.current=t},[t]),a.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}T(re,`useUncontrolledState`);function ie(e){return typeof e==`function`}T(ie,`isFunction`);var ae=Symbol(`RADIX:SYNC_STATE`);function oe(e,t,n,r){let{prop:i,defaultProp:o,onChange:s,caller:c}=t,l=i!==void 0,u=w(s),d=[{...n,state:o}];r&&d.push(r);let[f,p]=a.useReducer((t,n)=>{if(n.type===ae)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=a.useRef(m);a.useEffect(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=a.useMemo(()=>i===void 0?f:{...f,state:i},[f,i]);return a.useEffect(()=>{l&&!Object.is(i,f.state)&&p({type:ae,state:i})},[i,f.state,l]),[g,p]}T(oe,`useControllableStateReducer`);var se=Object.defineProperty,D=(e,t)=>se(e,`name`,{value:t,configurable:!0});function ce(e,t){return a.useReducer((e,n)=>t[e][n]??e,e)}D(ce,`useStateMachine`);var le=D(e=>{let{present:t,children:n}=e,r=ue(t),i=typeof n==`function`?n({present:r.isPresent}):a.Children.only(n),o=fe(r.ref,pe(i));return typeof n==`function`||r.isPresent?a.cloneElement(i,{ref:o}):null},`Presence`);function ue(e){let[t,n]=a.useState(),r=a.useRef(null),i=a.useRef(e),o=a.useRef(`none`),s=a.useRef(void 0),[c,l]=ce(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return a.useEffect(()=>{c===`mounted`?(o.current=s.current??O(r.current),s.current=void 0):o.current=`none`},[c]),f(()=>{let t=r.current,n=i.current;if(n!==e){let r=o.current,a=O(t);e?(s.current=a,l(`MOUNT`)):a===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==a?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,l]),f(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,a=D(a=>{let o=O(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(l(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=D(e=>{e.target===t&&(o.current=O(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,a),t.addEventListener(`animationend`,a),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,a),t.removeEventListener(`animationend`,a)}}l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(c),ref:a.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,s.current=O(t)}else r.current=null;n(e)},[])}}D(ue,`usePresence`);function de(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}D(de,`setRef`);function fe(...e){let t=a.useRef(e);return t.current=e,a.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=de(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;eme(e,`name`,{value:t,configurable:!0}),ge=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=i(`Primitive.${t}`),r=a.forwardRef((e,r)=>{let{asChild:i,...a}=e,s=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,o.jsx)(s,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function _e(e,t){e&&k.flushSync(()=>e.dispatchEvent(t))}he(_e,`dispatchDiscreteCustomEvent`);var ve=Object.defineProperty,ye=(e,t)=>ve(e,`name`,{value:t,configurable:!0});function be(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ye(be,`setRef`);function xe(...e){return t=>{let n=!1,r=e.map(e=>{let r=be(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;tCe(e,`name`,{value:t,configurable:!0}),Te=a.useInsertionEffect;function A(e){let t=a.useRef(e);return typeof Te==`function`?Te(()=>{t.current=e}):f(()=>{t.current=e}),a.useMemo(()=>((...e)=>t.current?.(...e)),[])}we(A,`useCallbackRef`);var Ee=Object.defineProperty,j=(e,t)=>Ee(e,`name`,{value:t,configurable:!0}),M=`dismissableLayer.update`,De=`dismissableLayer.pointerDownOutside`,Oe=`dismissableLayer.focusOutside`,ke,Ae=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),je=a.forwardRef(j(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:l,onDismiss:u,...d}=e,f=a.useContext(Ae),[p,m]=a.useState(null),h=p?.ownerDocument??globalThis?.document,[,_]=a.useState({}),v=Se(t,m),y=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),ee=b?y.indexOf(b):-1,x=p?y.indexOf(p):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,C=x>=ee,w=a.useRef(!1),te=Pe(e=>{s?.(e),l?.(e),e.defaultPrevented||u?.()},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:a.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return C&&!t},[f.branches,C])}),T=Fe(e=>{if(r&&w.current)return;let t=e.target;[...f.branches].some(e=>e.contains(t))||(c?.(e),l?.(e),e.defaultPrevented||u?.())},h),ne=p?x===y.length-1:!1,E=A(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))});return a.useEffect(()=>{if(ne)return h.addEventListener(`keydown`,E,{capture:!0}),()=>h.removeEventListener(`keydown`,E,{capture:!0})},[h,ne,E]),a.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(ke=h.body.style.pointerEvents,h.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),N(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(p),f.layersWithOutsidePointerEventsDisabled.size===0&&(h.body.style.pointerEvents=ke))}},[p,h,n,f]),a.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),N())},[p,f]),a.useEffect(()=>{let e=j(()=>_({}),`handleUpdate`);return document.addEventListener(M,e),()=>document.removeEventListener(M,e)},[]),(0,o.jsx)(ge.div,{...d,ref:v,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:g(e.onFocusCapture,T.onFocusCapture),onBlurCapture:g(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:g(e.onPointerDownCapture,te.onPointerDownCapture)})},`DismissableLayer`));function Me(){let e=a.useContext(Ae),[t,n]=a.useState(null);return a.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}j(Me,`useDismissableLayerSurface`);var Ne=j(()=>!0,`IS_TRUE`);function Pe(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:o,shouldHandlePointerDownOutside:s=Ne}=t,c=A(e),l=a.useRef(!1),u=a.useRef(!1),d=a.useRef(new Map),f=a.useRef(()=>{});return a.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}j(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}j(t,`isOutsideInteractionIntercepted`);function a(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...o].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}j(a,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}j(p,`handleInteractionBubble`);let m=j(a=>{if(a.target&&!l.current){let o=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||P(De,c,p,{discrete:!0})};if(j(o,`handleAndDispatchPointerDownOutsideEvent`),!s(a.target)){n.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?o():(n.removeEventListener(`click`,f.current),f.current=o,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,a,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,a,!0),n.removeEventListener(e,p)}},[n,c,r,i,o,s]),{onPointerDownCapture:j(()=>l.current=!0,`onPointerDownCapture`)}}j(Pe,`usePointerDownOutside`);function Fe(e,t=globalThis?.document){let n=A(e),r=a.useRef(!1);return a.useEffect(()=>{let e=j(e=>{e.target&&!r.current&&P(Oe,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:j(()=>r.current=!0,`onFocusCapture`),onBlurCapture:j(()=>r.current=!1,`onBlurCapture`)}}j(Fe,`useFocusOutside`);function N(){let e=new CustomEvent(M);document.dispatchEvent(e)}j(N,`dispatchUpdate`);function P(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?_e(i,a):i.dispatchEvent(a)}j(P,`handleAndDispatchCustomEvent`);var Ie=Object.defineProperty,Le=(e,t)=>Ie(e,`name`,{value:t,configurable:!0});function Re(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Le(Re,`setRef`);function ze(...e){return t=>{let n=!1,r=e.map(e=>{let r=Re(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;tVe(e,`name`,{value:t,configurable:!0}),Ue=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=i(`Primitive.${t}`),r=a.forwardRef((e,r)=>{let{asChild:i,...a}=e,s=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,o.jsx)(s,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function We(e,t){e&&k.flushSync(()=>e.dispatchEvent(t))}He(We,`dispatchDiscreteCustomEvent`);var Ge=Object.defineProperty,F=(e,t)=>Ge(e,`name`,{value:t,configurable:!0}),Ke=`focusScope.autoFocusOnMount`,qe=`focusScope.autoFocusOnUnmount`,Je={bubbles:!1,cancelable:!0},Ye=a.forwardRef(F(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:s,onUnmountAutoFocus:c,...l}=e,[u,d]=a.useState(null),f=A(s),p=A(c),m=a.useRef(null),h=Be(t,d),g=a.useRef(i);a.useEffect(()=>{g.current=i});let _=a.useCallback(e=>e?u?.contains(e)?!0:!!g.current?.some(t=>t.contains(e)):!1,[u]),v=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let e=function(e){if(v.paused||!u)return;let t=e.target;_(t)?m.current=t:I(m.current,{select:!0})},t=function(e){if(v.paused||!u)return;let t=e.relatedTarget;t!==null&&(_(t)||I(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&I(u)};F(e,`handleFocusIn`),F(t,`handleFocusOut`),F(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return u&&r.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,u,v.paused,_]),a.useEffect(()=>{if(u){ot.add(v);let e=document.activeElement;if(!u.contains(e)){let t=new CustomEvent(Ke,Je);u.addEventListener(Ke,f),u.dispatchEvent(t),t.defaultPrevented||(et(lt(nt(u)),{select:!0}),document.activeElement===e&&I(u))}return()=>{u.removeEventListener(Ke,f);let t=u.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(qe,Je);u.addEventListener(qe,p),u.dispatchEvent(r),r.defaultPrevented||I(e??t.body,{select:!0}),u.removeEventListener(qe,p),ot.remove(v)},0)}}},[u,f,p,v]);let y=a.useCallback(e=>{if(!n&&!r||v.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=tt(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&I(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&I(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,v.paused]);return(0,o.jsx)(Ue.div,{tabIndex:-1,...l,ref:h,onKeyDown:y})},`FocusScope`)),Xe=a.createContext(null);function Ze({registry:e,children:t}){return e?(0,o.jsx)(Xe.Provider,{value:e,children:t}):t}F(Ze,`FocusScopeBranchProvider`);function Qe(){let[e,t]=a.useState([]);return{nodes:e,registry:a.useMemo(()=>({add:F(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:F(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}F(Qe,`useFocusScopeBranchRegistry`);function $e(e){let t=a.useContext(Xe);a.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}F($e,`useFocusScopeBranch`);function et(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(I(r,{select:t}),document.activeElement!==n)return}F(et,`focusFirst`);function tt(e){let t=nt(e);return[rt(t,e),rt(t.reverse(),e)]}F(tt,`getTabbableEdges`);function nt(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:F(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}F(nt,`getTabbableCandidates`);function rt(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):it(r,{upTo:t})))return r}F(rt,`findVisible`);function it(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}F(it,`isHidden`);function at(e){return e.tagName===`INPUT`&&typeof e.select==`function`}F(at,`isSelectableInput`);function I(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&at(e)&&t&&e.select()}}F(I,`focus`);var ot=st();function st(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=ct(e,t),e.unshift(t)},remove(t){e=ct(e,t),e[0]?.resume()}}}F(st,`createFocusScopesStack`);function ct(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}F(ct,`arrayRemove`);function lt(e){return e.filter(e=>e.tagName!==`A`)}F(lt,`removeLinks`);var ut=Object.defineProperty,dt=(e,t)=>ut(e,`name`,{value:t,configurable:!0}),ft=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=i(`Primitive.${t}`),r=a.forwardRef((e,r)=>{let{asChild:i,...a}=e,s=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,o.jsx)(s,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function pt(e,t){e&&k.flushSync(()=>e.dispatchEvent(t))}dt(pt,`dispatchDiscreteCustomEvent`);var mt=Object.defineProperty,ht=a.forwardRef(((e,t)=>mt(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,s]=a.useState(!1);f(()=>s(!0),[]);let c=n||i&&globalThis?.document?.body;return c?k.createPortal((0,o.jsx)(ft.div,{...r,ref:t}),c):null},`Portal`)),gt=Object.defineProperty,_t=(e,t)=>gt(e,`name`,{value:t,configurable:!0}),L=0,R=null;function vt(e){return z(),e.children}_t(vt,`FocusGuards`);function z(){a.useEffect(()=>{R||={start:B(),end:B()};let{start:e,end:t}=R;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),L++,()=>{L===1&&(R?.start.remove(),R?.end.remove(),R=null),L=Math.max(0,L-1)}},[])}_t(z,`useFocusGuards`);function B(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}_t(B,`createFocusGuard`);var V=function(){return V=Object.assign||function(e){for(var t,n=1,r=arguments.length;n`u`)return Ht;var t=Wt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Kt=Vt(),G=`data-scroll-locked`,qt=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),` + .${xt} { + overflow: hidden ${r}; + padding-right: ${s}px ${r}; + } + body[${G}] { + overflow: hidden ${r}; + overscroll-behavior: contain; + ${[t&&`position: relative ${r};`,n===`margin`&&` + padding-left: ${i}px; + padding-top: ${a}px; + padding-right: ${o}px; + margin-left:0; + margin-top:0; + margin-right: ${s}px ${r}; + `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)} + } + + .${H} { + right: ${s}px ${r}; + } + + .${U} { + margin-right: ${s}px ${r}; + } + + .${H} .${H} { + right: 0 ${r}; + } + + .${U} .${U} { + margin-right: 0 ${r}; + } + + body[${G}] { + ${St}: ${s}px; + } +`},Jt=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Yt=function(){a.useEffect(function(){return document.body.setAttribute(G,(Jt()+1).toString()),function(){var e=Jt()-1;e<=0?document.body.removeAttribute(G):document.body.setAttribute(G,e.toString())}},[])},Xt=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Yt();var o=a.useMemo(function(){return Gt(i)},[i]);return a.createElement(Kt,{styles:qt(o,!t,i,n?``:`!important`)})},K=!1;if(typeof window<`u`)try{var q=Object.defineProperty({},"passive",{get:function(){return K=!0,!0}});window.addEventListener(`test`,q,q),window.removeEventListener(`test`,q,q)}catch{K=!1}var J=K?{passive:!1}:!1,Zt=function(e){return e.tagName===`TEXTAREA`},Qt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Zt(e)&&n[t]===`visible`)},$t=function(e){return Qt(e,`overflowY`)},en=function(e){return Qt(e,`overflowX`)},tn=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),an(e,r)){var i=on(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},nn=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},rn=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},an=function(e,t){return e===`v`?$t(t):en(t)},on=function(e,t){return e===`v`?nn(t):rn(t)},sn=function(e,t){return e===`h`&&t===`rtl`?-1:1},cn=function(e,t,n,r,i){var a=sn(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=on(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&an(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Y=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ln=function(e){return[e.deltaX,e.deltaY]},un=function(e){return e&&`current`in e?e.current:e},dn=function(e,t){return e[0]===t[0]&&e[1]===t[1]},fn=function(e){return` + .block-interactivity-${e} {pointer-events: none;} + .allow-interactivity-${e} {pointer-events: all;} +`},pn=0,X=[];function mn(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),i=a.useState(pn++)[0],o=a.useState(Vt)[0],s=a.useRef(e);a.useEffect(function(){s.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=bt([e.lockRef.current],(e.shards||[]).map(un),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=a.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var i=Y(e),a=n.current,o=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=tn(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=tn(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(o||c)&&(r.current=l),!l)return!0;var h=r.current||l;return cn(h,t,e,h===`h`?o:c,!0)},[]),l=a.useCallback(function(e){var n=e;if(X.length&&X[X.length-1]===o){var r=`deltaY`in n?ln(n):Y(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&dn(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var a=(s.current.shards||[]).map(un).filter(Boolean).filter(function(e){return e.contains(n.target)});(a.length>0?c(n,a[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=a.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:hn(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=a.useCallback(function(e){n.current=Y(e),r.current=void 0},[]),f=a.useCallback(function(t){u(t.type,ln(t),t.target,c(t,e.lockRef.current))},[]),p=a.useCallback(function(t){u(t.type,Y(t),t.target,c(t,e.lockRef.current))},[]);a.useEffect(function(){return X.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,J),document.addEventListener(`touchmove`,l,J),document.addEventListener(`touchstart`,d,J),function(){X=X.filter(function(e){return e!==o}),document.removeEventListener(`wheel`,l,J),document.removeEventListener(`touchmove`,l,J),document.removeEventListener(`touchstart`,d,J)}},[]);var m=e.removeScrollBar,h=e.inert;return a.createElement(a.Fragment,null,h?a.createElement(o,{styles:fn(i)}):null,m?a.createElement(Xt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function hn(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var gn=Mt(Nt,mn),_n=a.forwardRef(function(e,t){return a.createElement(W,V({},e,{ref:t,sideCar:gn}))});_n.classNames=W.classNames;var vn=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Z=new WeakMap,Q=new WeakMap,$={},yn=0,bn=function(e){return e&&(e.host||bn(e.parentNode))},xn=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=bn(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Sn=function(e,t,n,r){var i=xn(t,Array.isArray(e)?e:[e]);$[n]||($[n]=new WeakMap);var a=$[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Z.get(e)||0)+1,l=(a.get(e)||0)+1;Z.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Q.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),yn++,function(){o.forEach(function(e){var t=Z.get(e)-1,i=a.get(e)-1;Z.set(e,t),a.set(e,i),t||(Q.has(e)||e.removeAttribute(r),Q.delete(e)),i||e.removeAttribute(n)}),yn--,yn||(Z=new WeakMap,Z=new WeakMap,Q=new WeakMap,$={})}},Cn=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||vn(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Sn(r,i,n,`aria-hidden`)):function(){return null}};export{Ye as a,Qe as c,A as d,le as f,u as g,f as h,ht as i,je as l,g as m,_n as n,Ze as o,E as p,z as r,$e as s,Cn as t,Me as u}; \ No newline at end of file diff --git a/site/public/app/assets/esm-DQKxnO1B.js b/site/public/app/assets/esm-DQKxnO1B.js new file mode 100644 index 00000000..0dcb0f18 --- /dev/null +++ b/site/public/app/assets/esm-DQKxnO1B.js @@ -0,0 +1 @@ +import{Q as e,Y as t}from"./index-CteWxeiL.js";import{t as n}from"./react-dom-BQvtGpns.js";var r=e(t(),1),i=e(n(),1);function a(e){return typeof e==`object`?e.key:e}function o(e,t){let n=e.length;return new Proxy(e,{get(e,r,i){if(typeof r==`string`){let i=r.charCodeAt(0);if(i>=48&&i<=57){let i=+r;if(Number.isInteger(i)&&i>=0&&ir[t]!==e))&&(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1),i}return o.updateDeps=e=>{r=e},o}function c(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var l=(e,t)=>Math.abs(e-t)<1.01,u=(e,t,n)=>{let r;return Object.assign(function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(r)}})};function d({offset:e,isScrolling:t,elementMax:n,holdOffset:r,scrollOffset:i,pendingWrite:a,clampedMaxAtWrite:o}){return t&&a===null&&e===i?`spurious`:a!==null&&Math.abs(e-a.target)<1.5?`readBack`:a!==null&&!a.smooth&&n!==null&&a.target>n+r+.5&&Math.abs(e-(n+r))<1.5||a!==null&&!a.smooth&&a.lowMaxes?.some(t=>Math.abs(e-t)<1.5)?`clampedReadBack`:o!==null&&Math.abs(e-o)<1.5?`clampedEcho`:`external`}var f=e=>e===`smooth`||e===`smoothFinishing`;function p({kind:e,offset:t,command:n,target:r}){return e!==`spurious`&&e!==`readBack`&&e!==`clampedReadBack`&&n?.index!=null&&n.phase!==`queued`&&!f(n.phase)&&!l(t,n.lastTargetOffset)&&!l(t,r())&&e!==`clampedEcho`}var m=40;function h(e){let t=e[e.length-1];if(t===void 0)return!1;let n=e.length-2;for(;n>=0&&t.t-e[n].t=0&&r.t-e[i].t=0&&Math.abs(o)>=2*Math.abs(s)&&Math.abs(o)-Math.abs(s)>=.8}function g(e){let t=e[e.length-1];if(t===void 0)return!1;let n=e.length-2;for(;n>=0&&t.t-e[n].t=.05}var _,v=()=>{if(_!==void 0)return _;if(typeof navigator>`u`)return _=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return _=!0;let e=navigator.maxTouchPoints;return _=navigator.platform===`MacIntel`&&e!==void 0&&e>0},y,b=()=>y===void 0?y=v()&&typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`overflow-anchor: auto`):y,x=()=>!v()||b(),S={capture:!0,passive:!0},C=class{constructor(e){this.host=e,this._touch=null,this.inMotion=()=>this._touch!==null&&this._touch.phase!==`lateFling`,this.dragging=()=>this._touch?.phase===`down`&&this._touch.moved,this.tail=()=>this._touch?.phase===`tail`?this._touch.moved?`fling`:`tap`:null,this.onScroll=({isScrolling:e,ownReadBack:t,moved:n,external:r})=>(e&&this._touch?.phase===`tail`?this._openTail(this._touch.moved||!t,!1):this._touch?.phase===`lateFling`&&(this.host.now()>this._touch.until?this._touch=null:r&&e&&n&&this._openTail(!0,!1)),!t&&e&&n&&this._touch?.phase===`down`?(this._touch.moved=!0,!0):!1),this.touchStart=()=>{this.end(),this._touch={phase:`down`,moved:!1}},this.touchEnd=()=>{let e=this._touch?.phase===`down`&&this._touch.moved;this.end(),this._openTail(e,e)},this.end=()=>{let e=this.host.getWindow();this._touch?.phase===`tail`&&e!=null&&e.clearTimeout(this._touch.timerId),this._touch=null},this.listen=e=>{let t=()=>this.touchStart(),n=()=>this.touchEnd();return e.addEventListener(`touchstart`,t,S),e.addEventListener(`touchend`,n,S),e.addEventListener(`touchcancel`,n,S),()=>{e.removeEventListener(`touchstart`,t,S),e.removeEventListener(`touchend`,n,S),e.removeEventListener(`touchcancel`,n,S),this.end()}},this._openTail=(e,t)=>{let n=this.host.getWindow();if(n==null)return;this.end();let r={phase:`tail`,moved:e,awaitingFling:t,timerId:n.setTimeout(()=>{this.host.tailStillMoving()?this._openTail(r.moved,r.awaitingFling):(this._touch=r.awaitingFling?{phase:`lateFling`,until:this.host.now()+1e3}:null,this.host.onTailClosed())},150)};this._touch=r}}get touch(){return this._touch}},w=e=>{let{clientWidth:t,clientHeight:n}=e;return{width:t,height:n}},T=e=>{let t=new Set;return{schedule:n=>{let r=e.requestAnimationFrame(()=>{t.delete(r),n()});t.add(r)},cancel:()=>{t.forEach(t=>e.cancelAnimationFrame(t)),t.clear()}}},E=e=>e,D=e=>{let t=e.overscan*Math.max(e.lanes??1,1),n=Math.max(e.startIndex-t,0),r=Math.min(e.endIndex+t,e.count-1)-n+1,i=Array(r);for(let e=0;e{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(w(n)),!r.ResizeObserver)return()=>{};let a=T(r),o=new r.ResizeObserver(()=>{let t=()=>{i(w(n))};e.options.useAnimationFrameWithResizeObserver?a.schedule(t):t()});return o.observe(n,{box:`content-box`}),()=>{o.unobserve(n),a.cancel()}},k={passive:!0},A=typeof window>`u`||`onscrollend`in window,j=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&A,o=0,s=a?null:u(i,()=>t(n(r),!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),d=c(!1);return r.addEventListener(`scroll`,l,k),a&&r.addEventListener(`scrollend`,d,k),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,d),s?.cancel()}},M=(e,t)=>j(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),N=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},P=(e,{adjustments:t=0,behavior:n},r)=>{var i;let{scrollElement:a,options:o}=r,s=e+t,c=o.horizontal&&o.isRtl&&a!==null&&`ownerDocument`in a;(i=a?.scrollTo)==null||i.call(a,{[o.horizontal?`left`:`top`]:c?-s:s,behavior:n})},F=(e,t)=>e===`smooth`?t?`smoothLanded`:`smooth`:`instant`,I=e=>e?.phase===`smooth`||e?.phase===`smoothLanded`;function L(e,t,n,r){if(t===0)return!1;let i=r(0),a=new Set,o=0;for(;o=t)return!1;for(let e=0;ethis.targetWindow,now:()=>this.now(),tailStillMoving:()=>{let e=this.scrollState;if(e?.phase!==`queued`||this.pendingWrite!==null)return!1;let t=this._readElementOffset();return t===null||this._lastElementOffset===null||Math.abs(t-this._lastElementOffset)<1?!1:(this._lastElementOffset=t,e.samples=[...e.samples??[],{t:this.now(),offset:t}],!0)},onTailClosed:()=>{let e=this.scrollState;e?.phase===`queued`&&g(e.samples??[])&&(this.scrollState=null),this._flushHoldIfReady(!0),this._writeAwaitingCommand(),this._retryClampedAdjustment()}}),this._lastElementOffset=null,this.pendingWrite=null,this._clampedAdjustment=null,this.elementsCache=new Map,this._resizeBatch=null,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=null,n=!1,r=!1,i=new Set,a=()=>{if(e)return e;let r=this.targetWindow;if(!r||!r.ResizeObserver)return null;let i=t=T(r);return e=new r.ResizeObserver(e=>{let t=()=>{let t={sync:!1};this._resizeBatch=t;try{e.forEach(o)}finally{this._resizeBatch=null,t.notify&&(this.notify(t.sync),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment(),this.measureElement(null))}};if(this.options.useAnimationFrameWithResizeObserver)i.schedule(t);else{n=!0;try{t()}finally{n=!1}}})},o=e=>{let t=e.target,n=this.indexFromElement(t);if(t.isConnected)this.isIndexInRange(n)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this));else{this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}}};return{disconnect:()=>{var n;(n=a())==null||n.disconnect(),t?.cancel(),i.clear(),r=!1,e=null,t=null},observe:o=>{let s=a();s&&(n?(i.add(o),r||(r=!0,t?.schedule(()=>{r=!1,i.forEach(t=>{t.isConnected&&e?.observe(t,{box:`border-box`})}),i.clear()}))):s.observe(o,{box:`border-box`}))},unobserve:e=>{var t;i.delete(e),(t=a())==null||t.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:E,rangeExtractor:D,onChange:()=>{},measureElement:N,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,o=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,s=t.count,c=this.getMeasurements(),l=this._singleLaneMeasurements?.items??c,u=e=>a(l[e]),d=e>0?u(0):null,f=e>0?u(e-1):null;if(s!==e||e>0&&s>0&&(t.getItemKey(0)!==d||t.getItemKey(s-1)!==f)){o=!0;let a=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??c[0]:null;a&&(r=[a.key,this.getScrollOffset()-a.start]);let l=t.followOnAppend===!0?`auto`:t.followOnAppend||null;l&&s>0&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(s-1)!==f)&&(s>e||L(e,s,u,t.getItemKey))&&(i=l)}}this.options=t,o&&(this.pendingMin=0,this.itemSizeCacheVersion++);let s=null;if(r&&this.scrollOffset!==null&&!this._awaitingCommandReadBack()){let[e,t]=r,n=this.getMeasurements(),{count:a,getItemKey:o}=this.options,c=0;for(;c{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=s(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{var e;this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,(e=this._momentumStop)==null||e.restore(),this._momentumStop=null,this.isScrolling=!1,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._clampedAdjustment=null,this.pendingWrite=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.targetWindow=this.scrollElement&&`ownerDocument`in this.scrollElement?this.scrollElement.ownerDocument.defaultView:this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{let n=t?this._elementMaxScrollOffset():null,r=this._reportedOverscroll;this._reportedOverscroll=e<0||n!==null&&e>n+1;let i=e;this._lastElementOffset=i,e=this._toLayoutOffset(e);let a=this._classifyScrollEvent(e,t,n);if(a===`spurious`)return;a===`readBack`?e=this.pendingWrite.target:a===`clampedReadBack`&&this.scrollState?.index!=null&&ethis.getScrollStateTarget(this.scrollState)})&&(this.scrollState=null),this.pendingWrite=null,this._clampedAdjustment!==null&&Math.abs(e-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null);let o=this.getScrollOffset(),s=this.scrollDirection;this.scrollDirection=t?o===e?this.scrollDirection:oe-t.t<=200),{t:e,offset:i}],(s!==null&&this.scrollDirection!==s||h(c.samples))&&(this.scrollState=null)}}this._iosGesture.onScroll({isScrolling:t,ownReadBack:a===`readBack`,moved:e!==o,external:a===`external`&&this.scrollState?.phase!==`smooth`&&this.scrollState?.phase!==`smoothFinishing`})&&this.scrollState?.phase===`queued`&&(this.scrollState=null),this._flushHoldIfReady(!0),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement&&this.unsubs.push(this._iosGesture.listen(this.scrollElement)),this._scrollToOffset(this.getScrollOffset())}this._noteClampMax();let t=this.pendingScrollAnchor;this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled&&(t.kind===`anchor`?this._canWriteScroll()?I(this.scrollState)&&!l(this.getScrollOffset()-t.delta,this.scrollState.lastTargetOffset)||(this._followOffsetTarget(t.delta),this._scrollToOffset(this.getScrollOffset())):(this._holdOffset+=t.delta,this._followOffsetTarget(t.delta),this.notify(!1)):this.scrollToEnd({behavior:t.behavior})),this._flushHoldIfReady(!1),this._retryClampedAdjustment()},this._classifyScrollEvent=(e,t,n)=>d({offset:e,isScrolling:t,elementMax:n,holdOffset:this._holdOffset,scrollOffset:this.scrollOffset,pendingWrite:this.pendingWrite,clampedMaxAtWrite:this._clampedAdjustment?.maxAtWrite??null}),this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled||!this._canWriteScroll())return;let{target:e,maxAtWrite:t}=this._clampedAdjustment,n=this.getMaxScrollOffset();n>t+.5&&(this._clampedAdjustment=e>n+.5?{target:e,maxAtWrite:n}:null,this._scrollToOffset(e))},this._writeAwaitingCommand=()=>{let e=this.scrollState;if(e===null||e.phase!==`queued`)return;let{behavior:t}=e;this.getMeasurements();let n=this.getScrollStateTarget(e);e.lastTargetOffset=n,this._clampedAdjustment=null,e.phase=F(t,e.index!=null&&l(n,this.getScrollOffset())),this._scrollToOffset(n,{behavior:t}),this.scheduleScrollReconcile()},this._readElementOffset=()=>{let e=this.scrollElement;if(e==null)return null;let{horizontal:t,isRtl:n}=this.options;return typeof e.scrollTop==`number`?t?e.scrollLeft*(n&&-1||1):e.scrollTop:typeof e.scrollY==`number`?t?e.scrollX:e.scrollY:null},this._canWriteScroll=()=>!(v()&&this._iosGesture.inMotion())&&!this._reportedOverscroll,this._flushHoldIfReady=e=>{if(this._holdOffset===0||!this.scrollElement||!this.options.enabled||!this._canWriteScroll()||this.scrollState?.phase===`smooth`)return;this._holdOffset=0,this.scrollOffset!==null&&this.scrollOffset<0&&(this.scrollOffset=0),this.notify(e);let t=this.getCommandWrittenOffset()??this.getScrollOffset();this._clampedAdjustment=this._clampedBy(t),this._scrollToOffset(t)},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=s(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.isIndexInRange=e=>e>=0&&e[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:s,gap:c},l)=>{let u=this.itemSizeCache;if(!i)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let d=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._singleLaneMeasurements?.flat;if(!a||a.length0&&e.set(a.subarray(0,d*2)),a=e}let s=d===0?Array(e):this._singleLaneMeasurements.items.slice(),l;if(d===0)l=t+n;else{let e=d-1;l=a[e*2]+a[e*2+1]+c}for(let t=d;t1){l=o;let e=p[l],r=e===void 0?void 0:f[e];d=r?r.end+c:t+n}else if(h===a){let e=0,t=m[0],n=p[0];for(let r=1;rthis.options.debug}),this.calculateRange=s(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes,this._getLayoutTotalSize()+this.options.scrollMargin],(e,t,n,r,i)=>{if(e.length===0||t===0)return this.range=null,null;let a=Math.max(i-t,0);return this.range=V(e,t,Math.min(n,a),r,r===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range},{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=s(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t,this.options.lanes]},(e,t,n,r,i,a)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n,lanes:a}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!I(this.scrollState))return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),e.isConnected&&(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var n;if(!this.isIndexInRange(e))return;this._resizeBatch?.sync&&this.getMeasurements();let r,i,a,o=this._singleLaneMeasurements?.flat;if(this.options.lanes===1&&o!=null)a=this.options.getItemKey(e),i=o[e*2],r=o[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;a=t.key,i=t.start,r=t.size}let s=this.itemSizeCache.get(a)??r,c=t-s;if(c!==0){let o=this.options.anchorTo===`end`&&!I(this.scrollState)&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,l=o?this._getLayoutTotalSize():0,u=this.getScrollOffset(),d=this.itemSizeCache.has(a)?i+s<=u&&this.scrollDirection!==`backward`:i[this.getVirtualIndexes(),this.getMeasurements(),this._holdOffset],(e,t,n)=>{let r=[];for(let i=0,a=e.length;ithis.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._singleLaneMeasurements?.flat,r=this.options.lanes===1&&n!=null;return c(t[z(0,t.length-1,r?e=>n[e*2]:e=>c(t[e]).start,e)])},this._noteClampMax=()=>{if(!this._awaitingCommandReadBack())return;let e=this._elementMaxScrollOffset();if(e===null)return;let t=this.pendingWrite,n=Math.max(e,0)+this._holdOffset;if(n>=t.target)return;let r=t.lowMaxes??=[];r[r.length-1]!==n&&r.push(n)},this.getMaxScrollOffset=()=>(this._elementMaxScrollOffset()??0)+this._holdOffset,this._toLayoutOffset=e=>{let t=e+this._holdOffset;return this.pendingScrollAnchor?.kind===`anchor`&&(t+=this.pendingScrollAnchor.delta),t},this._elementMaxScrollOffset=()=>{let e=this.scrollElement;if(e===null)return null;if(`scrollHeight`in e)return this.options.horizontal?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight;if(`document`in e){let t=e.document.documentElement;return this.options.horizontal?t.scrollWidth-e.innerWidth:t.scrollHeight-e.innerHeight}return null},this._momentumStop=null,this._stopMomentum=e=>{let t=this.scrollElement,n=this.targetWindow;if(t===null||n===null)return;let r=`document`in t?t.document.scrollingElement:t;if(!r?.style)return;if(this._momentumStop){this._momentumStop.done=e;return}let{style:i}=r,a=this.options.horizontal?`overflow-x`:`overflow-y`,o=i.getPropertyValue(a),s=i.getPropertyPriority(a),c=()=>this.options.horizontal?r.clientHeight:r.clientWidth,l=c();if(i.setProperty(a,`hidden`,`important`),c()!==l){i.setProperty(a,o,s);return}let u={restore:()=>i.getPropertyValue(a)!==`hidden`||i.getPropertyPriority(a)!==`important`?!1:(i.setProperty(a,o,s),!0),done:e};this._momentumStop=u,n.requestAnimationFrame(()=>n.requestAnimationFrame(()=>{this._momentumStop===u&&(this._momentumStop=null,u.restore()&&u.done())}))},this._clampedBy=e=>{let t=this._elementMaxScrollOffset();if(t===null)return null;let n=t+this._holdOffset;return e>n+.5?{target:e,maxAtWrite:n}:null},this.getVirtualDistanceFromEnd=()=>Math.max(this._getLayoutTotalSize()+this.options.scrollMargin-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.getMeasurements()[e];if(!i)return;if(t===`auto`){if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t]}if(t===`end`&&e===this.options.count-1){let e=this.getMaxScrollOffset(),n=e-this.options.paddingEnd+this.options.scrollPaddingEnd;return[Math.max(Math.min(n,e),0),t]}let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._startScroll({index:null,align:t},this.getOffsetForAlignment(e,t),n,`absolute`)},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r;this._startScroll({index:e,align:a},i,n,`absolute`)},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getOffsetForAlignment((this.getCommandWrittenOffset()??this.getScrollOffset())+e,`start`);this._startScroll({index:null,align:`start`},n,t,`relative`)},this.scrollToEnd=({behavior:e=`auto`}={})=>{this.options.count>0?this._startScroll({index:this.options.count-1,align:`end`,toEnd:!0},Math.max(this.getMaxScrollOffset(),0),e,`absolute`):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.cancelScroll=()=>{this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null},this.getTotalSize=()=>Math.max(this._getLayoutTotalSize()-this._holdOffset,0),this._getLayoutTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._singleLaneMeasurements?.flat;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n}={})=>{let r={target:e+(t??0),smooth:n===`smooth`};return this.pendingWrite=r,this.options.scrollToFn(e-this._holdOffset,{behavior:n,adjustments:t},this),r},this.getCommandWrittenOffset=()=>this.scrollState!==null&&this.pendingWrite!==null&&!this.pendingWrite.smooth?this.pendingWrite.target:null,this._awaitingCommandReadBack=()=>{let e=this.getCommandWrittenOffset();return!(v()&&this._iosGesture.dragging())&&e!==null&&!l(e,this.getScrollOffset())},this._followOffsetTarget=e=>{this.scrollState!==null&&this.scrollState.index==null&&(this.scrollState.lastTargetOffset+=e)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}get scrollAdjustments(){return 0}applyScrollAdjustment(e,t){if(e===0)return!1;if(this._followOffsetTarget(e),this._canWriteScroll()){let n=this.getScrollOffset();this._clampedAdjustment=this._clampedBy(n+e);let r=this._scrollToOffset(n,{adjustments:e,behavior:t});return this.scrollOffset!==null&&(this.pendingWrite===r&&(this.scrollOffset+=e),this.scrollOffset<0&&(this.scrollOffset=0)),!0}return this._holdOffset+=e,this.scrollOffset!==null&&(this.scrollOffset+=e),!0}scheduleScrollReconcile(){this.targetWindow?this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}):this.scrollState=null}getScrollStateTarget(e){let t=e.toEnd?[Math.max(this.getMaxScrollOffset(),0)]:e.index==null?void 0:this.getOffsetForIndex(e.index,e.align);return t?t[0]:e.lastTargetOffset}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}if(this.scrollState.phase===`queued`){this.scheduleScrollReconcile();return}this.getMeasurements();let e=this.getScrollStateTarget(this.scrollState),t=this.scrollState.index==null?1:this.options.useAnimationFrameWithResizeObserver?3:2,n=e!==this.scrollState.lastTargetOffset;if(!n&&l(e,this.getScrollOffset())){if(this.scrollState.phase===`smooth`?this.scrollState.phase=`smoothLanded`:this.scrollState.phase===`smoothFinishing`&&(this.scrollState.phase=`instant`),this.scrollState.stableFrames++,this.scrollState.stableFrames>=t){this.getScrollOffset()!==e&&this._scrollToOffset(e,{behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let t=this.getSize()||600,n=Math.abs(e-this.getScrollOffset()),r=I(this.scrollState)&&n>t;this.scrollState.lastTargetOffset=e,r?this.scrollState.phase=`smooth`:this.scrollState.phase===`smooth`?this.scrollState.phase=`smoothFinishing`:this.scrollState.phase===`smoothLanded`&&(this.scrollState.phase=`instant`),this._scrollToOffset(e,{behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}_startScroll(e,t,n,r){this.pendingScrollAnchor=null,this._clampedAdjustment=null;let i=this._iosGesture.tail();if(r===`absolute`&&i!==null){if(i===`fling`&&x()){this._stopMomentum(()=>{this.scrollState?.phase!==`queued`||this._iosGesture.tail()!==`fling`||this._reportedOverscroll||(this._iosGesture.end(),this._flushHoldIfReady(!0),this._writeAwaitingCommand())}),this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,phase:`queued`,behavior:n,samples:[]},this.scheduleScrollReconcile();return}this._iosGesture.end()}this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,behavior:n,phase:F(n,e.index!=null&&l(t,this.getScrollOffset()))},this._scrollToOffset(t,{behavior:n}),this.scheduleScrollReconcile()}},z=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(ar)t=i-1;else return i}return e>0?e-1:0};function B(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(an)t=i-1;else return i}return r>0?r-1:0}function V(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=B(i,a,n),r=e,o=n+t;for(;re[t].start,n),s=o;if(r===1)for(;s1){let i=Array(r).fill(0);for(;se=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var H=typeof document<`u`?r.useLayoutEffect:r.useEffect;function U({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n=`transform`,...a}){let o=r.useReducer(e=>e+1,0)[1],s=r.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});s.current.enabled=t,s.current.mode=n;let c=r.useRef(!1),l=e=>{let t=s.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?`width`:`height`;t.container.style[r]=`${n}px`}},u=(e,t,n)=>{let r=s.current,i=!!e.options.horizontal,a=t.start-e.options.scrollMargin;r.lastPositions.get(n)!==a&&(r.lastPositions.set(n,a),r.mode===`transform`?n.style.transform=i?`translate3d(${a}px, 0, 0)`:`translate3d(0, ${a}px, 0)`:n.style[i?`left`:`top`]=`${a}px`)},d=e=>{let t=s.current;if(t.enabled&&t.container){l(e);for(let t of e.getVirtualItems()){let n=e.elementsCache.get(t.key);n&&u(e,t,n)}}},f={...a,onChange:(t,n)=>{var r;let l=s.current,u=!0;if(l.enabled){d(t);let e=t.range,n=l.prevRange;u=!n||n.isScrolling!==t.isScrolling||n.startIndex!==e?.startIndex||n.endIndex!==e?.endIndex,u&&(l.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}u&&(e&&n&&!c.current?(0,i.flushSync)(o):o()),(r=a.onChange)==null||r.call(a,t,n)}},[p]=r.useState(()=>{let e=new R(f),t=e.measureElement;return e.measureElement=n=>{c.current=!0;try{t(n)}finally{c.current=!1}let r=s.current;if(n!==null&&r.enabled&&r.container){let t=e.measurementsCache[e.indexFromElement(n)];t&&u(e,t,n)}},Object.assign(e,{containerRef:t=>{let n=s.current;n.container=t,n.lastSize=null,t!==null&&d(e)}})});return p.setOptions(f),H(()=>p._didMount(),[]),H(()=>(l(p),p._willUpdate())),H(()=>{d(p)}),p}function W(e){return U({observeElementRect:O,observeElementOffset:M,scrollToFn:P,...e})}export{W as t}; \ No newline at end of file diff --git a/site/public/app/assets/event-CTND-agQ.js b/site/public/app/assets/event-CTND-agQ.js new file mode 100644 index 00000000..f016f649 --- /dev/null +++ b/site/public/app/assets/event-CTND-agQ.js @@ -0,0 +1 @@ +import{G as e,W as t}from"./index-CteWxeiL.js";var n;(function(e){e.WINDOW_RESIZED=`tauri://resize`,e.WINDOW_MOVED=`tauri://move`,e.WINDOW_CLOSE_REQUESTED=`tauri://close-requested`,e.WINDOW_DESTROYED=`tauri://destroyed`,e.WINDOW_FOCUS=`tauri://focus`,e.WINDOW_BLUR=`tauri://blur`,e.WINDOW_SCALE_FACTOR_CHANGED=`tauri://scale-change`,e.WINDOW_THEME_CHANGED=`tauri://theme-changed`,e.WINDOW_CREATED=`tauri://window-created`,e.WINDOW_SUSPENDED=`tauri://suspended`,e.WINDOW_RESUMED=`tauri://resumed`,e.WEBVIEW_CREATED=`tauri://webview-created`,e.DRAG_ENTER=`tauri://drag-enter`,e.DRAG_OVER=`tauri://drag-over`,e.DRAG_DROP=`tauri://drag-drop`,e.DRAG_LEAVE=`tauri://drag-leave`})(n||={});async function r(e,n){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,n),await t(`plugin:event|unlisten`,{event:e,eventId:n})}async function i(n,i,a){let o=typeof a?.target==`string`?{kind:`AnyLabel`,label:a.target}:a?.target??{kind:`Any`};return t(`plugin:event|listen`,{event:n,target:o,handler:e(i)}).then(e=>async()=>r(n,e))}async function a(e,t,n){return i(e,n=>{r(e,n.id),t(n)},n)}async function o(e,n){await t(`plugin:event|emit`,{event:e,payload:n})}async function s(e,n,r){await t(`plugin:event|emit_to`,{target:typeof e==`string`?{kind:`AnyLabel`,label:e}:e,event:n,payload:r})}export{a,i,o as n,s as r,n as t}; \ No newline at end of file diff --git a/site/public/app/assets/explorer-BFleEu6E.js b/site/public/app/assets/explorer-BFleEu6E.js new file mode 100644 index 00000000..1763866f --- /dev/null +++ b/site/public/app/assets/explorer-BFleEu6E.js @@ -0,0 +1 @@ +import{F as e}from"./index-CteWxeiL.js";var t={queryHistory:t=>e(`query_history`,{query:t}),searchPages:t=>e(`query_history`,{query:{...t,groupByUrl:!0}}),loadHistoryFavicons:t=>e(`load_history_favicons`,{entries:t}),loadSiteFavicons:t=>e(`load_site_favicons`,{domains:t}),loadHistoryOgImages:t=>e(`load_history_og_images`,{entries:t}),markOgImagesShown:t=>e(`mark_og_images_shown`,{urls:t}),triggerOgImageRefetch:t=>e(`trigger_og_image_refetch`,{urls:t}),getOgImageStorageStats:()=>e(`get_og_image_storage_stats`,{}),getOgImageCoverageStats:()=>e(`get_og_image_coverage_stats`,{}),clearOgImageCache:()=>e(`clear_og_image_cache`,{}),runOgImageCleanup:()=>e(`run_og_image_cleanup`,{})};export{t}; \ No newline at end of file diff --git a/site/public/app/assets/favicon-CMH05BYD.js b/site/public/app/assets/favicon-CMH05BYD.js new file mode 100644 index 00000000..6610815f --- /dev/null +++ b/site/public/app/assets/favicon-CMH05BYD.js @@ -0,0 +1 @@ +import{r as e}from"./query-DyHGS9i8.js";import{k as t}from"./index-CteWxeiL.js";var n=t(),r=[252,150,30,300,200,90,340,0],i=e=>e.replace(/^www\./,``);function a(e){let t=0;for(let n of i(e))t=(t*31+n.charCodeAt(0))%997;return`oklch(0.62 0.13 ${r[t%r.length]})`}function o(e){return(i(e)[0]??`?`).toUpperCase()}function s({domain:t,src:r,className:i}){return r?(0,n.jsx)(`img`,{src:r,alt:``,className:e(`size-[18px] shrink-0 rounded-[5px] object-contain`,i)}):(0,n.jsx)(`span`,{"aria-hidden":!0,"data-initial":o(t),className:e(`flex size-[18px] shrink-0 items-center justify-center rounded-[5px] text-[10px] font-semibold text-white before:content-[attr(data-initial)]`,i),style:{background:a(t)}})}export{s as t}; \ No newline at end of file diff --git a/site/public/app/assets/firefox-EOqxoGBZ.svg b/site/public/app/assets/firefox-EOqxoGBZ.svg new file mode 100644 index 00000000..1a832773 --- /dev/null +++ b/site/public/app/assets/firefox-EOqxoGBZ.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/public/app/assets/floorp-BOjICP9Z.png b/site/public/app/assets/floorp-BOjICP9Z.png new file mode 100644 index 00000000..7f54cf90 Binary files /dev/null and b/site/public/app/assets/floorp-BOjICP9Z.png differ diff --git a/site/public/app/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 b/site/public/app/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 new file mode 100644 index 00000000..4c462958 Binary files /dev/null and b/site/public/app/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 differ diff --git a/site/public/app/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 b/site/public/app/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 new file mode 100644 index 00000000..4b7a2bec Binary files /dev/null and b/site/public/app/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 differ diff --git a/site/public/app/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 b/site/public/app/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 new file mode 100644 index 00000000..ba90e209 Binary files /dev/null and b/site/public/app/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 differ diff --git a/site/public/app/assets/geist-latin-wght-normal-BgDaEnEv.woff2 b/site/public/app/assets/geist-latin-wght-normal-BgDaEnEv.woff2 new file mode 100644 index 00000000..991445d7 Binary files /dev/null and b/site/public/app/assets/geist-latin-wght-normal-BgDaEnEv.woff2 differ diff --git a/site/public/app/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 b/site/public/app/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 new file mode 100644 index 00000000..fbc0ebd7 Binary files /dev/null and b/site/public/app/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 differ diff --git a/site/public/app/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 b/site/public/app/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 new file mode 100644 index 00000000..2fb7832f Binary files /dev/null and b/site/public/app/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 differ diff --git a/site/public/app/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 b/site/public/app/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 new file mode 100644 index 00000000..ea22fd94 Binary files /dev/null and b/site/public/app/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 differ diff --git a/site/public/app/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 b/site/public/app/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 new file mode 100644 index 00000000..0750682c Binary files /dev/null and b/site/public/app/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 differ diff --git a/site/public/app/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 b/site/public/app/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 new file mode 100644 index 00000000..f45df5d2 Binary files /dev/null and b/site/public/app/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 differ diff --git a/site/public/app/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 b/site/public/app/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 new file mode 100644 index 00000000..49730a41 Binary files /dev/null and b/site/public/app/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 differ diff --git a/site/public/app/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 b/site/public/app/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 new file mode 100644 index 00000000..ee965898 Binary files /dev/null and b/site/public/app/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 differ diff --git a/site/public/app/assets/highlighted-body-JLMTFACH-DAcfQXX-.js b/site/public/app/assets/highlighted-body-JLMTFACH-DAcfQXX-.js new file mode 100644 index 00000000..23efa0bb --- /dev/null +++ b/site/public/app/assets/highlighted-body-JLMTFACH-DAcfQXX-.js @@ -0,0 +1 @@ +import{i as e,n as t,r as n}from"./ask-page-dpmr3YMI.js";import{Q as r,Y as i,k as a}from"./index-CteWxeiL.js";var o=r(i(),1),s=a(),c=({code:r,isIncomplete:i=!1,language:a,maxHeight:c,raw:l,className:u,startLine:d,lineNumbers:f,...p})=>{let{shikiTheme:m}=(0,o.useContext)(n),h=e(),[g,_]=(0,o.useState)(l);return(0,o.useEffect)(()=>{if(!h){_(l);return}let e=!0,t=h.highlight({code:r,isIncomplete:i,language:a,themes:m},t=>{e&&_(t)});return t&&_(t),()=>{e=!1}},[r,i,a,m,h,l]),(0,s.jsx)(t,{className:u,language:a,lineNumbers:f,maxHeight:c,result:g,startLine:d,...p})};export{c as HighlightedCodeBlockBody}; \ No newline at end of file diff --git a/site/public/app/assets/history-page-DlFQeatv.js b/site/public/app/assets/history-page-DlFQeatv.js new file mode 100644 index 00000000..502e8263 --- /dev/null +++ b/site/public/app/assets/history-page-DlFQeatv.js @@ -0,0 +1,3 @@ +import{F as e,J as t,Q as n,Y as r,k as i,m as a,p as o}from"./index-CteWxeiL.js";import{At as s,Et as c,G as l,J as u,Lt as d,Nt as f,Ot as p,Q as m,Tt as h,U as g,Vt as _,W as v,Wt as y,X as b,Z as x,gt as S,ht as C,jt as w,q as T,qt as E}from"./main-CmsrHzbA.js";import{c as D,o as O,s as ee,t as k}from"./button-C0JM8asg.js";import{t as te}from"./search-coverage-CKKsR7SW.js";import{O as ne,i as A,n as re,r as j}from"./query-DyHGS9i8.js";import{a as ie,c as ae,d as M,f as N,h as P,i as oe,l as se,n as ce,o as le,p as ue,r as F,s as de,t as fe,u as pe}from"./queries-D4pVDbH5.js";import{c as me,m as he}from"./spaces-BqDG3Cu2.js";import{t as ge}from"./copy-Da1fgnNr.js";import{t as I}from"./x-G5NChC4d.js";import{c as L,i as _e,o as R}from"./app-CVcZz016.js";import{o as ve}from"./dist-BNmHZVEB.js";import{t as ye}from"./explorer-BFleEu6E.js";import{t as z}from"./site-icon-9eLiTdFC.js";import{t as be}from"./open-link-CxuCFjAI.js";import{n as xe,t as Se}from"./semantic-info-CtuKpnD0.js";import{t as Ce}from"./chevron-down-Cjj85Wup.js";import{t as we}from"./search-C-9jHG2I.js";import{i as Te,n as Ee,r as De,t as Oe}from"./tabs-ClQDWUQ9.js";import{n as ke,t as Ae}from"./toggle-group-D1jg9t1c.js";import{t as B}from"./browser-icons-DSlRrt_0.js";import{a as je,i as Me,n as Ne,r as Pe,t as Fe}from"./separator-HijrNZyY.js";import{t as Ie}from"./search-params-CHojWQdJ.js";import{a as V}from"./insights-Dw_jeUg7.js";import{t as Le}from"./sliders-horizontal-CjNvoOS9.js";import{t as Re}from"./plus-ClAV9by2.js";import{a as ze,i as Be,n as Ve,r as He,t as Ue}from"./select-BpsmShuc.js";import{t as We}from"./esm-DQKxnO1B.js";import{t as Ge}from"./sparkles-85KrG7mR.js";var Ke={name:`arrow-down-up`,size:24,node:[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`m21 8-4-4-4 4`,key:`1c9v7m`}],[`path`,{d:`M17 4v16`,key:`7dpous`}]]};Ke.node;var qe=D(Ke),Je={name:`calendar`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]};Je.node;var Ye=D(Je),Xe={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};Xe.node;var Ze=D(Xe),Qe={name:`funnel`,size:24,node:[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]],aliases:[`filter`]};Qe.node;var $e=D(Qe),et={name:`hash`,size:24,node:[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]};et.node;var tt=D(et),nt={name:`image-off`,size:24,node:[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]};nt.node;var rt=D(nt),it={name:`search-x`,size:24,node:[[`path`,{d:`m13.5 8.5-5 5`,key:`1cs55j`}],[`path`,{d:`m8.5 8.5 5 5`,key:`a8mexj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]};it.node;var at=D(it),ot={name:`star`,size:24,node:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]};ot.node;var H=D(ot),U=n(r(),1),W=i();function G({label:e,value:t,title:n=typeof t==`string`?t:void 0}){return(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-[3px] rounded-[10px] bg-muted px-3 py-2.5`,children:[(0,W.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),(0,W.jsx)(`span`,{className:`truncate font-semibold tabular`,title:n,children:t})]})}function st({url:e}){let{t:n}=t(),r=a(),i=ae(e);if(i.isPending)return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`grid grid-cols-2 gap-2.5`,"aria-hidden":!0,children:Array.from({length:4},(e,t)=>(0,W.jsx)(R,{className:`h-[58px] rounded-[10px]`},t))}),(0,W.jsx)(R,{className:`h-16 w-full rounded-md`,"aria-hidden":!0})]});if(i.isError)return(0,W.jsxs)(`div`,{className:`flex flex-col items-start gap-2 rounded-[10px] bg-muted px-3 py-2.5`,children:[(0,W.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:n(`history.detail.loadFailed`)}),(0,W.jsx)(k,{variant:`outline`,size:`xs`,onClick:()=>void i.refetch(),children:n(`common.retry`)})]});let o=i.data,s=o.weeklyVisits,c=Math.max(1,...s.map(e=>e.visits));return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`grid grid-cols-2 gap-2.5`,children:[(0,W.jsx)(G,{label:n(`history.detail.statVisits`),value:r.number(o.totalVisits)}),(0,W.jsx)(G,{label:n(`history.detail.statFirst`),value:o.firstVisitAt?r.date(o.firstVisitAt):`—`}),(0,W.jsx)(G,{label:n(`history.detail.statLast`),value:o.lastVisitAt?r.dayAndTime(o.lastVisitAt):`—`}),(0,W.jsx)(G,{label:n(`history.detail.statBrowser`),value:(0,W.jsx)(ue,{names:o.browsers}),title:o.browsers.join(`, `)})]}),(o.alsoRecordedBy?.length??0)>0&&(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n(`history.detail.alsoRecordedBy`,{names:(o.alsoRecordedBy??[]).join(`, `)})}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,W.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n(`history.detail.weeks`)}),(0,W.jsx)(`div`,{className:`flex h-12 items-end gap-[3px]`,role:`img`,"aria-label":n(`history.detail.weeks`),children:s.map((e,t)=>(0,W.jsx)(`span`,{title:n(`history.detail.weekTip`,{date:r.monthDay(e.weekStart),visits:n(`common.visits`,{count:e.visits})}),className:j(`min-h-[2px] flex-1 rounded-t-[3px] bg-brand transition-[height] duration-300`,t{lt.get(r)===i&<.delete(r)};return i.then(a,a),i}function dt(e,t){return e.getQueryData([`annotations`,`url`,t])?.notes}function ft(e,t,n,r){e.setQueryData([`annotations`,`url`,t],e=>e?{...e,[n]:r[n],updatedAt:r.updatedAt}:r)}var pt=800,mt=2e3;function ht({url:e,profileId:n,initial:r}){let{t:i}=t(),a=ne(),[o,s]=(0,U.useState)(r),[c,l]=(0,U.useState)(r),[u,d]=(0,U.useState)(!1);r!==c&&(l(r),o===c&&!u&&s(r));let[f,p]=(0,U.useState)(`idle`),m=(0,U.useRef)(o),h=(0,U.useRef)(c);(0,U.useEffect)(()=>{m.current=o,h.current=c},[o,c]);let g=(0,U.useRef)(void 0),_=(0,U.useRef)(void 0),v=(0,U.useCallback)(()=>{ut(`notes`,e,async()=>{let t=m.current;if(t===(dt(a,e)??h.current))g.current===void 0&&d(!1);else{p(`saving`);try{let r=await N.setUrlNotes({url:e,notes:t,sourceProfile:n??null});h.current=r.notes,g.current===void 0&&m.current===h.current&&d(!1),await a.cancelQueries({queryKey:[`annotations`,`url`,e]}),ft(a,e,`notes`,r),a.invalidateQueries({queryKey:[`stars`,`list`]}),fe(a),p(`saved`),clearTimeout(_.current),_.current=setTimeout(()=>p(`idle`),mt)}catch{p(`error`)}}})},[a,n,e]);(0,U.useEffect)(()=>()=>{clearTimeout(_.current),g.current&&(clearTimeout(g.current),v())},[v]);let y=e=>{d(!0),s(e),clearTimeout(g.current),g.current=setTimeout(()=>{g.current=void 0,v()},pt)};return(0,W.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,W.jsx)(`label`,{htmlFor:`history-note`,className:`text-xs text-muted-foreground`,children:i(`history.detail.note`)}),(0,W.jsxs)(`span`,{"aria-live":`polite`,className:j(`flex items-center gap-1 text-xs text-muted-foreground transition-opacity duration-300`,f===`idle`?`opacity-0`:`opacity-100`,f===`error`&&`text-destructive`),children:[f===`saved`&&(0,W.jsx)(ve,{className:`size-3`,"aria-hidden":!0}),f===`saving`&&i(`history.detail.noteSaving`),f===`saved`&&i(`history.detail.noteSaved`),f===`error`&&i(`history.detail.noteFailed`)]})]}),(0,W.jsx)(ct,{id:`history-note`,value:o,onChange:e=>y(e.target.value),placeholder:i(`history.detail.notePlaceholder`),className:`min-h-[72px] resize-y bg-card`})]})}var gt=new TextEncoder;function _t(e,t){let n=[...e],r=new Set(e.map(e=>e.toLowerCase()));for(let e of t.split(`,`)){let t=e.trim();if(t){if(gt.encode(t).length>64)return{problem:`tooLong`};if(!r.has(t.toLowerCase())){if(n.length>=64)return{problem:`tooMany`};r.add(t.toLowerCase()),n.push(t)}}}return{tags:n}}function vt(e){return/[\s"\\]/.test(e)?`tag:"${e.replace(/["\\]/g,e=>`\\${e}`)}"`:`tag:${e}`}function yt({url:e,profileId:n,initial:r,onFilter:i}){let{t:a}=t(),o=ne(),[s,c]=(0,U.useState)(()=>[...r]),[l,u]=(0,U.useState)(``),[d,f]=(0,U.useState)(null),p=(0,U.useRef)([...r]),m=(0,U.useRef)(0),h=(0,U.useRef)(r.join(` +`)),g=(0,U.useRef)(null),_=(0,U.useRef)([]),v=(0,U.useCallback)(t=>{c(t),f(null),m.current+=1,ut(`tags`,e,async()=>{try{let r=await N.replaceUrlTags({url:e,tags:t,sourceProfile:n??null});p.current=r.tags,await o.cancelQueries({queryKey:[`annotations`,`url`,e]}),ft(o,e,`tags`,r),o.invalidateQueries({queryKey:[`stars`,`list`]}),fe(o)}catch{c(p.current),f(`saveFailed`)}finally{--m.current}})},[o,n,e]);(0,U.useEffect)(()=>{let e=r.join(` +`);e!==h.current&&(h.current=e,m.current>0||(p.current=[...r],c([...r])))},[r]);let y=()=>{let e=_t(s,l);`problem`in e?f(e.problem):(u(``),e.tags.length!==s.length&&v(e.tags))},b=e=>{v(s.filter((t,n)=>n!==e)),requestAnimationFrame(()=>{let t=_.current[Math.max(0,e-1)];e>0&&t?t.focus():g.current?.focus()})},x=e=>{e.key===`Enter`||e.key===`,`?(e.preventDefault(),y()):e.key===`Backspace`&&l===``&&s.length>0||e.key===`ArrowLeft`&&e.currentTarget.selectionStart===0&&s.length>0?(e.preventDefault(),_.current[s.length-1]?.focus()):e.key===`Escape`&&l&&u(``)},S=(e,t)=>{if(e.key===`Backspace`||e.key===`Delete`)e.preventDefault(),b(t);else if(e.key===`ArrowLeft`)e.preventDefault(),_.current[Math.max(0,t-1)]?.focus();else if(e.key===`ArrowRight`){e.preventDefault();let n=_.current[t+1];t+1{e.target===e.currentTarget&&g.current?.focus()},children:[s.map((e,t)=>(0,W.jsxs)(`span`,{className:`inline-flex h-6 max-w-full animate-rise items-center rounded-md bg-brand-soft text-[12px] text-foreground`,children:[(0,W.jsxs)(`button`,{ref:e=>{_.current[t]=e},type:`button`,title:a(`historyPage.tags.filter`,{tag:e}),"aria-label":a(`historyPage.tags.filter`,{tag:e}),onClick:()=>i(e),onKeyDown:e=>S(e,t),className:`flex h-full min-w-0 items-center gap-0.5 rounded-l-md pr-1 pl-1.5 outline-none hover:text-brand focus-visible:ring-2 focus-visible:ring-ring/60`,children:[(0,W.jsx)(tt,{className:`size-3 shrink-0 opacity-60`,"aria-hidden":!0}),(0,W.jsx)(`span`,{className:`truncate`,children:e})]}),(0,W.jsx)(`button`,{type:`button`,"aria-label":a(`historyPage.tags.remove`,{tag:e}),onClick:()=>b(t),className:`flex h-full items-center rounded-r-md pr-1 pl-0.5 text-muted-foreground outline-none hover:text-foreground`,children:(0,W.jsx)(I,{className:`size-3`})})]},e.toLowerCase())),(0,W.jsx)(`input`,{ref:g,id:`history-tag-input`,value:l,onChange:e=>{u(e.target.value),d&&d!==`saveFailed`&&f(null)},onKeyDown:x,onBlur:()=>l.trim()&&y(),placeholder:a(s.length>0?`historyPage.tags.placeholderMore`:`historyPage.tags.placeholder`),"aria-describedby":d?`history-tag-problem`:void 0,"aria-invalid":d?!0:void 0,className:`h-6 min-w-[96px] flex-1 bg-transparent text-[13px] outline-none placeholder:text-muted-foreground`})]}),C&&(0,W.jsx)(`p`,{id:`history-tag-problem`,role:`alert`,className:`text-xs text-destructive`,children:C})]})}function bt({url:e,profileId:n,onFilterTag:r}){let{t:i}=t(),a=de(e);return a.isPending?(0,W.jsxs)(`div`,{className:`flex flex-col gap-[18px]`,"aria-hidden":!0,children:[(0,W.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,W.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:i(`historyPage.tags.label`)}),(0,W.jsx)(R,{className:`h-9 w-full rounded-md`})]}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,W.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:i(`history.detail.note`)}),(0,W.jsx)(R,{className:`h-[72px] w-full rounded-md`})]})]}):a.isError?(0,W.jsxs)(`div`,{className:`flex flex-col items-start gap-1.5`,children:[(0,W.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[i(`historyPage.tags.label`),` · `,i(`history.detail.note`)]}),(0,W.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:i(`historyPage.tags.loadFailed`)}),(0,W.jsx)(k,{variant:`outline`,size:`xs`,onClick:()=>void a.refetch(),children:i(`common.retry`)})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(yt,{url:e,profileId:n,initial:a.data?.tags??[],onFilter:r}),(0,W.jsx)(ht,{url:e,profileId:n,initial:a.data?.notes??``})]})}var xt=8,St=60,Ct=120,wt=2e3,K=new Map,q=new Set,Tt=new Set,Et=new Set,Dt=new Set,J=new Map,Ot=new Set,kt=new Set,At,jt;function Mt(){for(let e of Ot)e()}function Nt(){if(!(K.size<=Ct))for(let e of K.keys()){if(K.size<=Ct)break;J.get(e)||K.delete(e)}}async function Pt(){At=void 0;let e=[...q].slice(0,xt);if(e.length!==0){for(let t of e)q.delete(t),Tt.add(t);try{let t=await ye.loadHistoryOgImages(e.map(e=>({url:e})));for(let e of t)K.set(e.url,{status:e.fetchStatus,dataUrl:e.ogImage?.dataUrl??null})}catch{}for(let t of e)Tt.delete(t),K.has(t)||K.set(t,{status:`unknown`,dataUrl:null});Nt(),Mt(),q.size>0&&Ft()}}function Ft(){At??=setTimeout(()=>void Pt(),St)}function It(e){K.has(e)||q.has(e)||Tt.has(e)||(q.add(e),Ft())}async function Lt(e,{retry:t=!1}={}){if(!(Et.has(e)||Dt.has(e)&&!t)){Dt.add(e),Et.add(e),Mt();try{await ye.triggerOgImageRefetch([e])}catch{}Et.delete(e),K.delete(e),It(e),Mt()}}function Rt(e){kt.add(e),jt??=setTimeout(()=>{jt=void 0;let e=[...kt];kt.clear(),ye.markOgImagesShown(e).catch(()=>void 0)},wt)}function zt(e){return Ot.add(e),()=>{Ot.delete(e)}}function Bt(e){return(0,U.useEffect)(()=>{if(e)return J.set(e,(J.get(e)??0)+1),It(e),()=>{let t=(J.get(e)??1)-1;t>0?J.set(e,t):J.delete(e)}},[e]),(0,U.useSyncExternalStore)(zt,()=>{if(e)return Et.has(e)?`fetching`:K.get(e)})}function Vt(e){return Dt.has(e)}function Ht(){let e=_e().config.ogImage;return(e?.fetchEnabled??!0)&&(e?.fetchMode??`background`)!==`off`}function Ut(e,t,n,r){return t===void 0?`loading`:t===`fetching`?`fetching`:t.status===`ok`&&t.dataUrl&&!r?`ok`:t.status===`missing`?`missing`:t.status===`blocked`?`blocked`:e.startsWith(`http://`)?`https`:t.status===`pending`?n?Vt(e)?`failed`:`loading`:`off`:`failed`}function Wt({url:e,src:t,alt:n,onBroken:r}){let[i,a]=(0,U.useState)(!1);return(0,W.jsx)(`img`,{src:t,alt:n,decoding:`async`,draggable:!1,onLoad:()=>{a(!0),Rt(e)},onError:r,className:j(`absolute inset-0 size-full object-cover transition-opacity duration-300 motion-reduce:transition-none`,i?`opacity-100`:`opacity-0`)})}function Gt({url:e,domain:n,title:r}){let{t:i}=t(),a=Ht(),o=Bt(e),[s,c]=(0,U.useState)(!1),l=Ut(e,o,a,s),u=o!==void 0&&o!==`fetching`&&o.status===`pending`;(0,U.useEffect)(()=>{u&&a&&!e.startsWith(`http://`)&&Lt(e)},[u,a,e]);let d=(()=>{switch(l){case`fetching`:return i(`historyPage.preview.fetching`,{domain:n});case`missing`:return i(`historyPage.preview.missing`);case`blocked`:return i(`historyPage.preview.blocked`);case`https`:return i(`historyPage.preview.httpsOnly`);case`failed`:return i(`historyPage.preview.failed`);case`off`:return i(`historyPage.preview.off`);default:return null}})();return(0,W.jsxs)(`figure`,{"aria-label":i(`historyPage.preview.label`),"aria-busy":l===`loading`||l===`fetching`,"data-preview-state":l,className:`relative aspect-[1.91/1] w-full shrink-0 overflow-hidden rounded-[10px] border bg-muted`,children:[l===`ok`&&o&&o!==`fetching`&&o.dataUrl?(0,W.jsx)(Wt,{url:e,src:o.dataUrl,alt:i(`historyPage.preview.alt`,{title:r}),onBroken:()=>c(!0)}):(0,W.jsxs)(`div`,{className:j(`absolute inset-0 flex flex-col items-center justify-center gap-2 px-4 pb-6`,(l===`loading`||l===`fetching`)&&`animate-pulse motion-reduce:animate-none`),children:[(0,W.jsx)(z,{domain:n,className:`size-8 rounded-[8px] text-sm`}),(0,W.jsx)(`span`,{className:`max-w-full truncate text-xs text-muted-foreground`,children:n})]}),d&&(0,W.jsxs)(`figcaption`,{className:`absolute inset-x-0 bottom-0 flex items-center gap-1.5 bg-gradient-to-t from-background/80 to-transparent px-3 pt-4 pb-2 text-[11px] text-muted-foreground`,children:[l!==`fetching`&&(0,W.jsx)(rt,{className:`size-3 shrink-0`,"aria-hidden":!0}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:d}),l===`failed`&&a&&(0,W.jsx)(k,{variant:`ghost`,size:`xs`,className:`-my-1 h-5 px-1.5 text-[11px]`,onClick:()=>{c(!1),Lt(e,{retry:!0})},children:i(`historyPage.preview.retry`)}),l===`off`&&(0,W.jsx)(E,{to:`/settings/general`,className:`shrink-0 rounded text-foreground underline-offset-2 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring/50`,children:i(`historyPage.preview.turnOn`)})]})]})}function Kt({url:e,domain:t,lookup:n,className:r}){let i=Bt(e),[a,o]=(0,U.useState)(!1),s=e&&i&&i!==`fetching`&&i.status===`ok`&&!a?i.dataUrl:null;return(0,W.jsxs)(`span`,{"aria-hidden":!0,"data-preview-state":s?`ok`:i===void 0?`loading`:`none`,className:j(`relative flex h-9 w-16 shrink-0 items-center justify-center overflow-hidden rounded-[7px] border bg-muted`,r),children:[(0,W.jsx)(z,{domain:t,lookup:n,className:`size-5 rounded-[5px] text-[10px]`}),e&&s&&(0,W.jsx)(Wt,{url:e,src:s,alt:``,onBroken:()=>o(!0)})]})}var qt={get:(t,n)=>e(`get_related_pages`,{url:t,visitId:n??null})};function Jt({target:e,onSelect:n}){let{t:r}=t(),i=a(),o=(0,U.useId)(),s=Se(),c=A({queryKey:[...re.archiveData,`related-pages`,e.url,e.visitId??null,s.provider,s.lastIndexedAt,s.available],queryFn:()=>qt.get(e.url,e.visitId),enabled:s.available,refetchOnWindowFocus:!1,refetchInterval:e=>e.state.data?.state===`updating`&&5e3}),l=c.data;return!s.available||l?.state===`unavailable`?null:(0,W.jsxs)(`section`,{"aria-labelledby":o,className:`flex flex-col gap-1.5`,children:[(0,W.jsx)(`h3`,{id:o,className:`text-xs text-muted-foreground`,children:r(`historyPage.related.label`)}),l?.staticModel&&(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r(`historyPage.related.staticNote`)}),c.isPending?(0,W.jsx)(`div`,{role:`status`,"aria-label":r(`historyPage.related.loading`),children:[0,1,2].map(e=>(0,W.jsxs)(`div`,{className:`flex items-center gap-2 py-1.5`,"aria-hidden":!0,children:[(0,W.jsx)(R,{className:`size-6 shrink-0 rounded-md`}),(0,W.jsxs)(`div`,{className:`flex flex-1 flex-col gap-1.5`,children:[(0,W.jsx)(R,{className:`h-3.5 w-5/6`}),(0,W.jsx)(R,{className:`h-3 w-1/2`})]})]},e))}):c.isError?(0,W.jsxs)(`div`,{className:`flex flex-col items-start gap-1`,children:[(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r(`historyPage.related.failed`)}),(0,W.jsx)(k,{variant:`outline`,size:`xs`,onClick:()=>void c.refetch(),children:r(`common.retry`)})]}):l?.state===`ready`&&l.items.length>0?(0,W.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:l.items.map(e=>(0,W.jsx)(`li`,{children:(0,W.jsxs)(`button`,{type:`button`,"data-related-url":e.url,"aria-label":r(`historyPage.related.show`,{title:e.title?.trim()||e.url}),onClick:()=>n({url:e.url,title:e.title,domain:e.domain,visitId:e.historyId,profileId:e.profileId}),className:`flex w-full items-center gap-2 rounded py-1.5 text-left outline-none transition-colors duration-150 hover:text-brand focus-visible:ring-2 focus-visible:ring-ring/50`,children:[(0,W.jsx)(z,{domain:e.domain,className:`size-6 shrink-0 rounded-md`}),(0,W.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,W.jsx)(`span`,{className:`truncate text-[13px]`,children:e.title?.trim()||e.url}),(0,W.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[e.domain,` ·`,` `,i.relative(e.lastVisitTime,void 0,`elapsed`)]})]})]})},e.historyId))}):(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:r(l?.state===`notIndexed`?`historyPage.related.notIndexed`:l?.state===`updating`?`historyPage.related.updating`:`historyPage.related.empty`)})]})}function Yt({label:e,onClick:t,pressed:n,children:r}){return(0,W.jsxs)(b,{children:[(0,W.jsx)(m,{asChild:!0,children:(0,W.jsx)(k,{variant:`outline`,size:`icon-sm`,"aria-label":e,"aria-pressed":n,onClick:t,className:`size-[34px] shrink-0`,children:r})}),(0,W.jsx)(x,{children:e})]})}var Xt=8;function Zt({target:e,starred:n,sessionMates:r,repeats:i,onClose:o,onToggleStar:s,onSelectMate:c,onSelectRelated:l,onFilterTag:u}){let{t:d}=t(),f=be(),p=a(),m=async()=>{try{await navigator.clipboard.writeText(e.url),L(d(`history.detail.copied`))}catch{L.error(d(`history.detail.copyFailed`))}};return(0,W.jsxs)(`aside`,{className:`flex h-full w-80 flex-col gap-[18px] overflow-y-auto p-6`,"aria-label":d(`history.detail.label`),children:[(0,W.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,W.jsx)(z,{domain:e.domain,className:`size-9 rounded-[9px] text-[15px]`}),(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,W.jsx)(`h2`,{className:`leading-snug font-semibold break-words`,children:e.title?.trim()||e.domain}),(0,W.jsx)(`span`,{className:`font-mono text-xs break-all text-muted-foreground`,children:e.url})]}),(0,W.jsx)(k,{variant:`ghost`,size:`icon-xs`,"aria-label":d(`history.detail.close`),onClick:o,className:`text-muted-foreground`,children:(0,W.jsx)(I,{})})]}),(0,W.jsxs)(`div`,{className:`flex gap-2`,children:[(0,W.jsxs)(k,{className:`h-[34px] flex-1`,onClick:()=>void f(e.url,d(`history.detail.openFailed`)),children:[(0,W.jsx)(P,{}),d(`history.detail.open`)]}),(0,W.jsx)(Yt,{label:d(n?`history.detail.unstar`:`history.detail.star`),pressed:n,onClick:s,children:(0,W.jsx)(H,{className:j(n?`fill-brand text-brand`:`text-brand`)})}),(0,W.jsx)(Yt,{label:d(`history.detail.copy`),onClick:()=>void m(),children:(0,W.jsx)(ge,{})})]}),(0,W.jsx)(Gt,{url:e.url,domain:e.domain,title:e.title?.trim()||e.domain},`preview:${e.url}`),(0,W.jsx)(st,{url:e.url},`stats:${e.url}`),i.length>1&&(0,W.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,W.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:d(`history.sameVisits`,{count:i.length})}),(0,W.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:i.map(t=>(0,W.jsx)(`button`,{type:`button`,"aria-current":t.id===e.visitId?`true`:void 0,onClick:()=>c(t),className:j(`rounded-md px-1.5 py-0.5 text-xs tabular-nums outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring/50`,t.id===e.visitId?`bg-brand-soft text-foreground`:`text-muted-foreground hover:bg-muted hover:text-foreground`),children:p.time(t.visitTime)},t.id))})]}),r.length>0&&(0,W.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,W.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:d(`history.detail.sameSession`)}),r.slice(0,Xt).map(e=>(0,W.jsxs)(`button`,{type:`button`,onClick:()=>c(e),className:`flex items-center gap-2 rounded py-1 text-left text-[13px] outline-none hover:text-brand focus-visible:ring-2 focus-visible:ring-ring/50`,children:[(0,W.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:p.time(e.visitTime)}),(0,W.jsx)(`span`,{className:`truncate`,children:e.title?.trim()||e.url})]},e.id)),r.length>Xt&&(0,W.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:d(`history.detail.sessionMore`,{count:r.length-Xt})})]}),(0,W.jsx)(Jt,{target:e,onSelect:l}),(0,W.jsx)(bt,{url:e.url,profileId:e.profileId,onFilterTag:u},`annotations:${e.url}`)]})}var Qt=new Set(`aftnrvxuUdDsSwWpPbBAz`),$t=/^[0-9a-fA-F]+$/,en=/^\{\s*\d+\s*(,\s*\d*\s*)?\}/,tn=/^P?<[A-Za-z_][A-Za-z0-9_.[\]]*>/,nn=/^([imsUuxR-]+\)|[imsUuxR-]*:)/,rn=/^\{(start|end|start-half|end-half)\}/,an=class extends Error{problem;constructor(e){super(e.kind),this.problem=e}};function on(e){try{return ln(e),null}catch(e){if(e instanceof an)return e.problem;throw e}}function Y(e){throw new an(e)}function sn(e,t,n=!1){let r=e[t+1];if(r===void 0&&Y({kind:`syntax`}),n&&/[bBAz<>]/.test(r)&&Y({kind:`escape`,escape:`\\${r}`}),/[0-9]/.test(r)&&Y({kind:`backreference`}),r===`k`&&e[t+2]===`<`&&Y({kind:`backreference`}),!/[A-Za-z]/.test(r))return t+1;Qt.has(r)||Y({kind:`escape`,escape:`\\${r}`});let i=t+2,a=t=>{let n=e.indexOf(`}`,i);n<0&&Y({kind:`syntax`});let r=e.slice(i+1,n);return(t?!$t.test(r):!r.trim())&&Y({kind:`syntax`}),n},o=t=>{let n=e.slice(i,i+t);return(n.length0&&Y({kind:`syntax`})}var un={full:[`relevance`,`newest`,`oldest`,`visits`],regex:[`newest`,`oldest`,`visits`],semantic:[`relevance`]},dn=[`relevance`,`newest`,`oldest`,`visits`];function fn(e){return un[e]}var pn=[`timeline`,`sites`,`starred`],mn=[`full`,`regex`,`semantic`];function hn(e){let t=e.get(`view`),n=e.get(`mode`),r=e.get(`sort`),i=Number(e.get(`visit`));return{q:e.get(`q`)??``,mode:mn.includes(n)?n:`full`,sort:dn.includes(r)?r:null,view:pn.includes(t)?t:`timeline`,date:e.get(`date`)||null,browser:e.get(`browser`)||null,domain:e.get(`domain`)||null,visit:Number.isInteger(i)&&i>0?i:null}}var gn={q:``,mode:`full`,sort:null,view:`timeline`,date:null,browser:null,domain:null,visit:null};function _n(){let[e,t]=Ie();return{params:(0,U.useMemo)(()=>hn(e),[e]),update:(0,U.useCallback)(e=>{t(t=>{for(let[n,r]of Object.entries(e))r===gn[n]||r===``?t.delete(n):t.set(n,String(r));return t})},[t])}}var vn=/^\d{4}-\d{2}-\d{2}$/;function yn(e){if(!e)return{kind:`all`};if(e===`today`||e===`yesterday`||e===`7d`||e===`30d`)return{kind:`preset`,preset:e};let[t,n=t]=e.split(`..`);return vn.test(t)&&vn.test(n)?t<=n?{kind:`range`,start:t,end:n}:{kind:`range`,start:n,end:t}:{kind:`all`}}function bn(e,t){let n=V(e),r=V(t);return n===r?n:`${n}..${r}`}function xn(e,t=new Date){let n=e=>{let n=new Date(t);return n.setDate(n.getDate()-e),V(n)};if(e.kind===`all`)return null;if(e.kind===`range`)return{start:e.start,end:e.end};switch(e.preset){case`today`:return{start:n(0),end:n(0)};case`yesterday`:return{start:n(1),end:n(1)};case`7d`:return{start:n(6),end:n(0)};case`30d`:return{start:n(29),end:n(0)}}}function X(e){let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r)}function Sn(e){if(!e)return{startTimeMs:null,endTimeMs:null};let t=X(e.end);return t.setDate(t.getDate()+1),{startTimeMs:X(e.start).getTime(),endTimeMs:t.getTime()-1}}function Cn(e,t,n,r=null){let i=e.trim(),a=/^\/(.+)\/$/s.exec(i),o=a?`regex`:t===`semantic`&&!n?`full`:t,s=a?a[1]:i,c=fn(o);return{text:i,mode:o,sort:r!==null&&c.includes(r)?r:c[0],pattern:s,regexError:i&&o===`regex`?on(s):null}}var wn=[{value:null,label:`history.date.all`},{value:`today`,label:`history.date.today`},{value:`yesterday`,label:`history.date.yesterday`},{value:`7d`,label:`history.date.last7`},{value:`30d`,label:`history.date.last30`}],Tn={en:je,"zh-CN":Me,"zh-TW":Pe};function En(){let{t:e}=t(),n=a();return t=>{if(t.kind===`all`)return e(`history.date.all`);if(t.kind===`preset`)return e({today:`history.date.today`,yesterday:`history.date.yesterday`,"7d":`history.date.last7`,"30d":`history.date.last30`}[t.preset]);let r=n.date(X(t.start),{month:`short`,day:`numeric`});return t.start===t.end?r:`${r} – ${n.date(X(t.end),{month:`short`,day:`numeric`})}`}}function Dn({value:e,onChange:n}){let{t:r,language:i}=t(),a=En(),o=yn(e),[s,c]=(0,U.useState)(!1),[d,f]=(0,U.useState)(!1),[p,m]=(0,U.useState)(),h=e=>{n(e),c(!1)};return(0,W.jsxs)(l,{open:s,onOpenChange:e=>{c(e),e&&f(!1)},children:[(0,W.jsx)(u,{asChild:!0,children:(0,W.jsxs)(k,{variant:`outline`,size:`sm`,"aria-label":`${r(`history.date.label`)}: ${a(o)}`,className:j(`h-[30px] bg-card px-2.5 font-normal`,o.kind!==`all`&&`border-foreground`),children:[(0,W.jsx)(Ye,{className:`size-3.5`}),a(o),(0,W.jsx)(Ce,{className:`size-3.5 text-muted-foreground`})]})}),(0,W.jsx)(T,{align:`start`,className:j(`p-1`,d?`w-auto`:`w-[200px]`),children:d?(0,W.jsxs)(`div`,{className:`flex flex-col`,children:[(0,W.jsx)(Ne,{mode:`range`,selected:p,onSelect:m,locale:Tn[i],disabled:{after:new Date},defaultMonth:p?.from}),(0,W.jsx)(Fe,{}),(0,W.jsxs)(`div`,{className:`flex items-center justify-between gap-2 p-2`,children:[(0,W.jsx)(k,{variant:`ghost`,size:`sm`,onClick:()=>f(!1),children:r(`history.date.back`)}),(0,W.jsx)(k,{size:`sm`,disabled:!p?.from,onClick:()=>p?.from&&h(bn(p.from,p.to??p.from)),children:r(`history.date.apply`)})]})]}):(0,W.jsxs)(`div`,{role:`menu`,className:`flex flex-col`,children:[wn.map(e=>{let t=o.kind===`all`&&e.value===null||o.kind===`preset`&&o.preset===e.value;return(0,W.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":t,onClick:()=>h(e.value),className:`flex h-8 items-center gap-2 rounded-md px-2 text-left text-[13px] outline-none hover:bg-muted focus-visible:bg-muted`,children:[(0,W.jsx)(ve,{className:j(`size-3.5`,!t&&`opacity-0`)}),r(e.label)]},e.label)}),(0,W.jsx)(Fe,{className:`my-1`}),(0,W.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{m(o.kind===`range`?{from:X(o.start),to:X(o.end)}:void 0),f(!0)},className:`flex h-8 items-center gap-2 rounded-md px-2 text-left text-[13px] outline-none hover:bg-muted focus-visible:bg-muted`,children:[(0,W.jsx)(ve,{className:j(`size-3.5`,o.kind!==`range`&&`opacity-0`)}),r(`history.date.custom`)]})]})})]})}var On=1;function kn(e){return e.map(e=>({...e,id:On++}))}var An={pieces:[{kind:`text`,value:``}],atStart:!1,atEnd:!1,matchCase:!1};function jn(e){return e===`text`||e===`oneOf`}function Mn(e){return e.replace(/[\\.+*?()|[\]{}^$#&\-~]/g,e=>`\\${e}`)}function Nn(e){return e.split(`,`).map(e=>e.trim()).filter(Boolean)}function Pn(e){switch(e.kind){case`text`:return Mn(e.value);case`oneOf`:{let t=Nn(e.value).map(Mn);return t.length>1?`(?:${t.join(`|`)})`:t[0]??``}case`number`:return`\\d+`;case`word`:return`\\w+`;case`segment`:return`[^/]+`;case`any`:return`.*`}}function Fn(e){let t=e.pieces.map(Pn).join(``);return t?[e.matchCase?`(?-i)`:``,e.atStart?`^`:``,t,e.atEnd?`$`:``].join(``):``}var In={githubThreads:[{kind:`text`,value:`github.com/`},{kind:`segment`,value:``},{kind:`text`,value:`/`},{kind:`segment`,value:``},{kind:`text`,value:`/`},{kind:`oneOf`,value:`pull, issues`},{kind:`text`,value:`/`},{kind:`number`,value:``}],hackerNews:[{kind:`text`,value:`news.ycombinator.com/item?id=`},{kind:`number`,value:``}],youtube:[{kind:`oneOf`,value:`youtube.com/watch?v=, youtu.be/`}],stackOverflow:[{kind:`text`,value:`stackoverflow.com/questions/`},{kind:`number`,value:``}]},Ln=[`text`,`oneOf`,`number`,`word`,`segment`,`any`];function Rn({piece:e,index:n,onChange:r,onRemove:i}){let{t:a}=t(),o=a(`historySearch.builder.pattern.piece`,{n:n+1});return(0,W.jsxs)(`li`,{className:`flex items-center gap-1.5`,children:[(0,W.jsx)(`span`,{"aria-hidden":!0,className:`w-4 shrink-0 text-right font-mono text-[11px] text-muted-foreground`,children:n+1}),(0,W.jsxs)(Ue,{value:e.kind,onValueChange:t=>r({...e,kind:t}),children:[(0,W.jsx)(Be,{size:`sm`,"aria-label":o,className:`w-[190px] shrink-0 text-[13px]`,children:(0,W.jsx)(ze,{})}),(0,W.jsx)(Ve,{children:Ln.map(e=>(0,W.jsx)(He,{value:e,className:`text-[13px]`,children:a(`historySearch.builder.pattern.kind.${e}`)},e))})]}),jn(e.kind)?(0,W.jsx)(C,{value:e.value,onChange:t=>r({...e,value:t.target.value}),"aria-label":`${o}: ${a(`historySearch.builder.pattern.kind.${e.kind}`)}`,placeholder:a(e.kind===`oneOf`?`historySearch.builder.pattern.oneOfPlaceholder`:`historySearch.builder.pattern.textPlaceholder`),autoComplete:`off`,spellCheck:!1,className:`h-8 min-w-0 flex-1 font-mono text-[12px]`}):(0,W.jsx)(`span`,{className:`flex-1`}),(0,W.jsx)(k,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":a(`historySearch.builder.pattern.remove`,{n:n+1}),onClick:i,className:`size-7 shrink-0 text-muted-foreground`,children:(0,W.jsx)(I,{className:`size-3.5`})})]})}function zn({checked:e,onChange:t,label:n}){let r=(0,U.useId)();return(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(v,{id:r,checked:e,onCheckedChange:e=>t(e===!0)}),(0,W.jsx)(g,{htmlFor:r,className:`text-[13px] font-normal`,children:n})]})}function Bn({form:e,onChange:n}){let{t:r}=t(),i=t=>n({...e,pieces:t}),a=e.pieces.some(e=>e.kind===`oneOf`);return(0,W.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r(`historySearch.builder.pattern.intro`)}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,W.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:r(`historySearch.builder.pattern.examples`)}),(0,W.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:Object.keys(In).map(e=>(0,W.jsx)(k,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>n({pieces:kn(In[e]),atStart:!1,atEnd:!1,matchCase:!1}),className:`h-7 px-2.5 text-xs font-normal`,children:r(`historySearch.builder.pattern.example.${e}`)},e))})]}),(0,W.jsx)(`ol`,{className:`flex flex-col gap-1.5`,children:e.pieces.map((t,n)=>(0,W.jsx)(Rn,{piece:t,index:n,onChange:t=>i(e.pieces.map(e=>e.id===t.id?t:e)),onRemove:()=>i(e.pieces.filter(e=>e.id!==t.id))},t.id))}),a&&(0,W.jsx)(`p`,{className:`-mt-1.5 pl-[22px] text-[11px] text-muted-foreground`,children:r(`historySearch.builder.pattern.oneOfHint`)}),(0,W.jsxs)(h,{children:[(0,W.jsx)(f,{asChild:!0,children:(0,W.jsxs)(k,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 w-fit gap-1.5 px-2 text-xs`,children:[(0,W.jsx)(Re,{className:`size-3.5`,"aria-hidden":!0}),r(`historySearch.builder.pattern.add`)]})}),(0,W.jsx)(c,{align:`start`,children:Ln.map(t=>(0,W.jsx)(p,{onSelect:()=>i([...e.pieces,...kn([{kind:t,value:``}])]),className:`text-[13px]`,children:r(`historySearch.builder.pattern.kind.${t}`)},t))})]}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-2 border-t pt-3`,children:[(0,W.jsx)(zn,{checked:e.atStart,onChange:t=>n({...e,atStart:t}),label:r(`historySearch.builder.pattern.atStart`)}),(0,W.jsx)(zn,{checked:e.atEnd,onChange:t=>n({...e,atEnd:t}),label:r(`historySearch.builder.pattern.atEnd`)}),(0,W.jsx)(zn,{checked:e.matchCase,onChange:t=>n({...e,matchCase:t}),label:r(`historySearch.builder.pattern.matchCase`)}),(0,W.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:r(`historySearch.builder.pattern.matches`)})]})]})}function Vn({problem:e}){let{t:n}=t();return(0,W.jsxs)(`span`,{className:`flex items-start gap-1.5 text-destructive`,children:[(0,W.jsx)(d,{className:`mt-px size-3.5 shrink-0`,"aria-hidden":!0}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`span`,{className:`font-medium`,children:n(`history.modes.invalidRegex`)}),` · `,e.kind===`escape`?n(`historySearch.regex.escape`,{escape:e.escape}):n(`historySearch.regex.${e.kind}`)]})]})}function Hn({search:e,list:n}){let{t:r}=t();if(e.regexError)return(0,W.jsx)(Vn,{problem:e.regexError});if(n.isPlaceholder)return null;let i=n.search;if(!i)return n.isPending?(0,W.jsx)(W.Fragment,{children:r(`history.results.searching`)}):null;let a=r(`history.modes.${e.mode}`),o=i.pages.exact?i.visits?.exact?r(`history.results.pagesAndVisits`,{pages:r(`common.pages`,{count:i.pages.value}),visits:r(`common.visits`,{count:i.visits.value}),mode:a}):r(`history.results.pages`,{pages:r(`common.pages`,{count:i.pages.value}),mode:a}):r(`history.results.pagesMore`,{count:i.pages.value,mode:a});return(0,W.jsxs)(W.Fragment,{children:[o,i.sorting&&` · ${r(`history.results.sorting`)}`]})}var Un=`github.com`,Wn=[`all`,`phrase`,`any`,`none`],Gn=[`site`,`title`,`url`,`fileType`,`tags`,`note`];function Kn({name:e,form:n,onChange:r}){let{t:i}=t(),a=`${(0,U.useId)()}-${e}`,o=e===`tags`?i(`historySearch.builder.words.tagsHint`):null;return(0,W.jsxs)(`div`,{className:`grid grid-cols-[170px_1fr] items-center gap-x-3 gap-y-1`,children:[(0,W.jsx)(g,{htmlFor:a,className:`text-[13px] font-normal`,children:i(`historySearch.builder.words.${e}`)}),(0,W.jsx)(C,{id:a,value:n[e],onChange:t=>r({...n,[e]:t.target.value}),placeholder:e===`site`?Un:i(`historySearch.builder.words.examples.${e}`),"aria-describedby":o?`${a}-hint`:void 0,autoComplete:`off`,spellCheck:!1,className:`h-8 text-[13px]`}),o&&(0,W.jsx)(`p`,{id:`${a}-hint`,className:`col-start-2 text-[11px] text-muted-foreground`,children:o})]})}function qn({form:e,onChange:n}){let{t:r}=t(),i=(0,U.useId)();return(0,W.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r(`historySearch.builder.words.intro`)}),Wn.map(t=>(0,W.jsx)(Kn,{name:t,form:e,onChange:n},t)),(0,W.jsx)(`h3`,{className:`pt-2 text-xs font-medium text-muted-foreground`,children:r(`historySearch.builder.words.narrow`)}),Gn.map(t=>(0,W.jsx)(Kn,{name:t,form:e,onChange:n},t)),(0,W.jsxs)(`div`,{className:`flex items-center gap-2 pt-1`,children:[(0,W.jsx)(v,{id:i,checked:e.starred,onCheckedChange:t=>n({...e,starred:t===!0})}),(0,W.jsx)(g,{htmlFor:i,className:`text-[13px] font-normal`,children:r(`historySearch.builder.words.starred`)})]})]})}var Jn={all:``,phrase:``,any:``,none:``,site:``,title:``,url:``,fileType:``,tags:``,note:``,starred:!1},Yn=new Set([`"`,`“`,`”`]),Xn=/^\p{White_Space}$/u,Zn=e=>e.replace(/^\p{White_Space}+|\p{White_Space}+$/gu,``);function Qn(e){let t=[],n=``,r=!1,i=null,a=()=>{let e=Zn(n),r=i===0||i===1&&e.startsWith(`-`);e&&t.push({value:e,quoted:r}),n=``,i=null},o=[...e];for(let e=0;e`\\${e}`)}"`}function $n(e){return/[\p{White_Space}"“”\\]/u.test(e)?Z(e):e}function er(e){return e.quoted||/^(?:OR$|[a-z]+:)/i.test(e.value)?Z(e.value):$n(e.value)}function Q(e,t){return`${e}:${$n(t)}`}function tr(e){let t=e.phrase.trim(),n=e=>Qn(e).map(e=>({...e,value:e.value.replace(/^-+/,``)})).filter(e=>e.value!==``),r=[...n(e.all).map(er),n(e.any).map(er).join(` OR `),t&&Z(t),...n(e.none).map(e=>`-${er(e)}`),e.site.trim()&&Q(`site`,e.site.trim()),...Qn(e.title).map(e=>Q(`intitle`,e.value)),...Qn(e.url).map(e=>Q(`inurl`,e.value)),e.fileType.trim()&&Q(`filetype`,e.fileType.trim().replace(/^\.+/,``)),...e.tags.split(`,`).map(e=>e.trim()).filter(Boolean).map(vt),e.note.trim()&&Q(`note`,e.note.trim()),e.starred&&`is:starred`].filter(Boolean).join(` `);if(!/^\/.+\/$/s.test(r))return r;let[i,...a]=r.split(` `);return[Z(i),...a].join(` `)}function nr(e){return Zn(e)!==``&&!/["“”:\\]|(^|\p{White_Space})-|(^|\p{White_Space})OR(\p{White_Space}|$)/iu.test(e)&&!/^\/.*\/$/s.test(Zn(e))}var rr=()=>({...An,pieces:kn(An.pieces)}),ir=e=>Object.values(e).every(e=>e===``||e===!1);function ar(e){return/^\s|\s$|^\/.+\/$/s.test(e)?`/${e}/`:e}function or({query:e,mode:n,onApply:r}){let{t:i}=t(),[a,o]=(0,U.useState)(!1),[s,c]=(0,U.useState)(`words`),[d,f]=(0,U.useState)(Jn),[p,m]=(0,U.useState)(rr),h=s===`words`?tr(d):Fn(p),g=s===`pattern`&&h?on(h):null,_=t=>{t&&(ir(d)&&nr(e)&&f({...Jn,all:e.trim()}),n===`regex`&&c(`pattern`)),o(t)},v=()=>{h&&!g&&(s===`words`?r(h,`full`):r(ar(h),`regex`),o(!1))};return(0,W.jsxs)(l,{open:a,onOpenChange:_,children:[(0,W.jsx)(u,{asChild:!0,children:(0,W.jsx)(`button`,{type:`button`,"aria-label":i(`historySearch.builder.button`),className:`flex size-[22px] items-center justify-center rounded-full text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/50 data-[state=open]:text-foreground`,children:(0,W.jsx)(Le,{className:`size-4`})})}),(0,W.jsx)(T,{align:`end`,sideOffset:10,"aria-label":i(`historySearch.builder.title`),className:`w-[480px] p-0`,children:(0,W.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),v()},children:[(0,W.jsxs)(Oe,{value:s,onValueChange:e=>c(e),children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b px-4 pt-3 pb-2.5`,children:[(0,W.jsx)(`h2`,{className:`text-sm font-semibold`,children:i(`historySearch.builder.title`)}),(0,W.jsx)(De,{className:`h-8`,children:[`words`,`pattern`].map(e=>(0,W.jsx)(Te,{value:e,className:`h-6.5 px-2.5 text-xs`,children:i(`historySearch.builder.tabs.${e}`)},e))})]}),(0,W.jsxs)(`div`,{className:`max-h-[min(460px,calc(100vh-280px))] overflow-y-auto px-4 py-3`,children:[(0,W.jsx)(Ee,{value:`words`,children:(0,W.jsx)(qn,{form:d,onChange:f})}),(0,W.jsx)(Ee,{value:`pattern`,children:(0,W.jsx)(Bn,{form:p,onChange:m})})]})]}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-2 border-t px-4 py-3`,children:[(0,W.jsxs)(`span`,{className:`text-[11px] text-muted-foreground`,children:[i(`historySearch.builder.preview`),` ·`,` `,i(`history.modes.${s===`words`?`full`:`regex`}`)]}),(0,W.jsx)(`output`,{"aria-label":i(`historySearch.builder.preview`),className:`block min-h-[30px] rounded-md bg-muted px-2.5 py-1.5 font-mono text-[12px] break-all`,children:h||(0,W.jsx)(`span`,{className:`font-sans text-muted-foreground`,children:i(`historySearch.builder.previewEmpty`)})}),g&&(0,W.jsx)(`p`,{className:`text-xs`,children:(0,W.jsx)(Vn,{problem:g})}),(0,W.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,W.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:i(`historySearch.builder.replaces`)}),(0,W.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,W.jsx)(k,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>s===`words`?f(Jn):m(rr()),children:i(`historySearch.builder.clear`)}),(0,W.jsx)(k,{type:`submit`,size:`sm`,disabled:!h||g!==null,children:i(`historySearch.builder.search`)})]})]})]})]})})]})}var sr=350,cr=200;function lr(e=new Date){let t=new Date(e.getFullYear(),e.getMonth()-1,1),n=new Date(e.getFullYear(),e.getMonth(),0);return`after:${V(t)} before:${V(n)}`}var ur=[{query:`site:docs.rs tokio`,help:`historySearch.help.site`},{query:`tokio -smol`,help:`historySearch.help.exclude`},{query:`"half marathon"`,help:`historySearch.help.phrase`},{query:`tokio OR tauri`,help:`historySearch.help.or`},{query:`intitle:runtime`,help:`historySearch.help.intitle`},{query:`inurl:issues`,help:`historySearch.help.inurl`},{query:`filetype:html`,help:`historySearch.help.filetype`},{query:lr,help:`historySearch.help.dates`},{query:`tag:reading`,help:`historySearch.help.tag`},{query:`note:rewrite`,help:`historySearch.help.note`},{query:`/item\\?id=\\d+/`,help:`historySearch.help.regex`}];function dr({onPick:e}){let{t:n}=t(),[r,i]=(0,U.useState)(!1),a=(0,U.useRef)(!1),o=(0,U.useRef)(void 0);(0,U.useEffect)(()=>()=>clearTimeout(o.current),[]);let s=()=>{clearTimeout(o.current),r||(o.current=setTimeout(()=>i(!0),sr))},c=()=>{clearTimeout(o.current),a.current||(o.current=setTimeout(()=>i(!1),cr))};return(0,W.jsxs)(l,{open:r,onOpenChange:e=>{clearTimeout(o.current),a.current=e,i(e)},children:[(0,W.jsx)(u,{asChild:!0,children:(0,W.jsx)(`button`,{type:`button`,"aria-label":n(`historySearch.help.button`),onPointerEnter:s,onPointerLeave:c,className:`flex size-[22px] items-center justify-center rounded-full text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/50 data-[state=open]:text-foreground`,children:(0,W.jsx)(Ze,{className:`size-4`})})}),(0,W.jsxs)(T,{align:`end`,sideOffset:10,onPointerEnter:()=>clearTimeout(o.current),onPointerLeave:c,onOpenAutoFocus:e=>{a.current||e.preventDefault()},className:`w-[380px] p-0`,children:[(0,W.jsxs)(`div`,{className:`flex flex-col gap-0.5 border-b px-4 pt-3.5 pb-3`,children:[(0,W.jsx)(`h2`,{className:`text-sm font-semibold`,children:n(`historySearch.help.title`)}),(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n(`historySearch.help.intro`)})]}),(0,W.jsx)(`ul`,{className:`flex max-h-[min(420px,60vh)] flex-col overflow-y-auto p-1.5`,children:ur.map(({query:t,help:r})=>{let o=typeof t==`function`?t():t;return(0,W.jsx)(`li`,{children:(0,W.jsxs)(`button`,{type:`button`,onClick:()=>{a.current=!1,i(!1),e(o)},className:`flex w-full flex-col gap-0.5 rounded-md px-2.5 py-1.5 text-left outline-none hover:bg-muted focus-visible:bg-muted focus-visible:ring-2 focus-visible:ring-ring/50`,children:[(0,W.jsx)(`code`,{className:`font-mono text-[12px] text-foreground`,children:o}),(0,W.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n(r)})]})},r)})}),(0,W.jsx)(`p`,{className:`border-t px-4 py-2.5 text-[11px] leading-relaxed text-muted-foreground`,children:n(`historySearch.help.footer`)})]})]})}function fr({mode:e,sort:n,onSort:r}){let{t:i}=t(),a=fn(e),o=i(`historySearch.sort.${n}`),l=e===`regex`?i(`historySearch.sort.regexNote`):e===`semantic`?i(`historySearch.sort.semanticNote`):null;return(0,W.jsxs)(h,{children:[(0,W.jsx)(f,{asChild:!0,children:(0,W.jsxs)(k,{variant:`ghost`,size:`sm`,"aria-label":i(`historySearch.sort.label`,{order:o}),className:`h-7 animate-rise gap-1.5 px-2 text-xs font-medium text-muted-foreground`,children:[(0,W.jsx)(qe,{className:`size-3.5`,"aria-hidden":!0}),o,(0,W.jsx)(Ce,{className:`size-3.5`,"aria-hidden":!0})]})}),(0,W.jsxs)(c,{align:`end`,className:`w-[240px]`,children:[(0,W.jsx)(s,{value:n,onValueChange:e=>r(e),children:dn.map(e=>(0,W.jsx)(w,{value:e,disabled:!a.includes(e),className:`items-start [&>span:first-child]:top-[9px]`,children:(0,W.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[(0,W.jsx)(`span`,{children:i(`historySearch.sort.${e}`)}),(0,W.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:i(`historySearch.sort.about.${e}`)})]})},e))}),l&&(0,W.jsx)(`p`,{className:`border-t px-2 pt-2 pb-1 text-xs leading-relaxed text-muted-foreground`,children:l})]})]})}var pr=typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform)?`⌘K`:`Ctrl K`;function mr({value:e,options:n,onChange:r}){let{t:i}=t(),a=n.find(t=>t.kind===e),o=a?.name??i(`history.browser.all`);return(0,W.jsxs)(h,{children:[(0,W.jsx)(f,{asChild:!0,children:(0,W.jsxs)(k,{variant:`outline`,size:`sm`,"aria-label":`${i(`history.browser.label`)}: ${o}`,className:j(`h-[30px] bg-card px-2.5 font-normal`,e&&`border-foreground`),children:[a?(0,W.jsx)(B,{browserName:a.name,className:`size-3.5`,decorative:!0}):(0,W.jsx)(ee,{className:`size-3.5`}),o,(0,W.jsx)(Ce,{className:`size-3.5 text-muted-foreground`})]})}),(0,W.jsx)(c,{align:`start`,className:`min-w-[200px]`,children:(0,W.jsxs)(s,{value:e??`all`,onValueChange:e=>r(e===`all`?null:e),children:[(0,W.jsx)(w,{value:`all`,children:i(`history.browser.all`)}),n.map(e=>(0,W.jsxs)(w,{value:e.kind,children:[(0,W.jsx)(B,{browserName:e.name,className:`size-4`,decorative:!0}),e.name]},e.kind))]})})]})}function hr({mode:e,onMode:n,semanticAvailable:r,semanticOffReason:i}){let{t:a}=t(),o=`h-7 rounded-full border px-2.5 text-xs font-medium text-muted-foreground data-[state=on]:border-primary data-[state=on]:bg-primary data-[state=on]:text-primary-foreground`;return(0,W.jsxs)(Ae,{type:`single`,value:e,onValueChange:e=>e&&n(e),spacing:1,"aria-label":a(`history.modes.label`),className:`animate-rise`,children:[(0,W.jsx)(ke,{value:`full`,className:o,children:a(`history.modes.full`)}),(0,W.jsx)(ke,{value:`regex`,className:o,children:a(`history.modes.regex`)}),(0,W.jsxs)(b,{children:[(0,W.jsx)(m,{asChild:!0,children:(0,W.jsx)(`span`,{tabIndex:r?-1:0,children:(0,W.jsx)(ke,{value:`semantic`,disabled:!r,className:o,children:a(`history.modes.semantic`)})})}),!r&&(0,W.jsxs)(x,{className:`max-w-[260px]`,children:[i,` `,a(`historySearch.semantic.whereToFix`)]})]})]})}function gr(e){let{t:n}=t(),r=a(),{draft:i,onDraft:o,view:s,onView:c,starredCount:l}=e;return(0,W.jsxs)(`div`,{...S(),className:`flex flex-col gap-3 border-b px-7 pt-5 pb-3.5`,children:[(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,W.jsxs)(`div`,{className:`relative flex min-w-[260px] flex-1 items-center`,children:[(0,W.jsx)(we,{className:`pointer-events-none absolute left-3 size-4 text-muted-foreground`}),(0,W.jsx)(C,{type:`search`,value:i,onChange:e=>o(e.target.value),placeholder:n(`history.search.placeholder`),"aria-label":n(`history.search.label`),"aria-invalid":e.invalidRegex||void 0,className:`h-10 rounded-[10px] bg-card pr-[168px] pl-[38px] shadow-card [&::-webkit-search-cancel-button]:hidden`}),(0,W.jsxs)(`div`,{className:`absolute right-2.5 flex items-center gap-1.5`,children:[i&&(0,W.jsx)(`button`,{type:`button`,"aria-label":n(`history.search.clear`),onClick:()=>o(``),className:`flex size-[22px] items-center justify-center rounded-full bg-muted text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/50`,children:(0,W.jsx)(I,{className:`size-3`})}),(0,W.jsx)(or,{query:i,mode:e.mode,onApply:e.onBuild}),(0,W.jsx)(dr,{onPick:e.onExample}),(0,W.jsx)(`kbd`,{className:`pointer-events-none rounded-[5px] border px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground`,children:pr})]})]}),(0,W.jsx)(Oe,{value:s,onValueChange:e=>c(e),children:(0,W.jsx)(De,{"aria-label":n(`history.views.label`),className:`h-[38px] rounded-[9px] gap-0.5`,children:[`timeline`,`sites`,`starred`].map(e=>(0,W.jsxs)(Te,{value:e,className:`h-8 rounded-[7px] px-3 text-[13px]`,children:[n(`history.views.${e}`),e===`starred`&&l!==null&&l>0&&(0,W.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:r.number(l)})]},e))})})]}),(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,W.jsx)(Dn,{value:e.date,onChange:e.onDate}),(0,W.jsx)(mr,{value:e.browser,options:e.browsers,onChange:e.onBrowser}),e.domain&&(0,W.jsxs)(`span`,{className:`flex h-[30px] animate-rise items-center gap-1.5 rounded-lg bg-primary pr-1.5 pl-2.5 text-[13px] text-primary-foreground`,children:[e.domain,(0,W.jsx)(`button`,{type:`button`,"aria-label":n(`history.filters.removeSite`,{domain:e.domain}),onClick:e.onClearDomain,className:`flex size-5 items-center justify-center rounded outline-none hover:bg-primary-foreground/15 focus-visible:ring-2 focus-visible:ring-ring/50`,children:(0,W.jsx)(I,{className:`size-3.5`})})]}),e.hasFilters&&(0,W.jsx)(k,{variant:`ghost`,size:`sm`,className:`h-[30px] px-2 font-normal text-muted-foreground`,onClick:e.onClearFilters,children:n(`history.filters.clear`)}),e.searching&&(0,W.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,W.jsx)(fr,{mode:e.mode,sort:e.sort,onSort:e.onSort}),(0,W.jsx)(hr,{mode:e.mode,onMode:e.onMode,semanticAvailable:e.semanticAvailable,semanticOffReason:e.semanticOffReason})]})]})]})}function _r({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`empty`,className:j(`flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12`,e),...t})}function vr({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`empty-header`,className:j(`flex max-w-sm flex-col items-center gap-2 text-center`,e),...t})}var yr=O(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6`}},defaultVariants:{variant:`default`}});function br({className:e,variant:t=`default`,...n}){return(0,W.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":t,className:j(yr({variant:t,className:e})),...n})}function xr({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`empty-title`,className:j(`text-lg font-medium tracking-tight`,e),...t})}function Sr({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`empty-description`,className:j(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function Cr({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`empty-content`,className:j(`flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance`,e),...t})}function wr({row:e}){let{t:n}=t(),r=a(),i=(0,U.useMemo)(()=>{let t=new Date(e.dayStart),i=Math.round((o(new Date).getTime()-e.dayStart)/864e5),a=r.date(t,{month:`long`,day:`numeric`});return i===0?n(`history.day.today`,{date:a}):i===1?n(`history.day.yesterday`,{date:a}):r.date(t,{weekday:`long`,month:`long`,day:`numeric`,year:t.getFullYear()===new Date().getFullYear()?void 0:`numeric`})},[e.dayStart,r,n]);return(0,W.jsxs)(`div`,{className:`flex h-full items-end gap-2.5 px-2.5 pb-2`,children:[(0,W.jsx)(`h3`,{className:`text-[15px] font-semibold`,children:i}),e.count!==null&&(0,W.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n(`common.visits`,{count:e.count})})]})}function Tr({row:e}){let{t:n}=t(),r=a().timeRange(e.start,e.end),i=e.count===null?n(`history.session.labelOpen`,{range:r,site:e.site}):n(`history.session.label`,{range:r,visits:n(`common.visits`,{count:e.count}),site:e.site});return(0,W.jsx)(`div`,{className:`flex h-full items-end gap-2 px-2.5 pb-1.5 text-xs text-muted-foreground`,children:(0,W.jsx)(`span`,{className:`truncate`,children:i})})}function Er({starred:e}){let{t:n}=t();return e?(0,W.jsx)(H,{className:`size-[13px] shrink-0 fill-brand text-brand`,role:`img`,"aria-label":n(`history.starred.mark`)}):null}var Dr=e=>j(`flex h-full w-full items-center gap-3 rounded-lg px-2.5 text-left outline-none transition-colors`,`focus-visible:ring-2 focus-visible:ring-ring/50`,e?`bg-brand-soft`:`hover:bg-muted`),Or=(0,U.memo)(function({item:e,repeats:n,selected:r,starred:i,browserName:o,onSelect:s,onOpen:c}){let{t:l}=t(),u=a(),d=(0,U.useMemo)(()=>({profileId:e.profileId,url:e.url,visitTime:e.visitTime}),[e]);return(0,W.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":r,className:Dr(r),onClick:()=>s(e),onDoubleClick:()=>c(e),children:[(0,W.jsx)(`span`,{className:`w-16 shrink-0 text-xs whitespace-nowrap text-muted-foreground tabular-nums`,children:u.time(e.visitTime)}),(0,W.jsx)(z,{domain:e.domain,lookup:d,className:`size-[22px] text-[11px]`}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.title?.trim()||e.url}),n&&(0,W.jsxs)(`span`,{className:`shrink-0 rounded-md bg-muted px-1.5 text-[11px] text-muted-foreground tabular-nums`,title:l(`history.repeats`,{count:n}),"aria-label":l(`history.repeats`,{count:n}),children:[`×`,n]}),(0,W.jsx)(Er,{starred:i}),(0,W.jsx)(`span`,{className:`max-w-[40%] shrink-0 truncate text-xs text-muted-foreground`,children:e.domain}),(0,W.jsx)(B,{browserName:o,className:`size-3.5 shrink-0 opacity-85`,decorative:!0})]})}),kr=(0,U.memo)(function({item:e,selected:n,starred:r,browserName:i,onSelect:o,onOpen:s}){let{t:c}=t(),l=a(),u=(0,U.useMemo)(()=>({profileId:e.profileId,url:e.url,visitTime:e.visitTime}),[e]),d=e.score!==void 0&&e.score>=0&&e.score<=1?c(`history.results.relevance`,{percent:l.percent(e.score)}):null;return(0,W.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":n,className:Dr(n),onClick:()=>o(e),onDoubleClick:()=>s(e),children:[(0,W.jsx)(z,{domain:e.domain,lookup:u,className:`size-[22px] text-[11px]`}),(0,W.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,W.jsx)(`span`,{className:`truncate`,children:e.title?.trim()||e.url}),(0,W.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[e.domain,` · `,l.dayAndTime(e.visitTime)]})]}),e.visitCount!==void 0&&(0,W.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular`,children:c(`common.visits`,{count:e.visitCount})}),d&&(0,W.jsx)(`span`,{className:`shrink-0 font-mono text-xs text-muted-foreground tabular`,title:d,children:l.percent(e.score??0)}),(0,W.jsx)(Er,{starred:r}),(0,W.jsx)(B,{browserName:i,className:`size-3.5 shrink-0 opacity-85`,decorative:!0})]})});function Ar(){return(0,W.jsxs)(`div`,{className:`flex h-full items-center gap-3 px-2.5`,"aria-hidden":!0,children:[(0,W.jsx)(R,{className:`h-3 w-10`}),(0,W.jsx)(R,{className:`size-[22px] rounded-md`}),(0,W.jsx)(R,{className:`h-3 flex-1`}),(0,W.jsx)(R,{className:`h-3 w-24`})]})}var jr={history:he,filter:$e,search:at,star:H,sites:ee};function $({loading:e,error:n,icon:r,title:i,body:a,onRetry:o,children:s}){let{t:c}=t();if(e)return(0,W.jsx)(`div`,{className:`flex-1 overflow-hidden px-[18px] pt-3`,role:`status`,"aria-label":c(`history.state.loading`),children:Array.from({length:12},(e,t)=>(0,W.jsx)(`div`,{className:`h-[38px]`,style:{opacity:1-t*.06},children:(0,W.jsx)(Ar,{})},t))});let l=n?d:jr[r??`history`];return(0,W.jsxs)(_r,{className:`animate-rise flex-1`,children:[(0,W.jsxs)(vr,{children:[(0,W.jsx)(br,{variant:`icon`,children:(0,W.jsx)(l,{})}),(0,W.jsx)(xr,{className:`text-base`,children:i}),(0,W.jsx)(Sr,{children:n?n.message:a})]}),(o||s)&&(0,W.jsxs)(Cr,{children:[o&&(0,W.jsx)(k,{variant:`outline`,size:`sm`,onClick:o,children:c(`common.retry`)}),s]})]})}function Mr({rows:e,rowKey:t,rowHeight:n,renderRow:r,label:i,onEndReached:a,scrollToIndex:o,resetKey:s,className:c}){let l=(0,U.useRef)(null),u=(0,U.useCallback)(t=>n(e[t]),[n,e]),d=(0,U.useCallback)(n=>t(e[n]),[t,e]),f=We({count:e.length,getScrollElement:()=>l.current,estimateSize:u,getItemKey:d,overscan:12}),p=f.getVirtualItems(),m=p.at(-1)?.index??-1;return(0,U.useEffect)(()=>{a&&e.length>0&&m>=e.length-10&&a()},[m,e.length,a]),(0,U.useEffect)(()=>{o!=null&&o>=0&&f.scrollToIndex(o,{align:`auto`})},[o,f]),(0,U.useEffect)(()=>{l.current?.scrollTo({top:0})},[s]),(0,W.jsx)(`div`,{ref:l,className:j(`min-h-0 flex-1 overflow-y-auto px-[18px]`,c),children:(0,W.jsx)(`div`,{role:`listbox`,"aria-label":i,className:`relative w-full`,style:{height:f.getTotalSize()},children:p.map(t=>(0,W.jsx)(`div`,{role:`presentation`,className:`absolute top-0 left-0 w-full`,style:{height:t.size,transform:`translateY(${t.start}px)`},children:r(e[t.index])},t.key))})})}var Nr=63;function Pr({site:e,max:n,filters:r,onPick:i}){let{t:o}=t(),s=a(),c=F(e.domain,{...r,domain:null}),l=(0,U.useMemo)(()=>c.data?{profileId:c.data.profileId,url:c.data.url,visitTime:c.data.visitTime}:void 0,[c.data]),u=c.data?.title?.trim()||c.data?.url;return(0,W.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":!1,"aria-label":o(`history.sites.show`,{domain:e.domain}),onClick:()=>i(e.domain),className:`flex h-full w-full items-center gap-3.5 border-b px-2.5 text-left outline-none transition-colors hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring/50`,children:[(0,W.jsx)(Kt,{url:c.data?.url??null,domain:e.domain,lookup:l}),(0,W.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,W.jsx)(`span`,{className:`truncate font-medium`,children:e.domain}),(0,W.jsx)(`span`,{className:`h-4 truncate text-xs text-muted-foreground`,children:u?o(`history.sites.latest`,{title:u}):(0,W.jsx)(R,{className:`mt-0.5 h-3 w-48`})})]}),(0,W.jsx)(`span`,{className:`h-1.5 w-[120px] shrink-0 overflow-hidden rounded-full bg-muted`,children:(0,W.jsx)(`span`,{className:`block h-full rounded-full bg-brand`,style:{width:`${Math.max(2,e.visits/n*100)}%`}})}),(0,W.jsx)(`span`,{className:`w-16 shrink-0 text-right font-mono text-xs text-muted-foreground tabular`,children:s.number(e.visits)}),(0,W.jsx)(y,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":!0})]})}function Fr({range:e,profileIds:n,filters:r,resetKey:i,onPick:a}){let{t:o}=t(),s=le(e,n),c=(0,U.useMemo)(()=>s.data?.pages.flatMap(e=>e.sites),[s.data]),l=Math.max(1,c?.[0]?.visits??1),{hasNextPage:u,isFetchingNextPage:d,fetchNextPage:f}=s,p=(0,U.useCallback)(()=>{u&&!d&&f()},[u,d,f]),m=(0,U.useCallback)(e=>e.domain,[]),h=(0,U.useCallback)(()=>Nr,[]),g=(0,U.useCallback)(e=>(0,W.jsx)(Pr,{site:e,max:l,filters:r,onPick:a}),[l,r,a]);return s.isPending?(0,W.jsx)($,{loading:!0}):s.error?(0,W.jsx)($,{error:s.error,title:o(`history.state.errorTitle`),onRetry:()=>void s.refetch()}):!c||c.length===0?(0,W.jsx)($,{icon:`sites`,title:o(`history.state.noSitesTitle`)}):(0,W.jsx)(Mr,{rows:c,rowKey:m,rowHeight:h,renderRow:g,label:o(`history.views.sites`),resetKey:i,onEndReached:p})}var Ir=62,Lr=3;function Rr({item:e,selected:n,onPick:r}){let{t:i}=t(),a=F(e.domain,null),o=(0,U.useMemo)(()=>a.data?{profileId:a.data.profileId,url:a.data.url,visitTime:a.data.visitTime}:void 0,[a.data]),s=e.entityKind===`domain`,c=s?e.domain:e.title.trim()||e.entityKey,l=s?i(`common.visits`,{count:e.visitCount}):e.notes.trim()||e.entityKey,u=e.tags;return(0,W.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":n,onClick:()=>r(e),className:j(`flex h-full w-full items-center gap-3 rounded-[10px] px-3 text-left outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring/50`,n?`bg-brand-soft`:`hover:bg-muted`),children:[(0,W.jsx)(H,{className:`size-[15px] shrink-0 fill-brand text-brand`,"aria-hidden":!0}),(0,W.jsx)(Kt,{url:s?a.data?.url??null:e.entityKey,domain:e.domain,lookup:o}),(0,W.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,W.jsx)(`span`,{className:`truncate font-medium`,children:c}),(0,W.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground`,children:[u.slice(0,Lr).map(e=>(0,W.jsxs)(`span`,{className:`max-w-[120px] shrink-0 truncate rounded bg-brand-soft px-1.5 py-px text-[11px] text-foreground`,children:[`#`,e]},e)),u.length>Lr&&(0,W.jsx)(`span`,{className:`shrink-0 text-[11px]`,children:i(`historyPage.tags.more`,{count:u.length-Lr})}),(0,W.jsx)(`span`,{className:`min-w-0 truncate`,children:l})]})]}),(0,W.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:s?i(`history.starred.wholeSite`):e.domain})]})}function zr({selectedUrl:e,onSelect:n,onPickSite:r}){let{t:i}=t(),a=ie(),o=(0,U.useMemo)(()=>a.data?.pages.flatMap(e=>e.items)??[],[a.data]),{hasNextPage:s,isFetchingNextPage:c,fetchNextPage:l}=a,u=(0,U.useCallback)(()=>{s&&!c&&l()},[s,c,l]),d=(0,U.useCallback)(e=>{e.entityKind===`domain`?r(e.domain):n({url:e.entityKey,title:e.title||null,domain:e.domain})},[n,r]),f=(0,U.useCallback)(e=>`${e.entityKind}:${e.entityKey}`,[]),p=(0,U.useCallback)(()=>Ir,[]),m=(0,U.useCallback)(t=>(0,W.jsx)(Rr,{item:t,selected:t.entityKind===`url`&&t.entityKey===e,onPick:d}),[e,d]);return a.isPending?(0,W.jsx)($,{loading:!0}):a.error?(0,W.jsx)($,{error:a.error,title:i(`history.state.errorTitle`),onRetry:()=>void a.refetch()}):o.length===0?(0,W.jsx)($,{icon:`star`,title:i(`history.state.noStarredTitle`),body:i(`history.state.noStarredBody`)}):(0,W.jsx)(Mr,{rows:o,rowKey:f,rowHeight:p,renderRow:m,onEndReached:u,label:i(`history.views.starred`)})}var Br=`shrink-0 rounded text-foreground underline-offset-2 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring/50`;function Vr(e,t){switch(e.code){case`stale`:return t(`historySearch.semantic.stale.${e.reason}`);default:return t(`historySearch.semantic.note.${e.code}`)}}function Hr({info:e,active:n,notes:r}){let{t:i}=t(),o=a();if(!n)return(0,W.jsxs)(`p`,{role:`status`,className:`flex flex-wrap items-center gap-x-1.5 px-7 pb-1.5 text-xs text-muted-foreground`,children:[(0,W.jsx)(_,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),(0,W.jsxs)(`span`,{children:[i(`historySearch.semantic.reason.${e.reason??`off`}`),` `,i(`historySearch.semantic.fellBack`)]}),(0,W.jsx)(E,{to:`/settings/ai`,className:Br,children:i(`historySearch.semantic.openSettings`)})]});let s=r.filter(t=>!(t.code===`stale`&&e.stale)),c=[e.provider&&i(`historySearch.semantic.using`,{provider:e.provider}),i(`historySearch.semantic.indexed`,{count:e.indexed}),e.lastIndexedAt&&i(`historySearch.semantic.updated`,{when:o.relative(e.lastIndexedAt)})].filter(Boolean);return(0,W.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-1.5 px-7 pb-1.5 text-xs text-muted-foreground`,children:[(0,W.jsx)(Ge,{className:`size-3.5 shrink-0 text-brand`,"aria-hidden":!0}),(0,W.jsx)(`span`,{children:c.join(` · `)}),e.stale&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`span`,{children:[`· `,i(`historySearch.semantic.stale.${e.stale}`)]}),(0,W.jsx)(E,{to:`/settings/ai`,className:Br,children:i(`historySearch.semantic.rebuild`)})]}),s.length>0&&(0,W.jsxs)(`span`,{role:`status`,className:`flex basis-full flex-wrap gap-x-1.5`,children:[(0,W.jsx)(`span`,{children:s.map(e=>Vr(e,i)).join(` `)}),(0,W.jsx)(E,{to:`/settings/ai`,className:Br,children:i(`historySearch.semantic.openSettings`)})]})]})}function Ur(e){let t=new Map;for(let n of e)t.set(n.domain,(t.get(n.domain)??0)+1);let n=e[0].domain;for(let[e,r]of t)r>(t.get(n)??0)&&(n=e);return n}function Wr(e,t){let n=[],r=new Map,i=new Map;for(let t of e){let e=o(t.visitTime).getTime(),i=n.at(-1);i&&i.dayStart===e||(i={dayStart:e,sessions:[]},n.push(i));let a=i.sessions.at(-1),s=a?.items.at(-1);(!a||!s||s.visitTime-t.visitTime>18e5)&&(a={items:[]},i.sessions.push(a)),a.items.push(t),r.set(t.id,a)}let a=[];return n.forEach((e,r)=>{let o=r===n.length-1&&t;a.push({kind:`day`,key:`d:${e.dayStart}`,dayStart:e.dayStart,count:o?null:e.sessions.reduce((e,t)=>e+t.items.length,0)}),e.sessions.forEach((t,n)=>{let r=t.items[0],s=t.items[t.items.length-1],c=o&&n===e.sessions.length-1;a.push({kind:`session`,key:`s:${r.id}`,start:s.visitTime,end:r.visitTime,count:c?null:t.items.length,site:Ur(t.items)});for(let e=0;e1?t.items.slice(e,r):void 0;for(let e of o??[])i.set(e.id,o);a.push({kind:`visit`,key:`v:${n.id}`,item:n,repeats:o}),e=r}})}),{rows:a,sessionMates:e=>{let t=i.get(e);return r.get(e)?.items.filter(n=>n.id!==e&&!t?.includes(n))??[]},repeatsOf:e=>i.get(e)??[]}}function Gr(e,t){return e.kind===`visit`&&(e.item.id===t||(e.repeats?.some(e=>e.id===t)??!1))}function Kr(e){return e.map(e=>({kind:`visit`,key:`v:${e.id}`,item:e}))}var qr={day:52,session:34,visit:38,result:54,loading:38};function Jr(e){return e instanceof HTMLElement&&(e.isContentEditable||[`INPUT`,`TEXTAREA`,`SELECT`].includes(e.tagName))}function Yr(e){let t=(0,U.useRef)(e);(0,U.useEffect)(()=>{t.current=e}),(0,U.useEffect)(()=>{let e=e=>{if(e.metaKey||e.ctrlKey||e.altKey||Jr(e.target)||document.querySelector(`[role="dialog"], [role="menu"]`))return;let{ids:n,selectedId:r,onSelectIndex:i,onOpen:a,onClose:o}=t.current;if(e.key===`Escape`)o();else if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(n.length===0)return;e.preventDefault();let t=r===null?-1:n.indexOf(r),a=e.key===`ArrowDown`?1:-1;i(Math.min(n.length-1,Math.max(0,t+a)))}else if(e.key===`Enter`&&r!==null){let t=e.target,n=t instanceof HTMLElement&&t.closest(`[role="listbox"]`);(t===document.body||n)&&(e.preventDefault(),a())}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[])}var Xr=200;function Zr(e){let{t:n}=t(),r=ne(),[i,a]=(0,U.useState)(()=>new Map),o=(0,U.useRef)(new Set);(0,U.useEffect)(()=>{let t=[...new Set(e)].filter(e=>!o.current.has(e));for(let e=0;ea(t=>new Map([...t,...Object.entries(e)]))).catch(()=>{for(let e of n)o.current.delete(e)})}},[e]);let s=(0,U.useCallback)((e,t)=>{o.current.add(e),a(n=>new Map(n).set(e,t))},[]),c=(0,U.useCallback)(async(e,t)=>{s(e.url,t);let i={entityKind:`url`,entityKey:e.url,sourceProfile:e.profileId??null};try{await(t?M.setStar(i):M.unsetStar(i)),L(n(t?`history.detail.starAdded`:`history.detail.starRemoved`))}catch(r){s(e.url,!t),L.error(n(`history.detail.starFailed`),{description:r instanceof Error?r.message:void 0})}finally{r.invalidateQueries({queryKey:[`stars`]})}},[s,r,n]);return{isStarred:(0,U.useCallback)(e=>i.get(e)===!0,[i]),toggle:c}}var Qr=e=>e.key;function $r({rows:e,variant:t,label:n,selectedId:r,isStarred:i,browserName:a,onSelect:o,onOpen:s,onEndReached:c,scrollToIndex:l,resetKey:u,dimmed:d}){let f=(0,U.useCallback)(e=>e.kind===`visit`&&t===`results`?qr.result:qr[e.kind],[t]),p=(0,U.useCallback)(e=>{switch(e.kind){case`day`:return(0,W.jsx)(wr,{row:e});case`session`:return(0,W.jsx)(Tr,{row:e});case`loading`:return(0,W.jsx)(Ar,{});case`visit`:return(0,W.jsx)(t===`results`?kr:Or,{item:e.item,repeats:e.repeats?.length,selected:r!==null&&Gr(e,r),starred:i(e.item.url),browserName:a(e.item.profileId),onSelect:o,onOpen:s})}},[t,r,i,a,o,s]);return(0,W.jsx)(Mr,{rows:e,rowKey:Qr,rowHeight:f,renderRow:p,label:n,onEndReached:c,scrollToIndex:l,resetKey:u,className:d?`opacity-60 transition-opacity`:`transition-opacity`})}var ei=250;function ti(e){return/invalid regex pattern|regex parse error/i.test(e.message)}function ni(e,t){let[n,r]=(0,U.useState)(null);return n!==null&&n===e&&r(null),(0,U.useEffect)(()=>{if(n===null)return;let e=setTimeout(()=>t(n),ei);return()=>clearTimeout(e)},[n,t]),{value:n??e,setDraft:r}}function ri(){let{t:e}=t(),{params:n,update:r}=_n(),i=ce(),a=oe(),o=(0,U.useCallback)(e=>r({q:e}),[r]),{value:s,setDraft:c}=ni(n.q,o),l=Se(),u=l.available,d=xe(l),f=(0,U.useMemo)(()=>Cn(n.q,n.mode,u,n.sort),[n.q,n.mode,u,n.sort]),p=f.text!==``,m=p||n.view===`timeline`,h=(0,U.useMemo)(()=>xn(yn(n.date)),[n.date]),g=(0,U.useMemo)(()=>({...Sn(h),browserKind:n.browser,domain:n.domain}),[h,n.browser,n.domain]),_=n.date!==null||n.browser!==null||n.domain!==null,v=`${f.text}|${f.mode}|${f.sort}|${JSON.stringify(g)}`,y=se(f,g,m),{items:b,hasNextPage:x,isFetchingNextPage:S,fetchNextPage:C}=y,w=(0,U.useMemo)(()=>p?null:Wr(b,x),[p,b,x]),T=(0,U.useMemo)(()=>{let e=w?w.rows:Kr(b);return S?[...e,...[0,1,2].map(e=>({kind:`loading`,key:`loading:${e}`}))]:e},[w,b,S]),[D,O]=(0,U.useState)(null),[ee,ne]=(0,U.useState)(D);D&&D!==ee&&ne(D);let A=D??ee,[re,ie]=(0,U.useState)(null),ae=(0,U.useCallback)(e=>{O(pe(e)),ie(e.id),r({visit:e.id})},[r]),M=(0,U.useCallback)(e=>{O(e),r({visit:null})},[r]),N=(0,U.useCallback)(()=>{O(null),r({visit:null})},[r]);if(n.visit===null&&re!==null&&ie(null),n.visit!==null&&n.visit!==re){let e=b.find(e=>e.id===n.visit);e&&(ie(n.visit),O(pe(e)))}let P=Zr((0,U.useMemo)(()=>D?[...b.map(e=>e.url),D.url]:b.map(e=>e.url),[b,D])),le=be(),ue=(0,U.useCallback)(t=>void le(t,e(`history.detail.openFailed`)),[le,e]),F=(0,U.useMemo)(()=>w?w.rows.flatMap(e=>e.kind===`visit`?[e.item]:[]):b,[w,b]);Yr({ids:(0,U.useMemo)(()=>F.map(e=>e.id),[F]),selectedId:(0,U.useMemo)(()=>{let e=D?.visitId;if(e===void 0)return null;let t=w?.rows.find(t=>Gr(t,e));return t?.kind===`visit`?t.item.id:e},[w,D?.visitId]),onSelectIndex:e=>ae(F[e]),onOpen:()=>D&&ue(D.url),onClose:N});let de=(0,U.useMemo)(()=>{let e=D?.visitId;return e===void 0?null:T.findIndex(t=>Gr(t,e))},[T,D?.visitId]),fe=(0,U.useCallback)(()=>{x&&!S&&C()},[x,S,C]),he=e=>{c(null),r({view:e,q:``})},ge=(0,U.useCallback)(e=>{c(null),r({view:`timeline`,domain:e,q:``})},[c,r]),I=(0,U.useCallback)(e=>{c(null),r({q:vt(e),mode:`full`})},[c,r]),L=()=>r({date:null,browser:null,domain:null}),_e=a.data?a.data.urls+a.data.domains:null,R=n.browser?i.options.find(e=>e.kind===n.browser)?.profileIds??null:null;return(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,W.jsx)(gr,{draft:s,onDraft:c,view:p?``:n.view,onView:he,starredCount:_e,date:n.date,onDate:e=>r({date:e}),browser:n.browser,browsers:i.options,onBrowser:e=>r({browser:e}),domain:n.domain,onClearDomain:()=>r({domain:null}),hasFilters:_,onClearFilters:L,searching:s.trim()!==``,mode:f.mode,onMode:e=>r({mode:e}),sort:f.sort,onSort:e=>r({sort:e}),semanticAvailable:u,semanticOffReason:d,invalidRegex:f.regexError!==null,onExample:e=>{c(e),e.startsWith(`/`)||r({mode:`full`})},onBuild:(e,t)=>{c(null),r({q:e,mode:t})}}),(0,W.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[(0,W.jsxs)(`section`,{className:`flex min-w-0 flex-1 flex-col`,children:[p&&(0,W.jsx)(`div`,{className:`flex min-h-[38px] items-center gap-2 px-7 pt-3.5 pb-1.5 text-[13px] text-muted-foreground`,children:(0,W.jsx)(`p`,{"aria-live":`polite`,children:(0,W.jsx)(Hn,{search:f,list:y})})}),p&&(f.mode===`semantic`||n.mode===`semantic`)&&(0,W.jsx)(Hr,{info:l,active:f.mode===`semantic`,notes:y.search?.notes??[]}),p&&!f.regexError&&(0,W.jsx)(te,{status:y.search,className:`px-7 pb-2`}),m?f.regexError&&b.length===0?null:y.isPending?(0,W.jsx)($,{loading:!0}):y.error&&f.mode===`regex`&&ti(y.error)?(0,W.jsx)($,{icon:`search`,title:e(`historySearch.regex.backendTitle`),body:e(`historySearch.regex.backendBody`,{message:y.error.message})}):y.error?.message===`search-connection-lost`?(0,W.jsx)($,{icon:`search`,title:e(`history.state.searchErrorTitle`),body:e(`history.state.searchConnectionLost`),onRetry:y.refetch}):y.error?(0,W.jsx)($,{error:y.error,title:e(p?`history.state.searchErrorTitle`:`history.state.errorTitle`),onRetry:y.refetch}):b.length===0?p&&y.search&&!y.search.coverageComplete?(0,W.jsx)($,{icon:`search`,title:e(`history.state.noResultsPartialTitle`),body:e(`history.state.noResultsPartialBody`,{query:f.text})}):p?(0,W.jsx)($,{icon:`search`,title:e(`history.state.noResultsTitle`),body:e(`history.state.noResultsBody`,{query:f.text})}):_?(0,W.jsx)($,{icon:`filter`,title:e(`history.state.noMatchTitle`),body:e(`history.state.noMatchBody`),children:(0,W.jsx)(k,{variant:`outline`,size:`sm`,onClick:L,children:e(`history.filters.clear`)})}):(0,W.jsx)($,{icon:`history`,title:e(`history.state.noHistoryTitle`),body:e(`history.state.noHistoryBody`),children:(0,W.jsx)(k,{asChild:!0,size:`sm`,children:(0,W.jsx)(E,{to:me(`browsing`,`backup`),children:e(`history.state.goBackup`)})})}):(0,W.jsx)($r,{rows:T,variant:p?`results`:`timeline`,label:e(p?`history.results.listLabel`:`history.results.timelineLabel`),selectedId:D?.visitId??null,isStarred:P.isStarred,browserName:i.nameOf,onSelect:ae,onOpen:e=>ue(e.url),onEndReached:fe,scrollToIndex:de,resetKey:v,dimmed:y.isPlaceholder||f.regexError!==null}):n.view===`sites`?(0,W.jsx)(Fr,{range:h,profileIds:R,filters:g,resetKey:v,onPick:ge}):(0,W.jsx)(zr,{selectedUrl:D?.url??null,onSelect:M,onPickSite:ge})]}),(0,W.jsx)(`aside`,{inert:!D,className:j(`shrink-0 overflow-hidden transition-[width] duration-200 ease-out motion-reduce:transition-none`,D?`w-80`:`w-0`),children:(0,W.jsx)(`div`,{className:`h-full w-80 border-l`,children:A&&(0,W.jsx)(Zt,{target:A,starred:P.isStarred(A.url),sessionMates:w&&A.visitId!==void 0?w.sessionMates(A.visitId):[],repeats:w&&A.visitId!==void 0?w.repeatsOf(A.visitId):[],onClose:N,onToggleStar:()=>void P.toggle(A,!P.isStarred(A.url)),onSelectMate:ae,onSelectRelated:M,onFilterTag:I})})})]})]})}export{ri as default}; \ No newline at end of file diff --git a/site/public/app/assets/home-data-CnhNzCOu.js b/site/public/app/assets/home-data-CnhNzCOu.js new file mode 100644 index 00000000..37ec8a7f --- /dev/null +++ b/site/public/app/assets/home-data-CnhNzCOu.js @@ -0,0 +1 @@ +import{Q as e,Y as t,g as n}from"./index-CteWxeiL.js";import{r}from"./insights-Dw_jeUg7.js";import{i}from"./app-CVcZz016.js";import{n as a}from"./queries-DuRWdcwY.js";var o=e(t(),1);function s(e,t,r){let i=new Map(e.map(e=>[e.dateKey,e.totalVisits]));return Array.from({length:t},(e,a)=>{let o=n(r,a-(t-1));return{dateKey:o,visits:i.get(o)??0}})}function c(){let e=i(),t=a();return(0,o.useMemo)(()=>{let n=new Set(e.config.selectedProfileIds),r=new Map;for(let t of e.browserProfiles){if(!t.historyExists)continue;let e=r.get(t.browserName)??{browserName:t.browserName,visits:0,selected:!1};e.selected||=n.has(t.profileId),r.set(t.browserName,e)}for(let e of t.data??[]){let t=r.get(e.browserName)??{browserName:e.browserName,visits:0,selected:n.has(e.profileId)};t.visits+=e.visitCount,r.set(e.browserName,t)}return{list:[...r.values()].sort((e,t)=>Number(t.selected)-Number(e.selected)||t.visits-e.visits),loading:t.isPending,failed:t.isError}},[e,t.data,t.isPending,t.isError])}function l(e){return e.points.every(e=>e.totalVisits===0)}function u(e,t){return e!==void 0&&r(e)&&t(e.data)}export{c as i,l as n,u as r,s as t}; \ No newline at end of file diff --git a/site/public/app/assets/home-page-Cyb-mD0W.js b/site/public/app/assets/home-page-Cyb-mD0W.js new file mode 100644 index 00000000..77be0bcb --- /dev/null +++ b/site/public/app/assets/home-page-Cyb-mD0W.js @@ -0,0 +1 @@ +import{Gt as e,Jt as t,Lt as n,Wt as r,b as i,ft as a,qt as o,rt as s,y as c}from"./main-CmsrHzbA.js";import{n as l,t as u}from"./backup-button-BkjMcbWN.js";import{i as d,n as f,r as p,t as m}from"./section-card-BTUr59O6.js";import{i as h,n as g,o as _,r as v}from"./app-CVcZz016.js";import{J as y,Q as b,T as x,Y as S,g as C,k as w,m as T,y as E}from"./index-CteWxeiL.js";import{c as D}from"./spaces-BqDG3Cu2.js";import{n as O}from"./archive-tDw2mIBu.js";import{t as k}from"./button-C0JM8asg.js";import{r as A}from"./query-DyHGS9i8.js";import{n as j,t as M}from"./schedule-copy-DPACeJ9I.js";import{a as ee,c as te,d as ne,f as re,g as ie,h as ae,i as oe,l as se,n as ce,o as le,p as ue,r as N,s as de,t as fe,u as pe,v as P,y as me}from"./recharts-legend-CEu2I_wc.js";import{i as he,n as ge,r as _e,t as ve}from"./topic-icon-BmfUGk2_.js";import{t as ye}from"./browser-icons-DSlRrt_0.js";import{a as be,i as F,o as xe,r as I,t as Se,u as L}from"./links-4-O_q9FA.js";import{i as R,n as z,r as B,t as V}from"./home-data-CnhNzCOu.js";import{a as Ce,i as H,o as we,r as Te,t as Ee}from"./queries-DuRWdcwY.js";import{i as U,r as W}from"./zone-CAMroIcN.js";var G=b(S(),1),De=D(`browsing`,`backup`),K=`/settings/security`;function Oe(){let{t:e}=y(),t=h(),n=a(),{mutate:r}=v();return(0,G.useMemo)(()=>{let i=[],a={label:e(`home.alerts.openBackup`),to:De},o={label:e(`home.alerts.openSecurity`),to:K};for(let t of n.data?.issues??[])t.severity===`info`||t.dismissible||i.push({id:`schedule:${t.code}`,tone:t.severity===`error`?`error`:`warning`,title:M(e,t.titleKey)??e(`home.alerts.scheduleFallback`),detail:M(e,t.consequenceKey)??M(e,t.detailKey)??``,action:a});let s=j(t.browserDiscoveryIssue,t.browserProfiles.length);if(s===`full-disk-access`||s===`discovery-error`){let t=s===`full-disk-access`?`fullDiskAccess`:`discoveryError`;i.push({id:`discovery:${s}`,tone:`warning`,title:e(`home.alerts.${t}.title`),detail:e(`home.alerts.${t}.detail`),action:a})}let{config:c,keyringStatus:l}=t;return t.archiveStatus.encrypted&&(c.rememberDatabaseKeyInKeyring&&!l.available?i.push({id:`keychain:unavailable`,tone:`warning`,title:e(`home.alerts.keychainUnavailable.title`),detail:e(`home.alerts.keychainUnavailable.detail`)}):c.rememberDatabaseKeyInKeyring&&!l.storedSecret?i.push({id:`keychain:missing`,tone:`warning`,title:e(`home.alerts.keyMissing.title`),detail:e(`home.alerts.keyMissing.detail`),action:o}):!l.storedSecret&&!c.passwordKeptElsewhere&&i.push({id:`password:risk`,tone:`warning`,title:e(`home.alerts.passwordRisk.title`),detail:l.available?e(`home.alerts.passwordRisk.detail`):e(`home.alerts.passwordRisk.noKeychain`),action:l.available?{label:e(`home.alerts.passwordRisk.keep`),to:K}:void 0,dismiss:{label:e(`home.alerts.passwordRisk.dismiss`),run:()=>r(e=>({...e,passwordKeptElsewhere:!0}))}})),i},[e,t,n.data,r])}var q=w();function ke(){let{t:e}=y(),t=Oe();return t.length===0?null:(0,q.jsx)(`section`,{"aria-label":e(`home.alerts.label`),className:`animate-rise`,children:(0,q.jsx)(`ul`,{className:`flex flex-col gap-2`,children:t.map(e=>{let t=e.tone===`error`?O:n;return(0,q.jsxs)(`li`,{className:A(`flex items-start gap-3 rounded-xl border p-3.5 text-[13px]`,e.tone===`error`?`border-destructive/30 bg-destructive/5`:`border-brand/30 bg-brand-soft`),children:[(0,q.jsx)(t,{"aria-hidden":!0,className:A(`mt-0.5 size-4 shrink-0`,e.tone===`error`?`text-destructive`:`text-brand`)}),(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,q.jsx)(`h2`,{className:`font-medium`,children:e.title}),e.detail&&(0,q.jsx)(`p`,{className:`text-muted-foreground`,children:e.detail})]}),(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5 max-[640px]:flex-col max-[640px]:items-end`,children:[e.dismiss&&(0,q.jsx)(k,{size:`sm`,variant:`ghost`,onClick:e.dismiss.run,children:e.dismiss.label}),e.action&&(0,q.jsx)(k,{size:`sm`,variant:`outline`,asChild:!0,children:(0,q.jsx)(o,{to:e.action.to,children:e.action.label})})]})]},e.id)})})})}var J=G.memo(function({cx:e,cy:t,dataKey:n,chartId:r,className:i,fillOpacity:a=1,type:o=`default`,maskId:s}){let c=G.useId().replace(/:/g,``),l=`url(#${r}-colors-${String(n)})`;if(e===void 0||t===void 0)return null;switch(o){case`border`:return(0,q.jsx)(Ae,{cx:e,cy:t,dotId:c,fillOpacity:a,gradientUrl:l,className:i,maskId:s});case`colored-border`:return(0,q.jsx)(je,{cx:e,cy:t,dotId:c,fillOpacity:a,gradientUrl:l,className:i,maskId:s});default:return(0,q.jsx)(Y,{cx:e,cy:t,dotId:c,fillOpacity:a,gradientUrl:l,className:i,maskId:s})}}),Y=G.memo(({cx:e,cy:t,dotId:n,fillOpacity:r,gradientUrl:i,className:a,maskId:o})=>(0,q.jsxs)(`g`,{className:a,mask:o?`url(#${o})`:void 0,children:[(0,q.jsx)(`defs`,{children:(0,q.jsx)(`clipPath`,{id:`dot-clip-${n}`,children:(0,q.jsx)(`circle`,{cx:e,cy:t,r:3})})}),(0,q.jsx)(`rect`,{x:`0`,y:t-3,width:`100%`,height:6,fill:i,fillOpacity:r,clipPath:`url(#dot-clip-${n})`})]}));Y.displayName=`DefaultDot`;var Ae=G.memo(({cx:e,cy:t,dotId:n,fillOpacity:r,gradientUrl:i,className:a,maskId:o})=>(0,q.jsxs)(`g`,{className:A(a,`text-background`),mask:o?`url(#${o})`:void 0,children:[(0,q.jsx)(`defs`,{children:(0,q.jsx)(`clipPath`,{id:`dot-clip-${n}`,children:(0,q.jsx)(`circle`,{cx:e,cy:t,r:6})})}),(0,q.jsx)(`circle`,{cx:e,cy:t,r:6,fill:`currentColor`}),(0,q.jsx)(`rect`,{x:`0`,y:t-(6-5/2),width:`100%`,height:7,fill:i,fillOpacity:r,clipPath:`url(#dot-clip-inner-${n})`}),(0,q.jsx)(`defs`,{children:(0,q.jsx)(`clipPath`,{id:`dot-clip-inner-${n}`,children:(0,q.jsx)(`circle`,{cx:e,cy:t,r:6-5/2})})})]}));Ae.displayName=`PrimaryBorderDot`;var je=G.memo(({cx:e,cy:t,dotId:n,fillOpacity:r,gradientUrl:i,className:a,maskId:o})=>(0,q.jsxs)(`g`,{className:A(a,`text-background`),mask:o?`url(#${o})`:void 0,children:[(0,q.jsx)(`defs`,{children:(0,q.jsx)(`clipPath`,{id:`dot-clip-${n}`,children:(0,q.jsx)(`circle`,{cx:e,cy:t,r:3.5})})}),(0,q.jsx)(`rect`,{x:`0`,y:t-3-1/2,width:`100%`,height:7,fill:i,fillOpacity:r,clipPath:`url(#dot-clip-${n})`}),(0,q.jsx)(`circle`,{cx:e,cy:t,r:3-1/2,fill:`currentColor`})]}));je.displayName=`ColoredBorderDot`;var Me=.8,Ne=`loading`,Pe=2e3,Fe=`evil-stacked`,Ie=1,Le=[0,.7,.5,1],Re=(0,G.createContext)(null);function X(){let e=(0,G.use)(Re);if(!e)throw Error(`Area chart parts (, , …) must be used within `);return e}function Z({config:e,data:t,children:n,className:r,chartProps:i,curveType:a=`linear`,animationType:o=`left-to-right`,stackType:s=`default`,defaultSelectedDataKey:c=null,onSelectionChange:l,isLoading:u=!1,loadingPoints:d,xDataKey:f}){let p=(0,G.useId)().replace(/:/g,``),[m,h]=(0,G.useState)(c),{loadingData:g,onShimmerExit:_}=ct(u,d),{visibleData:v,brushProps:y}=ee({data:t}),b=(0,G.useMemo)(()=>{let e=G.Children.toArray(n),t=e.find(e=>(0,G.isValidElement)(e)&&e.type===N),r=(0,G.isValidElement)(t)?t.props:{};return{slot:{present:(0,G.isValidElement)(t),height:r.height,formatLabel:r.formatLabel,onChange:r.onChange},chartChildren:e.filter(e=>!((0,G.isValidElement)(e)&&e.type===N))}},[n]),x=b.slot.present,S=s===`expanded`,C=s===`stacked`||S,w=x&&!u?v:t,T=(0,G.useCallback)(e=>{h(e),l?.(e)},[l]),E=(0,G.useMemo)(()=>({config:e,curveType:a,animationType:o,isStacked:C,isExpanded:S,isLoading:u,selectedDataKey:m,selectDataKey:T}),[e,a,o,C,S,u,m,T]);return(0,q.jsx)(Re,{value:E,children:(0,q.jsxs)(te,{className:r,config:e,footer:x&&!u&&(0,q.jsx)(oe,{data:t,chartConfig:e,xDataKey:f,variant:`area`,curveType:a,height:b.slot.height,formatLabel:b.slot.formatLabel,stacked:C,skipStyle:!0,className:`mt-1`,...y,onChange:e=>{y.onChange(e),b.slot.onChange?.(e)}}),children:[(0,q.jsx)(se,{isLoading:u}),(0,q.jsxs)(ue,{id:p,accessibilityLayer:!0,stackOffset:S?`expand`:void 0,data:u?g:w,...i,children:[b.chartChildren,u&&(0,q.jsx)(lt,{chartId:p,curveType:a,onShimmerExit:_})]})]})})}function ze({dataKey:e,variant:t=`gradient`,strokeVariant:n=`dashed`,strokeWidth:r=Me,curveType:a,animationType:o,connectNulls:s=!1,isClickable:c=!1,children:l,areaProps:u}){let{config:d,curveType:f,animationType:p,isStacked:m,isExpanded:h,isLoading:g,selectedDataKey:_,selectDataKey:v}=X(),y=(0,G.useId)().replace(/:/g,``),b=i();if(g)return null;let x=a??f,S=b?`none`:o??p,C=S===`none`?void 0:`${y}-reveal-mask`,w=_===e,T=_!==null,E=qe(_,e),D=T&&!w,{dot:O,activeDot:k}=Ye(l,y,e,E.dot,C),A=n===`animated-dashed`,j=n===`dashed`||A;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(P,{type:x,dataKey:e,connectNulls:s,fillOpacity:E.fill,strokeOpacity:E.stroke,fill:Je(t,D,y),stroke:`url(#${y}-colors-${e})`,stackId:m?Fe:void 0,dot:O,activeDot:k,strokeWidth:r,strokeDasharray:j?`3 3`:void 0,isAnimationActive:!1,style:{...C?{mask:`url(#${C})`}:{},...c?{cursor:`pointer`}:{}},onClick:()=>{c&&v(w?null:e)},...u,children:A&&!T&&(0,q.jsx)(Xe,{})}),(0,q.jsxs)(`defs`,{children:[S!==`none`&&(0,q.jsx)(Qe,{id:y,type:S}),(0,q.jsx)($e,{id:y,dataKey:e,config:d,isExpanded:h}),t===`gradient`&&(0,q.jsx)(et,{id:y,dataKey:e}),t===`gradient-reverse`&&(0,q.jsx)(tt,{id:y,dataKey:e}),t===`solid`&&(0,q.jsx)(nt,{id:y,dataKey:e}),t===`dotted`&&(0,q.jsx)(it,{id:y,dataKey:e}),t===`lines`&&(0,q.jsx)(rt,{id:y,dataKey:e}),t===`hatched`&&(0,q.jsx)(at,{id:y,dataKey:e}),D&&(0,q.jsx)(ot,{id:y,dataKey:e})]})]})}var Be=()=>null,Ve=()=>null;function He({tickLine:e=!1,axisLine:t=!1,tickMargin:n=8,minTickGap:r=8,...i}){let{isLoading:a}=X();return a?null:(0,q.jsx)(ie,{tickLine:e,axisLine:t,tickMargin:n,minTickGap:r,...i})}function Ue({tickLine:e=!1,axisLine:t=!1,tickMargin:n=8,minTickGap:r=8,width:i=`auto`,tickFormatter:a,...o}){let{isLoading:s,isExpanded:c}=X();return s?null:(0,q.jsx)(ae,{tickLine:e,axisLine:t,tickMargin:n,minTickGap:r,width:i,tickFormatter:c?pe:a,...o})}function We({vertical:e=!1,strokeDasharray:t=`3 3`,...n}){return(0,q.jsx)(me,{vertical:e,strokeDasharray:t,...n})}function Ge({variant:e,roundness:t,defaultIndex:n,cursor:r=!0}){let{isLoading:i,selectedDataKey:a}=X();return i?null:(0,q.jsx)(le,{defaultIndex:n,cursor:r?{strokeDasharray:`3 3`,strokeWidth:Me}:!1,content:(0,q.jsx)(de,{selected:a,roundness:t,variant:e})})}function Ke({variant:e,align:t=`right`,verticalAlign:n=`top`,isClickable:r=!1}){let{selectedDataKey:i,selectDataKey:a}=X();return(0,q.jsx)(fe,{verticalAlign:n,align:t,content:(0,q.jsx)(ce,{selected:i,onSelectChange:a,isClickable:r,variant:e})})}var qe=(e,t)=>e===null||e===t?{fill:.8,stroke:1,dot:1}:{fill:.1,stroke:.3,dot:.3},Je=(e,t,n)=>t?`url(#${n}-unselected)`:`url(#${n}-${e})`,Ye=(e,t,n,r,i)=>{let a=!1,o=!1;return G.Children.forEach(e,e=>{if((0,G.isValidElement)(e)){if(e.type===Be){let{variant:o}=e.props;a=(0,q.jsx)(J,{type:o,dataKey:n,chartId:t,fillOpacity:r,maskId:i})}if(e.type===Ve){let{variant:i}=e.props;o=(0,q.jsx)(J,{type:i,dataKey:n,chartId:t,fillOpacity:r})}}}),{dot:a,activeDot:o}},Xe=()=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`animate`,{attributeName:`stroke-dasharray`,values:`3 3; 0 3; 3 3`,dur:`1s`,repeatCount:`indefinite`,keyTimes:`0;0.5;1`}),(0,q.jsx)(`animate`,{attributeName:`stroke-dashoffset`,values:`0; -6`,dur:`1s`,repeatCount:`indefinite`,keyTimes:`0;1`})]}),Ze={"left-to-right":0,"right-to-left":1,"center-out":.5},Qe=({id:e,type:t})=>{let n={initial:{scaleX:0},animate:{scaleX:1},transition:{duration:Ie,ease:Le}};return(0,q.jsx)(`mask`,{id:`${e}-reveal-mask`,maskUnits:`userSpaceOnUse`,maskContentUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`100%`,height:`100%`,children:t===`edges-in`?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(c.rect,{...n,x:`0`,y:`0`,width:`50%`,height:`100%`,fill:`white`,style:{originX:0}}),(0,q.jsx)(c.rect,{...n,x:`50%`,y:`0`,width:`50%`,height:`100%`,fill:`white`,style:{originX:1}})]}):(0,q.jsx)(c.rect,{...n,x:`0`,y:`0`,width:`100%`,height:`100%`,fill:`white`,style:{originX:Ze[t]}})})},$e=({id:e,dataKey:t,config:n,isExpanded:r})=>{let i=ne(n[t]??{});return(0,q.jsx)(`linearGradient`,{id:`${e}-colors-${t}`,x1:`0`,y1:`0`,x2:`1`,y2:`0`,gradientUnits:r?`userSpaceOnUse`:`objectBoundingBox`,children:i===1?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`stop`,{offset:`0%`,stopColor:`var(--color-${t}-0)`}),(0,q.jsx)(`stop`,{offset:`100%`,stopColor:`var(--color-${t}-0)`})]}):Array.from({length:i},(e,n)=>{let r=`${n/(i-1)*100}%`;return(0,q.jsx)(`stop`,{offset:r,stopColor:`var(--color-${t}-${n}, var(--color-${t}-0))`},r)})})},et=({id:e,dataKey:t})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`linearGradient`,{id:`${e}-vertical-fade`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,q.jsx)(`stop`,{offset:`0%`,stopColor:`white`,stopOpacity:.1}),(0,q.jsx)(`stop`,{offset:`100%`,stopColor:`white`,stopOpacity:0})]}),(0,q.jsx)(`mask`,{id:`${e}-gradient-mask`,children:(0,q.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#${e}-vertical-fade)`})}),(0,q.jsx)(`pattern`,{id:`${e}-gradient`,patternUnits:`userSpaceOnUse`,width:`100%`,height:`100%`,children:(0,q.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#${e}-colors-${t})`,mask:`url(#${e}-gradient-mask)`})})]}),tt=({id:e,dataKey:t})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`linearGradient`,{id:`${e}-vertical-fade-reverse`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,q.jsx)(`stop`,{offset:`0%`,stopColor:`white`,stopOpacity:0}),(0,q.jsx)(`stop`,{offset:`100%`,stopColor:`white`,stopOpacity:.1})]}),(0,q.jsx)(`mask`,{id:`${e}-gradient-reverse-mask`,children:(0,q.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#${e}-vertical-fade-reverse)`})}),(0,q.jsx)(`pattern`,{id:`${e}-gradient-reverse`,patternUnits:`userSpaceOnUse`,width:`100%`,height:`100%`,children:(0,q.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#${e}-colors-${t})`,mask:`url(#${e}-gradient-reverse-mask)`})})]}),nt=({id:e,dataKey:t})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`linearGradient`,{id:`${e}-solid-fade`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,q.jsx)(`stop`,{offset:`0%`,stopColor:`white`,stopOpacity:.1}),(0,q.jsx)(`stop`,{offset:`100%`,stopColor:`white`,stopOpacity:.1})]}),(0,q.jsx)(`mask`,{id:`${e}-solid-mask`,children:(0,q.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#${e}-solid-fade)`})}),(0,q.jsx)(`pattern`,{id:`${e}-solid`,patternUnits:`userSpaceOnUse`,width:`100%`,height:`100%`,children:(0,q.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#${e}-colors-${t})`,mask:`url(#${e}-solid-mask)`})})]}),rt=({id:e,dataKey:t})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`pattern`,{id:`${e}-lines-texture`,patternUnits:`userSpaceOnUse`,width:`5`,height:`5`,patternTransform:`rotate(45)`,children:(0,q.jsx)(`line`,{x1:`0`,y1:`0`,x2:`0`,y2:`5`,stroke:`white`,strokeWidth:`1`})}),(0,q.jsx)(`mask`,{id:`${e}-lines-mask`,children:(0,q.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#${e}-lines-texture)`,fillOpacity:`0.3`})}),(0,q.jsx)(`pattern`,{id:`${e}-lines`,patternUnits:`userSpaceOnUse`,width:`100%`,height:`100%`,children:(0,q.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#${e}-colors-${t})`,mask:`url(#${e}-lines-mask)`})})]}),it=({id:e,dataKey:t})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`pattern`,{id:`${e}-dotted-texture`,x:`0`,y:`0`,width:`6`,height:`6`,patternUnits:`userSpaceOnUse`,children:(0,q.jsx)(`circle`,{cx:`4`,cy:`4`,r:`0.5`,fill:`white`})}),(0,q.jsx)(`mask`,{id:`${e}-dotted-mask`,children:(0,q.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#${e}-dotted-texture)`,fillOpacity:`0.5`})}),(0,q.jsx)(`pattern`,{id:`${e}-dotted`,patternUnits:`userSpaceOnUse`,width:`100%`,height:`100%`,children:(0,q.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#${e}-colors-${t})`,mask:`url(#${e}-dotted-mask)`})})]}),at=({id:e,dataKey:t})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`linearGradient`,{id:`${e}-hatched-stripe`,x1:`0`,y1:`0`,x2:`1`,y2:`0`,children:[(0,q.jsx)(`stop`,{offset:`50%`,stopColor:`white`,stopOpacity:.2}),(0,q.jsx)(`stop`,{offset:`50%`,stopColor:`white`,stopOpacity:1})]}),(0,q.jsx)(`pattern`,{id:`${e}-hatched-texture`,x:`0`,y:`0`,width:`20`,height:`10`,patternUnits:`userSpaceOnUse`,overflow:`visible`,patternTransform:`rotate(20)`,children:(0,q.jsx)(`rect`,{width:`20`,height:`10`,fill:`url(#${e}-hatched-stripe)`})}),(0,q.jsx)(`mask`,{id:`${e}-hatched-mask`,children:(0,q.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#${e}-hatched-texture)`,fillOpacity:`0.2`})}),(0,q.jsx)(`pattern`,{id:`${e}-hatched`,patternUnits:`userSpaceOnUse`,width:`100%`,height:`100%`,children:(0,q.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#${e}-colors-${t})`,mask:`url(#${e}-hatched-mask)`})})]}),ot=({id:e,dataKey:t})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`pattern`,{id:`${e}-unselected-texture`,patternUnits:`userSpaceOnUse`,width:`5`,height:`5`,patternTransform:`rotate(45)`,children:(0,q.jsx)(`line`,{x1:`0`,y1:`0`,x2:`0`,y2:`5`,stroke:`white`,strokeWidth:`1`})}),(0,q.jsx)(`mask`,{id:`${e}-unselected-mask`,children:(0,q.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#${e}-unselected-texture)`,fillOpacity:`0.3`})}),(0,q.jsx)(`pattern`,{id:`${e}-unselected`,patternUnits:`userSpaceOnUse`,width:`100%`,height:`100%`,children:(0,q.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#${e}-colors-${t})`,mask:`url(#${e}-unselected-mask)`})})]}),st=(e=17,t=.05,n=.9)=>Array.from({length:e},(r,i)=>{let a=i/(e-1),o=t+Math.sin(a*Math.PI)**2*(n-t);return{offset:`${(a*100).toFixed(0)}%`,opacity:Number(o.toFixed(3))}});function ct(e,t=14){let[n,r]=(0,G.useState)(!1),i=(0,G.useCallback)(()=>{e&&r(e=>!e)},[e]);return{loadingData:(0,G.useMemo)(()=>re(t),[t,n]),onShimmerExit:i}}var lt=({chartId:e,curveType:t,onShimmerExit:n})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(P,{type:t,dataKey:Ne,fillOpacity:.05,fill:`currentColor`,stroke:`currentColor`,strokeOpacity:.5,isAnimationActive:!1,legendType:`none`,tooltipType:`none`,activeDot:!1,dot:!1,style:{mask:`url(#${e}-loading-mask)`}}),(0,q.jsx)(`defs`,{children:(0,q.jsx)(ut,{chartId:e,onShimmerExit:n})})]}),ut=({chartId:e,onShimmerExit:t})=>{let n=st(),r=(0,G.useRef)(-1);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`linearGradient`,{id:`${e}-loading-gradient`,x1:`0`,y1:`0`,x2:`1`,y2:`0`,children:n.map(({offset:e,opacity:t})=>(0,q.jsx)(`stop`,{offset:e,stopColor:`white`,stopOpacity:t},e))}),(0,q.jsx)(`pattern`,{id:`${e}-loading-pattern`,patternUnits:`objectBoundingBox`,patternContentUnits:`objectBoundingBox`,patternTransform:`rotate(25)`,width:3,height:`1`,x:`0`,y:`0`,children:(0,q.jsx)(c.rect,{y:`0`,width:`1`,height:`1`,fill:`url(#${e}-loading-gradient)`,initial:{x:-1},animate:{x:2},transition:{duration:Pe/1e3,ease:`linear`,repeat:1/0,repeatType:`loop`},onUpdate:e=>{let n=typeof e.x==`number`?e.x:-1,i=r.current;n>=1&&i<1&&t(),r.current=n}})}),(0,q.jsx)(`mask`,{id:`${e}-loading-mask`,maskUnits:`userSpaceOnUse`,children:(0,q.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#${e}-loading-pattern)`})})]})};Z.Area=ze,Z.Dot=Be,Z.ActiveDot=Ve,Z.XAxis=He,Z.YAxis=Ue,Z.Grid=We,Z.Tooltip=Ge,Z.Legend=Ke,Z.Brush=N;function Q({result:e}){let{t}=y();return(0,q.jsxs)(`p`,{role:`status`,className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,q.jsx)(s,{role:`presentation`,"aria-hidden":!0,className:`size-3`}),t(e?.meta?.generatedAt?`home.building.update`:`home.building.first`)]})}var dt={visits:{label:`Visits`,colors:{light:[`var(--brand)`],dark:[`var(--brand)`]}}};function ft(){let{t:e}=y(),t=W(),n=x(U().shown),r=H(),i=Te(),a=B(r.data,z),o=(0,G.useMemo)(()=>V(r.data?.data.points??[],30,n),[r.data,n]),s=i.data?.data.totalVisits.changePercent,c=(0,G.useMemo)(()=>({visits:{...dt.visits,label:e(`home.trend.visits`)}}),[e]);return(0,q.jsxs)(d,{title:e(`home.trend.title`),subtitle:e(`home.trend.subtitle`),action:s!=null&&Number.isFinite(s)?(0,q.jsx)(`span`,{title:e(`home.trend.vsPrevious`),className:`rounded-md bg-brand-soft px-2 py-0.5 text-xs font-medium text-brand tabular`,children:t.percent(s/100,!0)}):null,children:[(0,q.jsx)(`div`,{className:`h-[210px]`,children:r.isError?(0,q.jsx)(m,{error:r.error,onRetry:()=>void r.refetch()}):(0,q.jsxs)(Z,{data:o,config:c,xDataKey:`dateKey`,isLoading:r.isPending||a,className:`h-full aspect-auto`,curveType:`monotone`,children:[(0,q.jsx)(`defs`,{children:(0,q.jsxs)(`linearGradient`,{id:`home-trend-fill`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,q.jsx)(`stop`,{offset:`0%`,stopColor:`var(--brand)`,stopOpacity:.35}),(0,q.jsx)(`stop`,{offset:`100%`,stopColor:`var(--brand)`,stopOpacity:0})]})}),(0,q.jsx)(Z.Grid,{vertical:!1,strokeDasharray:`3 4`}),(0,q.jsx)(Z.XAxis,{dataKey:`dateKey`,tickLine:!1,axisLine:!1,interval:6,padding:{left:14,right:14},tickFormatter:e=>t.day(e,{month:`short`,day:`numeric`}),className:`font-mono`}),(0,q.jsx)(Z.Tooltip,{}),(0,q.jsx)(Z.Area,{dataKey:`visits`,variant:`gradient`,strokeVariant:`solid`,strokeWidth:2,areaProps:{dataKey:`visits`,fill:`url(#home-trend-fill)`},children:(0,q.jsx)(Z.ActiveDot,{variant:`colored-border`})})]})}),a&&(0,q.jsx)(Q,{result:r.data})]})}function pt(){let{t:e}=y(),t=W(),n=x(U().shown),r=Ee(),i=B(r.data,e=>e.every(e=>e.totalVisits===0)),a=(r.data?.data??[]).filter(e=>e.totalVisits>0).slice(0,4);return(0,q.jsx)(d,{title:e(`home.onThisDay.title`),subtitle:e(`home.onThisDay.subtitle`,{date:t.day(n,{month:`short`,day:`numeric`})}),children:r.isError?(0,q.jsx)(m,{error:r.error,onRetry:()=>void r.refetch()}):r.isPending||i?(0,q.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[[0,1,2].map(e=>(0,q.jsx)(_,{className:`h-10`},e)),i&&(0,q.jsx)(Q,{result:r.data})]}):a.length===0?(0,q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`home.onThisDay.empty`)}):(0,q.jsx)(`ul`,{className:`-mx-2 flex flex-col`,children:a.map(t=>(0,q.jsx)(`li`,{children:(0,q.jsxs)(o,{to:I({date:t.date}),className:`flex items-start gap-3 rounded-lg p-2 transition-colors hover:bg-muted`,children:[(0,q.jsx)(`span`,{className:`min-w-[38px] pt-0.5 font-mono text-xs font-medium text-brand`,children:t.year}),(0,q.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,q.jsx)(`span`,{className:`leading-snug font-medium`,children:t.summary||t.topDomains.slice(0,2).join(`、`)||t.date}),(0,q.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e(`home.onThisDay.meta`,{visits:e(`common.visits`,{count:t.totalVisits}),domains:t.topDomains.slice(0,3).join(`, `)})})]})]})},t.year))})})}function mt(e,t,n,r){let i=Math.max(1,...n.values()),a=`${e}-01-01`,o=(E(a).getUTCDay()+6)%7,s=[];for(let c=0;c<54;c+=1){let l=[];for(let s=0;s<7;s+=1){let u=C(a,c*7+s-o),d=!u.startsWith(`${e}-`)||u>t,f=n.get(u)??0;l.push(d?{key:`${c}-${s}`,level:0,label:``,empty:!0}:{key:u,level:he(f,i),label:r(u,f)})}l.some(e=>!e.empty)&&s.push(l)}return s}function ht(){let{t:n}=y(),i=W(),a=t(),o=x(U().shown),s=Number(o.slice(0,4)),[c,l]=(0,G.useState)(s),u=we(c),f=B(u.data,z),p=u.data?.data.availableYears??[s],h=Math.min(s,...p),g=u.data?.data.points,{columns:v,total:b,busiest:S}=(0,G.useMemo)(()=>{let e=new Map((g??[]).map(e=>[e.dateKey,e.totalVisits])),t=null,r=0;for(let[n,i]of e)r+=i,(!t||i>t.visits)&&(t={dateKey:n,visits:i});return{columns:mt(c,o,e,(e,t)=>t>0?n(`home.year.cell`,{date:i.day(e),visits:n(`common.visits`,{count:t})}):n(`home.year.cellEmpty`,{date:i.day(e)})),total:r,busiest:t}},[g,c,o,n,i]);return(0,q.jsxs)(d,{title:n(`home.year.title`),subtitle:n(`home.year.subtitle`),action:(0,q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,q.jsx)(k,{variant:`outline`,size:`icon`,className:`size-7`,"aria-label":n(`home.year.previous`),disabled:c<=h,onClick:()=>l(e=>e-1),children:(0,q.jsx)(e,{})}),(0,q.jsx)(`span`,{className:`px-2 font-mono text-[13px] font-medium tabular`,children:c}),(0,q.jsx)(k,{variant:`outline`,size:`icon`,className:`size-7`,"aria-label":n(`home.year.next`),disabled:c>=s,onClick:()=>l(e=>e+1),children:(0,q.jsx)(r,{})})]}),children:[(0,q.jsx)(`div`,{className:A(`overflow-x-auto pb-1 transition-opacity`,u.isFetching&&`opacity-60`),children:u.isError?(0,q.jsx)(m,{error:u.error,onRetry:()=>void u.refetch()}):u.isPending||f?(0,q.jsx)(_,{className:`h-[110px] w-full`}):(0,q.jsx)(_e,{columns:v,label:`${n(`home.year.title`)} · ${c}`,onCellClick:e=>void a(Se(e))})}),(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 text-xs text-muted-foreground`,children:[f?(0,q.jsx)(Q,{result:u.data}):u.isPending?(0,q.jsx)(_,{className:`h-3.5 w-48`}):(0,q.jsxs)(`span`,{className:`tabular`,children:[n(`home.year.summary`,{total:i.number(b),year:String(c)}),S&&S.visits>0&&` · ${n(`home.year.busiest`,{date:i.day(S.dateKey,{month:`short`,day:`numeric`})})}`]}),(0,q.jsx)(ge,{less:n(`common.less`),more:n(`common.more`)})]})]})}function gt(){let{t:e}=y(),t=W(),n=U().shown,r=Ce(),i=B(r.data,e=>e.items.length===0),a=(r.data?.data.items??[]).slice().sort((e,t)=>t.lastSeenAt.localeCompare(e.lastSeenAt)).slice(0,4);return(0,q.jsx)(d,{title:e(`home.threads.title`),action:(0,q.jsxs)(o,{to:F(),className:`text-[13px] text-muted-foreground hover:text-foreground`,children:[e(`home.threads.all`),` →`]}),children:r.isError?(0,q.jsx)(m,{error:r.error,onRetry:()=>void r.refetch()}):r.isPending||i?(0,q.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[[0,1,2,3].map(e=>(0,q.jsx)(_,{className:`h-9`},e)),i&&(0,q.jsx)(Q,{result:r.data})]}):a.length===0?(0,q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`home.threads.empty`)}):(0,q.jsx)(`ul`,{className:`-mx-2 flex flex-col`,children:a.map(r=>(0,q.jsx)(`li`,{children:(0,q.jsxs)(o,{to:r.anchorType===`query_family`?xe(r.anchorLabel,L(`d90`,n)):be(r.anchorId,L(`d90`,n)),className:`flex items-center gap-3 rounded-lg p-2 transition-colors hover:bg-muted`,children:[(0,q.jsx)(ve,{topic:r}),(0,q.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,q.jsx)(`span`,{className:`truncate font-medium`,children:r.anchorLabel}),(0,q.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e(`home.threads.meta`,{days:e(`home.threads.days`,{count:r.distinctDays}),visits:e(`common.visits`,{count:r.occurrenceCount})})})]}),(0,q.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:t.shortWhen(r.lastSeenAt)})]})},r.investigationId))})})}function _t(){let{t:e}=y(),t=T(),{list:n,loading:r,failed:i}=R(),a=Math.max(1,...n.map(e=>e.visits));return(0,q.jsx)(d,{title:e(`home.sources.title`),action:(0,q.jsxs)(o,{to:D(`browsing`,`backup`),className:`text-[13px] text-muted-foreground hover:text-foreground`,children:[e(`home.sources.manage`),` →`]}),children:n.length===0?(0,q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`home.sources.empty`)}):(0,q.jsx)(`ul`,{className:`flex flex-col gap-3`,children:n.map(n=>(0,q.jsxs)(`li`,{className:A(`flex items-center gap-3`,!n.selected&&`opacity-50`),title:n.selected?void 0:e(`home.sources.paused`),children:[(0,q.jsx)(ye,{browserName:n.browserName,className:`size-5`,decorative:!0}),(0,q.jsx)(`span`,{className:`flex-1 truncate font-medium`,children:n.browserName}),r?(0,q.jsx)(_,{className:`h-3 w-24`}):i?(0,q.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:`—`}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground tabular`,children:t.number(n.visits)}),(0,q.jsx)(`span`,{className:`h-1 w-16 overflow-hidden rounded-full bg-muted`,children:(0,q.jsx)(`span`,{className:`block h-full rounded-full bg-foreground/80`,style:{width:`${n.visits/a*100}%`}})})]})]},n.browserName))})})}function vt(e,t=new Date().getHours()){return e(t<5?`home.greetingEvening`:t<12?`home.greetingMorning`:t<18?`home.greetingAfternoon`:`home.greetingEvening`)}function yt(e,t){let n=new Date(t),r=new Date,i=(r.getFullYear()-n.getFullYear())*12+r.getMonth()-n.getMonth();return i>=12?e(`home.stats.spanYearsMonths`,{years:Math.floor(i/12),months:i%12}):i>=1?e(`home.stats.spanMonths`,{count:i}):e(`home.stats.spanDays`,{count:Math.max(1,Math.round((r.getTime()-n.getTime())/864e5))})}function $({to:e,label:t,value:n,sub:r,loading:i}){return(0,q.jsxs)(o,{to:e,className:`flex flex-col gap-1.5 rounded-xl border bg-card px-[18px] py-4 shadow-card transition-colors hover:bg-card/90 hover:no-underline`,children:[(0,q.jsx)(`span`,{className:`text-[13px] text-muted-foreground`,children:t}),i?(0,q.jsx)(_,{className:`my-1 h-6 w-28`}):(0,q.jsx)(`span`,{className:`text-2xl font-semibold tracking-[-0.02em] tabular`,children:n}),i?(0,q.jsx)(_,{className:`h-3.5 w-24`}):(0,q.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:r})]})}function bt(){let{t:e}=y(),t=T(),n=h(),r=g(),i=H(),a=R(),o=x(U().shown),s=r.data,c=V(i.data?.data.points??[],7,o).reduce((e,t)=>e+t.visits,0),l=s?.storage,u=l?Object.values({...l}).reduce((e,t)=>e+t,0):null,d=a.list.filter(e=>e.selected).length,f=a.list.length-d;return(0,q.jsxs)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(180px,1fr))] gap-3`,children:[(0,q.jsx)($,{to:I({}),label:e(`home.stats.saved`),value:s?t.number(s.totalVisits):`—`,sub:e(`home.stats.savedSub`,{count:c}),loading:r.isPending||i.isPending||B(i.data,z)}),(0,q.jsx)($,{to:F(),label:e(`home.stats.span`),value:s?.earliestVisitAt?yt(e,s.earliestVisitAt):`—`,sub:s?.earliestVisitAt?e(`home.stats.spanSince`,{date:t.date(s.earliestVisitAt,{year:`numeric`,month:`long`})}):``,loading:r.isPending}),(0,q.jsx)($,{to:`/settings/storage`,label:e(`home.stats.size`),value:u===null?`—`:t.bytes(u),sub:e(n.archiveStatus.encrypted?`home.stats.encrypted`:`home.stats.notEncrypted`),loading:r.isPending}),(0,q.jsx)($,{to:D(`browsing`,`backup`),label:e(`home.stats.sources`),value:e(`home.stats.sourcesValue`,{count:d}),sub:f>0?e(`home.stats.sourcesPaused`,{count:f}):e(`home.stats.sourcesAllOn`)})]})}function xt(){let{t:e}=y(),t=T();return(0,q.jsxs)(p,{children:[(0,q.jsx)(f,{eyebrow:t.weekdayDate(new Date),title:e(`home.title`,{greeting:vt(e)}),actions:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(l,{}),(0,q.jsx)(u,{})]})}),(0,q.jsx)(ke,{}),(0,q.jsx)(bt,{}),(0,q.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1.6fr)_minmax(0,1fr)] gap-4 max-[900px]:grid-cols-1`,children:[(0,q.jsx)(ft,{}),(0,q.jsx)(pt,{})]}),(0,q.jsx)(ht,{}),(0,q.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 max-[900px]:grid-cols-1`,children:[(0,q.jsx)(gt,{}),(0,q.jsx)(_t,{})]})]})}export{xt as default}; \ No newline at end of file diff --git a/site/public/app/assets/index-CteWxeiL.js b/site/public/app/assets/index-CteWxeiL.js new file mode 100644 index 00000000..c531584d --- /dev/null +++ b/site/public/app/assets/index-CteWxeiL.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./main-CmsrHzbA.js","./react-dom-BQvtGpns.js","./query-DyHGS9i8.js","./button-C0JM8asg.js","./loader-circle-BRt0w1nZ.js","./theme-B8UKnN8k.js","./app-CVcZz016.js","./es2015-Do4eDMnQ.js","./dist-Bj5Hol67.js","./dist-DjbtVayB.js","./schedule-BcYH--Ck.js","./spaces-BqDG3Cu2.js","./archive-tDw2mIBu.js","./useInfiniteQuery-_wRbirEp.js","./intelligence-CeVzSBj6.js","./zone-CAMroIcN.js","./insights-Dw_jeUg7.js","./search-C-9jHG2I.js","./dialog-Euero0G3.js","./x-G5NChC4d.js","./dist-BNmHZVEB.js","./circle-C2ges-Y_.js","./window-DVG07HkV.js","./event-CTND-agQ.js","./main-CP-I-o71.css"])))=>i.map(i=>d[i]); +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,ee={};function v(e,t,n){this.props=e,this.context=t,this.refs=ee,this.updater=n||g}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=ee,this.updater=n||g}var x=b.prototype=new y;x.constructor=b,_(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function T(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function E(e,t){return T(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var O=/\/+/g;function k(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function A(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+k(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(O,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=E(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(O,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=u()})),f=l(d(),1),p=(0,f.createContext)(null);function m(){let e=(0,f.useContext)(p);if(!e)throw Error(`useI18n must be used inside I18nProvider`);return e}var h=[`en`,`zh-CN`,`zh-TW`];function g(e){return e}var _=async(e,t)=>await pn(e,t);function ee(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}function v(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}var y,b=`__TAURI_TO_IPC_KEY__`;function x(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}async function S(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}var C=class{get rid(){return ee(this,y,`f`)}constructor(e){y.set(this,void 0),v(this,y,e,`f`)}async close(){return S(`plugin:resources|close`,{rid:this.rid})}async[(y=new WeakMap,Symbol.asyncDispose)](){await this.close()}};function w(){return!!(globalThis||window).isTauri}function te(){return typeof globalThis==`object`&&globalThis!==null&&typeof globalThis.location?.protocol==`string`&&globalThis.location.protocol===`tauri:`}function T(){let e=globalThis.__TAURI_INTERNALS__;return typeof e!=`object`||!e?null:e}function E(){return w()||te()||typeof T()?.invoke==`function`}function D(){let e=`demo`.replace(/\/+$/,``);return e.length>0?e:null}function ne(){return E()?`tauri`:D()?`browser-desktop-bridge`:`browser-only`}function O(){return ne()!==`browser-only`}function k(){return E()}function A(){if(typeof navigator>`u`)return!1;let e=navigator.platform||``,t=navigator.userAgent||``;return/Mac|iPhone|iPod|iPad/.test(e)||/Mac OS X/.test(t)}function j(){return E()&&A()}function M(){return E()&&!A()}function re(e){try{return JSON.stringify(e).length}catch{return 0}}function N(e,t,n=0){if(e===null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e;if(typeof e==`bigint`)return e.toString();if(e===void 0)return`__undefined__`;if(Array.isArray(e))return n>=2?{__type:`array`,length:e.length}:{__type:`array`,length:e.length,sample:e.slice(0,8).map(e=>N(e,t,n+1))};if(typeof e==`object`){if(t.has(e))return`__cycle__`;if(t.add(e),n>=2)return{__type:`object`,keyCount:Object.keys(e).length};let r=Object.entries(e),i={__type:`object`,keyCount:r.length};for(let[e,a]of r.slice(0,12))i[e]=N(a,t,n+1);return r.length>12&&(i.__truncatedKeys=r.length-12),i}return{__type:typeof e}}function ie(e){try{return JSON.stringify(N(e,new WeakSet)).length}catch{return 0}}function ae(e){if(typeof window>`u`)return;let t=window,n=t.__PATHKEEP_DESKTOP_COMMAND_METRICS__??[];n.push(e),n.length>200&&n.splice(0,n.length-200),t.__PATHKEEP_DESKTOP_COMMAND_METRICS__=n}async function P(e,t){let n=performance.now();if(O()){let r=await _(e,t);return ae({command:e,durationMs:performance.now()-n,requestBytes:re(t),responseBytes:ie(r),recordedAt:new Date().toISOString()}),r}throw Error(`PathKeep cannot reach its backend (${e}). Run the desktop app, or start the dev bridge with \`bun run desktop:dev:bridge\`.`)}var oe={openPathInFileManager:e=>P(`open_path_in_file_manager`,{path:e}),openExternalUrl:e=>P(`open_external_url`,{url:e}),systemClock:()=>P(`system_clock`),openVisitedPage:e=>P(`open_visited_page`,{url:e}),revealLogs:()=>P(`reveal_logs`)},se=g({en:{newChat:`New chat`,untitled:`New chat`,list:{label:`Conversations`,empty:`Your conversations will show up here.`,loadFailed:`Could not load your conversations.`,options:`Conversation options`,rename:`Rename`,delete:`Delete`,renameTitle:`Rename conversation`,renameLabel:`Title`,renameFailed:`Could not rename the conversation.`,deleteTitle:`Delete this conversation?`,deleteBody:`“{title}” will be removed from this computer. Your browsing history is not affected.`,deleteFailed:`Could not delete the conversation.`,export:`Export as Markdown…`},export:{done:`Saved as Markdown`,failed:`Could not export the conversation.`,gone:`This conversation is no longer saved.`,you:`You`,assistant:`Assistant`},empty:{title:`Ask about the path you’ve walked`,bodyLocal:`The assistant only reads your local archive. With a local model, nothing leaves this computer.`,bodyRemote:`The assistant only reads your local archive. {provider} is an online service, so the snippets it needs are sent there when you ask.`,examplesLabel:`Try asking`,example1:`What did I spend the most time on this week?`,example2:`Find the article I read about Rust last month`,example3:`Which sites did I keep coming back to lately?`,example4:`What was I researching around the end of last month?`},setup:{title:`Ask your history in plain language`,body:`The assistant searches your archive and answers with the pages it found. It needs an AI service to talk to. A local model, such as one running in Ollama, keeps everything on this computer.`,optional:`PathKeep works fully without it. Search, Insights and backups do not need an assistant.`,action:`Set up in Settings → AI`,toContinue:`To ask more, set up an AI service.`},loadingConversation:`Opening conversation…`,loadFailed:`Could not open this conversation.`,edit:{action:`Edit message`,label:`Edited message`,send:`Send`,dropsLater:`The answers after this message are replaced by a new one.`},composer:{label:`Message`,placeholder:`Ask about your history`,send:`Send`,stop:`Stop`,hint:`Enter to send, Shift+Enter for a new line`,model:`Model that answers`,modelLoaded:`Loaded · reads {size}`,modelUpTo:`Up to {size}`,modelsLoading:`Reading its models…`,modelsFailed:`Could not read {service}’s models.`,context:`{used} / {limit}`,contextUnknown:`{used} · limit unknown`,contextTitle:`The next message takes about {used} tokens of the {limit} the model reads at a time: the conversation, what you typed, the assistant’s instructions and room for its answer.`,contextUnknownTitle:`The next message takes about {used} tokens. {service} doesn’t say how much this model reads at a time; LM Studio and Ollama say it once the model is loaded.`,contextNear:`This conversation is close to the model’s context ({limit}). A longer one won’t be sent; start a new chat, or load the model with a longer context in LM Studio or Ollama.`,contextOver:`This conversation no longer fits the model’s context ({limit}), so it won’t be sent: the service would cut part of it out without saying. Start a new chat, or load the model with a longer context in LM Studio or Ollama.`},turn:{working:`Working…`,searching:`Searching your archive…`,thinking:`Thinking`,thinkingSearched_one:`Thinking · searched the archive {count} time`,thinkingSearched_other:`Thinking · searched the archive {count} times`,searchedOnly_one:`Searched the archive {count} time`,searchedOnly_other:`Searched the archive {count} times`,toolPending:`Running…`,toolFailed:`Failed`,code:`Script`,openInHistory:`Open in History`,copy:`Copy answer`,copied:`Copied`,retry:`Try again`,regenerate:`Answer again`,writtenBy:`The model that wrote this answer`,cancelled:`Stopped. The answer above may be incomplete.`,interrupted:`This answer did not finish.`,failedTitle:`The assistant could not answer`,tokens:`{prompt} in · {completion} out`,sources:`Pages used`,moreSources:`+{count} more`,lessSources:`Show fewer`,sourceTitle:`{title} · {date}`,notes:{maxStepsReached:`It stopped after reaching the search step limit, so the answer may be incomplete.`,tokenBudgetReached:`It stopped when the model’s context was nearly full, so the answer may be incomplete.`,contextTooSmall:`This conversation doesn’t fit the context the model is loaded with, so it wasn’t sent: the service would have cut part of it out without saying. Load the model with a longer context in LM Studio or Ollama, or start a new chat.`,sourcesNotSaved:`The pages this answer used couldn’t be saved. They show now, but not when you reopen this chat.`,toolCallingUnavailable:`This model cannot use search tools, so it answered without looking at your archive.`,searchIndexIncomplete:`The search index was still being built, so this answer may miss some pages.`,noAnswer:`The model stopped without writing an answer. Ask again, or pick another model beside the message box.`}}},"zh-CN":{newChat:`新对话`,untitled:`新对话`,list:{label:`对话`,empty:`你的对话会显示在这里。`,loadFailed:`无法加载你的对话。`,options:`对话选项`,rename:`重命名`,delete:`删除`,renameTitle:`重命名对话`,renameLabel:`标题`,renameFailed:`无法重命名这段对话。`,deleteTitle:`删除这段对话?`,deleteBody:`「{title}」会从这台电脑上移除,不会影响你的浏览历史。`,deleteFailed:`无法删除这段对话。`,export:`导出为 Markdown…`},export:{done:`已存为 Markdown`,failed:`无法导出这段对话。`,gone:`这段对话已经不在了。`,you:`你`,assistant:`助理`},empty:{title:`问问你走过的路`,bodyLocal:`助理只读取本机存档。使用本地模型时,任何内容都不会离开这台电脑。`,bodyRemote:`助理只读取本机存档。{provider} 是在线服务,你提问时会把所需的片段发送过去。`,examplesLabel:`可以这样问`,example1:`这周我花最多时间在什么上?`,example2:`找回上个月我读过的那篇 Rust 文章`,example3:`最近我反复打开了哪些网站?`,example4:`上个月底我在研究什么?`},setup:{title:`用日常语言询问你的历史`,body:`助理会搜索你的存档,并用找到的页面来回答。它需要连接一个 AI 服务。使用本地模型(例如在 Ollama 中运行的模型),所有内容都留在这台电脑上。`,optional:`没有助理,PathKeep 也完全可用。搜索、洞察和备份都不需要它。`,action:`前往「设置 → AI」`,toContinue:`要继续提问,请先设置一个 AI 服务。`},loadingConversation:`正在打开对话…`,loadFailed:`无法打开这段对话。`,edit:{action:`编辑消息`,label:`编辑后的消息`,send:`发送`,dropsLater:`这则消息之后的回答会被新的回答取代。`},composer:{label:`消息`,placeholder:`问问你的浏览历史`,send:`发送`,stop:`停止`,hint:`按 Enter 发送,Shift+Enter 换行`,model:`回答用的模型`,modelLoaded:`已加载 · 读 {size}`,modelUpTo:`最多 {size}`,modelsLoading:`正在读取模型…`,modelsFailed:`无法读取 {service} 的模型。`,context:`{used} / {limit}`,contextUnknown:`{used} · 上限未知`,contextTitle:`下一则消息约占 {used} tokens,模型一次能读 {limit}:包括对话、你输入的内容、助理的说明和留给回答的空间。`,contextUnknownTitle:`下一则消息约占 {used} tokens。{service} 没有说这个模型一次能读多少;LM Studio 和 Ollama 在模型加载后才会说。`,contextNear:`这段对话快到模型的 context 上限({limit})了。再长就不会送出;开新对话,或在 LM Studio、Ollama 用更长的 context 加载模型。`,contextOver:`这段对话已经超过模型的 context({limit}),所以不会送出:服务会默默截掉其中一段。开新对话,或在 LM Studio、Ollama 用更长的 context 加载模型。`},turn:{working:`处理中…`,searching:`正在搜索存档…`,thinking:`思考`,thinkingSearched_one:`思考 · 搜索了 {count} 次存档`,thinkingSearched_other:`思考 · 搜索了 {count} 次存档`,searchedOnly_one:`搜索了 {count} 次存档`,searchedOnly_other:`搜索了 {count} 次存档`,toolPending:`运行中…`,toolFailed:`失败`,code:`脚本`,openInHistory:`在记录中打开`,copy:`复制回答`,copied:`已复制`,retry:`重试`,regenerate:`重新回答`,writtenBy:`写这个回答的模型`,cancelled:`已停止,上面的回答可能不完整。`,interrupted:`这个回答没有完成。`,failedTitle:`助理无法回答`,tokens:`输入 {prompt} · 输出 {completion}`,sources:`用到的页面`,moreSources:`另外 {count} 个`,lessSources:`收起`,sourceTitle:`{title} · {date}`,notes:{maxStepsReached:`已达到搜索步数上限而停止,回答可能不完整。`,tokenBudgetReached:`模型的 context 快满了,所以停下,回答可能不完整。`,contextTooSmall:`这段对话放不进模型目前加载的 context,所以没有送出:服务会默默截掉其中一段。在 LM Studio 或 Ollama 用更长的 context 加载模型,或开新对话。`,sourcesNotSaved:`这个回答用到的页面没能保存。现在看得到,重新打开这段对话时就不会显示。`,toolCallingUnavailable:`这个模型无法使用搜索工具,所以它没有查看你的存档就回答了。`,searchIndexIncomplete:`搜索索引还在建立中,这个回答可能漏掉一些页面。`,noAnswer:`模型没有写出回答就停下了。可以再问一次,或在输入框旁换一个模型。`}}},"zh-TW":{newChat:`新對話`,untitled:`新對話`,list:{label:`對話`,empty:`你的對話會顯示在這裡。`,loadFailed:`無法載入你的對話。`,options:`對話選項`,rename:`重新命名`,delete:`刪除`,renameTitle:`重新命名對話`,renameLabel:`標題`,renameFailed:`無法重新命名這段對話。`,deleteTitle:`要刪除這段對話嗎?`,deleteBody:`「{title}」會從這台電腦移除,不會影響你的瀏覽歷史。`,deleteFailed:`無法刪除這段對話。`,export:`匯出為 Markdown…`},export:{done:`已存成 Markdown`,failed:`無法匯出這段對話。`,gone:`這段對話已經不在了。`,you:`你`,assistant:`助理`},empty:{title:`問問你走過的路`,bodyLocal:`助理只讀取本機存檔。使用本機模型時,任何內容都不會離開這台電腦。`,bodyRemote:`助理只讀取本機存檔。{provider} 是線上服務,你提問時會把所需的片段傳送過去。`,examplesLabel:`可以這樣問`,example1:`這週我花最多時間在什麼上?`,example2:`找回上個月我讀過的那篇 Rust 文章`,example3:`最近我反覆打開了哪些網站?`,example4:`上個月底我在研究什麼?`},setup:{title:`用日常語言詢問你的歷史`,body:`助理會搜尋你的存檔,並用找到的頁面來回答。它需要連接一個 AI 服務。使用本機模型(例如在 Ollama 中執行的模型),所有內容都留在這台電腦上。`,optional:`沒有助理,PathKeep 也完全可用。搜尋、洞察和備份都不需要它。`,action:`前往「設定 → AI」`,toContinue:`要繼續提問,請先設定一個 AI 服務。`},loadingConversation:`正在開啟對話…`,loadFailed:`無法開啟這段對話。`,edit:{action:`編輯訊息`,label:`編輯後的訊息`,send:`傳送`,dropsLater:`這則訊息之後的回答會被新的回答取代。`},composer:{label:`訊息`,placeholder:`問問你的瀏覽歷史`,send:`傳送`,stop:`停止`,hint:`按 Enter 傳送,Shift+Enter 換行`,model:`回答用的模型`,modelLoaded:`已載入 · 讀 {size}`,modelUpTo:`最多 {size}`,modelsLoading:`正在讀取模型…`,modelsFailed:`無法讀取 {service} 的模型。`,context:`{used} / {limit}`,contextUnknown:`{used} · 上限未知`,contextTitle:`下一則訊息約占 {used} tokens,模型一次能讀 {limit}:包括對話、你輸入的內容、助理的說明和留給回答的空間。`,contextUnknownTitle:`下一則訊息約占 {used} tokens。{service} 沒有說這個模型一次能讀多少;LM Studio 和 Ollama 在模型載入後才會說。`,contextNear:`這段對話快到模型的 context 上限({limit})了。再長就不會送出;開新對話,或在 LM Studio、Ollama 用更長的 context 載入模型。`,contextOver:`這段對話已經超過模型的 context({limit}),所以不會送出:服務會默默截掉其中一段。開新對話,或在 LM Studio、Ollama 用更長的 context 載入模型。`},turn:{working:`處理中…`,searching:`正在搜尋存檔…`,thinking:`思考`,thinkingSearched_one:`思考 · 搜尋了 {count} 次存檔`,thinkingSearched_other:`思考 · 搜尋了 {count} 次存檔`,searchedOnly_one:`搜尋了 {count} 次存檔`,searchedOnly_other:`搜尋了 {count} 次存檔`,toolPending:`執行中…`,toolFailed:`失敗`,code:`腳本`,openInHistory:`在紀錄中開啟`,copy:`複製回答`,copied:`已複製`,retry:`重試`,regenerate:`重新回答`,writtenBy:`寫這個回答的模型`,cancelled:`已停止,上面的回答可能不完整。`,interrupted:`這個回答沒有完成。`,failedTitle:`助理無法回答`,tokens:`輸入 {prompt} · 輸出 {completion}`,sources:`用到的頁面`,moreSources:`另外 {count} 個`,lessSources:`收合`,sourceTitle:`{title} · {date}`,notes:{maxStepsReached:`已達到搜尋步數上限而停止,回答可能不完整。`,tokenBudgetReached:`模型的 context 快滿了,所以停下,回答可能不完整。`,contextTooSmall:`這段對話放不進模型目前載入的 context,所以沒有送出:服務會默默截掉其中一段。在 LM Studio 或 Ollama 用更長的 context 載入模型,或開新對話。`,sourcesNotSaved:`這個回答用到的頁面沒能儲存。現在看得到,重新打開這段對話時就不會顯示。`,toolCallingUnavailable:`這個模型無法使用搜尋工具,所以它沒有查看你的存檔就回答了。`,searchIndexIncomplete:`搜尋索引還在建立中,這個回答可能漏掉一些頁面。`,noAnswer:`模型沒有寫出回答就停下了。可以再問一次,或在輸入框旁換一個模型。`}}}}),ce=g({en:{title:`Backup`,subtitle:`PathKeep never reads live browser databases. It copies them, then appends what is new.`,progress:{title:`Backing up source {done} of {total}`,starting:`Getting ready…`,label:`Backup progress`},sources:{title:`Sources`,rescan:`Rescan`,rescanDone_one:`Scan finished. {count} browser profile found.`,rescanDone_other:`Scan finished. {count} browser profiles found.`,rescanFailed:`The scan failed`,lastVisit:`Last visit {ago}`,noVisits:`No visits yet`,statsFailed:`Visit counts are not available right now`,grant:`Grant`,grantFailed:`Could not open System Settings`,checkAgain:`Check again`,saveFailed:`Could not update the sources`,toggle:`Back up {name}`,group:{profiles_one:`{count} profile`,profiles_other:`{count} profiles`,on:`{on} of {total} backed up`,show:`Show the profiles of {browser}`,hide:`Hide the profiles of {browser}`,notFound_one:`{count} profile without history`,notFound_other:`{count} profiles without history`,notFoundHint:`PathKeep found these profiles but no history file in them: the browser was removed, or the profile never used.`},status:{ok:`OK`,needsPermission:`Needs permission`,paused:`Paused`,notFound:`Not found`},notice:{fullDiskAccess:{title:`Safari needs Full Disk Access`,body:`macOS keeps Safari’s history private until you allow PathKeep in System Settings → Privacy & Security → Full Disk Access.`},empty:{title:`No browsers found`,body:`PathKeep looks for Chrome, Edge, Firefox, Safari and other browsers installed for your user. Set one up, then scan again.`},error:{title:`PathKeep could not scan for browsers`,body:`Try scanning again. If it keeps failing, the logs in Settings → About say why.`}}},schedule:{title:`Automatic backup`,subtitle:`Runs in the background, even when PathKeep is closed.`,label:`Backup frequency`,hourly:`Hourly`,sixHours:`Every 6h`,daily:`Daily`,off:`Off`,next:`Next run`,scheduler:`Scheduler`,state:{installed:`installed`,notInstalled:`not installed`,mismatch:`needs repair`,permissionWarning:`needs permission`,legacy:`old install found`,manual:`manual setup`},turnedOff:`Automatic backup is off`,repaired:`The scheduler is repaired`,attention:{title:`The scheduler needs attention`,mismatch:`The installed job does not match PathKeep’s settings, so backups may not run on time.`,permission:`The system has not let the scheduled job run yet, so backups may not run on time.`,repair:`Repair`},manual:{title:`Set this up yourself`,body:`PathKeep cannot install a scheduler on this system. Add a job that follows these steps:`}},import:{title:`Import`,subtitle:`Bring in older history from a Google Takeout export.`,steps:{title:`How to get it from Google Takeout`,open:`Open takeout.google.com and deselect everything.`,chrome:`Tick Chrome. In its data options you can keep just History.`,zip:`Create the export as a .zip. Google emails you when it is ready to download.`,drop:`Drop the .zip here or choose it. There is no need to unzip it.`,note:`Takeout holds the history Chrome synced to your Google account, which can go back further than Chrome on this computer.`},nothingHint:`There is no Chrome history in this file. In Takeout, tick Chrome and export it as a .zip.`,myActivity:`This export has My Activity’s Chrome entries as HTML, which PathKeep cannot read. In Takeout, choose JSON as the format for My Activity, or tick Chrome.`,drop:`Drop a Takeout .zip here`,dropActive:`Release to inspect it`,choose:`Choose file`,pickerTitle:`Choose a Google Takeout .zip`,pickFailed:`Could not open the file picker`,pathLabel:`Path to a Takeout .zip or folder`,pathPlaceholder:`/path/to/takeout.zip`,inspect:`Inspect`,inspecting:`Reading {name}…`,inspectFailed:`Could not read that file.`,nothing:`No browsing history found`,found_one:`{count} visit found`,found_other:`{count} visits found`,range:`From {start} to {end}`,setAside_one:`{count} file was not recognized and will be set aside.`,setAside_other:`{count} files were not recognized and will be set aside.`,dedupe:`Visits you already have are skipped. Nothing is written until you import.`,confirm:`Import`,running:`Importing…`,done_one:`Imported {count} new visit`,done_other:`Imported {count} new visits`,failed:`Import failed`,imported_one:`{count} new visit imported`,imported_other:`{count} new visits imported`,duplicates_one:`{count} visit was already in your archive.`,duplicates_other:`{count} visits were already in your archive.`,sameVisits_one:`{count} visit was already in your archive from another source (the browser, or another export). It is kept and counted once.`,sameVisits_other:`{count} visits were already in your archive from another source (the browser, or another export). They are kept and counted once.`,continued:`This finished the import of this export that stopped on {date}; the numbers include what it saved then.`,stop:`Stop`,stopping:`Stopping…`,stopFailed:`Could not stop the import`,stoppedToast:`Import stopped`,stopped_one:`Stopped. {count} new visit was saved.`,stopped_other:`Stopped. {count} new visits were saved.`,stoppedNext:`Import the same export again to finish it. It reads the export from the start, but passes quickly over what was saved.`,another:`Import another`,batches:{title:`Recent imports`,takeout:`Google Takeout`,browserFile:`Browser history file`,summary:`{imported} new · {duplicates} already there`,undone:`Undone. Hidden from your history.`,undo:`Undo`,restore:`Restore`,undoConfirm:`Undo import`,revertDone:`Import undone`,revertFailed:`Could not undo the import`,restoreDone:`Import restored`,restoreFailed:`Could not restore the import`}},runs:{incomplete:`Backup incomplete · {summary}`,title:`Recent runs`,empty:`No backups yet. Run one and it will show up here.`,failed:`Backup failed`,stoppedBackup:`Stopped partway · {summary} · the next backup finishes it`,stopped:`{label} · stopped partway`,seconds:`{value}s`,minutes:`{minutes}m {seconds}s`,summary:`{sources} · {visits}`,sources_one:`{count} source`,sources_other:`{count} sources`,newVisits_one:`{count} new visit`,newVisits_other:`{count} new visits`,types:{import:`Import`,rekey:`Encryption change`,doctor:`Health check`,archive_restore:`Archive restore`,snapshot_restore:`Snapshot restore`,retention_prune:`Cleanup`,rollback:`Import undone`,restore:`Import restored`,"same-visit":`Same visits counted once`},detail:{title:`Run details`,description:`What this run did, from the audit record.`,started:`Started`,duration:`Duration`,trigger:`Started by`,triggers:{manual:`You`,schedule:`The scheduler`},newVisits:`New visits`,newPages:`New pages`,sources:`Sources`,error:`Error`,noWarnings:`No warnings.`}}},"zh-CN":{title:`备份`,subtitle:`PathKeep 从不直接读取浏览器的数据库,而是先复制一份,再增量追加新内容。`,progress:{title:`正在备份第 {done} / {total} 个来源`,starting:`正在准备…`,label:`备份进度`},sources:{title:`来源`,rescan:`重新扫描`,rescanDone_one:`扫描完成,找到 {count} 个浏览器用户。`,rescanDone_other:`扫描完成,找到 {count} 个浏览器用户。`,rescanFailed:`扫描失败`,lastVisit:`最近浏览 {ago}`,noVisits:`还没有浏览记录`,statsFailed:`暂时无法获取浏览次数`,grant:`授权`,grantFailed:`无法打开系统设置`,checkAgain:`重新检查`,saveFailed:`无法更新来源`,toggle:`备份 {name}`,group:{profiles_one:`{count} 个用户`,profiles_other:`{count} 个用户`,on:`已备份 {on}/{total}`,show:`显示 {browser} 的用户`,hide:`收起 {browser} 的用户`,notFound_one:`{count} 个用户没有浏览记录`,notFound_other:`{count} 个用户没有浏览记录`,notFoundHint:`PathKeep 找到了这些用户,但里面没有浏览记录文件:浏览器已删除,或这个用户没用过。`},status:{ok:`正常`,needsPermission:`需要授权`,paused:`已暂停`,notFound:`未找到`},notice:{fullDiskAccess:{title:`Safari 需要完全磁盘访问权限`,body:`在系统设置 → 隐私与安全性 → 完全磁盘访问权限中允许 PathKeep 之前,macOS 不会让它读取 Safari 的历史记录。`},empty:{title:`没有找到浏览器`,body:`PathKeep 会查找当前用户安装的 Chrome、Edge、Firefox、Safari 等浏览器。装好并使用过之后,再扫描一次。`},error:{title:`PathKeep 无法扫描浏览器`,body:`请再扫描一次。如果一直失败,可以在“设置 → 关于”里打开日志查看原因。`}}},schedule:{title:`自动备份`,subtitle:`在后台运行,即使 PathKeep 没有打开也会继续。`,label:`备份频率`,hourly:`每小时`,sixHours:`每 6 小时`,daily:`每天`,off:`关闭`,next:`下次运行`,scheduler:`调度器`,state:{installed:`已安装`,notInstalled:`未安装`,mismatch:`需要修复`,permissionWarning:`需要授权`,legacy:`发现旧版安装`,manual:`需手动设置`},turnedOff:`自动备份已关闭`,repaired:`调度器已修复`,attention:{title:`调度器需要处理`,mismatch:`已安装的任务与 PathKeep 的设置不一致,备份可能不会准时运行。`,permission:`系统还没有允许这个定时任务运行,备份可能不会准时运行。`,repair:`修复`},manual:{title:`需要你手动设置`,body:`PathKeep 无法在这个系统上自动安装调度器。请添加一个按以下步骤运行的任务:`}},import:{title:`导入`,subtitle:`从 Google Takeout 导出文件里导入更早的历史记录。`,steps:{title:`怎样从 Google Takeout 取得`,open:`打开 takeout.google.com,取消全选。`,chrome:`勾选 Chrome。在它的数据选项里可以只留“历史记录”。`,zip:`以 .zip 格式创建导出。准备好后 Google 会发邮件通知你下载。`,drop:`把 .zip 拖到这里或选择它,不用解压。`,note:`Takeout 里是 Chrome 同步到你 Google 账号的历史记录,可能比这台电脑上的 Chrome 记得更久。`},nothingHint:`这个文件里没有 Chrome 历史记录。在 Takeout 里勾选 Chrome,以 .zip 格式导出。`,myActivity:`这个导出里“我的活动”中的 Chrome 记录是 HTML,PathKeep 读不了。在 Takeout 里把“我的活动”的格式改为 JSON,或改为勾选 Chrome。`,drop:`把 Takeout 的 .zip 拖到这里`,dropActive:`松开即可检查`,choose:`选择文件`,pickerTitle:`选择 Google Takeout 的 .zip`,pickFailed:`无法打开文件选择器`,pathLabel:`Takeout .zip 或文件夹的路径`,pathPlaceholder:`/path/to/takeout.zip`,inspect:`检查`,inspecting:`正在读取 {name}…`,inspectFailed:`无法读取这个文件。`,nothing:`没有找到浏览记录`,found_one:`找到 {count} 条浏览记录`,found_other:`找到 {count} 条浏览记录`,range:`从 {start} 到 {end}`,setAside_one:`有 {count} 个文件无法识别,会被另行存放。`,setAside_other:`有 {count} 个文件无法识别,会被另行存放。`,dedupe:`已有的浏览记录会被跳过。点击导入之前不会写入任何内容。`,confirm:`导入`,running:`正在导入…`,done_one:`已导入 {count} 条新的浏览记录`,done_other:`已导入 {count} 条新的浏览记录`,failed:`导入失败`,imported_one:`已导入 {count} 条新的浏览记录`,imported_other:`已导入 {count} 条新的浏览记录`,duplicates_one:`另有 {count} 条已经在存档里。`,duplicates_other:`另有 {count} 条已经在存档里。`,sameVisits_one:`{count} 条已经从别的来源(浏览器本身,或另一份导出)进了存档:一并保存,只算一次。`,sameVisits_other:`{count} 条已经从别的来源(浏览器本身,或另一份导出)进了存档:一并保存,只算一次。`,continued:`接着完成了 {date} 中断的这份导出;上面的数字包括那次已经存下的。`,stop:`停止`,stopping:`正在停止…`,stopFailed:`没能停止导入`,stoppedToast:`导入已停止`,stopped_one:`已停止。存下了 {count} 条新的浏览记录。`,stopped_other:`已停止。存下了 {count} 条新的浏览记录。`,stoppedNext:`再导入同一份导出就能完成:会从头再读一遍,已经存下的很快略过,接着存剩下的。`,another:`再导入一个`,batches:{title:`最近的导入`,takeout:`Google Takeout`,browserFile:`浏览器历史文件`,summary:`新增 {imported} 条 · 已有 {duplicates} 条`,undone:`已撤销,不再显示在记录中。`,undo:`撤销`,restore:`恢复`,undoConfirm:`撤销导入`,revertDone:`已撤销导入`,revertFailed:`无法撤销导入`,restoreDone:`已恢复导入`,restoreFailed:`无法恢复导入`}},runs:{incomplete:`备份未完成 · {summary}`,title:`最近记录`,empty:`还没有备份。运行一次,记录就会出现在这里。`,failed:`备份失败`,stoppedBackup:`中途停止 · {summary} · 下次备份会接着完成`,stopped:`{label} · 中途停止`,seconds:`{value} 秒`,minutes:`{minutes} 分 {seconds} 秒`,summary:`{sources} · {visits}`,sources_one:`{count} 个来源`,sources_other:`{count} 个来源`,newVisits_one:`新增 {count} 条`,newVisits_other:`新增 {count} 条`,types:{import:`导入`,rekey:`加密变更`,doctor:`健康检查`,archive_restore:`存档还原`,snapshot_restore:`快照还原`,retention_prune:`清理`,rollback:`撤销导入`,restore:`恢复导入`,"same-visit":`同一次访问只算一次`},detail:{title:`运行详情`,description:`这次运行做了什么,来自审计记录。`,started:`开始时间`,duration:`用时`,trigger:`触发方式`,triggers:{manual:`你手动触发`,schedule:`调度器`},newVisits:`新增浏览`,newPages:`新增页面`,sources:`来源`,error:`错误`,noWarnings:`没有警告。`}}},"zh-TW":{title:`備份`,subtitle:`PathKeep 從不直接讀取瀏覽器的資料庫,而是先複製一份,再增量追加新內容。`,progress:{title:`正在備份第 {done} / {total} 個來源`,starting:`正在準備…`,label:`備份進度`},sources:{title:`來源`,rescan:`重新掃描`,rescanDone_one:`掃描完成,找到 {count} 個瀏覽器使用者。`,rescanDone_other:`掃描完成,找到 {count} 個瀏覽器使用者。`,rescanFailed:`掃描失敗`,lastVisit:`最近瀏覽 {ago}`,noVisits:`還沒有瀏覽記錄`,statsFailed:`暫時無法取得瀏覽次數`,grant:`授權`,grantFailed:`無法開啟系統設定`,checkAgain:`重新檢查`,saveFailed:`無法更新來源`,toggle:`備份 {name}`,group:{profiles_one:`{count} 個使用者`,profiles_other:`{count} 個使用者`,on:`已備份 {on}/{total}`,show:`顯示 {browser} 的使用者`,hide:`收起 {browser} 的使用者`,notFound_one:`{count} 個使用者沒有瀏覽紀錄`,notFound_other:`{count} 個使用者沒有瀏覽紀錄`,notFoundHint:`PathKeep 找到了這些使用者,但裡面沒有瀏覽紀錄檔:瀏覽器已移除,或這個使用者沒用過。`},status:{ok:`正常`,needsPermission:`需要授權`,paused:`已暫停`,notFound:`找不到`},notice:{fullDiskAccess:{title:`Safari 需要完整磁碟取用權限`,body:`在「系統設定 → 隱私權與安全性 → 完整磁碟取用權限」允許 PathKeep 之前,macOS 不會讓它讀取 Safari 的歷史記錄。`},empty:{title:`找不到瀏覽器`,body:`PathKeep 會尋找目前使用者安裝的 Chrome、Edge、Firefox、Safari 等瀏覽器。裝好並使用過之後,再掃描一次。`},error:{title:`PathKeep 無法掃描瀏覽器`,body:`請再掃描一次。如果一直失敗,可以在「設定 → 關於」開啟記錄檔查看原因。`}}},schedule:{title:`自動備份`,subtitle:`在背景執行,即使 PathKeep 沒有開啟也會繼續。`,label:`備份頻率`,hourly:`每小時`,sixHours:`每 6 小時`,daily:`每天`,off:`關閉`,next:`下次執行`,scheduler:`排程器`,state:{installed:`已安裝`,notInstalled:`未安裝`,mismatch:`需要修復`,permissionWarning:`需要授權`,legacy:`發現舊版安裝`,manual:`需手動設定`},turnedOff:`自動備份已關閉`,repaired:`排程器已修復`,attention:{title:`排程器需要處理`,mismatch:`已安裝的工作與 PathKeep 的設定不一致,備份可能不會準時執行。`,permission:`系統還沒有允許這個排程工作執行,備份可能不會準時執行。`,repair:`修復`},manual:{title:`需要你手動設定`,body:`PathKeep 無法在這個系統上自動安裝排程器。請新增一個依下列步驟執行的工作:`}},import:{title:`匯入`,subtitle:`從 Google Takeout 匯出檔匯入更早的歷史記錄。`,steps:{title:`怎麼從 Google Takeout 取得`,open:`打開 takeout.google.com,全部取消選取。`,chrome:`勾選 Chrome。在它的資料選項裡可以只留「歷史記錄」。`,zip:`以 .zip 格式建立匯出。準備好後 Google 會寄信通知你下載。`,drop:`把 .zip 拖到這裡或選擇它,不用解壓縮。`,note:`Takeout 裡是 Chrome 同步到你 Google 帳號的歷史記錄,可能比這台電腦上的 Chrome 記得更久。`},nothingHint:`這個檔案裡沒有 Chrome 歷史記錄。在 Takeout 裡勾選 Chrome,以 .zip 格式匯出。`,myActivity:`這份匯出裡「我的活動」中的 Chrome 記錄是 HTML,PathKeep 讀不了。在 Takeout 裡把「我的活動」的格式改為 JSON,或改為勾選 Chrome。`,drop:`把 Takeout 的 .zip 拖到這裡`,dropActive:`放開即可檢查`,choose:`選擇檔案`,pickerTitle:`選擇 Google Takeout 的 .zip`,pickFailed:`無法開啟檔案選擇器`,pathLabel:`Takeout .zip 或資料夾的路徑`,pathPlaceholder:`/path/to/takeout.zip`,inspect:`檢查`,inspecting:`正在讀取 {name}…`,inspectFailed:`無法讀取這個檔案。`,nothing:`找不到瀏覽記錄`,found_one:`找到 {count} 筆瀏覽記錄`,found_other:`找到 {count} 筆瀏覽記錄`,range:`從 {start} 到 {end}`,setAside_one:`有 {count} 個檔案無法辨識,會另外存放。`,setAside_other:`有 {count} 個檔案無法辨識,會另外存放。`,dedupe:`已有的瀏覽記錄會被略過。按下匯入之前不會寫入任何內容。`,confirm:`匯入`,running:`正在匯入…`,done_one:`已匯入 {count} 筆新的瀏覽記錄`,done_other:`已匯入 {count} 筆新的瀏覽記錄`,failed:`匯入失敗`,imported_one:`已匯入 {count} 筆新的瀏覽記錄`,imported_other:`已匯入 {count} 筆新的瀏覽記錄`,duplicates_one:`另有 {count} 筆已經在存檔裡。`,duplicates_other:`另有 {count} 筆已經在存檔裡。`,sameVisits_one:`{count} 筆已經從別的來源(瀏覽器本身,或另一份匯出)進了存檔:一併保存,只算一次。`,sameVisits_other:`{count} 筆已經從別的來源(瀏覽器本身,或另一份匯出)進了存檔:一併保存,只算一次。`,continued:`接著完成了 {date} 中斷的這份匯出;上面的數字包括那次已經存下的。`,stop:`停止`,stopping:`正在停止…`,stopFailed:`沒能停止匯入`,stoppedToast:`匯入已停止`,stopped_one:`已停止。存下了 {count} 筆新的瀏覽記錄。`,stopped_other:`已停止。存下了 {count} 筆新的瀏覽記錄。`,stoppedNext:`再匯入同一份匯出就能完成:會從頭再讀一遍,已經存下的很快略過,接著存剩下的。`,another:`再匯入一個`,batches:{title:`最近的匯入`,takeout:`Google Takeout`,browserFile:`瀏覽器歷史檔案`,summary:`新增 {imported} 筆 · 已有 {duplicates} 筆`,undone:`已復原,不再顯示在紀錄中。`,undo:`復原`,restore:`還原`,undoConfirm:`復原匯入`,revertDone:`已復原匯入`,revertFailed:`無法復原匯入`,restoreDone:`已還原匯入`,restoreFailed:`無法還原匯入`}},runs:{incomplete:`備份未完成 · {summary}`,title:`最近記錄`,empty:`還沒有備份。執行一次,記錄就會出現在這裡。`,failed:`備份失敗`,stoppedBackup:`中途停止 · {summary} · 下次備份會接著完成`,stopped:`{label} · 中途停止`,seconds:`{value} 秒`,minutes:`{minutes} 分 {seconds} 秒`,summary:`{sources} · {visits}`,sources_one:`{count} 個來源`,sources_other:`{count} 個來源`,newVisits_one:`新增 {count} 筆`,newVisits_other:`新增 {count} 筆`,types:{import:`匯入`,rekey:`加密變更`,doctor:`健康檢查`,archive_restore:`存檔還原`,snapshot_restore:`快照還原`,retention_prune:`清理`,rollback:`復原匯入`,restore:`還原匯入`,"same-visit":`同一次造訪只算一次`},detail:{title:`執行詳情`,description:`這次執行做了什麼,來自稽核記錄。`,started:`開始時間`,duration:`耗時`,trigger:`觸發方式`,triggers:{manual:`你手動觸發`,schedule:`排程器`},newVisits:`新增瀏覽`,newPages:`新增頁面`,sources:`來源`,error:`錯誤`,noWarnings:`沒有警告。`}}}}),le=g({en:{browser:{title:`Import a browser’s history`,subtitle:`Bring in a History, places.sqlite or History.db file, or a whole profile folder, from another browser or computer.`,drop:`Drop a history file or profile folder here`,chooseFile:`Choose file`,chooseFolder:`Choose folder`,pickerTitle:`Choose a browser history file`,folderPickerTitle:`Choose a browser profile folder`,pathLabel:`Path to a history file or profile folder`,pathPlaceholder:`/path/to/places.sqlite`,from:`From`,sources:{detect:`Detect automatically`,chrome:`Google Chrome`,edge:`Microsoft Edge`,firefox:`Firefox`,safari:`Safari`,atlas:`ChatGPT Atlas`,comet:`Perplexity Comet`},detected:{chromium:`Chrome-style history`,firefox:`Firefox history`,safari:`Safari history`},inspect:`Inspect`,inspecting:`Reading {name}…`,inspectFailed:`Could not read that file.`,newVisits_one:`{count} new visit`,newVisits_other:`{count} new visits`,already_one:`{count} is already in your archive`,already_other:`{count} are already in your archive`,inFile_one:`{count} visit in the file`,inFile_other:`{count} visits in the file`,range:`From {start} to {end}`,sample:`Latest in the file`,alreadySaved:`already saved`,syncCopy:`Sync copy`,syncCopies_one:`{count} is a Firefox Sync copy of a visit in your archive: kept, counted once`,syncCopies_other:`{count} are Firefox Sync copies of visits in your archive: kept, counted once`,untitled:`Untitled`,historyOnly:`Only visits and pages come in. Icons, downloads and searches are not part of this file.`,copyOnly:`PathKeep reads a copy of the file. The browser’s own file is not changed.`,nothingNew:`Everything in this file is already in your archive.`,confirm_one:`Import {count} visit`,confirm_other:`Import {count} visits`,running:`Importing…`,processed:`{done} of {total}`,done_one:`Imported {count} new visit`,done_other:`Imported {count} new visits`,failed:`Import failed`,stoppedNext:`Importing this file again adds the rest; what was saved counts as already in your archive.`,another:`Import another`,busy:`Wait for the backup to finish first.`},batches:{subtitle:`Each import can be undone and restored. Nothing is deleted.`,empty:`Nothing imported yet.`,reviewTitle:`Import from {time}`,source:`Source`,added:`Added`,already:`Already there`,visible:`Shown in history`,sample:`Some of the visits it added`,noSample:`Its visits are hidden right now.`,record:`Record`,loadFailed:`Could not load this import.`,undoNote_one:`Undo hides the {count} visit this import added. Nothing is deleted, and you can restore it later.`,undoNote_other:`Undo hides the {count} visits this import added. Nothing is deleted, and you can restore it later.`,restoreNote_one:`Restore shows the {count} visit this import added in your history again.`,restoreNote_other:`Restore shows the {count} visits this import added in your history again.`,restoreConfirm:`Restore import`,working:`Working…`,importing:`Importing…`,stopped:`Stopped partway · {imported} added`,undoStopped:`Undo stopped partway. Some of its visits are still shown.`,restoreStopped:`Restore stopped partway. Some of its visits are still hidden.`,finishUndo:`Finish undo`,finishRestore:`Finish restore`,stoppedNote:`This import stopped before it finished. Importing the same file again adds the rest; visits already added are skipped.`,finishUndoNote:`Undo stopped before it finished. Finishing it hides the rest of the visits this import added.`,finishRestoreNote:`Restore stopped before it finished. Finishing it shows the rest of the visits this import added again.`}},"zh-CN":{browser:{title:`导入浏览器历史`,subtitle:`从别的浏览器或电脑导入 History、places.sqlite、History.db 文件,或整个用户资料文件夹。`,drop:`把历史文件或用户资料文件夹拖到这里`,chooseFile:`选择文件`,chooseFolder:`选择文件夹`,pickerTitle:`选择浏览器历史文件`,folderPickerTitle:`选择浏览器用户资料文件夹`,pathLabel:`历史文件或用户资料文件夹的路径`,pathPlaceholder:`/path/to/places.sqlite`,from:`来自`,sources:{detect:`自动识别`,chrome:`Google Chrome`,edge:`Microsoft Edge`,firefox:`Firefox`,safari:`Safari`,atlas:`ChatGPT Atlas`,comet:`Perplexity Comet`},detected:{chromium:`Chrome 格式的历史`,firefox:`Firefox 历史`,safari:`Safari 历史`},inspect:`检查`,inspecting:`正在读取 {name}…`,inspectFailed:`无法读取这个文件。`,newVisits_one:`{count} 条新浏览记录`,newVisits_other:`{count} 条新浏览记录`,already_one:`{count} 条已经在存档里`,already_other:`{count} 条已经在存档里`,inFile_one:`文件里有 {count} 条浏览记录`,inFile_other:`文件里有 {count} 条浏览记录`,range:`从 {start} 到 {end}`,sample:`文件里最近的记录`,alreadySaved:`已保存`,syncCopy:`同步副本`,syncCopies_one:`{count} 条是存档里已有记录的 Firefox 同步副本:一并保存,只算一次`,syncCopies_other:`{count} 条是存档里已有记录的 Firefox 同步副本:一并保存,只算一次`,untitled:`无标题`,historyOnly:`只会导入浏览记录和页面。图标、下载和搜索不在这个文件里。`,copyOnly:`PathKeep 读取的是文件的副本,不会改动浏览器自己的文件。`,nothingNew:`这个文件里的内容都已经在存档里了。`,confirm_one:`导入 {count} 条`,confirm_other:`导入 {count} 条`,running:`正在导入…`,processed:`{done} / {total}`,done_one:`已导入 {count} 条新的浏览记录`,done_other:`已导入 {count} 条新的浏览记录`,failed:`导入失败`,stoppedNext:`再导入这个文件会补上其余的;已经存下的会算作已在存档里。`,another:`再导入一个`,busy:`请等备份完成。`},batches:{subtitle:`每次导入都可以撤销和恢复,不会删除任何内容。`,empty:`还没有导入过。`,reviewTitle:`{time} 的导入`,source:`来源`,added:`新增`,already:`已有`,visible:`显示在记录中`,sample:`它新增的部分记录`,noSample:`它的记录目前是隐藏的。`,record:`记录`,loadFailed:`无法加载这次导入。`,undoNote_one:`撤销会隐藏这次导入新增的 {count} 条浏览记录。不会删除任何内容,之后可以恢复。`,undoNote_other:`撤销会隐藏这次导入新增的 {count} 条浏览记录。不会删除任何内容,之后可以恢复。`,restoreNote_one:`恢复会让这次导入新增的 {count} 条浏览记录重新显示在记录中。`,restoreNote_other:`恢复会让这次导入新增的 {count} 条浏览记录重新显示在记录中。`,restoreConfirm:`恢复导入`,working:`正在处理…`,importing:`正在导入…`,stopped:`中途停止 · 已新增 {imported} 条`,undoStopped:`撤销中途停止,部分记录仍然显示。`,restoreStopped:`恢复中途停止,部分记录仍然隐藏。`,finishUndo:`完成撤销`,finishRestore:`完成恢复`,stoppedNote:`这次导入没有完成就停止了。再次导入同一个文件会补上剩下的记录,已新增的会跳过。`,finishUndoNote:`撤销没有完成就停止了。完成后,这次导入新增的其余记录也会隐藏。`,finishRestoreNote:`恢复没有完成就停止了。完成后,这次导入新增的其余记录也会重新显示。`}},"zh-TW":{browser:{title:`匯入瀏覽器歷史`,subtitle:`從別的瀏覽器或電腦匯入 History、places.sqlite、History.db 檔案,或整個使用者資料夾。`,drop:`把歷史檔案或使用者資料夾拖到這裡`,chooseFile:`選擇檔案`,chooseFolder:`選擇資料夾`,pickerTitle:`選擇瀏覽器歷史檔案`,folderPickerTitle:`選擇瀏覽器使用者資料夾`,pathLabel:`歷史檔案或使用者資料夾的路徑`,pathPlaceholder:`/path/to/places.sqlite`,from:`來自`,sources:{detect:`自動辨識`,chrome:`Google Chrome`,edge:`Microsoft Edge`,firefox:`Firefox`,safari:`Safari`,atlas:`ChatGPT Atlas`,comet:`Perplexity Comet`},detected:{chromium:`Chrome 格式的歷史`,firefox:`Firefox 歷史`,safari:`Safari 歷史`},inspect:`檢查`,inspecting:`正在讀取 {name}…`,inspectFailed:`無法讀取這個檔案。`,newVisits_one:`{count} 筆新的瀏覽記錄`,newVisits_other:`{count} 筆新的瀏覽記錄`,already_one:`{count} 筆已經在存檔裡`,already_other:`{count} 筆已經在存檔裡`,inFile_one:`檔案裡有 {count} 筆瀏覽記錄`,inFile_other:`檔案裡有 {count} 筆瀏覽記錄`,range:`從 {start} 到 {end}`,sample:`檔案裡最近的記錄`,alreadySaved:`已儲存`,syncCopy:`同步副本`,syncCopies_one:`{count} 筆是存檔裡已有記錄的 Firefox 同步副本:一併保存,只算一次`,syncCopies_other:`{count} 筆是存檔裡已有記錄的 Firefox 同步副本:一併保存,只算一次`,untitled:`無標題`,historyOnly:`只會匯入瀏覽記錄和頁面。圖示、下載和搜尋不在這個檔案裡。`,copyOnly:`PathKeep 讀取的是檔案的副本,不會改動瀏覽器自己的檔案。`,nothingNew:`這個檔案裡的內容都已經在存檔裡了。`,confirm_one:`匯入 {count} 筆`,confirm_other:`匯入 {count} 筆`,running:`正在匯入…`,processed:`{done} / {total}`,done_one:`已匯入 {count} 筆新的瀏覽記錄`,done_other:`已匯入 {count} 筆新的瀏覽記錄`,failed:`匯入失敗`,stoppedNext:`再匯入這個檔案會補上其餘的;已經存下的會算作已在存檔裡。`,another:`再匯入一個`,busy:`請等備份完成。`},batches:{subtitle:`每次匯入都可以復原和還原,不會刪除任何內容。`,empty:`還沒有匯入過。`,reviewTitle:`{time} 的匯入`,source:`來源`,added:`新增`,already:`已有`,visible:`顯示在紀錄中`,sample:`它新增的部分記錄`,noSample:`它的記錄目前是隱藏的。`,record:`記錄`,loadFailed:`無法載入這次匯入。`,undoNote_one:`復原會隱藏這次匯入新增的 {count} 筆瀏覽記錄。不會刪除任何內容,之後可以還原。`,undoNote_other:`復原會隱藏這次匯入新增的 {count} 筆瀏覽記錄。不會刪除任何內容,之後可以還原。`,restoreNote_one:`還原會讓這次匯入新增的 {count} 筆瀏覽記錄重新顯示在紀錄中。`,restoreNote_other:`還原會讓這次匯入新增的 {count} 筆瀏覽記錄重新顯示在紀錄中。`,restoreConfirm:`還原匯入`,working:`正在處理…`,importing:`正在匯入…`,stopped:`中途停止 · 已新增 {imported} 筆`,undoStopped:`復原中途停止,部分記錄仍然顯示。`,restoreStopped:`還原中途停止,部分記錄仍然隱藏。`,finishUndo:`完成復原`,finishRestore:`完成還原`,stoppedNote:`這次匯入沒有完成就停止了。再次匯入同一個檔案會補上剩下的記錄,已新增的會略過。`,finishUndoNote:`復原沒有完成就停止了。完成後,這次匯入新增的其餘記錄也會隱藏。`,finishRestoreNote:`還原沒有完成就停止了。完成後,這次匯入新增的其餘記錄也會重新顯示。`}}}),ue=g({en:{incomplete:`Backup incomplete`,incompleteBody:`Some selected browsers weren’t fully backed up. Saved history is kept. Open Warnings for details.`,tabs:{summary:`Summary`,files:`Files`,warnings_one:`Warnings ({count})`,warnings_other:`Warnings ({count})`},manifest:`Manifest`,manifestHash:`Fingerprint`,noManifest:`This run has no manifest.`,noFiles:`This run kept no other files.`,kinds:{snapshot:`Saved copy`},reasons:{"before-rekey":`Copy from before the encryption change`,"source-schema-changed":`Copy kept because the browser’s format changed`,"periodic-checkpoint":`Periodic copy of the browser’s history file`},size:`Size`,safety:{title:`Safety copy`,body:`PathKeep kept the archive as it was before the encryption change. It opens with the password the archive had then, or none if it was not encrypted.`},timezone:`Time zone`,dueOnly:`Ran because a backup was due`,warnings:{"safari-full-disk-access-skip":`Skipped {profile}: PathKeep can’t read Safari’s history without Full Disk Access. Grant it, and the next backup includes Safari.`,"profile-history-unreadable-skip":`Skipped {profile}: its history file is missing or can’t be read.`,"profile-not-detected-skip":`Skipped {profile}: it’s no longer on this computer. What earlier backups saved from it stays in the archive.`,"source-profile-not-discovered":`Skipped {profile}: it’s no longer on this computer. What earlier backups saved from it stays in the archive.`,"source-unreadable":`Skipped {profile}: its history file is missing or can’t be read.`,"source-permission-denied":`Skipped {profile}: PathKeep isn’t allowed to read its history. Grant Full Disk Access, and the next backup includes it.`,"source-read-failed":`Couldn’t read {profile}’s history file. Nothing from it was added this time.`,"source-stream-failed":`Reading {profile}’s history stopped part way. What was read before that is saved.`,"source-favicons-unavailable":`Couldn’t read {profile}’s site icons. The history was saved without new icons.`,"staging-fallback-recovered-copy":`{profile} was in use, so PathKeep read a copy of its history file instead of the live one.`,"staging-fallback-repaired-copy":`{profile}’s history file needed repair, so PathKeep read a repaired copy of it.`,"git-history-skipped":`This run’s records were saved, but adding them to the Git history failed.`,"intelligence-refresh-failed":`Insights couldn’t start updating with this backup’s visits.`,"ai-autoindex-enqueue-failed":`New pages couldn’t be queued for semantic search.`,"ai-autoindex-provider-not-ready":`New pages weren’t queued for semantic search because its model isn’t ready.`,"enrichment-reoffer-failed":`Pages waiting for their content to be fetched couldn’t be queued.`,"og-refetch-failed":`Retrying link previews that failed before didn’t work.`,"og-prefetch-failed":`Link previews for new pages couldn’t be fetched.`,"og-cleanup-failed":`Cleaning up the link preview cache failed.`,"review-record-failed":`Everything was saved, but the record of this run couldn’t be written.`,"skipped-missing-timestamp_one":`Skipped {count} entry in the import file because it has no time.`,"skipped-missing-timestamp_other":`Skipped {count} entries in the import file because they have no time.`,"browser-skipped-missing-url-row_one":`Skipped {count} visit in the import file because its address is missing.`,"browser-skipped-missing-url-row_other":`Skipped {count} visits in the import file because their address is missing.`,"parse-failed":`Part of the import couldn’t be read.`,"no-importable-files":`The import had no history files PathKeep could read.`,parser:`The import file reported a problem.`,other:`Recorded during this run:`},notes:{"source-ids-reset":`Checked all history still available in {profile}.`,title:`Also during this run`,"source-visits-without-page_one":`{count} entry in {profile}’s history has no page in the browser’s file, so it has no address to save.`,"source-visits-without-page_other":`{count} entries in {profile}’s history have no page in the browser’s file, so they have no address to save.`,"profile-search-terms-captured_one":`Saved {count} search typed in {profile}.`,"profile-search-terms-captured_other":`Saved {count} searches typed in {profile}.`,"og-prefetch-summary_one":`Link previews: fetched {succeeded} of {count} new page.`,"og-prefetch-summary_other":`Link previews: fetched {succeeded} of {count} new pages.`,"og-refetch-summary_one":`Link previews: retried {count} that failed before; {succeeded} worked this time.`,"og-refetch-summary_other":`Link previews: retried {count} that failed before; {succeeded} worked this time.`,"og-cleanup-summary_one":`Link preview cache: removed {count} old entry and freed {bytes}.`,"og-cleanup-summary_other":`Link preview cache: removed {count} old entries and freed {bytes}.`,"ai-autoindex-queued-while-paused":`New pages are queued for semantic search. They’ll be indexed when background work resumes.`,"batch-reverted_one":`Undone: this import’s {count} visit is hidden.`,"batch-reverted_other":`Undone: this import’s {count} visits are hidden.`,"batch-restored_one":`Restored: this import’s {count} visit is back.`,"batch-restored_other":`Restored: this import’s {count} visits are back.`},actions:{aiSettings:`Go to AI settings`,backgroundSettings:`Go to Background work`}},"zh-CN":{incomplete:`备份未完成`,incompleteBody:`部分所选浏览器未能完整备份。已保存的历史仍会保留,原因见“警告”。`,tabs:{summary:`摘要`,files:`文件`,warnings_one:`警告({count})`,warnings_other:`警告({count})`},manifest:`清单`,manifestHash:`指纹`,noManifest:`这次运行没有清单。`,noFiles:`这次运行没有保留其他文件。`,kinds:{snapshot:`保存的副本`},reasons:{"before-rekey":`加密变更前的副本`,"source-schema-changed":`浏览器格式变了,因此保留的副本`,"periodic-checkpoint":`浏览器历史文件的定期副本`},size:`大小`,safety:{title:`安全副本`,body:`PathKeep 保留了加密变更前的存档。打开它需要当时的密码;如果当时没有加密,则不需要密码。`},timezone:`时区`,dueOnly:`因为到了备份时间而运行`,warnings:{"safari-full-disk-access-skip":`已跳过 {profile}:没有完全磁盘访问权限,PathKeep 读不到 Safari 的历史记录。授权后,下次备份就会包含 Safari。`,"profile-history-unreadable-skip":`已跳过 {profile}:它的历史文件不存在或无法读取。`,"profile-not-detected-skip":`已跳过 {profile}:这台电脑上已经找不到它。之前备份的内容仍在存档中。`,"source-profile-not-discovered":`已跳过 {profile}:这台电脑上已经找不到它。之前备份的内容仍在存档中。`,"source-unreadable":`已跳过 {profile}:它的历史文件不存在或无法读取。`,"source-permission-denied":`已跳过 {profile}:PathKeep 没有读取它历史记录的权限。授予“完全磁盘访问权限”后,下次备份就会包含它。`,"source-read-failed":`无法读取 {profile} 的历史文件,这次没有从它加入任何内容。`,"source-stream-failed":`读取 {profile} 的历史记录中途停止了,之前读到的部分已保存。`,"source-favicons-unavailable":`无法读取 {profile} 的网站图标。历史已保存,没有加入新图标。`,"staging-fallback-recovered-copy":`{profile} 正在使用中,因此 PathKeep 读取的是历史文件的副本,而不是正在使用的文件。`,"staging-fallback-repaired-copy":`{profile} 的历史文件需要修复,因此 PathKeep 读取的是修复后的副本。`,"git-history-skipped":`这次运行的记录已保存,但未能写入 Git 历史。`,"intelligence-refresh-failed":`洞察没能开始用这次备份的访问记录更新。`,"ai-autoindex-enqueue-failed":`新页面没能加入语义搜索的索引队列。`,"ai-autoindex-provider-not-ready":`语义搜索的模型还没准备好,因此新页面没有加入索引队列。`,"enrichment-reoffer-failed":`等待抓取内容的页面没能加入队列。`,"og-refetch-failed":`重试之前失败的链接预览时出错。`,"og-prefetch-failed":`没能获取新页面的链接预览。`,"og-cleanup-failed":`清理链接预览缓存失败。`,"review-record-failed":`内容都已保存,但这次执行的记录没能写入。`,"skipped-missing-timestamp_one":`跳过了导入文件中的 {count} 条记录,因为它们没有时间。`,"skipped-missing-timestamp_other":`跳过了导入文件中的 {count} 条记录,因为它们没有时间。`,"browser-skipped-missing-url-row_one":`跳过了导入文件中的 {count} 次访问,因为缺少网址。`,"browser-skipped-missing-url-row_other":`跳过了导入文件中的 {count} 次访问,因为缺少网址。`,"parse-failed":`导入的部分内容无法读取。`,"no-importable-files":`导入中没有 PathKeep 能读取的历史文件。`,parser:`导入文件报告了一个问题。`,other:`这次运行记录了:`},notes:{"source-ids-reset":`已重新核对 {profile} 中仍可读取的全部历史记录。`,title:`这次运行还做了`,"source-visits-without-page_one":`{profile} 的历史记录中有 {count} 条在浏览器文件里找不到对应的页面,没有网址可以保存。`,"source-visits-without-page_other":`{profile} 的历史记录中有 {count} 条在浏览器文件里找不到对应的页面,没有网址可以保存。`,"profile-search-terms-captured_one":`保存了在 {profile} 中输入的 {count} 次搜索。`,"profile-search-terms-captured_other":`保存了在 {profile} 中输入的 {count} 次搜索。`,"og-prefetch-summary_one":`链接预览:{count} 个新页面中获取了 {succeeded} 个。`,"og-prefetch-summary_other":`链接预览:{count} 个新页面中获取了 {succeeded} 个。`,"og-refetch-summary_one":`链接预览:重试了 {count} 个之前失败的页面,这次成功 {succeeded} 个。`,"og-refetch-summary_other":`链接预览:重试了 {count} 个之前失败的页面,这次成功 {succeeded} 个。`,"og-cleanup-summary_one":`链接预览缓存:移除了 {count} 条旧记录,释放了 {bytes}。`,"og-cleanup-summary_other":`链接预览缓存:移除了 {count} 条旧记录,释放了 {bytes}。`,"ai-autoindex-queued-while-paused":`新页面已加入语义搜索的索引队列,后台任务恢复后就会建立索引。`,"batch-reverted_one":`已撤销:这次导入的 {count} 条浏览记录已隐藏。`,"batch-reverted_other":`已撤销:这次导入的 {count} 条浏览记录已隐藏。`,"batch-restored_one":`已恢复:这次导入的 {count} 条浏览记录已重新显示。`,"batch-restored_other":`已恢复:这次导入的 {count} 条浏览记录已重新显示。`},actions:{aiSettings:`前往 AI 设置`,backgroundSettings:`前往后台任务`}},"zh-TW":{incomplete:`備份未完成`,incompleteBody:`部分所選瀏覽器未能完整備份。已儲存的歷史仍會保留,原因見「警告」。`,tabs:{summary:`摘要`,files:`檔案`,warnings_one:`警告({count})`,warnings_other:`警告({count})`},manifest:`清單`,manifestHash:`指紋`,noManifest:`這次執行沒有清單。`,noFiles:`這次執行沒有保留其他檔案。`,kinds:{snapshot:`儲存的副本`},reasons:{"before-rekey":`加密變更前的副本`,"source-schema-changed":`瀏覽器格式變了,因此保留的副本`,"periodic-checkpoint":`瀏覽器歷史檔案的定期副本`},size:`大小`,safety:{title:`安全副本`,body:`PathKeep 保留了加密變更前的存檔。打開它需要當時的密碼;如果當時沒有加密,則不需要密碼。`},timezone:`時區`,dueOnly:`因為到了備份時間而執行`,warnings:{"safari-full-disk-access-skip":`已略過 {profile}:沒有完整磁碟取用權限,PathKeep 讀不到 Safari 的歷史記錄。授權後,下次備份就會包含 Safari。`,"profile-history-unreadable-skip":`已略過 {profile}:它的歷史檔案不存在或無法讀取。`,"profile-not-detected-skip":`已略過 {profile}:這台電腦上已經找不到它。之前備份的內容仍在存檔中。`,"source-profile-not-discovered":`已略過 {profile}:這台電腦上已經找不到它。之前備份的內容仍在存檔中。`,"source-unreadable":`已略過 {profile}:它的歷史檔案不存在或無法讀取。`,"source-permission-denied":`已略過 {profile}:PathKeep 沒有讀取它歷史紀錄的權限。給予「完整磁碟取用權限」後,下次備份就會包含它。`,"source-read-failed":`無法讀取 {profile} 的歷史檔案,這次沒有從它加入任何內容。`,"source-stream-failed":`讀取 {profile} 的歷史紀錄中途停止了,之前讀到的部分已儲存。`,"source-favicons-unavailable":`無法讀取 {profile} 的網站圖示。歷史已儲存,沒有加入新圖示。`,"staging-fallback-recovered-copy":`{profile} 正在使用中,因此 PathKeep 讀取的是歷史檔案的副本,而不是正在使用的檔案。`,"staging-fallback-repaired-copy":`{profile} 的歷史檔案需要修復,因此 PathKeep 讀取的是修復後的副本。`,"git-history-skipped":`這次執行的記錄已儲存,但未能寫入 Git 歷史。`,"intelligence-refresh-failed":`洞察沒能開始用這次備份的造訪記錄更新。`,"ai-autoindex-enqueue-failed":`新頁面沒能加入語意搜尋的索引佇列。`,"ai-autoindex-provider-not-ready":`語意搜尋的模型還沒準備好,因此新頁面沒有加入索引佇列。`,"enrichment-reoffer-failed":`等待抓取內容的頁面沒能加入佇列。`,"og-refetch-failed":`重試之前失敗的連結預覽時出錯。`,"og-prefetch-failed":`沒能取得新頁面的連結預覽。`,"og-cleanup-failed":`清理連結預覽快取失敗。`,"review-record-failed":`內容都已儲存,但這次執行的記錄沒能寫入。`,"skipped-missing-timestamp_one":`略過了匯入檔案中的 {count} 筆記錄,因為它們沒有時間。`,"skipped-missing-timestamp_other":`略過了匯入檔案中的 {count} 筆記錄,因為它們沒有時間。`,"browser-skipped-missing-url-row_one":`略過了匯入檔案中的 {count} 次造訪,因為缺少網址。`,"browser-skipped-missing-url-row_other":`略過了匯入檔案中的 {count} 次造訪,因為缺少網址。`,"parse-failed":`匯入的部分內容無法讀取。`,"no-importable-files":`匯入中沒有 PathKeep 能讀取的歷史檔案。`,parser:`匯入檔案回報了一個問題。`,other:`這次執行記錄了:`},notes:{"source-ids-reset":`已重新核對 {profile} 中仍可讀取的全部歷史紀錄。`,title:`這次執行還做了`,"source-visits-without-page_one":`{profile} 的歷史紀錄中有 {count} 筆在瀏覽器檔案裡找不到對應的頁面,沒有網址可以儲存。`,"source-visits-without-page_other":`{profile} 的歷史紀錄中有 {count} 筆在瀏覽器檔案裡找不到對應的頁面,沒有網址可以儲存。`,"profile-search-terms-captured_one":`儲存了在 {profile} 中輸入的 {count} 次搜尋。`,"profile-search-terms-captured_other":`儲存了在 {profile} 中輸入的 {count} 次搜尋。`,"og-prefetch-summary_one":`連結預覽:{count} 個新頁面中取得了 {succeeded} 個。`,"og-prefetch-summary_other":`連結預覽:{count} 個新頁面中取得了 {succeeded} 個。`,"og-refetch-summary_one":`連結預覽:重試了 {count} 個之前失敗的頁面,這次成功 {succeeded} 個。`,"og-refetch-summary_other":`連結預覽:重試了 {count} 個之前失敗的頁面,這次成功 {succeeded} 個。`,"og-cleanup-summary_one":`連結預覽快取:移除了 {count} 筆舊記錄,釋放了 {bytes}。`,"og-cleanup-summary_other":`連結預覽快取:移除了 {count} 筆舊記錄,釋放了 {bytes}。`,"ai-autoindex-queued-while-paused":`新頁面已加入語意搜尋的索引佇列,背景工作恢復後就會建立索引。`,"batch-reverted_one":`已復原:這次匯入的 {count} 筆瀏覽記錄已隱藏。`,"batch-reverted_other":`已復原:這次匯入的 {count} 筆瀏覽記錄已隱藏。`,"batch-restored_one":`已還原:這次匯入的 {count} 筆瀏覽記錄已重新顯示。`,"batch-restored_other":`已還原:這次匯入的 {count} 筆瀏覽記錄已重新顯示。`},actions:{aiSettings:`前往 AI 設定`,backgroundSettings:`前往背景工作`}}}),de=g({en:{interval:{minutes_one:`{count} minute`,minutes_other:`{count} minutes`,hours_one:`{count} hour`,hours_other:`{count} hours`,days_one:`{count} day`,days_other:`{count} days`},custom:`Custom`,customActive:`Backs up every {interval}.`,changeCustom:`Change`,lastRun:`Last automatic backup`,lastRunNever:`None yet`,details:`Details`,change:{installTitle:`Turn on automatic backup`,updateTitle:`Change automatic backup`,reinstallTitle:`Reinstall automatic backup`,intro:`This is what PathKeep gives the system scheduler. Nothing changes until you confirm.`,every:`Back up every`,amount:`How many`,unit:`Unit`,units:{minutes:`minutes`,hours:`hours`,days:`days`},invalid:`Choose a whole number between 1 minute and 30 days.`,when:`PathKeep backs up about every {interval}, at the check closest to that interval. The system checks every {check} and when you log in, so a backup missed while the computer was off runs soon after.`,scheduler:`Scheduler`,file:`File`,contents:`File contents`,copyFile:`Copy file`,copyPath:`Copy path`,copied:`Copied`,copyFailed:`Could not copy`,loading:`Preparing the file…`,previewFailed:`PathKeep could not prepare the file.`,install:`Install`,update:`Update`,reinstall:`Reinstall`,working:`Working…`,failed:`The scheduler did not accept it.`,installed:`Automatic backup is on: every {interval}`,manualIntro:`PathKeep cannot install a scheduler on this system. Save the interval here, then add the files below yourself.`,save:`Save interval`,saved:`Interval saved. Update the files you installed.`},off:{title:`Turn off automatic backup?`,body:`PathKeep removes its job from the system scheduler. Your archive and the interval you chose stay, so you can turn it back on later.`,removes:`PathKeep removes:`,noFiles:`No job file was found. PathKeep still asks the scheduler to forget the job.`,confirm:`Turn off`},legacy:{title:`Remove the old automatic backup?`,body:`An earlier version of PathKeep left a job under its old name. PathKeep removes it. Your current automatic backup is not touched.`,confirm:`Remove old job`,attention:`An earlier version of PathKeep left an old automatic backup job behind.`},verify:{title:`Automatic backup details`,description:`What PathKeep found when it last checked the system scheduler.`,checkedAt:`Checked {time}`,checkAgain:`Check again`,checking:`Checking…`,checks:`Checks`,noChecks:`Nothing to check: automatic backup is not installed.`,problems:`Problems`,files:`Files found`,noFiles:`No PathKeep scheduler files on this computer.`,lastChange:`Last change`,noLastChange:`PathKeep has not installed or removed a job yet.`,action:{apply:`Installed`,remove:`Removed`,repair:`Repaired`},outcome:{ok:`Done`,failed:`Failed`,unknown:`Result not recorded`},record:`Record`,attempts:`Recent automatic runs`,noAttempts:`The scheduler has not started PathKeep yet.`,attempt:{partial:`Backup incomplete`,running:`Running`,success:`Backed up`,skipped:`Not due yet`,deferred:`Waited for another backup`,failed:`Failed`,interrupted:`Stopped early`},status:{ok:`OK`,warning:`Check`,error:`Problem`,pending:`Not yet`},manual:`Set it up yourself`,manualBody:`Prefer to do it by hand? These steps set up the same job PathKeep would.`,command:`Command`,copyCommand:`Copy command`,reveal:`Show in folder`,revealFailed:`Could not open the folder`,repair:`Fix`},backend:{issueInspectionFailedTitle:`PathKeep could not read the scheduler`,issueInspectionFailedConsequence:`PathKeep cannot tell whether automatic backups will run.`,issueMacosInspectionFailedDetail:`The job file exists, but PathKeep could not open it.`,issueWindowsAccessDeniedDetail:`Windows did not let PathKeep read the task.`,issueWindowsInspectionFailedDetail:`PathKeep could not ask Task Scheduler about the task.`,issueLaunchAgentNotLoadedTitle:`The job is installed but not loaded`,issueLaunchAgentNotLoadedDetail:`The job file is in place, but macOS has not loaded it.`,issueLaunchAgentNotLoadedConsequence:`Automatic backups do not run until it is loaded. Reinstalling usually fixes this.`,issueLegacyAgentTitle:`An old automatic backup job is still installed`,issueLegacyAgentDetail:`An earlier version of PathKeep installed a job under its old name.`,issueLegacyAgentConsequence:`It may run next to the current one, or fail. Remove it from here.`,issuePlistMismatchTitle:`The installed job does not match your settings`,issuePlistMismatchDetail:`The job file on disk differs from the one PathKeep would install now.`,issuePlistMismatchConsequence:`Backups may run at the wrong time or not at all. Reinstall to fix it.`,issuePlistMissingLoadedTitle:`The job is loaded without its file`,issuePlistMissingLoadedDetail:`macOS still has the job loaded, but its file was deleted.`,issuePlistMissingLoadedConsequence:`PathKeep cannot change a job without its file. Reinstall it or turn it off.`,issueScheduleAttemptIncompleteTitle:`The last automatic backup was incomplete`,issueScheduleAttemptIncompleteDetail:`Some selected browsers weren’t fully backed up. History already saved is kept.`,issueScheduleAttemptIncompleteConsequence:`Open the latest run for details, then try backing up again.`,issueScheduleAttemptFailedTitle:`The last automatic backup failed`,issueScheduleAttemptFailedDetail:`The scheduler started PathKeep, but the backup did not finish.`,issueScheduleAttemptFailedConsequence:`New history is not saved until this is fixed. The log says why.`,issueScheduleAttemptInterruptedTitle:`The last automatic backup stopped early`,issueScheduleAttemptInterruptedDetail:`PathKeep was stopped before the backup finished, for example by a shutdown.`,issueScheduleAttemptInterruptedConsequence:`The next run tries again.`,issueScheduleOverdueTitle:`Automatic backups have stopped running`,issueScheduleOverdueDetail:`The system has not started PathKeep for longer than this schedule allows, not even to check whether a backup is due.`,issueScheduleOverdueConsequence:`New history is not saved, and the browsers may delete it first. Reinstall the automatic backup, or back up now.`,issueScheduleAttemptLedgerUnreadableTitle:`PathKeep could not read its list of automatic runs`,issueScheduleAttemptLedgerUnreadableDetail:`The file that lists recent automatic backups is damaged or unreadable.`,issueScheduleAttemptLedgerUnreadableConsequence:`Recent runs may be missing here. Backups themselves are not affected.`,issueStatusDetectionUnavailableTitle:`PathKeep cannot check the scheduler here`,issueStatusDetectionUnavailableDetail:`On this system PathKeep cannot see whether the job is installed.`,issueStatusDetectionUnavailableConsequence:`Follow the steps below, then check the job yourself.`,issueTaskMismatchTitle:`The installed task does not match your settings`,issueTaskMismatchDetail:`The Task Scheduler task differs from the one PathKeep would install now.`,issueTaskMismatchConsequence:`Backups may run at the wrong time or not at all. Reinstall to fix it.`,manualLinuxCopyServiceTitle:`Save the service file`,manualLinuxCopyServiceSummary:`Save this as a systemd user service.`,manualLinuxCopyServiceWhy:`It tells systemd how to start a PathKeep backup.`,manualLinuxCopyTimerTitle:`Save the timer file`,manualLinuxCopyTimerSummary:`Save this next to the service file.`,manualLinuxCopyTimerWhy:`It tells systemd when to start the backup, including runs missed while the computer was off.`,manualLinuxEnableTitle:`Turn the timer on`,manualLinuxEnableSummary:`Run this command.`,manualLinuxEnableWhy:`systemd only uses the timer once it is enabled.`,manualMacosSavePlistTitle:`Save the job file`,manualMacosSavePlistSummary:`Save this file in ~/Library/LaunchAgents.`,manualMacosSavePlistWhy:`macOS starts the jobs it finds there.`,manualMacosLoadTitle:`Load the job`,manualMacosLoadSummary:`Run this command in Terminal.`,manualMacosLoadWhy:`macOS loads new jobs at the next login. This loads it now.`,manualWindowsSaveXmlTitle:`Save the task file`,manualWindowsSaveXmlSummary:`Save this XML file.`,manualWindowsSaveXmlWhy:`Task Scheduler creates the task from it.`,manualWindowsRegisterTitle:`Create the task`,manualWindowsRegisterSummary:`Run this command.`,manualWindowsRegisterWhy:`It creates the task from the file, for your user only.`,verifyMacosBootstrap:`Load the job`,verifyMacosBootstrapOk:`macOS loaded the job.`,verifyMacosBootstrapFailed:`macOS did not load the job.`,verifyMacosLegacy:`Old jobs`,verifyMacosLegacyFound:`A job from an earlier version of PathKeep is still installed.`,verifyMacosLoaded:`Job loaded`,verifyMacosLoadedOk:`macOS has the job loaded.`,verifyMacosLoadedFailed:`macOS has not loaded the job.`,verifyMacosLoadedWithoutPlist:`macOS has the job loaded, but its file is gone.`,verifyMacosPlist:`Job file`,verifyMacosPlistMismatch:`The file differs from your current settings.`,verifyMacosPlistMissing:`No job file is installed.`,verifyMacosPlistMissingLoaded:`The file is missing while the job is still loaded.`,verifyMacosRemove:`Remove the job`,verifyMacosRemoveOk:`The job file was removed.`,verifyMacosRemoveNoop:`There was nothing to remove.`,verifyMacosRepairLegacy:`Remove old jobs`,verifyMacosRepairLegacyOk:`Old jobs were removed.`,verifyMacosRepairLegacyNoop:`No old jobs were found.`,verifyWindowsRegister:`Create the task`,verifyWindowsRegisterOk:`The task was created.`,verifyWindowsRegisterFailed:`Task Scheduler did not create the task.`,verifyWindowsRegisterAccessDenied:`Windows did not let PathKeep create the task.`,verifyWindowsRemove:`Remove the task`,verifyWindowsRemoveOk:`The task was removed.`,verifyWindowsRemoveFailed:`Task Scheduler did not remove the task.`,verifyWindowsTask:`Task registered`,verifyWindowsTaskFailed:`PathKeep could not read the task.`,verifyWindowsTaskMissing:`No task is registered.`,verifyWindowsTaskXml:`Task settings`,verifyWindowsTaskXmlOk:`The task matches your settings.`,verifyWindowsTaskXmlMismatch:`The task differs from your current settings.`,windowsAccessDeniedInstallMessage:`Windows did not let PathKeep create the task. Check that your account may create scheduled tasks, then try again.`}},"zh-CN":{interval:{minutes_one:`{count} 分钟`,minutes_other:`{count} 分钟`,hours_one:`{count} 小时`,hours_other:`{count} 小时`,days_one:`{count} 天`,days_other:`{count} 天`},custom:`自定义`,customActive:`每 {interval} 备份一次。`,changeCustom:`更改`,lastRun:`上次自动备份`,lastRunNever:`还没有`,details:`详情`,change:{installTitle:`开启自动备份`,updateTitle:`更改自动备份`,reinstallTitle:`重新安装自动备份`,intro:`这是 PathKeep 要交给系统调度器的内容。确认之前不会改动任何东西。`,every:`每隔`,amount:`数值`,unit:`单位`,units:{minutes:`分钟`,hours:`小时`,days:`天`},invalid:`请选一个 1 分钟到 30 天之间的整数。`,when:`PathKeep 大约每 {interval} 备份一次,在最接近这个间隔的检查时执行。系统每 {check} 检查一次,登录时也会检查,所以关机时错过的备份会在登录后尽快补上。`,scheduler:`调度器`,file:`文件`,contents:`文件内容`,copyFile:`复制文件`,copyPath:`复制路径`,copied:`已复制`,copyFailed:`无法复制`,loading:`正在准备文件…`,previewFailed:`PathKeep 没能准备这个文件。`,install:`安装`,update:`更新`,reinstall:`重新安装`,working:`正在处理…`,failed:`调度器没有接受。`,installed:`自动备份已开启:每 {interval}`,manualIntro:`PathKeep 无法在这个系统上安装调度器。请先在这里保存间隔,再自己添加下面的文件。`,save:`保存间隔`,saved:`间隔已保存。请同步更新你安装的文件。`},off:{title:`关闭自动备份?`,body:`PathKeep 会从系统调度器移除它的任务。存档和你选的间隔都会保留,之后可以再开启。`,removes:`PathKeep 会移除:`,noFiles:`没有找到任务文件。PathKeep 仍会请调度器忘掉这个任务。`,confirm:`关闭`},legacy:{title:`移除旧的自动备份?`,body:`旧版 PathKeep 以旧名称留下了一个任务。PathKeep 会移除它,不会动到现在的自动备份。`,confirm:`移除旧任务`,attention:`旧版 PathKeep 留下了一个旧的自动备份任务。`},verify:{title:`自动备份详情`,description:`PathKeep 上次检查系统调度器时看到的情况。`,checkedAt:`检查于 {time}`,checkAgain:`再检查一次`,checking:`正在检查…`,checks:`检查项`,noChecks:`没有可检查的:自动备份还没有安装。`,problems:`问题`,files:`找到的文件`,noFiles:`这台电脑上没有 PathKeep 的调度文件。`,lastChange:`最近一次变更`,noLastChange:`PathKeep 还没有安装或移除过任务。`,action:{apply:`已安装`,remove:`已移除`,repair:`已修复`},outcome:{ok:`完成`,failed:`失败`,unknown:`没有记录结果`},record:`记录`,attempts:`最近的自动运行`,noAttempts:`调度器还没有启动过 PathKeep。`,attempt:{partial:`备份未完成`,running:`运行中`,success:`已备份`,skipped:`还没到时间`,deferred:`等待另一个备份`,failed:`失败`,interrupted:`中途停止`},status:{ok:`正常`,warning:`注意`,error:`有问题`,pending:`尚未`},manual:`自己设置`,manualBody:`想手动设置?按这些步骤可以装上和 PathKeep 一样的任务。`,command:`命令`,copyCommand:`复制命令`,reveal:`在文件夹中显示`,revealFailed:`无法打开文件夹`,repair:`修复`},backend:{issueInspectionFailedTitle:`PathKeep 无法读取调度器`,issueInspectionFailedConsequence:`PathKeep 无法判断自动备份会不会运行。`,issueMacosInspectionFailedDetail:`任务文件存在,但 PathKeep 打不开它。`,issueWindowsAccessDeniedDetail:`Windows 不允许 PathKeep 读取这个任务。`,issueWindowsInspectionFailedDetail:`PathKeep 无法向任务计划程序查询这个任务。`,issueLaunchAgentNotLoadedTitle:`任务已安装但没有载入`,issueLaunchAgentNotLoadedDetail:`任务文件在,但 macOS 还没有载入它。`,issueLaunchAgentNotLoadedConsequence:`载入之前自动备份不会运行。通常重新安装就能解决。`,issueLegacyAgentTitle:`还装着旧的自动备份任务`,issueLegacyAgentDetail:`旧版 PathKeep 以旧名称安装过一个任务。`,issueLegacyAgentConsequence:`它可能和现在的任务一起运行,或者失败。可以在这里移除。`,issuePlistMismatchTitle:`已安装的任务和你的设置不一致`,issuePlistMismatchDetail:`磁盘上的任务文件和 PathKeep 现在会安装的不同。`,issuePlistMismatchConsequence:`备份可能不在对的时间运行,甚至不运行。重新安装即可修好。`,issuePlistMissingLoadedTitle:`任务已载入,但文件不见了`,issuePlistMissingLoadedDetail:`macOS 仍载入着这个任务,但它的文件被删了。`,issuePlistMissingLoadedConsequence:`没有文件,PathKeep 无法更改这个任务。请重新安装或关闭。`,issueScheduleAttemptIncompleteTitle:`上次自动备份未完成`,issueScheduleAttemptIncompleteDetail:`部分所选浏览器未能完整备份,已保存的历史仍会保留。`,issueScheduleAttemptIncompleteConsequence:`打开最近的运行记录了解原因,然后重试备份。`,issueScheduleAttemptFailedTitle:`上次自动备份失败`,issueScheduleAttemptFailedDetail:`调度器启动了 PathKeep,但备份没有完成。`,issueScheduleAttemptFailedConsequence:`修好之前新的历史不会被保存。日志里有原因。`,issueScheduleAttemptInterruptedTitle:`上次自动备份中途停止`,issueScheduleAttemptInterruptedDetail:`备份完成前 PathKeep 被停止了,比如关机。`,issueScheduleAttemptInterruptedConsequence:`下次运行会再试一次。`,issueScheduleOverdueTitle:`自动备份已经停了`,issueScheduleOverdueDetail:`系统超过这个排程该有的时间都没有启动 PathKeep,连检查要不要备份都没有。`,issueScheduleOverdueConsequence:`新的历史不会被保存,浏览器还可能先把它删掉。请重新安装自动备份,或现在就备份。`,issueScheduleAttemptLedgerUnreadableTitle:`PathKeep 无法读取自动运行的记录`,issueScheduleAttemptLedgerUnreadableDetail:`记录最近自动备份的文件损坏或无法读取。`,issueScheduleAttemptLedgerUnreadableConsequence:`这里可能缺少最近的运行记录,备份本身不受影响。`,issueStatusDetectionUnavailableTitle:`PathKeep 在这里无法检查调度器`,issueStatusDetectionUnavailableDetail:`在这个系统上,PathKeep 看不到任务有没有安装。`,issueStatusDetectionUnavailableConsequence:`请按下面的步骤操作,再自己检查任务。`,issueTaskMismatchTitle:`已安装的任务和你的设置不一致`,issueTaskMismatchDetail:`任务计划程序里的任务和 PathKeep 现在会安装的不同。`,issueTaskMismatchConsequence:`备份可能不在对的时间运行,甚至不运行。重新安装即可修好。`,manualLinuxCopyServiceTitle:`保存 service 文件`,manualLinuxCopyServiceSummary:`把它保存为 systemd 用户服务。`,manualLinuxCopyServiceWhy:`它告诉 systemd 怎样启动一次 PathKeep 备份。`,manualLinuxCopyTimerTitle:`保存 timer 文件`,manualLinuxCopyTimerSummary:`把它保存在 service 文件旁边。`,manualLinuxCopyTimerWhy:`它告诉 systemd 什么时候启动备份,包括关机时错过的那几次。`,manualLinuxEnableTitle:`启用 timer`,manualLinuxEnableSummary:`运行这条命令。`,manualLinuxEnableWhy:`启用之后 systemd 才会使用这个 timer。`,manualMacosSavePlistTitle:`保存任务文件`,manualMacosSavePlistSummary:`把这个文件保存到 ~/Library/LaunchAgents。`,manualMacosSavePlistWhy:`macOS 会启动在那里找到的任务。`,manualMacosLoadTitle:`载入任务`,manualMacosLoadSummary:`在终端里运行这条命令。`,manualMacosLoadWhy:`macOS 会在下次登录时载入新任务,这条命令让它马上载入。`,manualWindowsSaveXmlTitle:`保存任务文件`,manualWindowsSaveXmlSummary:`保存这个 XML 文件。`,manualWindowsSaveXmlWhy:`任务计划程序会用它创建任务。`,manualWindowsRegisterTitle:`创建任务`,manualWindowsRegisterSummary:`运行这条命令。`,manualWindowsRegisterWhy:`它用这个文件创建任务,只对你的账户生效。`,verifyMacosBootstrap:`载入任务`,verifyMacosBootstrapOk:`macOS 已载入任务。`,verifyMacosBootstrapFailed:`macOS 没有载入任务。`,verifyMacosLegacy:`旧任务`,verifyMacosLegacyFound:`旧版 PathKeep 的任务还在。`,verifyMacosLoaded:`任务已载入`,verifyMacosLoadedOk:`macOS 已载入这个任务。`,verifyMacosLoadedFailed:`macOS 没有载入这个任务。`,verifyMacosLoadedWithoutPlist:`macOS 载入着这个任务,但它的文件不见了。`,verifyMacosPlist:`任务文件`,verifyMacosPlistMismatch:`文件和你现在的设置不一致。`,verifyMacosPlistMissing:`没有安装任务文件。`,verifyMacosPlistMissingLoaded:`任务仍在载入,但文件不见了。`,verifyMacosRemove:`移除任务`,verifyMacosRemoveOk:`任务文件已移除。`,verifyMacosRemoveNoop:`没有需要移除的东西。`,verifyMacosRepairLegacy:`移除旧任务`,verifyMacosRepairLegacyOk:`旧任务已移除。`,verifyMacosRepairLegacyNoop:`没有找到旧任务。`,verifyWindowsRegister:`创建任务`,verifyWindowsRegisterOk:`任务已创建。`,verifyWindowsRegisterFailed:`任务计划程序没有创建任务。`,verifyWindowsRegisterAccessDenied:`Windows 不允许 PathKeep 创建任务。`,verifyWindowsRemove:`移除任务`,verifyWindowsRemoveOk:`任务已移除。`,verifyWindowsRemoveFailed:`任务计划程序没有移除任务。`,verifyWindowsTask:`任务已注册`,verifyWindowsTaskFailed:`PathKeep 无法读取这个任务。`,verifyWindowsTaskMissing:`没有注册任务。`,verifyWindowsTaskXml:`任务设置`,verifyWindowsTaskXmlOk:`任务和你的设置一致。`,verifyWindowsTaskXmlMismatch:`任务和你现在的设置不一致。`,windowsAccessDeniedInstallMessage:`Windows 不允许 PathKeep 创建任务。请确认你的账户可以创建计划任务,然后再试一次。`}},"zh-TW":{interval:{minutes_one:`{count} 分鐘`,minutes_other:`{count} 分鐘`,hours_one:`{count} 小時`,hours_other:`{count} 小時`,days_one:`{count} 天`,days_other:`{count} 天`},custom:`自訂`,customActive:`每 {interval} 備份一次。`,changeCustom:`變更`,lastRun:`上次自動備份`,lastRunNever:`還沒有`,details:`詳情`,change:{installTitle:`開啟自動備份`,updateTitle:`變更自動備份`,reinstallTitle:`重新安裝自動備份`,intro:`這是 PathKeep 要交給系統排程器的內容。確認之前不會改動任何東西。`,every:`每隔`,amount:`數值`,unit:`單位`,units:{minutes:`分鐘`,hours:`小時`,days:`天`},invalid:`請選一個 1 分鐘到 30 天之間的整數。`,when:`PathKeep 大約每 {interval} 備份一次,在最接近這個間隔的檢查時執行。系統每 {check} 檢查一次,登入時也會檢查,所以關機時錯過的備份會在登入後盡快補上。`,scheduler:`排程器`,file:`檔案`,contents:`檔案內容`,copyFile:`複製檔案`,copyPath:`複製路徑`,copied:`已複製`,copyFailed:`無法複製`,loading:`正在準備檔案…`,previewFailed:`PathKeep 沒能準備這個檔案。`,install:`安裝`,update:`更新`,reinstall:`重新安裝`,working:`正在處理…`,failed:`排程器沒有接受。`,installed:`自動備份已開啟:每 {interval}`,manualIntro:`PathKeep 無法在這個系統上安裝排程器。請先在這裡儲存間隔,再自己加入下面的檔案。`,save:`儲存間隔`,saved:`間隔已儲存。請同步更新你安裝的檔案。`},off:{title:`關閉自動備份?`,body:`PathKeep 會從系統排程器移除它的工作。存檔和你選的間隔都會保留,之後可以再開啟。`,removes:`PathKeep 會移除:`,noFiles:`沒有找到工作檔案。PathKeep 仍會請排程器忘掉這個工作。`,confirm:`關閉`},legacy:{title:`移除舊的自動備份?`,body:`舊版 PathKeep 以舊名稱留下了一個工作。PathKeep 會移除它,不會動到現在的自動備份。`,confirm:`移除舊工作`,attention:`舊版 PathKeep 留下了一個舊的自動備份工作。`},verify:{title:`自動備份詳情`,description:`PathKeep 上次檢查系統排程器時看到的情況。`,checkedAt:`檢查於 {time}`,checkAgain:`再檢查一次`,checking:`正在檢查…`,checks:`檢查項目`,noChecks:`沒有可檢查的:自動備份還沒有安裝。`,problems:`問題`,files:`找到的檔案`,noFiles:`這台電腦上沒有 PathKeep 的排程檔案。`,lastChange:`最近一次變更`,noLastChange:`PathKeep 還沒有安裝或移除過工作。`,action:{apply:`已安裝`,remove:`已移除`,repair:`已修復`},outcome:{ok:`完成`,failed:`失敗`,unknown:`沒有記錄結果`},record:`記錄`,attempts:`最近的自動執行`,noAttempts:`排程器還沒有啟動過 PathKeep。`,attempt:{partial:`備份未完成`,running:`執行中`,success:`已備份`,skipped:`還沒到時間`,deferred:`等待另一個備份`,failed:`失敗`,interrupted:`中途停止`},status:{ok:`正常`,warning:`注意`,error:`有問題`,pending:`尚未`},manual:`自己設定`,manualBody:`想手動設定?依這些步驟可以裝上和 PathKeep 一樣的工作。`,command:`指令`,copyCommand:`複製指令`,reveal:`在資料夾中顯示`,revealFailed:`無法開啟資料夾`,repair:`修復`},backend:{issueInspectionFailedTitle:`PathKeep 無法讀取排程器`,issueInspectionFailedConsequence:`PathKeep 無法判斷自動備份會不會執行。`,issueMacosInspectionFailedDetail:`工作檔案存在,但 PathKeep 打不開它。`,issueWindowsAccessDeniedDetail:`Windows 不允許 PathKeep 讀取這個工作。`,issueWindowsInspectionFailedDetail:`PathKeep 無法向工作排程器查詢這個工作。`,issueLaunchAgentNotLoadedTitle:`工作已安裝但沒有載入`,issueLaunchAgentNotLoadedDetail:`工作檔案在,但 macOS 還沒有載入它。`,issueLaunchAgentNotLoadedConsequence:`載入之前自動備份不會執行。通常重新安裝就能解決。`,issueLegacyAgentTitle:`還裝著舊的自動備份工作`,issueLegacyAgentDetail:`舊版 PathKeep 以舊名稱安裝過一個工作。`,issueLegacyAgentConsequence:`它可能和現在的工作一起執行,或者失敗。可以在這裡移除。`,issuePlistMismatchTitle:`已安裝的工作和你的設定不一致`,issuePlistMismatchDetail:`磁碟上的工作檔案和 PathKeep 現在會安裝的不同。`,issuePlistMismatchConsequence:`備份可能不在對的時間執行,甚至不執行。重新安裝即可修好。`,issuePlistMissingLoadedTitle:`工作已載入,但檔案不見了`,issuePlistMissingLoadedDetail:`macOS 仍載入著這個工作,但它的檔案被刪了。`,issuePlistMissingLoadedConsequence:`沒有檔案,PathKeep 無法變更這個工作。請重新安裝或關閉。`,issueScheduleAttemptIncompleteTitle:`上次自動備份未完成`,issueScheduleAttemptIncompleteDetail:`部分所選瀏覽器未能完整備份,已儲存的歷史仍會保留。`,issueScheduleAttemptIncompleteConsequence:`開啟最近的執行記錄了解原因,然後重試備份。`,issueScheduleAttemptFailedTitle:`上次自動備份失敗`,issueScheduleAttemptFailedDetail:`排程器啟動了 PathKeep,但備份沒有完成。`,issueScheduleAttemptFailedConsequence:`修好之前新的歷史不會被儲存。記錄檔裡有原因。`,issueScheduleAttemptInterruptedTitle:`上次自動備份中途停止`,issueScheduleAttemptInterruptedDetail:`備份完成前 PathKeep 被停止了,例如關機。`,issueScheduleAttemptInterruptedConsequence:`下次執行會再試一次。`,issueScheduleOverdueTitle:`自動備份已經停了`,issueScheduleOverdueDetail:`系統超過這個排程該有的時間都沒有啟動 PathKeep,連檢查要不要備份都沒有。`,issueScheduleOverdueConsequence:`新的歷史不會被儲存,瀏覽器還可能先把它刪掉。請重新安裝自動備份,或現在就備份。`,issueScheduleAttemptLedgerUnreadableTitle:`PathKeep 無法讀取自動執行的記錄`,issueScheduleAttemptLedgerUnreadableDetail:`記錄最近自動備份的檔案損壞或無法讀取。`,issueScheduleAttemptLedgerUnreadableConsequence:`這裡可能缺少最近的執行記錄,備份本身不受影響。`,issueStatusDetectionUnavailableTitle:`PathKeep 在這裡無法檢查排程器`,issueStatusDetectionUnavailableDetail:`在這個系統上,PathKeep 看不到工作有沒有安裝。`,issueStatusDetectionUnavailableConsequence:`請依下面的步驟操作,再自己檢查工作。`,issueTaskMismatchTitle:`已安裝的工作和你的設定不一致`,issueTaskMismatchDetail:`工作排程器裡的工作和 PathKeep 現在會安裝的不同。`,issueTaskMismatchConsequence:`備份可能不在對的時間執行,甚至不執行。重新安裝即可修好。`,manualLinuxCopyServiceTitle:`儲存 service 檔案`,manualLinuxCopyServiceSummary:`把它儲存為 systemd 使用者服務。`,manualLinuxCopyServiceWhy:`它告訴 systemd 怎樣啟動一次 PathKeep 備份。`,manualLinuxCopyTimerTitle:`儲存 timer 檔案`,manualLinuxCopyTimerSummary:`把它儲存在 service 檔案旁邊。`,manualLinuxCopyTimerWhy:`它告訴 systemd 什麼時候啟動備份,包括關機時錯過的那幾次。`,manualLinuxEnableTitle:`啟用 timer`,manualLinuxEnableSummary:`執行這條指令。`,manualLinuxEnableWhy:`啟用之後 systemd 才會使用這個 timer。`,manualMacosSavePlistTitle:`儲存工作檔案`,manualMacosSavePlistSummary:`把這個檔案儲存到 ~/Library/LaunchAgents。`,manualMacosSavePlistWhy:`macOS 會啟動在那裡找到的工作。`,manualMacosLoadTitle:`載入工作`,manualMacosLoadSummary:`在終端機裡執行這條指令。`,manualMacosLoadWhy:`macOS 會在下次登入時載入新工作,這條指令讓它馬上載入。`,manualWindowsSaveXmlTitle:`儲存工作檔案`,manualWindowsSaveXmlSummary:`儲存這個 XML 檔案。`,manualWindowsSaveXmlWhy:`工作排程器會用它建立工作。`,manualWindowsRegisterTitle:`建立工作`,manualWindowsRegisterSummary:`執行這條指令。`,manualWindowsRegisterWhy:`它用這個檔案建立工作,只對你的帳號生效。`,verifyMacosBootstrap:`載入工作`,verifyMacosBootstrapOk:`macOS 已載入工作。`,verifyMacosBootstrapFailed:`macOS 沒有載入工作。`,verifyMacosLegacy:`舊工作`,verifyMacosLegacyFound:`舊版 PathKeep 的工作還在。`,verifyMacosLoaded:`工作已載入`,verifyMacosLoadedOk:`macOS 已載入這個工作。`,verifyMacosLoadedFailed:`macOS 沒有載入這個工作。`,verifyMacosLoadedWithoutPlist:`macOS 載入著這個工作,但它的檔案不見了。`,verifyMacosPlist:`工作檔案`,verifyMacosPlistMismatch:`檔案和你現在的設定不一致。`,verifyMacosPlistMissing:`沒有安裝工作檔案。`,verifyMacosPlistMissingLoaded:`工作仍在載入,但檔案不見了。`,verifyMacosRemove:`移除工作`,verifyMacosRemoveOk:`工作檔案已移除。`,verifyMacosRemoveNoop:`沒有需要移除的東西。`,verifyMacosRepairLegacy:`移除舊工作`,verifyMacosRepairLegacyOk:`舊工作已移除。`,verifyMacosRepairLegacyNoop:`沒有找到舊工作。`,verifyWindowsRegister:`建立工作`,verifyWindowsRegisterOk:`工作已建立。`,verifyWindowsRegisterFailed:`工作排程器沒有建立工作。`,verifyWindowsRegisterAccessDenied:`Windows 不允許 PathKeep 建立工作。`,verifyWindowsRemove:`移除工作`,verifyWindowsRemoveOk:`工作已移除。`,verifyWindowsRemoveFailed:`工作排程器沒有移除工作。`,verifyWindowsTask:`工作已註冊`,verifyWindowsTaskFailed:`PathKeep 無法讀取這個工作。`,verifyWindowsTaskMissing:`沒有註冊工作。`,verifyWindowsTaskXml:`工作設定`,verifyWindowsTaskXmlOk:`工作和你的設定一致。`,verifyWindowsTaskXmlMismatch:`工作和你現在的設定不一致。`,windowsAccessDeniedInstallMessage:`Windows 不允許 PathKeep 建立工作。請確認你的帳號可以建立排程工作,然後再試一次。`}}}),fe=g({en:{takeoutProfile:`Google Takeout`,takeoutActivityProfile:`Google Takeout · My Activity`,cancel:`Cancel`,close:`Close`,confirm:`Confirm`,continue:`Continue`,back:`Back`,skip:`Skip`,save:`Save`,saved:`Saved`,retry:`Try again`,loadFailed:`Couldn’t load this.`,loading:`Loading…`,copy:`Copy`,copied:`Copied`,open:`Open`,all:`All`,none:`None`,today:`Today`,yesterday:`Yesterday`,notAvailable:`Not available`,errorTitle:`Something went wrong`,errorBody:`PathKeep could not load this. The details are below.`,linkFailed:`Couldn’t open the link`,notInHistory:`PathKeep opens a file on this computer only if it is a page in your history, and this one is not.`,visits_one:`{count} visit`,visits_other:`{count} visits`,pages_one:`{count} page`,pages_other:`{count} pages`,sites_one:`{count} site`,sites_other:`{count} sites`,browsers_one:`{count} browser`,browsers_other:`{count} browsers`,minutesAgo_one:`{count} min ago`,minutesAgo_other:`{count} min ago`,hoursAgo_one:`{count} hour ago`,hoursAgo_other:`{count} hours ago`,daysAgo_one:`{count} day ago`,daysAgo_other:`{count} days ago`,monthsAgo_one:`{count} month ago`,monthsAgo_other:`{count} months ago`,yearsAgo_one:`{count} year ago`,yearsAgo_other:`{count} years ago`,justNow:`just now`,never:`Never`,less:`Less`,more:`More`},"zh-CN":{takeoutProfile:`Google Takeout`,takeoutActivityProfile:`Google Takeout · 我的活动`,cancel:`取消`,close:`关闭`,confirm:`确认`,continue:`继续`,back:`上一步`,skip:`跳过`,save:`保存`,saved:`已保存`,retry:`重试`,loadFailed:`没能加载这部分。`,loading:`加载中…`,copy:`复制`,copied:`已复制`,open:`打开`,all:`全部`,none:`无`,today:`今天`,yesterday:`昨天`,notAvailable:`暂无`,errorTitle:`出了点问题`,errorBody:`PathKeep 没能加载这部分内容,详情如下。`,linkFailed:`没能打开链接`,notInHistory:`PathKeep 只打开历史记录里有的本机文件,这个不在其中。`,visits_one:`{count} 次浏览`,visits_other:`{count} 次浏览`,pages_one:`{count} 个页面`,pages_other:`{count} 个页面`,sites_one:`{count} 个网站`,sites_other:`{count} 个网站`,browsers_one:`{count} 个浏览器`,browsers_other:`{count} 个浏览器`,minutesAgo_one:`{count} 分钟前`,minutesAgo_other:`{count} 分钟前`,hoursAgo_one:`{count} 小时前`,hoursAgo_other:`{count} 小时前`,daysAgo_one:`{count} 天前`,daysAgo_other:`{count} 天前`,monthsAgo_one:`{count} 个月前`,monthsAgo_other:`{count} 个月前`,yearsAgo_one:`{count} 年前`,yearsAgo_other:`{count} 年前`,justNow:`刚刚`,never:`从未`,less:`少`,more:`多`},"zh-TW":{takeoutProfile:`Google Takeout`,takeoutActivityProfile:`Google Takeout · 我的活動`,cancel:`取消`,close:`關閉`,confirm:`確認`,continue:`繼續`,back:`上一步`,skip:`略過`,save:`儲存`,saved:`已儲存`,retry:`再試一次`,loadFailed:`沒能載入這部分。`,loading:`載入中…`,copy:`複製`,copied:`已複製`,open:`打開`,all:`全部`,none:`無`,today:`今天`,yesterday:`昨天`,notAvailable:`暫無`,errorTitle:`出了點問題`,errorBody:`PathKeep 沒能載入這部分內容,詳情如下。`,linkFailed:`無法打開連結`,notInHistory:`PathKeep 只打開歷史紀錄裡有的本機檔案,這個不在其中。`,visits_one:`{count} 次瀏覽`,visits_other:`{count} 次瀏覽`,pages_one:`{count} 個頁面`,pages_other:`{count} 個頁面`,sites_one:`{count} 個網站`,sites_other:`{count} 個網站`,browsers_one:`{count} 個瀏覽器`,browsers_other:`{count} 個瀏覽器`,minutesAgo_one:`{count} 分鐘前`,minutesAgo_other:`{count} 分鐘前`,hoursAgo_one:`{count} 小時前`,hoursAgo_other:`{count} 小時前`,daysAgo_one:`{count} 天前`,daysAgo_other:`{count} 天前`,monthsAgo_one:`{count} 個月前`,monthsAgo_other:`{count} 個月前`,yearsAgo_one:`{count} 年前`,yearsAgo_other:`{count} 年前`,justNow:`剛剛`,never:`從未`,less:`少`,more:`多`}}),pe=g({en:{search:{placeholder:`Search titles, URLs or content. /regex/ works too`,label:`Search history`,clear:`Clear search`},views:{label:`History view`,timeline:`Timeline`,sites:`Sites`,starred:`Starred`},modes:{label:`Search mode`,full:`Full text`,regex:`Regex`,semantic:`Semantic`,invalidRegex:`Invalid regex`},date:{label:`Date filter`,all:`All dates`,today:`Today`,yesterday:`Yesterday`,last7:`Last 7 days`,last30:`Last 30 days`,custom:`Custom range…`,rangeHint:`Pick a first and last day`,apply:`Apply`,back:`Back to presets`},browser:{label:`Browser filter`,all:`All browsers`},filters:{clear:`Clear filters`,removeSite:`Remove site filter {domain}`},day:{today:`Today · {date}`,yesterday:`Yesterday · {date}`},repeats_one:`Opened {count} time in a row`,repeats_other:`Opened {count} times in a row`,sameVisits:`Opened {count} times in a row here:`,session:{label:`{range} · {visits} · {site}`,labelOpen:`{range} · {site}`},results:{pagesAndVisits:`{pages} · {visits} · {mode}`,pages:`{pages} · {mode}`,pagesMore:`{count}+ pages · {mode}`,searching:`Searching…`,sorting:`Still ranking`,relevance:`Relevance {percent}`,listLabel:`History results`,timelineLabel:`History timeline`},state:{loading:`Loading history`,loadingMore:`Loading more`,noHistoryTitle:`No history yet`,noHistoryBody:`Back up a browser and your visits will show up here.`,goBackup:`Go to Backup`,noMatchTitle:`No visits match these filters`,noMatchBody:`Try clearing the filters.`,noResultsTitle:`Nothing found`,noResultsBody:`No visits match “{query}”. Try fewer words, or another search mode.`,noSitesTitle:`No sites in this range`,noStarredTitle:`No starred pages yet`,noStarredBody:`Star a page from the detail panel to keep it here.`,errorTitle:`Couldn’t load history`,searchErrorTitle:`The search didn’t run`,noResultsPartialTitle:`Nothing found yet`,noResultsPartialBody:`No visits match “{query}” in the part of your history indexed so far. The rest is still being indexed.`,searchConnectionLost:`The connection to the search was lost. Try again.`,untitled:`Untitled page`},coverage:{building:`The search index is still being built: {done} of {total} pages so far. Pages not indexed yet won’t show up here.`,updating:`Some recent changes aren’t searchable yet. They will be in a moment.`,failed:`The search index couldn’t be updated, so some pages can’t be found: {error}`,progressLabel:`Search index progress`},sites:{latest:`Latest: {title}`,show:`Show visits to {domain}`},starred:{wholeSite:`Whole site`,mark:`Starred`},detail:{label:`Page details`,close:`Close details`,open:`Open in browser`,openFailed:`Couldn’t open the link`,star:`Star this page`,unstar:`Remove star`,starAdded:`Starred`,starRemoved:`Star removed`,starFailed:`Couldn’t update the star`,copy:`Copy link`,copied:`Link copied`,copyFailed:`Couldn’t copy the link`,statVisits:`Total visits`,statFirst:`First visit`,statLast:`Most recent`,statBrowser:`Source browser`,alsoRecordedBy:`{names} recorded these visits too. They count once.`,loadFailed:`Couldn’t load the details for this page.`,weeks:`Visits, last 12 weeks`,weekTip:`Week of {date} · {visits}`,sameSession:`Same session`,sessionMore_one:`+{count} more`,sessionMore_other:`+{count} more`,note:`Note`,notePlaceholder:`Add a note you can search later`,noteSaving:`Saving…`,noteSaved:`Saved`,noteFailed:`Couldn’t save the note`}},"zh-CN":{search:{placeholder:`搜索标题、网址或内容,支持 /正则/`,label:`搜索历史`,clear:`清除搜索`},views:{label:`历史视图`,timeline:`时间线`,sites:`网站`,starred:`已加星`},modes:{label:`搜索方式`,full:`全文`,regex:`正则`,semantic:`语义`,invalidRegex:`正则表达式无效`},date:{label:`日期筛选`,all:`全部日期`,today:`今天`,yesterday:`昨天`,last7:`近 7 天`,last30:`近 30 天`,custom:`自定义范围…`,rangeHint:`选择开始和结束的日期`,apply:`应用`,back:`返回预设`},browser:{label:`浏览器筛选`,all:`所有浏览器`},filters:{clear:`清除筛选`,removeSite:`移除网站筛选 {domain}`},day:{today:`今天 · {date}`,yesterday:`昨天 · {date}`},repeats_one:`连着打开了 {count} 次`,repeats_other:`连着打开了 {count} 次`,sameVisits:`这里连着打开了 {count} 次:`,session:{label:`{range} · {visits} · {site}`,labelOpen:`{range} · {site}`},results:{pagesAndVisits:`找到 {pages} · {visits} · {mode}`,pages:`找到 {pages} · {mode}`,pagesMore:`找到 {count}+ 个页面 · {mode}`,searching:`正在搜索…`,sorting:`仍在排序`,relevance:`相关度 {percent}`,listLabel:`历史搜索结果`,timelineLabel:`历史时间线`},state:{loading:`正在加载历史`,loadingMore:`正在加载更多`,noHistoryTitle:`还没有历史记录`,noHistoryBody:`备份一个浏览器后,你的浏览记录会出现在这里。`,goBackup:`前往备份`,noMatchTitle:`没有符合筛选的记录`,noMatchBody:`试试清除筛选。`,noResultsTitle:`没有找到结果`,noResultsBody:`没有记录符合“{query}”。试试更少的关键词,或换一种搜索方式。`,noSitesTitle:`这个范围内没有网站`,noStarredTitle:`还没有加星的页面`,noStarredBody:`在右侧详情里点星标,重要的页面就会出现在这里。`,errorTitle:`没能加载历史`,searchErrorTitle:`搜索没有执行成功`,noResultsPartialTitle:`暂时没有找到`,noResultsPartialBody:`在目前已建立索引的历史中,没有与“{query}”相符的记录。其余部分仍在建立索引。`,searchConnectionLost:`与搜索的连接中断了,请重试。`,untitled:`无标题页面`},coverage:{building:`搜索索引仍在建立:目前已处理 {done} / {total} 个页面。尚未建立索引的页面暂时不会出现在这里。`,updating:`部分最近的变更还搜索不到,稍后就能搜到。`,failed:`搜索索引无法更新,部分页面可能搜不到:{error}`,progressLabel:`搜索索引进度`},sites:{latest:`最近:{title}`,show:`查看 {domain} 的浏览记录`},starred:{wholeSite:`整个网站`,mark:`已加星`},detail:{label:`页面详情`,close:`关闭详情`,open:`在浏览器中打开`,openFailed:`没能打开链接`,star:`为这个页面加星`,unstar:`取消加星`,starAdded:`已加星`,starRemoved:`已取消加星`,starFailed:`没能更新星标`,copy:`复制链接`,copied:`已复制链接`,copyFailed:`没能复制链接`,statVisits:`总浏览次数`,statFirst:`首次浏览`,statLast:`最近一次`,statBrowser:`来源浏览器`,alsoRecordedBy:`{names} 也记下了这些访问,只算一次。`,loadFailed:`没能加载这个页面的详情。`,weeks:`近 12 周浏览`,weekTip:`{date} 起的一周 · {visits}`,sameSession:`同一段浏览`,sessionMore_one:`还有 {count} 条`,sessionMore_other:`还有 {count} 条`,note:`备注`,notePlaceholder:`写点什么,之后可以搜索到`,noteSaving:`正在保存…`,noteSaved:`已保存`,noteFailed:`没能保存备注`}},"zh-TW":{search:{placeholder:`搜尋標題、網址或內容,支援 /正規表示式/`,label:`搜尋歷史`,clear:`清除搜尋`},views:{label:`歷史檢視`,timeline:`時間線`,sites:`網站`,starred:`已加星`},modes:{label:`搜尋方式`,full:`全文`,regex:`正規`,semantic:`語意`,invalidRegex:`正規表示式無效`},date:{label:`日期篩選`,all:`全部日期`,today:`今天`,yesterday:`昨天`,last7:`近 7 天`,last30:`近 30 天`,custom:`自訂範圍…`,rangeHint:`選擇開始和結束的日期`,apply:`套用`,back:`返回預設`},browser:{label:`瀏覽器篩選`,all:`所有瀏覽器`},filters:{clear:`清除篩選`,removeSite:`移除網站篩選 {domain}`},day:{today:`今天 · {date}`,yesterday:`昨天 · {date}`},repeats_one:`連著打開了 {count} 次`,repeats_other:`連著打開了 {count} 次`,sameVisits:`這裡連著打開了 {count} 次:`,session:{label:`{range} · {visits} · {site}`,labelOpen:`{range} · {site}`},results:{pagesAndVisits:`找到 {pages} · {visits} · {mode}`,pages:`找到 {pages} · {mode}`,pagesMore:`找到 {count}+ 個頁面 · {mode}`,searching:`正在搜尋…`,sorting:`仍在排序`,relevance:`相關度 {percent}`,listLabel:`歷史搜尋結果`,timelineLabel:`歷史時間線`},state:{loading:`正在載入歷史`,loadingMore:`正在載入更多`,noHistoryTitle:`還沒有歷史記錄`,noHistoryBody:`備份一個瀏覽器後,你的瀏覽記錄就會出現在這裡。`,goBackup:`前往備份`,noMatchTitle:`沒有符合篩選的記錄`,noMatchBody:`試試清除篩選。`,noResultsTitle:`沒有找到結果`,noResultsBody:`沒有記錄符合「{query}」。試試更少的關鍵字,或換一種搜尋方式。`,noSitesTitle:`這個範圍內沒有網站`,noStarredTitle:`還沒有加星的頁面`,noStarredBody:`在右側詳情裡點星號,重要的頁面就會出現在這裡。`,errorTitle:`無法載入歷史`,searchErrorTitle:`搜尋沒有執行成功`,noResultsPartialTitle:`暫時沒有找到`,noResultsPartialBody:`在目前已建立索引的歷史中,沒有符合「{query}」的記錄。其餘部分仍在建立索引。`,searchConnectionLost:`與搜尋的連線中斷了,請再試一次。`,untitled:`未命名頁面`},coverage:{building:`搜尋索引仍在建立:目前已處理 {done} / {total} 個頁面。還沒建立索引的頁面暫時不會出現在這裡。`,updating:`部分最近的變更還搜尋不到,稍後就能搜到。`,failed:`搜尋索引無法更新,部分頁面可能搜不到:{error}`,progressLabel:`搜尋索引進度`},sites:{latest:`最近:{title}`,show:`查看 {domain} 的瀏覽記錄`},starred:{wholeSite:`整個網站`,mark:`已加星`},detail:{label:`頁面詳情`,close:`關閉詳情`,open:`在瀏覽器中打開`,openFailed:`無法打開連結`,star:`為這個頁面加星`,unstar:`取消加星`,starAdded:`已加星`,starRemoved:`已取消加星`,starFailed:`無法更新星號`,copy:`複製連結`,copied:`已複製連結`,copyFailed:`無法複製連結`,statVisits:`總造訪次數`,statFirst:`首次造訪`,statLast:`最近一次`,statBrowser:`來源瀏覽器`,alsoRecordedBy:`{names} 也記下了這些造訪,只算一次。`,loadFailed:`無法載入這個頁面的詳情。`,weeks:`近 12 週造訪`,weekTip:`{date} 起的一週 · {visits}`,sameSession:`同一段瀏覽`,sessionMore_one:`還有 {count} 筆`,sessionMore_other:`還有 {count} 筆`,note:`備註`,notePlaceholder:`寫點什麼,之後可以搜尋到`,noteSaving:`正在儲存…`,noteSaved:`已儲存`,noteFailed:`無法儲存備註`}}}),me=g({en:{related:{label:`Related pages`,loading:`Finding related pages`,show:`Show details for {title}`,staticNote:`Found with the built-in model, so pages from the same site tend to rank first.`,notIndexed:`This page hasn’t been indexed yet.`,updating:`The search index is being updated.`,empty:`No similar pages found.`,failed:`Couldn’t load related pages.`},preview:{label:`Link preview`,alt:`Preview image of {title}`,fetching:`Getting a preview from {domain}…`,missing:`This page has no preview image`,blocked:`Previews are blocked for this site`,httpsOnly:`Previews are only downloaded for HTTPS pages`,failed:`Couldn’t get a preview image`,retry:`Try again`,off:`Link previews are off`,turnOn:`Turn on`},tags:{label:`Tags`,placeholder:`Add a tag, then press Enter`,placeholderMore:`Add a tag`,filter:`Show pages tagged {tag}`,remove:`Remove tag {tag}`,more_one:`+{count}`,more_other:`+{count}`,tooLong:`That tag is too long. Keep it under 64 letters (about 21 in Chinese).`,tooMany:`A page can have up to 64 tags.`,saveFailed:`Couldn’t save the tags. Your last change was undone.`,loadFailed:`Couldn’t load the tags and note for this page.`}},"zh-CN":{related:{label:`相关页面`,loading:`正在查找相关页面`,show:`查看 {title} 的详情`,staticNote:`用内置模型查找,同一网站的页面容易排在前面。`,notIndexed:`这个页面还没有建立索引。`,updating:`搜索索引正在更新。`,empty:`没有找到相似的页面。`,failed:`没能加载相关页面。`},preview:{label:`链接预览`,alt:`{title} 的预览图`,fetching:`正在从 {domain} 获取预览图…`,missing:`这个页面没有提供预览图`,blocked:`这个网站的预览图已被屏蔽`,httpsOnly:`只会为 HTTPS 页面下载预览图`,failed:`没能获取预览图`,retry:`重试`,off:`链接预览已关闭`,turnOn:`去开启`},tags:{label:`标签`,placeholder:`输入标签,按回车添加`,placeholderMore:`添加标签`,filter:`查看带有标签 {tag} 的页面`,remove:`移除标签 {tag}`,more_one:`+{count}`,more_other:`+{count}`,tooLong:`这个标签太长了,最多 64 个英文字母(中文约 21 个字)。`,tooMany:`一个页面最多 64 个标签。`,saveFailed:`没能保存标签,刚才的修改已撤销。`,loadFailed:`没能加载这个页面的标签和备注。`}},"zh-TW":{related:{label:`相關頁面`,loading:`正在尋找相關頁面`,show:`查看 {title} 的詳情`,staticNote:`用內建模型尋找,同一網站的頁面容易排在前面。`,notIndexed:`這個頁面還沒有建立索引。`,updating:`搜尋索引正在更新。`,empty:`沒有找到相似的頁面。`,failed:`無法載入相關頁面。`},preview:{label:`連結預覽`,alt:`{title} 的預覽圖`,fetching:`正在從 {domain} 取得預覽圖…`,missing:`這個頁面沒有提供預覽圖`,blocked:`這個網站的預覽圖已被封鎖`,httpsOnly:`只會為 HTTPS 頁面下載預覽圖`,failed:`無法取得預覽圖`,retry:`重試`,off:`連結預覽已關閉`,turnOn:`去開啟`},tags:{label:`標籤`,placeholder:`輸入標籤,按 Enter 新增`,placeholderMore:`新增標籤`,filter:`查看帶有標籤 {tag} 的頁面`,remove:`移除標籤 {tag}`,more_one:`+{count}`,more_other:`+{count}`,tooLong:`這個標籤太長了,最多 64 個英文字母(中文約 21 個字)。`,tooMany:`一個頁面最多 64 個標籤。`,saveFailed:`無法儲存標籤,剛才的修改已復原。`,loadFailed:`無法載入這個頁面的標籤和備註。`}}}),he=g({en:{help:{button:`Search tips`,title:`Search tips`,intro:`Mix these with ordinary words. Pick one to try it. A minus in front (-site:, -tag:) leaves those pages out.`,site:`Only pages on one site`,exclude:`Leave out pages with a word`,phrase:`These words together, in this order`,or:`Either word`,intitle:`A word in the page title`,inurl:`A word in the address`,filetype:`Addresses ending in a file type`,dates:`Visited between two dates (last month here)`,tag:`Pages you tagged`,note:`Pages whose note contains a word`,regex:`Slashes around it make it a regex`,footer:`Regex follows Rust’s syntax: no look-ahead, look-behind or back-references. Everything is searched on this computer.`},sort:{label:`Sort results: {order}`,relevance:`Best match`,newest:`Newest first`,oldest:`Oldest first`,visits:`Most visited`,about:{relevance:`Closest to what you typed`,newest:`By each page’s latest visit`,oldest:`By each page’s first visit`,visits:`By how often you visited each page`},regexNote:`A regex either matches or it doesn’t, so there’s no best match.`,semanticNote:`Semantic search sorts by meaning only.`},builder:{button:`Advanced search`,title:`Advanced search`,tabs:{words:`Words`,pattern:`Pattern`},words:{intro:`Fill in any of these. They’re combined into one full-text search.`,all:`All of these words`,phrase:`This exact phrase`,any:`Any of these words`,none:`None of these words`,narrow:`Only pages`,site:`On this site`,title:`With these words in the title`,url:`With these words in the address`,fileType:`Of this file type`,tags:`Tagged`,tagsHint:`Separate tags with commas. A page needs all of them.`,note:`Whose note mentions`,starred:`Only starred pages`,examples:{all:`tokio runtime`,phrase:`release notes`,any:`tauri electron`,none:`beta`,title:`guide`,url:`issues`,fileType:`pdf`,tags:`reading, rust`,note:`rewrite`}},pattern:{intro:`Describe the address or title piece by piece, and PathKeep writes the regex.`,piece:`Piece {n}`,kind:{text:`This text`,oneOf:`One of`,number:`A number`,word:`A word`,segment:`Anything up to the next /`,any:`Anything`},textPlaceholder:`github.com/`,oneOfPlaceholder:`pull, issues`,oneOfHint:`Separate the choices with commas.`,add:`Add a piece`,remove:`Remove piece {n}`,atStart:`Must start where the address or title starts`,atEnd:`Must end where the address or title ends`,matchCase:`Match upper and lower case`,examples:`Start from an example`,example:{githubThreads:`GitHub pull requests and issues`,hackerNews:`Hacker News threads`,youtube:`YouTube videos`,stackOverflow:`Stack Overflow questions`},matches:`Matched against each page’s address and title.`},preview:`Searches for`,previewEmpty:`Fill in a field to build a search.`,search:`Search`,clear:`Clear`,replaces:`Replaces what’s in the search box.`},regex:{syntax:`Check the brackets, parentheses and backslashes.`,lookAround:`Look-ahead and look-behind, like (?=…) or (?, aren’t supported.`,group:`This kind of group isn’t supported. Use (…), (?:…) or (?…).`,escape:`{escape} isn’t an escape PathKeep knows. Use \\d, \\w, \\s or \\b, or put a backslash before punctuation.`,brace:`{ starts a repeat count like {2} or {2,5}. Write \\{ for the character itself.`,backendTitle:`This regex can’t run`,backendBody:`PathKeep uses Rust’s regex syntax, which refused this pattern: {message}`},semantic:{builtIn:`the built-in static model`,builtInModel:`the built-in static model ({model})`,using:`Semantic search with {provider}`,indexed_one:`{count} visit indexed`,indexed_other:`{count} visits indexed`,updated:`updated {when}`,stale:{watermark:`pages added since then aren’t in it yet`,enrichment:`page text saved since then isn’t in it yet`,textFormat:`it was made from an older version of the page text`},rebuild:`Rebuild in Settings → AI`,fellBack:`These are full-text results instead.`,note:{previousModel:`The chosen model’s index isn’t finished yet, so this uses the previous one.`,lexicalFallbackNoProvider:`No embedding service is chosen, so these results match words only.`,emptySemanticIndex:`The semantic index is empty, so these results match words only.`,semanticMatchesFilteredOut:`Pages close in meaning were found, but none fit the filters.`,configDriftDimension:`The index was built for another model, so these results match words only until it’s rebuilt.`,configDriftFingerprint:`The index was built with other model settings, so these results match words only until it’s rebuilt.`,providerResolutionFailed:`The embedding service couldn’t be reached, so these results match words only.`},openSettings:`Settings → AI`,whereToFix:`See Settings → AI.`,reason:{off:`Semantic search is off.`,building:`The semantic index is still being built.`,queued:`The semantic index is waiting to be built.`,paused:`Building the semantic index is paused.`,empty:`The semantic index is empty.`,failed:`Building the semantic index failed.`,degraded:`The semantic index can’t be used right now: its model isn’t available or it holds no vectors.`,blocked:`Semantic search needs the archive to be set up first.`}}},"zh-CN":{help:{button:`搜索技巧`,title:`搜索技巧`,intro:`可以和普通关键词混用,点一条试试。前面加减号(-site:、-tag:)就是排除这些页面。`,site:`只看某个网站的页面`,exclude:`排除含有某个词的页面`,phrase:`这几个词连在一起、按这个顺序`,or:`任一个词`,intitle:`标题里有这个词`,inurl:`网址里有这个词`,filetype:`网址以某种文件类型结尾`,dates:`在两个日期之间浏览过(这里是上个月)`,tag:`你加过这个标签的页面`,note:`备注里有这个词的页面`,regex:`前后加斜线就是正则表达式`,footer:`正则使用 Rust 的语法:不支持前瞻、后顾和反向引用。所有搜索都在这台电脑上进行。`},sort:{label:`结果排序:{order}`,relevance:`最相关`,newest:`最新的在前`,oldest:`最早的在前`,visits:`最常浏览`,about:{relevance:`最接近你输入的内容`,newest:`按每个页面最近一次浏览`,oldest:`按每个页面第一次浏览`,visits:`按每个页面浏览的次数`},regexNote:`正则只分匹配和不匹配,没有「最相关」。`,semanticNote:`语义搜索只按意思排序。`},builder:{button:`高级搜索`,title:`高级搜索`,tabs:{words:`关键词`,pattern:`样式`},words:{intro:`填任意几项就行,会合成一个全文搜索。`,all:`包含所有这些词`,phrase:`包含这个完整词组`,any:`包含其中任意一个词`,none:`不包含这些词`,narrow:`只看这些页面`,site:`在这个网站`,title:`标题里有这些词`,url:`网址里有这些词`,fileType:`这种文件类型`,tags:`加了这些标签`,tagsHint:`标签用逗号分开,页面要有全部标签。`,note:`备注里提到`,starred:`只看已加星的页面`,examples:{all:`机器学习 入门`,phrase:`发布说明`,any:`咖啡 茶`,none:`广告`,title:`教程`,url:`issues`,fileType:`pdf`,tags:`稍后读, rust`,note:`重写`}},pattern:{intro:`一段一段描述网址或标题,PathKeep 帮你写成正则。`,piece:`第 {n} 段`,kind:{text:`这段文字`,oneOf:`其中之一`,number:`一串数字`,word:`一个词`,segment:`到下一个 / 为止的任何内容`,any:`任何内容`},textPlaceholder:`github.com/`,oneOfPlaceholder:`pull, issues`,oneOfHint:`选项用逗号分开。`,add:`加一段`,remove:`删除第 {n} 段`,atStart:`必须从网址或标题的开头开始`,atEnd:`必须到网址或标题的结尾为止`,matchCase:`区分大小写`,examples:`从示例开始`,example:{githubThreads:`GitHub 的 pull request 和 issue`,hackerNews:`Hacker News 讨论帖`,youtube:`YouTube 视频`,stackOverflow:`Stack Overflow 问题`},matches:`会和每个页面的网址和标题比对。`},preview:`会搜索`,previewEmpty:`填一项就会组成搜索。`,search:`搜索`,clear:`清除`,replaces:`会替换搜索框里现在的内容。`},regex:{syntax:`检查一下方括号、圆括号和反斜线。`,lookAround:`不支持前瞻和后顾,例如 (?=…) 或 (?。`,group:`不支持这种分组。可以用 (…)、(?:…) 或 (?…)。`,escape:`PathKeep 不认识 {escape} 这个转义。可以用 \\d、\\w、\\s、\\b,或在标点前加反斜线。`,brace:`{ 表示重复次数,例如 {2} 或 {2,5}。要匹配这个字符本身请写 \\{。`,backendTitle:`这个正则表达式无法执行`,backendBody:`PathKeep 使用 Rust 的正则语法,它拒绝了这个模式:{message}`},semantic:{builtIn:`内置静态模型`,builtInModel:`内置静态模型({model})`,using:`语义搜索使用{provider}`,indexed_one:`已索引 {count} 条访问记录`,indexed_other:`已索引 {count} 条访问记录`,updated:`{when}更新`,stale:{watermark:`之后新增的页面还没有加进去`,enrichment:`之后保存的网页正文还没有加进去`,textFormat:`它是用旧版的页面文字建立的`},rebuild:`到“设置 → AI”重建`,fellBack:`下面是全文搜索的结果。`,note:{previousModel:`所选模型的索引还没建完,所以先用上一个模型的索引。`,lexicalFallbackNoProvider:`还没选嵌入服务,所以这些结果只匹配字词。`,emptySemanticIndex:`语义索引是空的,所以这些结果只匹配字词。`,semanticMatchesFilteredOut:`有意思相近的页面,但都不符合筛选条件。`,configDriftDimension:`索引是为另一个模型建的,重建之前这些结果只匹配字词。`,configDriftFingerprint:`索引是用不同的模型设置建的,重建之前这些结果只匹配字词。`,providerResolutionFailed:`连不上嵌入服务,所以这些结果只匹配字词。`},openSettings:`设置 → AI`,whereToFix:`请看“设置 → AI”。`,reason:{off:`语义搜索没有开启。`,building:`语义索引还在建立中。`,queued:`语义索引正在等待建立。`,paused:`语义索引的建立已暂停。`,empty:`语义索引是空的。`,failed:`语义索引建立失败。`,degraded:`语义索引现在无法使用:模型不可用,或索引里没有向量。`,blocked:`要先完成存档设置,才能使用语义搜索。`}}},"zh-TW":{help:{button:`搜尋技巧`,title:`搜尋技巧`,intro:`可以和一般關鍵字混用,點一條試試。前面加減號(-site:、-tag:)就是排除這些頁面。`,site:`只看某個網站的頁面`,exclude:`排除含有某個詞的頁面`,phrase:`這幾個詞連在一起、按這個順序`,or:`任一個詞`,intitle:`標題裡有這個詞`,inurl:`網址裡有這個詞`,filetype:`網址以某種檔案類型結尾`,dates:`在兩個日期之間瀏覽過(這裡是上個月)`,tag:`你加過這個標籤的頁面`,note:`備註裡有這個詞的頁面`,regex:`前後加斜線就是正規表示式`,footer:`正規表示式使用 Rust 的語法:不支援前瞻、後顧和反向參照。所有搜尋都在這台電腦上進行。`},sort:{label:`結果排序:{order}`,relevance:`最相關`,newest:`最新的在前`,oldest:`最早的在前`,visits:`最常瀏覽`,about:{relevance:`最接近你輸入的內容`,newest:`依每個頁面最近一次瀏覽`,oldest:`依每個頁面第一次瀏覽`,visits:`依每個頁面瀏覽的次數`},regexNote:`正規表示式只分符合和不符合,沒有「最相關」。`,semanticNote:`語意搜尋只依意思排序。`},builder:{button:`進階搜尋`,title:`進階搜尋`,tabs:{words:`關鍵字`,pattern:`樣式`},words:{intro:`填任意幾項就好,會合成一個全文搜尋。`,all:`包含所有這些字`,phrase:`包含這個完整詞組`,any:`包含其中任一個字`,none:`不包含這些字`,narrow:`只看這些頁面`,site:`在這個網站`,title:`標題裡有這些字`,url:`網址裡有這些字`,fileType:`這種檔案類型`,tags:`加了這些標籤`,tagsHint:`標籤用逗號分開,頁面要有全部標籤。`,note:`備註裡提到`,starred:`只看已加星的頁面`,examples:{all:`機器學習 入門`,phrase:`版本說明`,any:`咖啡 茶`,none:`廣告`,title:`教學`,url:`issues`,fileType:`pdf`,tags:`稍後讀, rust`,note:`重寫`}},pattern:{intro:`一段一段描述網址或標題,PathKeep 幫你寫成正規表示式。`,piece:`第 {n} 段`,kind:{text:`這段文字`,oneOf:`其中之一`,number:`一串數字`,word:`一個字`,segment:`到下一個 / 為止的任何內容`,any:`任何內容`},textPlaceholder:`github.com/`,oneOfPlaceholder:`pull, issues`,oneOfHint:`選項用逗號分開。`,add:`加一段`,remove:`移除第 {n} 段`,atStart:`必須從網址或標題的開頭開始`,atEnd:`必須到網址或標題的結尾為止`,matchCase:`區分大小寫`,examples:`從範例開始`,example:{githubThreads:`GitHub 的 pull request 和 issue`,hackerNews:`Hacker News 討論串`,youtube:`YouTube 影片`,stackOverflow:`Stack Overflow 問題`},matches:`會和每個頁面的網址和標題比對。`},preview:`會搜尋`,previewEmpty:`填一項就會組成搜尋。`,search:`搜尋`,clear:`清除`,replaces:`會取代搜尋框裡現在的內容。`},regex:{syntax:`檢查一下方括號、圓括號和反斜線。`,lookAround:`不支援前瞻和後顧,例如 (?=…) 或 (?。`,group:`不支援這種群組。可以用 (…)、(?:…) 或 (?…)。`,escape:`PathKeep 不認得 {escape} 這個跳脫字元。可以用 \\d、\\w、\\s、\\b,或在標點前加反斜線。`,brace:`{ 表示重複次數,例如 {2} 或 {2,5}。要比對這個字元本身請寫 \\{。`,backendTitle:`這個正規表示式無法執行`,backendBody:`PathKeep 使用 Rust 的正規表示式語法,它拒絕了這個模式:{message}`},semantic:{builtIn:`內建靜態模型`,builtInModel:`內建靜態模型({model})`,using:`語意搜尋使用{provider}`,indexed_one:`已索引 {count} 次造訪`,indexed_other:`已索引 {count} 次造訪`,updated:`{when}更新`,stale:{watermark:`之後新增的頁面還沒有加進去`,enrichment:`之後儲存的網頁內文還沒有加進去`,textFormat:`它是用舊版的頁面文字建立的`},rebuild:`到「設定 → AI」重建`,fellBack:`下面是全文搜尋的結果。`,note:{previousModel:`所選模型的索引還沒建完,所以先用上一個模型的索引。`,lexicalFallbackNoProvider:`還沒選嵌入服務,所以這些結果只比對字詞。`,emptySemanticIndex:`語意索引是空的,所以這些結果只比對字詞。`,semanticMatchesFilteredOut:`有意思相近的頁面,但都不符合篩選條件。`,configDriftDimension:`索引是為另一個模型建的,重建之前這些結果只比對字詞。`,configDriftFingerprint:`索引是用不同的模型設定建的,重建之前這些結果只比對字詞。`,providerResolutionFailed:`連不上嵌入服務,所以這些結果只比對字詞。`},openSettings:`設定 → AI`,whereToFix:`請看「設定 → AI」。`,reason:{off:`語意搜尋沒有開啟。`,building:`語意索引還在建立中。`,queued:`語意索引正在等待建立。`,paused:`語意索引的建立已暫停。`,empty:`語意索引是空的。`,failed:`語意索引建立失敗。`,degraded:`語意索引現在無法使用:模型無法使用,或索引裡沒有向量。`,blocked:`要先完成存檔設定,才能使用語意搜尋。`}}}}),ge=g({en:{greetingMorning:`Good morning`,greetingAfternoon:`Good afternoon`,greetingEvening:`Good evening`,title:`{greeting}`,alerts:{label:`Needs your attention`,openBackup:`Open Backup`,openSecurity:`Open Security settings`,scheduleFallback:`Automatic backup needs attention`,fullDiskAccess:{title:`Safari’s history can’t be read`,detail:`macOS keeps Safari’s history from PathKeep until you give it Full Disk Access. Until then Safari is not backed up.`},discoveryError:{title:`PathKeep couldn’t look for your browsers`,detail:`The browsers on this computer could not be listed, so new history may be missed.`},keychainUnavailable:{title:`The keychain isn’t available`,detail:`The archive password can’t be saved, so PathKeep asks for it every time it starts, and automatic backups can’t run without you.`},keyMissing:{title:`The archive password is no longer in the keychain`,detail:`PathKeep will ask for it the next time it starts, and automatic backups can’t open the archive until it is saved again.`},passwordRisk:{title:`Only you have the archive password`,detail:`The archive is encrypted and its password isn’t in the keychain. If the password is lost, nothing can open the archive, PathKeep included.`,noKeychain:`The archive is encrypted, and this computer has no keychain to save its password in. If the password is lost, nothing can open the archive, PathKeep included. Keep it in a password manager, or written down somewhere safe.`,keep:`Save it in the keychain`,dismiss:`I keep it safe`}},stats:{saved:`Saved visits`,savedSub_one:`{count} new this week`,savedSub_other:`{count} new this week`,span:`Time span`,spanYearsMonths:`{years} yr {months} mo`,spanMonths_one:`{count} month`,spanMonths_other:`{count} months`,spanDays_one:`{count} day`,spanDays_other:`{count} days`,spanSince:`Since {date}`,size:`Archive size`,encrypted:`Encrypted`,notEncrypted:`Not encrypted`,sources:`Sources`,sourcesValue_one:`{count} browser`,sourcesValue_other:`{count} browsers`,sourcesPaused_one:`{count} paused`,sourcesPaused_other:`{count} paused`,sourcesAllOn:`All backing up`},building:{first:`Working out your Insights for the first time…`,update:`Updating your Insights…`},trend:{title:`Last 30 days`,subtitle:`Visits per day, all browsers`,visits:`Visits`,vsPrevious:`vs. the 30 days before`},onThisDay:{title:`On this day`,subtitle:`What you were reading on {date}`,meta:`{visits} · {domains}`,empty:`Nothing from this date in earlier years yet. Come back next year.`},year:{title:`Your year`,subtitle:`Each square is a day. Click one to see that day.`,previous:`Previous year`,next:`Next year`,summary:`{total} visits in {year}`,busiest:`busiest: {date}`,cell:`{date} · {visits}`,cellEmpty:`{date} · no visits`},threads:{title:`Things you keep coming back to`,all:`All`,meta:`{days} · {visits}`,days_one:`{count} day`,days_other:`{count} days`,empty:`Topics you return to over several days will show up here.`},sources:{title:`Sources`,manage:`Manage`,paused:`Paused`,empty:`No browsers are being backed up yet.`}},"zh-CN":{greetingMorning:`早上好`,greetingAfternoon:`下午好`,greetingEvening:`晚上好`,title:`{greeting},这是你走过的路`,alerts:{label:`需要你处理`,openBackup:`打开备份`,openSecurity:`打开安全设置`,scheduleFallback:`自动备份需要处理`,fullDiskAccess:{title:`读不到 Safari 的历史`,detail:`在你给 PathKeep 完全磁盘访问权限之前,macOS 不让它读 Safari 的历史,这期间 Safari 不会被备份。`},discoveryError:{title:`PathKeep 找不到你的浏览器`,detail:`没能列出这台电脑上的浏览器,新的历史可能会漏掉。`},keychainUnavailable:{title:`钥匙串不可用`,detail:`存不了存档的密码,所以 PathKeep 每次启动都要问,自动备份也没法在你不在时运行。`},keyMissing:{title:`存档的密码已经不在钥匙串里`,detail:`PathKeep 下次启动会问密码,自动备份在重新存好之前也打不开存档。`},passwordRisk:{title:`存档的密码只有你知道`,detail:`存档已加密,密码不在钥匙串里。密码一旦丢了,谁都打不开存档,PathKeep 也不行。`,noKeychain:`存档已加密,这台电脑上也没有能存密码的钥匙串。密码一旦丢了,谁都打不开存档,PathKeep 也不行。请把它存在密码管理器里,或写下来放在安全的地方。`,keep:`存到钥匙串`,dismiss:`我有妥善保管`}},stats:{saved:`已保存记录`,savedSub_one:`本周新增 {count}`,savedSub_other:`本周新增 {count}`,span:`时间跨度`,spanYearsMonths:`{years} 年 {months} 个月`,spanMonths_one:`{count} 个月`,spanMonths_other:`{count} 个月`,spanDays_one:`{count} 天`,spanDays_other:`{count} 天`,spanSince:`最早 {date}`,size:`存档大小`,encrypted:`已加密`,notEncrypted:`未加密`,sources:`来源`,sourcesValue_one:`{count} 个浏览器`,sourcesValue_other:`{count} 个浏览器`,sourcesPaused_one:`{count} 个已暂停`,sourcesPaused_other:`{count} 个已暂停`,sourcesAllOn:`全部在备份`},building:{first:`正在第一次整理你的洞察…`,update:`正在更新你的洞察…`},trend:{title:`近 30 天浏览`,subtitle:`每日浏览次数,所有浏览器`,visits:`浏览`,vsPrevious:`与前 30 天相比`},onThisDay:{title:`往年今日`,subtitle:`{date},你在看什么`,meta:`{visits} · {domains}`,empty:`往年的今天还没有记录。明年再来看看。`},year:{title:`一年的浏览`,subtitle:`每格是一天,点一下查看那天`,previous:`上一年`,next:`下一年`,summary:`{year} 年共 {total} 次浏览`,busiest:`最活跃:{date}`,cell:`{date} · {visits}`,cellEmpty:`{date} · 没有浏览`},threads:{title:`反复回来看的主题`,all:`全部`,meta:`{days} · {visits}`,days_one:`{count} 天`,days_other:`{count} 天`,empty:`连续几天都在看的主题会出现在这里。`},sources:{title:`来源`,manage:`管理`,paused:`已暂停`,empty:`还没有在备份任何浏览器。`}},"zh-TW":{greetingMorning:`早安`,greetingAfternoon:`午安`,greetingEvening:`晚安`,title:`{greeting},這是你走過的路`,alerts:{label:`需要你處理`,openBackup:`打開備份`,openSecurity:`打開安全性設定`,scheduleFallback:`自動備份需要處理`,fullDiskAccess:{title:`讀不到 Safari 的歷史`,detail:`在你給 PathKeep 完整磁碟取用權限之前,macOS 不讓它讀 Safari 的歷史,這段期間 Safari 不會被備份。`},discoveryError:{title:`PathKeep 找不到你的瀏覽器`,detail:`沒能列出這台電腦上的瀏覽器,新的歷史可能會漏掉。`},keychainUnavailable:{title:`鑰匙圈無法使用`,detail:`存不了存檔的密碼,所以 PathKeep 每次啟動都要問,自動備份也沒辦法在你不在時執行。`},keyMissing:{title:`存檔的密碼已經不在鑰匙圈裡`,detail:`PathKeep 下次啟動會問密碼,自動備份在重新存好之前也打不開存檔。`},passwordRisk:{title:`存檔的密碼只有你知道`,detail:`存檔已加密,密碼不在鑰匙圈裡。密碼一旦遺失,誰都打不開存檔,PathKeep 也不行。`,noKeychain:`存檔已加密,這台電腦上也沒有能存密碼的鑰匙圈。密碼一旦遺失,誰都打不開存檔,PathKeep 也不行。請把它存在密碼管理器裡,或寫下來放在安全的地方。`,keep:`存到鑰匙圈`,dismiss:`我有妥善保管`}},stats:{saved:`已保存記錄`,savedSub_one:`本週新增 {count}`,savedSub_other:`本週新增 {count}`,span:`時間跨度`,spanYearsMonths:`{years} 年 {months} 個月`,spanMonths_one:`{count} 個月`,spanMonths_other:`{count} 個月`,spanDays_one:`{count} 天`,spanDays_other:`{count} 天`,spanSince:`最早 {date}`,size:`存檔大小`,encrypted:`已加密`,notEncrypted:`未加密`,sources:`來源`,sourcesValue_one:`{count} 個瀏覽器`,sourcesValue_other:`{count} 個瀏覽器`,sourcesPaused_one:`{count} 個已暫停`,sourcesPaused_other:`{count} 個已暫停`,sourcesAllOn:`全部在備份`},building:{first:`正在第一次整理你的洞察…`,update:`正在更新你的洞察…`},trend:{title:`近 30 天瀏覽`,subtitle:`每日瀏覽次數,所有瀏覽器`,visits:`瀏覽`,vsPrevious:`與前 30 天相比`},onThisDay:{title:`往年今日`,subtitle:`{date},你在看什麼`,meta:`{visits} · {domains}`,empty:`往年的今天還沒有記錄。明年再來看看。`},year:{title:`一年的瀏覽`,subtitle:`每格是一天,點一下查看那天`,previous:`上一年`,next:`下一年`,summary:`{year} 年共 {total} 次瀏覽`,busiest:`最活躍:{date}`,cell:`{date} · {visits}`,cellEmpty:`{date} · 沒有瀏覽`},threads:{title:`反覆回來看的主題`,all:`全部`,meta:`{days} · {visits}`,days_one:`{count} 天`,days_other:`{count} 天`,empty:`連續幾天都在看的主題會出現在這裡。`},sources:{title:`來源`,manage:`管理`,paused:`已暫停`,empty:`還沒有在備份任何瀏覽器。`}}}),_e=g({en:{groups:{title:`Things you looked into`,loading:`Loading search groups…`,all:`all time`,recent:`last {days} days`,range:`{range} · Searches grouped by meaning`,monthly:`By month, {range} · Searches grouped by meaning`,wholeMonths:`Whole calendar months; partial months extend beyond the selected dates.`,allBrowsers:`Monthly groups include all browsers.`,static:`Groups follow shared words more than meaning. Settings → AI`,explain:`Keyword searches grouped by meaning, using the pages their searches opened. Very short searches stay out. A group is shown if it opened pages or was searched on more than one day. Searches without saved vectors are not grouped yet.`,empty:`No groups here. Counts keyword searches that opened pages or returned on several days; very short searches stay out.`,updating:`Updating…`,others_one:`and {count} other search`,others_other:`and {count} other searches`,searchCount_one:`{count} search`,searchCount_other:`{count} searches`,dayCount_one:`{count} day`,dayCount_other:`{count} days`,pageCount_one:`{count} page opened`,pageCount_other:`{count} pages opened`,strip:`Days this group was searched`,searched:`{date}: searched`,notSearched:`{date}: no searches`},title:`Insights`,subtitle:`Computed from your local archive. Nothing leaves this computer.`,zone:{differs:`Insights use {insights}; this computer is now on {computer}.`,differsNote:`Days and hours in Insights stay as they are unless you switch. Switching builds Insights again.`,use:`Use {zone}`,keep:`Keep {zone}`,saving:`Saving…`,label:`{name} ({offset})`,labelWithPlace:`{name}, {place} ({offset})`},openInHistory:`Open in History`,sections:{time:`When you browse`,searching:`Searching`},patterns:`Patterns`,times:`{count}×`,range:{label:`Time range`,all:`All time`,d7:`7d`,d30:`30d`,d90:`90d`,y1:`1y`,custom:`Custom`,customLabel:`Custom range: {range}`,pick:`Pick the first and last day`,apply:`Show these days`,cancel:`Cancel`},profile:{label:`Browser profile`,all:`All browsers`},status:{updating:`Updating`,limited:`Limited`,about:`About this number`,computed:`Computed`,never:`Not yet`,window:`Dates`,state:`Status`,basedOn:`Based on`,evidence:{visits_one:`{count} visit`,visits_other:`{count} visits`,siteVisits_one:`{count} visit to websites`,siteVisits_other:`{count} visits to websites`,pageVisits_one:`{count} visit to websites, not counting searches`,pageVisits_other:`{count} visits to websites, not counting searches`,searches_one:`{count} search`,searches_other:`{count} searches`,searchTrails_one:`{count} search and where it led`,searchTrails_other:`{count} searches and where they led`,landedSearches_one:`{count} search that led to a website`,landedSearches_other:`{count} searches that led to a website`,days_one:`{count} day of browsing`,days_other:`{count} days of browsing`,sessions_one:`{count} browsing session`,sessions_other:`{count} browsing sessions`},chromiumOnly:`Uses what only Chrome and other Chromium browsers record. Safari and Google Takeout visits are left out.`,ask:`Ask about this`,question:{range:`What stands out in “{card}” in my browsing from {start} to {end}?`,day:`What stands out in “{card}” in my browsing on {day}?`,all:`What stands out in “{card}” across all my browsing history?`},states:{ready:`Up to date`,stale:`Updating`,degraded:`Partly available`,disabled:`Turned off`},reasons:{"module-never-built":`Not worked out yet. It happens in the background after a backup, or the next time PathKeep opens.`,"module-no-successful-rebuild":`The last attempt to work this out did not finish. Settings → Background work says why and can try again.`,"module-disabled":`Turned off in Settings.`,"module-rebuild-required":`This needs working out again; that happens in the background.`,"module-version-mismatch":`This version of PathKeep works this out differently; it is being redone in the background.`,"module-version-changed":`This version of PathKeep works this out differently; it is being redone in the background.`,unknown:`Part of this is not available right now.`}},kpi:{visits:`Page visits`,domains:`Distinct sites`,searches:`Searches`,activeTime:`Active time`,newSites:`New sites`,newSitesDetail:`Sites visited for the first time in this range`,deepDives:`Deep dives`,deepDivesDetail:`Sessions that followed links four or more pages deep, across five or more sites, including a new one`,reopened:`Pages reopened`,reopenedDetail:`Pages opened again on more than one day`,vsPrevious:`Compared with the previous {days} days`,hours:`{value} h`,minutes:`{value} min`},daily:{title:`Browsing over time`,hint:`Per day. Click a day to see it in detail.`,perWeek:`Per week, starting Monday.`,perMonth:`Per month.`,pages:`Pages`,searches:`Searches`},topSites:{title:`Top sites`,empty:`No visits in this range.`,orderLabel:`Order sites by`,order:{visits:`Visits`,unique_days:`Days visited`,average_daily_visits:`Visits per day`}},rhythm:{weekday:`Weekdays`,weekend:`Weekends`,perDay:`{visits} a day`,busiest:`Busiest hours:`,title:`Rhythm`,subtitle:`Visits by hour of the day, across the week`,cell:`{day} {hour} · {visits}`,weekdays:`Mon,Tue,Wed,Thu,Fri,Sat,Sun`},searches:{title:`Frequent searches`,empty:`No searches in this range.`},mix:{title:`Kinds of sites`,explain:`Each visit counts toward the kind of site it went to. Kinds come from PathKeep's built-in lists of well-known sites in several regions, or from the kind you choose on a site's page; sites on no list are not classified. Visits to search engines count as Search.`,compared:`The small numbers are the change in share, in percentage points, from the previous {days} days.`,points:`{value} pts`,categories:{ai:`AI`,community:`Forums and Q&A`,developer:`Building software`,docs:`Documentation`,education:`Learning and reference`,entertainment:`Music, games and shows`,finance:`Money`,news:`News`,search:`Search`,shopping:`Shopping`,social:`Social`,travel:`Travel and maps`,video:`Video`,work:`Work tools`,unknown:`Not classified`},unclassified:{open:`Show the sites that are not classified`,title:`Sites not on any list`,description:`The sites PathKeep's lists don't know, most visited first. Open one to choose what kind of site it is.`,empty:`Every site in this range is on a list.`,failed:`These sites couldn't be loaded.`,more:`Show more`,visits_one:`{shown} visit`,visits_other:`{shown} visits`}},engines:{title:`Where you search`,explain:`Searches on each search engine or site search, in this range. Search engines are recognized by their address.`},words:{title:`What you search for`,subtitle:`Words that come up most in your searches`,explain:`Each word counts once per search it appears in. Single letters, bare numbers and filler words such as "the" are left out. Click a word to find every page it led to in History.`},outcomes:{title:`How your searches go`,explain:`For each search engine: searches in this range, how many times a search was reworded on average before you moved on, and how many pages it opened. Below, the searches you came back to most, and over how many days.`,searches_one:`{searches} search`,searches_other:`{searches} searches`,engine:`Reworded {rewordings}× on average · {pages} pages opened per search`,mostReturned:`Searches you came back to most`,topic_one:`{searches} search over {days} days`,topic_other:`{searches} searches over {days} days`},tries:{title:`Searches that took several tries`,subtitle:`Reworded twice or more, or no result opened`,explain:`A search is reworded when you search again on the same engine soon after, with the same words plus or minus some. Click one to see each time you searched it and where it led.`,empty:`Every search in this range found something within a try or two.`,reworded_one:`Reworded once`,reworded_other:`Reworded {times} times`,endedOn:`ended on {site}`,noResult:`no result opened`},paths:{title:`How you move between sites`,subtitle:`Three sites in a row, most often first`,explain:`Three different sites visited one after another in the same session. Going back to a site you just left (a search engine, say) makes a round trip, which is not counted as a path. A path counts on the day you reached its last site, so the first two can be earlier than the range.`,empty:`No three sites came one after another more than once in this range.`,then:`then`,times_one:`{times} time`,times_other:`{times} times`},landings:{title:`Where your searches end up`,subtitle:`Sites your searches led to, most first`,explain:`Each search counts for the site of the first page you opened after it (after its last wording, if you reworded it). Fewer different searches than searches means you kept coming back for the same things.`,counts_one:`{searches} search · {queries} different`,counts_other:`{searches} searches · {queries} different`},compared:{title:`Pages you compared`,subtitle:`Pages you went back and forth between in one search`,explain:`Pages of the same kind (products, docs, articles, videos…) on two or more sites, or several pages of one site, that you switched between at least twice during one search.`,empty:`No search in this range had you comparing pages.`,pages_one:`{pages} page`,pages_other:`{pages} pages`,sites_one:`on {sites} site`,sites_other:`on {sites} sites`,landing:`Opened first from the search`,openDay:`Show this day`},newSites:{title:`New sites`,series:`New sites`,none:`No site in this range was new; every one had been visited before.`,total_one:`{sites} site visited for the first time`,total_other:`{sites} sites visited for the first time`,share:`{share} of the sites you visited`,explain:`A site counts on the first day you visited it in any browser, or in the browser profile chosen above.`},refind:{title:`Pages you keep reopening`,days_one:`on {count} day`,days_other:`on {count} days`,empty:`Pages you come back to on different days will show up here.`,explain:`A page counts when you open it again on different days, find it again through a search, or go straight to it. Each browser is counted on its own.`},threads:{title:`Things you came back to`,subtitle:`Searches and pages you returned to on several days`,explain:`A search counts when you made it more than once; a page when you opened it on more than one day.`,empty:`Nothing you returned to in this range yet.`,searched_one:`Searched {count} time`,searched_other:`Searched {count} times`,opened_one:`Opened on {count} day`,opened_other:`Opened on {count} days`,last:`last {when}`},breadth:{title:`Explore or focus`,explain:`Based on how your visits are spread across sites. If most visits go to a few sites, you are focused; if they are spread over many, you are exploring.`,half_one:`Half of your visits went to {count} site.`,half_other:`Half of your visits went to {count} sites.`,meter:`How widely your visits are spread`,focusedEnd:`A few sites`,wideEnd:`Many sites`,focused:`You stayed with a small set of sites.`,mixed:`A mix of familiar sites and others.`,wide:`Your visits were spread across many sites.`,newSites_one:`{count} site was new to you.`,newSites_other:`{count} sites were new to you.`},habits:{title:`Habits`,subtitle:`Sites you visit on a regular rhythm`,explain:`A site is a habit when you visit it on at least 5 days over two weeks or more, with steady gaps between visits. It has stopped when the gap since your last visit is more than twice the usual one.`,empty:`No regular rhythm in this range yet.`,daily:`Almost every day`,weekly:`About once a week`,periodic:`About every {days} days`,days_one:`{count} day`,days_other:`{count} days`,stopped:`Stopped · {when}`},browsers:{title:`Browsers compared`,explain:`Visits and sites per browser profile in this range, and the kinds of sites each mostly visits (unclassified sites left out). A site is listed under one browser when only that browser visited it; the sites more than one visited are counted below, the most visited named.`,single:`Only one browser has visits in this range.`,only:`Only here:`,shared_one:`{count} site was visited in more than one browser.`,shared_other:`{count} sites were visited in more than one browser.`,sharedTop:`Most visited of them:`,kinds:`Mostly {kinds}`,kindsJoin:`, `},day:{reopened:`Pages you came back to`,reopenedHint:`Opened this day, and on other days too`,reopenedEmpty:`Nothing opened this day was one you keep coming back to.`,eyebrow:`Day`,previous:`Previous day`,next:`Next day`,invalid:`This is not a day PathKeep can show.`,vsPrevious:`Compared with the day before`,visits:`Visits`,hours:`By hour`,empty:`No visits on this day.`,siteInHistory:`Show this site’s visits that day in History`,sessions:`Sessions`,sessionsHint:`Visits close together in one browser, in order`,noSessions:`No sessions on this day.`,untitledSession:`Browsing`,deepDive:`Deep dive`,sessionMeta:`{pages} · {sites}`,searchCount_one:`{count} search`,searchCount_other:`{count} searches`,noVisits:`No pages to show.`,searched:`Searched “{query}”`,searches:`Searches`,noSearches:`No searches on this day.`,mixCompared:`The small numbers are the change in share, in percentage points, from the day before.`,timesInAll_one:`{count} time in all`,timesInAll_other:`{count} times in all`,trailAfter:`{pages} after`,noCompared:`No search this day had you comparing pages.`},site:{category:{label:`Kind of site`,lists:`PathKeep's list: {category}`,updating:`Updating Insights…`,failed:`The kind of site wasn't changed`,parts_one:`{count} part sorted on its own`,parts_other:`{count} parts sorted on their own`,partsExplain:`PathKeep's lists sort these parts of {site} on their own, so the kind you choose for the site leaves them as they are.`},arrivals:`How you got here`,arrivalsHint:`Each visit that came from somewhere other than this site`,arrivalsExplain:`The browser records which page opened each page. A visit counts here when that page was not on this site: none at all means you typed the address, used a bookmark or opened a new tab; a search results page means a search; any other page means a link. Moving between pages of this site is not counted.`,direct:`Typed or bookmarked`,fromSearch:`From a search`,fromLink:`From a link`,noArrivals:`No visit came here from somewhere else in this range.`,arrivalsUnrecorded:`Your visits here came from a browser that doesn't record which page opened a page (Safari, or history imported from Google Takeout), so PathKeep can't tell how you got here.`,onwardUnrecorded:`Your visits here came from a browser that doesn't record which page opened a page (Safari, or history imported from Google Takeout), so PathKeep can't tell where you went next.`,unrecordedNote_one:`{count} visit here isn't counted: its browser doesn't record which page opened a page (Safari, or history imported from Google Takeout).`,unrecordedNote_other:`{count} visits here aren't counted: their browser doesn't record which page opened a page (Safari, or history imported from Google Takeout).`,referrers:`Links from`,searchSites:`Searches on`,onward:`Where you went next`,onwardHint:`Sites you opened from links on this one`,noOnward:`You did not open another site from this one in this range.`,siteSearches:`Searched on this site`,siteSearchesHint:`What you searched for here, most often first`,eyebrow:`Site`,activeDays:`Days visited`,ofDays:`out of {days}`,pages:`Pages`,landings:`Searches that ended here`,landingsHint:`Opened from a search result`,topPages:`Most visited pages`,empty:`No visits to this site in this range.`,searches:`Searches that led here`,searchesHint:`What you searched before opening this site`,noSearches:`No searches led here in this range.`,trend:`Visits per day`,trendWeekly:`Visits per week`,trendMonthly:`Visits per month`,trendHint:`Click a day to see it in detail`},search:{similar:{title:`Similar searches`,hint:`Across all time`,staticNote:`With the in-app static model, similar searches follow shared words.`,loading:`Loading similar searches`,open:`Show searches for “{query}”`,notIndexed:`This search hasn’t been indexed yet.`,empty:`No similar searches found.`},eyebrow:`Search`,inHistory:`Search History for this`,notFound:`This search is not among your searches in this range. Try a longer range, or search History for it.`,timesSearched:`Times searched`,allTime:`In total, all browsers`,first:`First searched`,last:`Last searched`,engines:`Search engine`,times:`Each time, and where it led`,timesHint:`The latest times in this range`,noTimes:`You did not make this search in this range.`,wordings:`Other ways you searched it`,oneWording:`You always searched it the same way.`,ledTo:`Opened {site}`,noLanding:`No page opened from the results`,trailMeta:`{pages} after · {engine}`,reworded_one:`reworded once`,reworded_other:`reworded {count} times`,landings:`Where it led`,landingsHint_one:`Sites opened from the search on the left`,landingsHint_other:`Sites opened from the {count} results on the left`,noLandings:`No site was opened from these results.`},page:{eyebrow:`Page you keep reopening`,open:`Open in browser`,openFailed:`Couldn’t open the page`,totalVisits:`Visits`,allBrowsers:`All browsers, all time`,firstVisit:`First visit`,lastVisit:`Last visit`,browsers:`Browsers`,weeks:`Visits, last 12 weeks`,why:`Why it is listed`,score:`Score {score}, the bars added up.`,whyExplain:`Each signal adds to the page’s score, weighted by how strongly it shows you come back to it.`,notRefound:`This page is not counted as reopened in this range.`,factors:{days_one:`Opened on {count} day`,days_other:`Opened on {count} different days`,trails_one:`Part of {count} search`,trails_other:`Part of {count} searches`,searches_one:`Reached from a search {count} time`,searches_other:`Reached from a search {count} times`,direct_one:`Opened directly {count} time`,direct_other:`Opened directly {count} times`},countedIn:`Counted in {profile}.`,alsoIn_one:`Also reopened in {count} other browser profile.`,alsoIn_other:`Also reopened in {count} other browser profiles.`,searchesTitle:`Searches that led here`,noSearches:`No searches led to this page in this range.`,recentDays:`Recent days you opened it`,noDays:`No recent days to show.`},stale:`Updating your Insights…`},"zh-CN":{groups:{title:`查过的事`,loading:`正在加载搜索分组…`,all:`全部时间`,recent:`最近 {days} 天`,range:`{range} · 按意思给搜索分组`,monthly:`按月,{range} · 按意思给搜索分组`,wholeMonths:`显示完整的日历月;不足一个月的部分会延伸到所选日期以外。`,allBrowsers:`每月分组包含所有浏览器。`,static:`分组更偏向共同用词,而非意思。设置 → AI`,explain:`按意思给关键词搜索分组,也参考搜索后打开的页面。排除过短的搜索;只显示打开过页面或在多天搜索过的组。尚无向量的搜索暂不分组。`,empty:`没有可显示的分组。统计打开过页面或在多天重复的关键词搜索,排除过短的搜索。`,updating:`更新中…`,others_one:`以及其他 {count} 个搜索`,others_other:`以及其他 {count} 个搜索`,searchCount_one:`{count} 次搜索`,searchCount_other:`{count} 次搜索`,dayCount_one:`{count} 天`,dayCount_other:`{count} 天`,pageCount_one:`打开 {count} 个页面`,pageCount_other:`打开 {count} 个页面`,strip:`这组搜索出现的日期`,searched:`{date}:有搜索`,notSearched:`{date}:无搜索`},title:`洞察`,subtitle:`全部来自本机存档,不经过网络`,zone:{differs:`洞察用的是{insights},这台电脑现在是{computer}。`,differsNote:`不切换的话,洞察里的日子和时刻保持不变;切换会重新整理洞察。`,use:`改用{zone}`,keep:`保持{zone}`,saving:`正在保存…`,label:`{name}({offset})`,labelWithPlace:`{name}・{place}({offset})`},openInHistory:`在记录中打开`,sections:{time:`什么时候浏览`,searching:`搜索`},patterns:`规律`,times:`{count} 次`,range:{label:`时间范围`,all:`全部时间`,d7:`7 天`,d30:`30 天`,d90:`90 天`,y1:`1 年`,custom:`自定义`,customLabel:`自定义范围:{range}`,pick:`选择第一天和最后一天`,apply:`查看这几天`,cancel:`取消`},profile:{label:`浏览器配置`,all:`所有浏览器`},status:{updating:`更新中`,limited:`部分可用`,about:`关于这个数字`,computed:`计算于`,never:`尚未计算`,window:`日期`,state:`状态`,basedOn:`依据`,evidence:{visits_one:`{count} 次访问`,visits_other:`{count} 次访问`,siteVisits_one:`{count} 次网站访问`,siteVisits_other:`{count} 次网站访问`,pageVisits_one:`{count} 次网站访问(不含搜索)`,pageVisits_other:`{count} 次网站访问(不含搜索)`,searches_one:`{count} 次搜索`,searches_other:`{count} 次搜索`,searchTrails_one:`{count} 次搜索及之后的浏览`,searchTrails_other:`{count} 次搜索及之后的浏览`,landedSearches_one:`{count} 次打开了网站的搜索`,landedSearches_other:`{count} 次打开了网站的搜索`,days_one:`{count} 天的浏览`,days_other:`{count} 天的浏览`,sessions_one:`{count} 段浏览`,sessions_other:`{count} 段浏览`},chromiumOnly:`用到只有 Chrome 等 Chromium 浏览器才记录的信息,Safari 和 Google Takeout 的访问不计入。`,ask:`问问助理`,question:{range:`我在 {start} 到 {end} 的浏览里,“{card}”有什么值得注意的?`,day:`我在 {day} 的浏览里,“{card}”有什么值得注意的?`,all:`在我所有的浏览记录里,“{card}”有什么值得注意的?`},states:{ready:`已是最新`,stale:`正在更新`,degraded:`部分可用`,disabled:`已关闭`},reasons:{"module-never-built":`还没整理出来。备份之后、或下次打开 PathKeep 时会在后台整理。`,"module-no-successful-rebuild":`上次整理没有完成。设置 → 后台工作 会说明原因,也可以重试。`,"module-disabled":`已在设置里关闭。`,"module-rebuild-required":`这部分需要重新整理,会在后台进行。`,"module-version-mismatch":`这个版本的 PathKeep 整理方式不同,正在后台重新整理。`,"module-version-changed":`这个版本的 PathKeep 整理方式不同,正在后台重新整理。`,unknown:`这部分暂时无法使用。`}},kpi:{visits:`页面浏览`,domains:`不同网站`,searches:`搜索次数`,activeTime:`活跃时间`,newSites:`新网站`,newSitesDetail:`这段时间第一次去的网站`,deepDives:`深入浏览`,deepDivesDetail:`一路点下去四层以上、经过五个以上网站且有新网站的浏览`,reopened:`重新打开的页面`,reopenedDetail:`在不止一天又打开过的页面`,vsPrevious:`与前 {days} 天相比`,hours:`{value} 小时`,minutes:`{value} 分钟`},daily:{title:`浏览走势`,hint:`每天一条。点某一天查看详情。`,perWeek:`每周一条,从周一算起。`,perMonth:`每月一条。`,pages:`页面`,searches:`搜索`},topSites:{title:`最常浏览`,empty:`这段时间没有浏览记录。`,orderLabel:`网站排序方式`,order:{visits:`浏览次数`,unique_days:`去过的天数`,average_daily_visits:`每天浏览次数`}},rhythm:{weekday:`工作日`,weekend:`周末`,perDay:`每天 {visits} 次`,busiest:`最忙的时段:`,title:`浏览节奏`,subtitle:`一周内每小时的浏览量`,cell:`周{day} {hour} · {visits}`,weekdays:`一,二,三,四,五,六,日`},searches:{title:`常用搜索词`,empty:`这段时间没有搜索。`},mix:{title:`哪类网站`,explain:`每次浏览算进它去的那类网站。类别来自 PathKeep 内置的各地常见网站清单,或你在网站页上选的类别;不在清单上的网站算“未分类”。去搜索引擎的浏览算“搜索”。`,compared:`小字是和前 {days} 天相比,占比变化了几个百分点。`,points:`{value} 个百分点`,categories:{ai:`AI`,community:`论坛与问答`,developer:`写程序`,docs:`文档`,education:`学习与查询`,entertainment:`音乐、游戏与影视`,finance:`理财`,news:`新闻`,search:`搜索`,shopping:`购物`,social:`社交`,travel:`旅行与地图`,video:`视频`,work:`工作工具`,unknown:`未分类`},unclassified:{open:`显示未分类的网站`,title:`不在清单上的网站`,description:`PathKeep 清单上没有的网站,浏览最多的在前。打开一个就能选它是哪类网站。`,empty:`这段时间的网站都在清单上。`,failed:`没能读出这些网站。`,more:`显示更多`,visits_one:`{shown} 次浏览`,visits_other:`{shown} 次浏览`}},engines:{title:`在哪里搜索`,explain:`这段时间在每个搜索引擎或站内搜索里搜索的次数。搜索引擎按网址识别。`},words:{title:`搜索什么`,subtitle:`搜索里最常出现的词`,explain:`一个词在一次搜索里出现只算一次。单个字母、单独的数字和 "the" 之类的虚词不计。点一个词,在历史里找出它带你去过的所有页面。`},outcomes:{title:`搜索得怎么样`,explain:`每个搜索引擎:这段时间的搜索次数,一次搜索平均改写几次才往下走,以及打开了几个页面。下方是你最常回来再搜的搜索,以及跨了多少天。`,searches_one:`搜索 {searches} 次`,searches_other:`搜索 {searches} 次`,engine:`平均改写 {rewordings} 次 · 每次搜索打开 {pages} 个页面`,mostReturned:`最常回来再搜的`,topic_one:`{days} 天里搜索 {searches} 次`,topic_other:`{days} 天里搜索 {searches} 次`},tries:{title:`试了好几次的搜索`,subtitle:`改写两次以上,或没有打开任何结果`,explain:`在同一个搜索引擎上,紧接着用差不多的词(多几个或少几个)再搜一次,就算改写。点一个搜索,看每一次搜索和它带你去了哪里。`,empty:`这段时间的搜索都在一两次内找到了东西。`,reworded_one:`改写 1 次`,reworded_other:`改写 {times} 次`,endedOn:`最后到了 {site}`,noResult:`没有打开任何结果`},paths:{title:`在网站之间怎么走`,subtitle:`连着去的三个网站,最常见的在前`,explain:`同一段浏览里先后去的三个不同网站。回到刚离开的网站(比如搜索引擎)算来回,不算一条路线。一条路线算在到达最后一个网站的那天,所以前两个网站可以早于这段时间。`,empty:`这段时间没有哪三个网站接连出现超过一次。`,then:`然后`,times_one:`{times} 次`,times_other:`{times} 次`},landings:{title:`搜索最后到了哪里`,subtitle:`搜索带你去的网站,最多的在前`,explain:`每次搜索算在它之后(改写过的话,最后一次改写之后)打开的第一个页面所在的网站。不同的搜索比搜索次数少,表示你常为同样的事回来。`,counts_one:`搜索 {searches} 次 · {queries} 种`,counts_other:`搜索 {searches} 次 · {queries} 种`},compared:{title:`比较过的页面`,subtitle:`一次搜索里来回看的页面`,explain:`同一类页面(商品、文档、文章、视频……)分布在两个以上的网站,或同一网站的几个页面,在一次搜索里来回切换至少两次。`,empty:`这段时间的搜索里没有来回比较页面。`,pages_one:`{pages} 个页面`,pages_other:`{pages} 个页面`,sites_one:`在 {sites} 个网站`,sites_other:`在 {sites} 个网站`,landing:`搜索后第一个打开的页面`,openDay:`查看这一天`},newSites:{title:`新网站`,series:`新网站`,none:`这段时间没有新网站,去过的网站之前都去过。`,total_one:`第一次去的网站 {sites} 个`,total_other:`第一次去的网站 {sites} 个`,share:`占去过的网站的 {share}`,explain:`一个网站算在你第一次在任何浏览器(或上面选的浏览器配置)去它的那一天。`},refind:{title:`反复打开的页面`,days_one:`{count} 天`,days_other:`{count} 天`,empty:`在不同日子反复打开的页面会出现在这里。`,explain:`在不同的日子再次打开、通过搜索再次找到,或直接前往的页面都会计入。每个浏览器分开计算。`},threads:{title:`你回头再看的事`,subtitle:`在好几天里回头再搜、再打开的内容`,explain:`同一个搜索做过不止一次,或同一个页面在不止一天里打开过,都会列在这里。`,empty:`这段时间还没有回头再看的内容。`,searched_one:`搜索过 {count} 次`,searched_other:`搜索过 {count} 次`,opened_one:`在 {count} 天打开过`,opened_other:`在 {count} 天打开过`,last:`最近一次 {when}`},breadth:{title:`探索还是专注`,explain:`看你的浏览分布在多少网站上。大部分浏览集中在少数网站就是专注;分散在很多网站就是在探索。`,half_one:`你一半的浏览集中在 {count} 个网站。`,half_other:`你一半的浏览集中在 {count} 个网站。`,meter:`浏览分散的程度`,focusedEnd:`少数网站`,wideEnd:`很多网站`,focused:`你主要待在一小组网站上。`,mixed:`常去的网站和其他网站都有。`,wide:`你的浏览分散在很多网站上。`,newSites_one:`有 {count} 个网站是第一次去。`,newSites_other:`有 {count} 个网站是第一次去。`},habits:{title:`习惯`,subtitle:`你规律造访的网站`,explain:`在两周以上的时间里至少有 5 天造访、间隔稳定的网站就算习惯。距离上次造访超过平常间隔的两倍,就算中断了。`,empty:`这段时间还没有规律造访的网站。`,daily:`几乎每天`,weekly:`大约每周一次`,periodic:`大约每 {days} 天`,days_one:`{count} 天`,days_other:`{count} 天`,stopped:`已中断 · {when}`},browsers:{title:`各浏览器对比`,explain:`这段时间每个浏览器配置的浏览量和网站数,以及它主要去哪类网站(不算未分类的)。只有一个浏览器去过的网站会列在它下面;不止一个浏览器去过的网站在最下面计数,并写出最常去的几个。`,single:`这段时间只有一个浏览器有浏览记录。`,only:`只在这里:`,shared_one:`有 {count} 个网站在不止一个浏览器里去过。`,shared_other:`有 {count} 个网站在不止一个浏览器里去过。`,sharedTop:`其中最常去的:`,kinds:`主要是 {kinds}`,kindsJoin:`、`},day:{reopened:`回来再看的页面`,reopenedHint:`这天打开过,其他日子也打开过`,reopenedEmpty:`这天打开的页面都不是你常回来看的。`,eyebrow:`某一天`,previous:`前一天`,next:`后一天`,invalid:`无法显示这一天。`,vsPrevious:`与前一天相比`,visits:`浏览`,hours:`按小时`,empty:`这一天没有浏览记录。`,siteInHistory:`在记录中查看这个网站当天的浏览`,sessions:`浏览时段`,sessionsHint:`同一个浏览器里时间相近的浏览,按顺序排列`,noSessions:`这一天没有浏览时段。`,untitledSession:`浏览`,deepDive:`深入浏览`,sessionMeta:`{pages} · {sites}`,searchCount_one:`{count} 次搜索`,searchCount_other:`{count} 次搜索`,noVisits:`没有可显示的页面。`,searched:`搜索“{query}”`,searches:`搜索`,noSearches:`这一天没有搜索。`,mixCompared:`小字是和前一天相比,占比变化了几个百分点。`,timesInAll_one:`一共搜索过 {count} 次`,timesInAll_other:`一共搜索过 {count} 次`,trailAfter:`之后 {pages}`,noCompared:`这一天的搜索里没有来回比较页面。`},site:{category:{label:`网站类别`,lists:`PathKeep 清单:{category}`,updating:`正在更新洞察…`,failed:`没能改变网站类别`,parts_one:`{count} 个部分另外分类`,parts_other:`{count} 个部分另外分类`,partsExplain:`PathKeep 清单把 {site} 的这些部分另外分类,你为这个网站选的类别不会改到它们。`},arrivals:`怎么来到这里`,arrivalsHint:`从这个网站以外来的每一次浏览`,arrivalsExplain:`浏览器会记下每个页面是从哪个页面打开的。打开它的页面不在这个网站上,才算在这里:没有打开它的页面,表示你输入了网址、用了书签或开了新标签页;是搜索结果页,算从搜索来;其他页面,算从链接来。在这个网站的页面之间移动不算。`,direct:`输入网址或书签`,fromSearch:`从搜索来`,fromLink:`从链接来`,noArrivals:`这段时间没有从别处来到这里的浏览。`,arrivalsUnrecorded:`这里的浏览来自不记录“从哪一页打开”的浏览器(Safari,或从 Google Takeout 导入的记录),所以 PathKeep 无法知道你是怎么来的。`,onwardUnrecorded:`这里的浏览来自不记录“从哪一页打开”的浏览器(Safari,或从 Google Takeout 导入的记录),所以 PathKeep 无法知道你接着去了哪里。`,unrecordedNote_one:`有 {count} 次浏览没算进来:它的浏览器不记录是从哪一页打开的(Safari,或从 Google Takeout 导入的记录)。`,unrecordedNote_other:`有 {count} 次浏览没算进来:它们的浏览器不记录是从哪一页打开的(Safari,或从 Google Takeout 导入的记录)。`,referrers:`链接来自`,searchSites:`在这些地方搜索`,onward:`接着去了哪里`,onwardHint:`从这个网站的链接打开的网站`,noOnward:`这段时间没有从这个网站打开别的网站。`,siteSearches:`在这个网站上搜索`,siteSearchesHint:`你在这里搜索过什么,最常搜的在前`,eyebrow:`网站`,activeDays:`造访天数`,ofDays:`共 {days} 天`,pages:`页面数`,landings:`从搜索来到这里`,landingsHint:`从搜索结果打开`,topPages:`最常浏览的页面`,empty:`这段时间没有造访这个网站。`,searches:`带你来到这里的搜索`,searchesHint:`打开这个网站之前你搜索了什么`,noSearches:`这段时间没有从搜索来到这里。`,trend:`每日浏览`,trendWeekly:`每周浏览`,trendMonthly:`每月浏览`,trendHint:`点某一天查看详情`},search:{similar:{title:`相似搜索`,hint:`所有时间`,staticNote:`内置静态模型主要按共同字词找相似搜索。`,loading:`正在加载相似搜索`,open:`查看“{query}”的搜索`,notIndexed:`这个搜索还没有建立索引。`,empty:`没有找到相似搜索。`},eyebrow:`搜索`,inHistory:`在记录中搜索`,notFound:`这段时间的搜索里没有这一个。试试更长的时间范围,或在记录中搜索。`,timesSearched:`搜索次数`,allTime:`全部浏览器,所有时间`,first:`第一次搜索`,last:`最近一次搜索`,engines:`搜索引擎`,times:`每一次搜索,以及打开了什么`,timesHint:`这段时间里最近的几次`,noTimes:`这段时间没有做过这个搜索。`,wordings:`其他搜法`,oneWording:`你每次都用同样的字搜索。`,ledTo:`打开了 {site}`,noLanding:`没有从结果打开页面`,trailMeta:`之后 {pages} · {engine}`,reworded_one:`改写 1 次`,reworded_other:`改写 {count} 次`,landings:`打开了哪些网站`,landingsHint_one:`从这次搜索结果打开的网站`,landingsHint_other:`从左边 {count} 次搜索结果打开的网站`,noLandings:`这些搜索结果都没有打开网站。`},page:{eyebrow:`反复打开的页面`,open:`在浏览器打开`,openFailed:`没能打开这个页面`,totalVisits:`浏览次数`,allBrowsers:`全部浏览器,所有时间`,firstVisit:`第一次浏览`,lastVisit:`最近一次浏览`,browsers:`浏览器`,weeks:`近 12 周浏览`,why:`为什么列在这里`,score:`得分 {score},即上面各项相加。`,whyExplain:`每个信号都会给页面加分,越能说明你会回来看,权重越高。`,notRefound:`这段时间这个页面没有算作反复打开。`,factors:{days_one:`在 {count} 天打开过`,days_other:`在 {count} 个不同的日子打开过`,trails_one:`出现在 {count} 次搜索中`,trails_other:`出现在 {count} 次搜索中`,searches_one:`从搜索来到这里 {count} 次`,searches_other:`从搜索来到这里 {count} 次`,direct_one:`直接打开 {count} 次`,direct_other:`直接打开 {count} 次`},countedIn:`按 {profile} 计算。`,alsoIn_one:`另外 {count} 个浏览器配置也反复打开过。`,alsoIn_other:`另外 {count} 个浏览器配置也反复打开过。`,searchesTitle:`带你来到这里的搜索`,noSearches:`这段时间没有从搜索来到这个页面。`,recentDays:`最近打开的日子`,noDays:`没有可显示的日子。`},stale:`正在更新你的洞察…`},"zh-TW":{groups:{title:`查過的事`,loading:`正在載入搜尋分組…`,all:`全部時間`,recent:`最近 {days} 天`,range:`{range} · 按意思將搜尋分組`,monthly:`按月,{range} · 按意思將搜尋分組`,wholeMonths:`顯示完整的日曆月;不足一個月的部分會延伸到所選日期以外。`,allBrowsers:`每月分組包含所有瀏覽器。`,static:`分組偏向共同用詞,而非意思。設定 → AI`,explain:`按意思將關鍵字搜尋分組,也參考搜尋後打開的頁面。排除過短的搜尋;只顯示打開過頁面或在多天搜尋過的組。尚無向量的搜尋暫不分組。`,empty:`沒有可顯示的分組。統計打開過頁面或在多天重複的關鍵字搜尋,排除過短的搜尋。`,updating:`更新中…`,others_one:`以及其他 {count} 個搜尋`,others_other:`以及其他 {count} 個搜尋`,searchCount_one:`{count} 次搜尋`,searchCount_other:`{count} 次搜尋`,dayCount_one:`{count} 天`,dayCount_other:`{count} 天`,pageCount_one:`打開 {count} 個頁面`,pageCount_other:`打開 {count} 個頁面`,strip:`這組搜尋出現的日期`,searched:`{date}:有搜尋`,notSearched:`{date}:無搜尋`},title:`洞察`,subtitle:`全部來自本機存檔,不經過網路`,zone:{differs:`洞察用的是{insights},這台電腦現在是{computer}。`,differsNote:`不切換的話,洞察裡的日子與時刻維持不變;切換會重新整理洞察。`,use:`改用{zone}`,keep:`保持{zone}`,saving:`正在儲存…`,label:`{name}({offset})`,labelWithPlace:`{name}・{place}({offset})`},openInHistory:`在紀錄中打開`,sections:{time:`什麼時候瀏覽`,searching:`搜尋`},patterns:`規律`,times:`{count} 次`,range:{label:`時間範圍`,all:`全部時間`,d7:`7 天`,d30:`30 天`,d90:`90 天`,y1:`1 年`,custom:`自訂`,customLabel:`自訂範圍:{range}`,pick:`選擇第一天和最後一天`,apply:`查看這幾天`,cancel:`取消`},profile:{label:`瀏覽器設定檔`,all:`所有瀏覽器`},status:{updating:`更新中`,limited:`部分可用`,about:`關於這個數字`,computed:`計算於`,never:`尚未計算`,window:`日期`,state:`狀態`,basedOn:`依據`,evidence:{visits_one:`{count} 次造訪`,visits_other:`{count} 次造訪`,siteVisits_one:`{count} 次網站造訪`,siteVisits_other:`{count} 次網站造訪`,pageVisits_one:`{count} 次網站造訪(不含搜尋)`,pageVisits_other:`{count} 次網站造訪(不含搜尋)`,searches_one:`{count} 次搜尋`,searches_other:`{count} 次搜尋`,searchTrails_one:`{count} 次搜尋及之後的瀏覽`,searchTrails_other:`{count} 次搜尋及之後的瀏覽`,landedSearches_one:`{count} 次有打開網站的搜尋`,landedSearches_other:`{count} 次有打開網站的搜尋`,days_one:`{count} 天的瀏覽`,days_other:`{count} 天的瀏覽`,sessions_one:`{count} 段瀏覽`,sessions_other:`{count} 段瀏覽`},chromiumOnly:`用到只有 Chrome 等 Chromium 瀏覽器才記錄的資訊,Safari 與 Google Takeout 的造訪不算在內。`,ask:`問問助理`,question:{range:`我在 {start} 到 {end} 的瀏覽裡,「{card}」有什麼值得注意的?`,day:`我在 {day} 的瀏覽裡,「{card}」有什麼值得注意的?`,all:`在我所有的瀏覽紀錄裡,「{card}」有什麼值得注意的?`},states:{ready:`已是最新`,stale:`正在更新`,degraded:`部分可用`,disabled:`已關閉`},reasons:{"module-never-built":`還沒整理出來。備份之後、或下次打開 PathKeep 時會在背景整理。`,"module-no-successful-rebuild":`上次整理沒有完成。設定 → 背景工作 會說明原因,也可以重試。`,"module-disabled":`已在設定裡關閉。`,"module-rebuild-required":`這部分需要重新整理,會在背景進行。`,"module-version-mismatch":`這個版本的 PathKeep 整理方式不同,正在背景重新整理。`,"module-version-changed":`這個版本的 PathKeep 整理方式不同,正在背景重新整理。`,unknown:`這部分暫時無法使用。`}},kpi:{visits:`頁面瀏覽`,domains:`不同網站`,searches:`搜尋次數`,activeTime:`活躍時間`,newSites:`新網站`,newSitesDetail:`這段時間第一次去的網站`,deepDives:`深入瀏覽`,deepDivesDetail:`一路點下去四層以上、經過五個以上網站且有新網站的瀏覽`,reopened:`重新打開的頁面`,reopenedDetail:`在不止一天又打開過的頁面`,vsPrevious:`與前 {days} 天相比`,hours:`{value} 小時`,minutes:`{value} 分鐘`},daily:{title:`瀏覽走勢`,hint:`每天一條。點某一天查看詳情。`,perWeek:`每週一條,從週一算起。`,perMonth:`每月一條。`,pages:`頁面`,searches:`搜尋`},topSites:{title:`最常瀏覽`,empty:`這段時間沒有瀏覽記錄。`,orderLabel:`網站排序方式`,order:{visits:`瀏覽次數`,unique_days:`去過的天數`,average_daily_visits:`每天瀏覽次數`}},rhythm:{weekday:`平日`,weekend:`週末`,perDay:`每天 {visits} 次`,busiest:`最忙的時段:`,title:`瀏覽節奏`,subtitle:`一週內每小時的瀏覽量`,cell:`週{day} {hour} · {visits}`,weekdays:`一,二,三,四,五,六,日`},searches:{title:`常用搜尋詞`,empty:`這段時間沒有搜尋。`},mix:{title:`哪類網站`,explain:`每次瀏覽算進它去的那類網站。類別來自 PathKeep 內建的各地常見網站清單,或你在網站頁上選的類別;不在清單上的網站算「未分類」。去搜尋引擎的瀏覽算「搜尋」。`,compared:`小字是和前 {days} 天相比,占比變化了幾個百分點。`,points:`{value} 個百分點`,categories:{ai:`AI`,community:`論壇與問答`,developer:`寫程式`,docs:`文件`,education:`學習與查詢`,entertainment:`音樂、遊戲與影劇`,finance:`理財`,news:`新聞`,search:`搜尋`,shopping:`購物`,social:`社群`,travel:`旅行與地圖`,video:`影片`,work:`工作工具`,unknown:`未分類`},unclassified:{open:`顯示未分類的網站`,title:`不在清單上的網站`,description:`PathKeep 清單上沒有的網站,瀏覽最多的在前。打開一個就能選它是哪類網站。`,empty:`這段時間的網站都在清單上。`,failed:`沒能讀出這些網站。`,more:`顯示更多`,visits_one:`{shown} 次瀏覽`,visits_other:`{shown} 次瀏覽`}},engines:{title:`在哪裡搜尋`,explain:`這段時間在每個搜尋引擎或站內搜尋裡搜尋的次數。搜尋引擎按網址辨識。`},words:{title:`搜尋什麼`,subtitle:`搜尋裡最常出現的詞`,explain:`一個詞在一次搜尋裡出現只算一次。單個字母、單獨的數字和 "the" 之類的虛詞不計。點一個詞,在歷史裡找出它帶你去過的所有頁面。`},outcomes:{title:`搜尋得怎麼樣`,explain:`每個搜尋引擎:這段時間的搜尋次數,一次搜尋平均改寫幾次才往下走,以及打開了幾個頁面。下方是你最常回來再搜的搜尋,以及跨了多少天。`,searches_one:`搜尋 {searches} 次`,searches_other:`搜尋 {searches} 次`,engine:`平均改寫 {rewordings} 次 · 每次搜尋打開 {pages} 個頁面`,mostReturned:`最常回來再搜的`,topic_one:`{days} 天裡搜尋 {searches} 次`,topic_other:`{days} 天裡搜尋 {searches} 次`},tries:{title:`試了好幾次的搜尋`,subtitle:`改寫兩次以上,或沒有打開任何結果`,explain:`在同一個搜尋引擎上,緊接著用差不多的詞(多幾個或少幾個)再搜一次,就算改寫。點一個搜尋,看每一次搜尋和它帶你去了哪裡。`,empty:`這段時間的搜尋都在一兩次內找到了東西。`,reworded_one:`改寫 1 次`,reworded_other:`改寫 {times} 次`,endedOn:`最後到了 {site}`,noResult:`沒有打開任何結果`},paths:{title:`在網站之間怎麼走`,subtitle:`連著去的三個網站,最常見的在前`,explain:`同一段瀏覽裡先後去的三個不同網站。回到剛離開的網站(例如搜尋引擎)算來回,不算一條路線。一條路線算在到達最後一個網站的那天,所以前兩個網站可以早於這段時間。`,empty:`這段時間沒有哪三個網站接連出現超過一次。`,then:`然後`,times_one:`{times} 次`,times_other:`{times} 次`},landings:{title:`搜尋最後到了哪裡`,subtitle:`搜尋帶你去的網站,最多的在前`,explain:`每次搜尋算在它之後(改寫過的話,最後一次改寫之後)打開的第一個頁面所在的網站。不同的搜尋比搜尋次數少,表示你常為同樣的事回來。`,counts_one:`搜尋 {searches} 次 · {queries} 種`,counts_other:`搜尋 {searches} 次 · {queries} 種`},compared:{title:`比較過的頁面`,subtitle:`一次搜尋裡來回看的頁面`,explain:`同一類頁面(商品、文件、文章、影片……)分布在兩個以上的網站,或同一網站的幾個頁面,在一次搜尋裡來回切換至少兩次。`,empty:`這段時間的搜尋裡沒有來回比較頁面。`,pages_one:`{pages} 個頁面`,pages_other:`{pages} 個頁面`,sites_one:`在 {sites} 個網站`,sites_other:`在 {sites} 個網站`,landing:`搜尋後第一個打開的頁面`,openDay:`查看這一天`},newSites:{title:`新網站`,series:`新網站`,none:`這段時間沒有新網站,去過的網站之前都去過。`,total_one:`第一次去的網站 {sites} 個`,total_other:`第一次去的網站 {sites} 個`,share:`占去過的網站的 {share}`,explain:`一個網站算在你第一次在任何瀏覽器(或上面選的瀏覽器設定檔)去它的那一天。`},refind:{title:`反覆打開的頁面`,days_one:`{count} 天`,days_other:`{count} 天`,empty:`在不同日子反覆打開的頁面會出現在這裡。`,explain:`在不同的日子再次打開、透過搜尋再次找到,或直接前往的頁面都會計入。每個瀏覽器分開計算。`},threads:{title:`你回頭再看的事`,subtitle:`在好幾天裡回頭再搜、再打開的內容`,explain:`同一個搜尋做過不只一次,或同一個頁面在不只一天裡打開過,都會列在這裡。`,empty:`這段時間還沒有回頭再看的內容。`,searched_one:`搜尋過 {count} 次`,searched_other:`搜尋過 {count} 次`,opened_one:`在 {count} 天打開過`,opened_other:`在 {count} 天打開過`,last:`最近一次 {when}`},breadth:{title:`探索還是專注`,explain:`看你的瀏覽分布在多少網站上。大部分瀏覽集中在少數網站就是專注;分散在很多網站就是在探索。`,half_one:`你一半的瀏覽集中在 {count} 個網站。`,half_other:`你一半的瀏覽集中在 {count} 個網站。`,meter:`瀏覽分散的程度`,focusedEnd:`少數網站`,wideEnd:`很多網站`,focused:`你主要待在一小組網站上。`,mixed:`常去的網站和其他網站都有。`,wide:`你的瀏覽分散在很多網站上。`,newSites_one:`有 {count} 個網站是第一次去。`,newSites_other:`有 {count} 個網站是第一次去。`},habits:{title:`習慣`,subtitle:`你規律造訪的網站`,explain:`在兩週以上的時間裡至少有 5 天造訪、間隔穩定的網站就算習慣。距離上次造訪超過平常間隔的兩倍,就算中斷了。`,empty:`這段時間還沒有規律造訪的網站。`,daily:`幾乎每天`,weekly:`大約每週一次`,periodic:`大約每 {days} 天`,days_one:`{count} 天`,days_other:`{count} 天`,stopped:`已中斷 · {when}`},browsers:{title:`各瀏覽器比較`,explain:`這段時間每個瀏覽器設定檔的瀏覽量和網站數,以及它主要去哪類網站(不算未分類的)。只有一個瀏覽器去過的網站會列在它下面;不只一個瀏覽器去過的網站在最下面計數,並寫出最常去的幾個。`,single:`這段時間只有一個瀏覽器有瀏覽記錄。`,only:`只在這裡:`,shared_one:`有 {count} 個網站在不只一個瀏覽器裡去過。`,shared_other:`有 {count} 個網站在不只一個瀏覽器裡去過。`,sharedTop:`其中最常去的:`,kinds:`主要是 {kinds}`,kindsJoin:`、`},day:{reopened:`回來再看的頁面`,reopenedHint:`這天打開過,其他日子也打開過`,reopenedEmpty:`這天打開的頁面都不是你常回來看的。`,eyebrow:`某一天`,previous:`前一天`,next:`後一天`,invalid:`無法顯示這一天。`,vsPrevious:`與前一天相比`,visits:`瀏覽`,hours:`按小時`,empty:`這一天沒有瀏覽記錄。`,siteInHistory:`在紀錄中查看這個網站當天的瀏覽`,sessions:`瀏覽時段`,sessionsHint:`同一個瀏覽器裡時間相近的瀏覽,依順序排列`,noSessions:`這一天沒有瀏覽時段。`,untitledSession:`瀏覽`,deepDive:`深入瀏覽`,sessionMeta:`{pages} · {sites}`,searchCount_one:`{count} 次搜尋`,searchCount_other:`{count} 次搜尋`,noVisits:`沒有可顯示的頁面。`,searched:`搜尋「{query}」`,searches:`搜尋`,noSearches:`這一天沒有搜尋。`,mixCompared:`小字是和前一天相比,占比變化了幾個百分點。`,timesInAll_one:`一共搜尋過 {count} 次`,timesInAll_other:`一共搜尋過 {count} 次`,trailAfter:`之後 {pages}`,noCompared:`這一天的搜尋裡沒有來回比較頁面。`},site:{category:{label:`網站類別`,lists:`PathKeep 清單:{category}`,updating:`正在更新洞察…`,failed:`沒能改變網站類別`,parts_one:`{count} 個部分另外分類`,parts_other:`{count} 個部分另外分類`,partsExplain:`PathKeep 清單把 {site} 的這些部分另外分類,你替這個網站選的類別不會改到它們。`},arrivals:`怎麼來到這裡`,arrivalsHint:`從這個網站以外來的每一次瀏覽`,arrivalsExplain:`瀏覽器會記下每個頁面是從哪個頁面打開的。打開它的頁面不在這個網站上,才算在這裡:沒有打開它的頁面,表示你輸入了網址、用了書籤或開了新分頁;是搜尋結果頁,算從搜尋來;其他頁面,算從連結來。在這個網站的頁面之間移動不算。`,direct:`輸入網址或書籤`,fromSearch:`從搜尋來`,fromLink:`從連結來`,noArrivals:`這段時間沒有從別處來到這裡的瀏覽。`,arrivalsUnrecorded:`這裡的瀏覽來自不記錄「從哪一頁打開」的瀏覽器(Safari,或從 Google Takeout 匯入的紀錄),所以 PathKeep 無法知道你是怎麼來的。`,onwardUnrecorded:`這裡的瀏覽來自不記錄「從哪一頁打開」的瀏覽器(Safari,或從 Google Takeout 匯入的紀錄),所以 PathKeep 無法知道你接著去了哪裡。`,unrecordedNote_one:`有 {count} 次瀏覽沒算進來:它的瀏覽器不記錄是從哪一頁打開的(Safari,或從 Google Takeout 匯入的紀錄)。`,unrecordedNote_other:`有 {count} 次瀏覽沒算進來:它們的瀏覽器不記錄是從哪一頁打開的(Safari,或從 Google Takeout 匯入的紀錄)。`,referrers:`連結來自`,searchSites:`在這些地方搜尋`,onward:`接著去了哪裡`,onwardHint:`從這個網站的連結打開的網站`,noOnward:`這段時間沒有從這個網站打開別的網站。`,siteSearches:`在這個網站上搜尋`,siteSearchesHint:`你在這裡搜尋過什麼,最常搜的在前`,eyebrow:`網站`,activeDays:`造訪天數`,ofDays:`共 {days} 天`,pages:`頁面數`,landings:`從搜尋來到這裡`,landingsHint:`從搜尋結果打開`,topPages:`最常瀏覽的頁面`,empty:`這段時間沒有造訪這個網站。`,searches:`帶你來到這裡的搜尋`,searchesHint:`打開這個網站之前你搜尋了什麼`,noSearches:`這段時間沒有從搜尋來到這裡。`,trend:`每日瀏覽`,trendWeekly:`每週瀏覽`,trendMonthly:`每月瀏覽`,trendHint:`點某一天查看詳情`},search:{similar:{title:`相似搜尋`,hint:`所有時間`,staticNote:`內建靜態模型主要依共同字詞找相似搜尋。`,loading:`正在載入相似搜尋`,open:`查看「{query}」的搜尋`,notIndexed:`這個搜尋還沒有建立索引。`,empty:`沒有找到相似搜尋。`},eyebrow:`搜尋`,inHistory:`在紀錄中搜尋`,notFound:`這段時間的搜尋裡沒有這一個。試試更長的時間範圍,或在紀錄中搜尋。`,timesSearched:`搜尋次數`,allTime:`全部瀏覽器,所有時間`,first:`第一次搜尋`,last:`最近一次搜尋`,engines:`搜尋引擎`,times:`每一次搜尋,以及打開了什麼`,timesHint:`這段時間裡最近的幾次`,noTimes:`這段時間沒有做過這個搜尋。`,wordings:`其他搜法`,oneWording:`你每次都用同樣的字搜尋。`,ledTo:`打開了 {site}`,noLanding:`沒有從結果打開頁面`,trailMeta:`之後 {pages} · {engine}`,reworded_one:`改寫 1 次`,reworded_other:`改寫 {count} 次`,landings:`打開了哪些網站`,landingsHint_one:`從這次搜尋結果打開的網站`,landingsHint_other:`從左邊 {count} 次搜尋結果打開的網站`,noLandings:`這些搜尋結果都沒有打開網站。`},page:{eyebrow:`反覆打開的頁面`,open:`在瀏覽器打開`,openFailed:`沒能打開這個頁面`,totalVisits:`瀏覽次數`,allBrowsers:`全部瀏覽器,所有時間`,firstVisit:`第一次瀏覽`,lastVisit:`最近一次瀏覽`,browsers:`瀏覽器`,weeks:`近 12 週瀏覽`,why:`為什麼列在這裡`,score:`得分 {score},即上面各項相加。`,whyExplain:`每個訊號都會替頁面加分,越能說明你會回來看,權重越高。`,notRefound:`這段時間這個頁面沒有算作反覆打開。`,factors:{days_one:`在 {count} 天打開過`,days_other:`在 {count} 個不同的日子打開過`,trails_one:`出現在 {count} 次搜尋中`,trails_other:`出現在 {count} 次搜尋中`,searches_one:`從搜尋來到這裡 {count} 次`,searches_other:`從搜尋來到這裡 {count} 次`,direct_one:`直接打開 {count} 次`,direct_other:`直接打開 {count} 次`},countedIn:`依 {profile} 計算。`,alsoIn_one:`另外 {count} 個瀏覽器設定檔也反覆打開過。`,alsoIn_other:`另外 {count} 個瀏覽器設定檔也反覆打開過。`,searchesTitle:`帶你來到這裡的搜尋`,noSearches:`這段時間沒有從搜尋來到這個頁面。`,recentDays:`最近打開的日子`,noDays:`沒有可顯示的日子。`},stale:`正在更新你的洞察…`}}),ve=g({en:{phases:{exporting:`Preparing the file`,importing:`Opening the file`,converting:`Copying the archive`,rewrapping:`Changing the password`,restoring:`Restoring`,pruning:`Removing old snapshots`,copying:`Copying the archive`,snapshotting:`Taking a snapshot`,verifying:`Checking the copy`,indexing:`Building the search index`,projecting:`Linking pages`,publishing:`Finishing`,merging:`Merging duplicates`},progress:`{done} of {total}`,stop:`Stop`,stopping:`Stopping…`,stopped:`Stopped. Nothing was changed.`,progressLabel:`Progress`},"zh-CN":{phases:{exporting:`正在准备文件`,importing:`正在打开文件`,converting:`正在复制存档`,rewrapping:`正在更换密码`,restoring:`正在恢复`,pruning:`正在删除旧快照`,copying:`正在复制存档`,snapshotting:`正在建立快照`,verifying:`正在检查副本`,indexing:`正在建立搜索索引`,projecting:`正在关联页面`,publishing:`即将完成`,merging:`正在合并重复项`},progress:`{done} / {total}`,stop:`停止`,stopping:`正在停止…`,stopped:`已停止,没有任何改动。`,progressLabel:`进度`},"zh-TW":{phases:{exporting:`正在準備檔案`,importing:`正在開啟檔案`,converting:`正在複製存檔`,rewrapping:`正在更換密碼`,restoring:`正在還原`,pruning:`正在刪除舊快照`,copying:`正在複製存檔`,snapshotting:`正在建立快照`,verifying:`正在檢查副本`,indexing:`正在建立搜尋索引`,projecting:`正在連結頁面`,publishing:`即將完成`,merging:`正在合併重複項目`},progress:`{done} / {total}`,stop:`停止`,stopping:`正在停止…`,stopped:`已停止,沒有任何變動。`,progressLabel:`進度`}}),ye=g({en:{stepsLabel:`Setup steps`,progressLabel:`Setup progress`,stepDone:`done`,saveFailed:`Could not save your choice`,where:{mac:`on this Mac`,other:`on this computer`},steps:{welcome:{label:`Welcome`,title:`Your browser is deleting your history`,body:`Chrome, Edge, Arc and other Chromium browsers keep about 90 days by default. PathKeep keeps it forever {where}, so you can search, revisit and analyze it later.`},browsers:{label:`Browsers`,title:`Which browsers should we back up?`,body:`We found these {where}. You can change this later in Backup.`},storage:{label:`Storage`,title:`Where the archive lives`,body:`The archive is a local database. Nothing is uploaded.`},encryption:{label:`Encryption`,title:`Encrypt the archive?`,body:`Without the password, an encrypted archive can’t be opened. A lost password can’t be recovered.`},schedule:{label:`Schedule`,title:`How often should we back up?`,body:`PathKeep installs a system schedule that runs in the background, window closed or not.`},ai:{label:`AI`,title:`Turn on AI features?`,body:`Off by default. When on, you can search in plain language and ask the assistant.`},done:{label:`Done`,title:`You’re all set`,body:`Next is the first full backup. After that, each backup only adds what’s new.`}},nav:{back:`Back`,next:`Continue`,skip:`Skip`,start:`Get started`},welcome:{retentionTitle:`How long browsers keep history by default`,days90:`~90 days`,year:`1 year`,bySize:`By size`,forever:`Forever`,local:{title:`Local only`,body:`No upload, no account`},originals:{title:`Never touches originals`,body:`Copies first, then appends`},search:{title:`Searchable`,body:`Full text, regex, timeline`}},browsers:{needsPermission:`needs permission`,historySize:`History file: {size}`,needOne:`Pick at least one browser PathKeep can read.`,fullDiskAccess:{title:`Safari needs Full Disk Access`,body:`Open System Settings → Privacy & Security and add PathKeep. You can skip this; Safari will be left out for now.`,open:`Open Settings`,openFailed:`Could not open System Settings`,recheck:`Check again`,recheckFailed:`Could not check again`}},storage:{location:`Archive location`,revealMac:`Show in Finder`,revealOther:`Open folder`,revealFailed:`Could not open the folder`,history:`Browser history`,estimate:`Estimated size`,browsers:`Browsers`,note:`Estimated from the browsers you picked. The archive grows a little with each backup.`},encryption:{on:{title:`Encrypt`,body:`AES-256, unlock with a password`},off:{title:`Don’t encrypt`,body:`No password. Anyone signed in to your account can read it.`},password:`Password`,passwordHint:`At least 10 characters`,confirm:`Confirm password`,mismatch:`The passwords don’t match.`,strength:`Password strength: {level}`,weak:`Too short`,ok:`Okay`,good:`Good`,strong:`Strong`,keychainMac:`Save to macOS Keychain`,keychainOther:`Save to the system keychain`,keychainBody:`Background backups need it to unlock the archive. Without it, they can’t run.`,keychainUnavailable:`PathKeep can’t find a system keychain here, so background backups won’t be able to unlock an encrypted archive.`},schedule:{label:`Backup frequency`,recommended:`Recommended`,hourly:{title:`Every hour`,body:`Rarely misses anything`},sixHours:{title:`Every 6 hours`,body:`Fewer runs, still several a day`},daily:{title:`Once a day`,body:`Catches up at login if a run was missed`},off:{title:`Manual`,body:`Only when you press Back up now`},preview:{title:`What will be installed`,when:`Nothing is installed until you finish setup.`,scheduler:`Scheduler`,file:`File`,showFile:`Show the file`,hideFile:`Hide the file`,loading:`Preparing the schedule…`,failed:`Could not prepare the schedule.`,retry:`Try again`},unsupported:{title:`PathKeep can’t install the schedule here`,body:`After setup, Backup shows the steps to set it up yourself.`},noKeychain:`The archive will be encrypted and its password won’t be in the keychain, so background backups won’t be able to open it.`},ai:{off:{title:`Not now`,body:`Full-text and regex search only. Nothing is downloaded.`},local:{title:`Local semantic search`,body:`Downloads a static embedding model once, then builds the index {where}. Very fast, but it finds pages by meaning less well than the usual contextual embedding models. Your searches stay offline.`},provider:{title:`Connect a provider`,body:`Ollama, OpenAI, Anthropic and others. Only the snippets relevant to a question are sent.`},approxSize:`≈ {size}`,note:`PathKeep works fully without AI. You can change this later in Settings → AI.`},done:{browsers:`Browsers`,location:`Location`,encryption:`Encryption`,schedule:`Schedule`,ai:`AI`,online:`Online`,onlineValue:`Downloads each page’s preview image · turn off in Settings → General`,encrypted:`On · AES-256`,inKeychain:`password in the keychain`,notEncrypted:`Not encrypted`,start:`Start first backup`,working:`Setting up…`,open:`Open PathKeep`,retry:`Try again`,stages:{archive:`Create the archive`,keychain:`Save the password to the keychain`,schedule:`Install the schedule`,backup:`Run the first backup`,ai:`Set up AI`},failed:{archive:`The archive could not be created`,keychain:`The password could not be saved to the keychain`,schedule:`The schedule could not be installed`,backup:`The first backup failed`,ai:`AI could not be set up`},skip:{keychain:`Continue without the keychain`,schedule:`Skip, set it up later in Backup`,backup:`Skip, back up later`,ai:`Skip, set it up later in Settings`},stageState:{pending:`Not started`,running:`In progress`,done:`Done`,failed:`Failed`,skipped:`Skipped`},saved_one:`Done. {count} visit saved.`,saved_other:`Done. {count} visits saved.`,skippedBackup:`Setup is finished. Press Back up now whenever you’re ready.`,safariSkipped:`Safari was left out because PathKeep doesn’t have Full Disk Access yet.`,partial:`Some of the browsers you chose couldn’t be read. What could be read is saved; Backup shows which ones and why.`,fullDiskAccess:`Safari needs Full Disk Access before it can be backed up. Allow PathKeep in System Settings → Privacy & Security, then try again.`,localAi:`The semantic search model is downloading in the background. Settings → AI shows its progress.`,notOpened:`The archive was created but did not open.`,alreadyRunning:`A backup is already running. Try again when it ends.`}},"zh-CN":{stepsLabel:`设置步骤`,progressLabel:`设置进度`,stepDone:`已完成`,saveFailed:`无法保存你的选择`,where:{mac:`在这台 Mac 上`,other:`在这台电脑上`},steps:{welcome:{label:`欢迎`,title:`你的浏览器正在删掉你的历史`,body:`Chrome、Edge、Arc 等 Chromium 浏览器默认只保留约 90 天。PathKeep {where}替你永久保存,之后可以搜索、回顾和分析。`},browsers:{label:`选择浏览器`,title:`要备份哪些浏览器?`,body:`我们{where}找到了以下浏览器。之后可以在“备份”里随时调整。`},storage:{label:`存放位置`,title:`存档放在哪里`,body:`存档是一个本地数据库,不会上传到任何地方。`},encryption:{label:`加密`,title:`要不要加密?`,body:`加密后,没有密码就打不开存档。密码丢了无法找回。`},schedule:{label:`自动备份`,title:`多久备份一次?`,body:`PathKeep 会安装一个系统计划任务,在后台运行,不需要开着窗口。`},ai:{label:`AI`,title:`要开启 AI 功能吗?`,body:`默认关闭。开启后可以用自然语言搜索,也可以问助手。`},done:{label:`完成`,title:`都设置好了`,body:`接下来会做第一次完整备份,之后每次只追加新的记录。`}},nav:{back:`上一步`,next:`继续`,skip:`跳过`,start:`开始设置`},welcome:{retentionTitle:`浏览器默认保留多久`,days90:`约 90 天`,year:`1 年`,bySize:`看容量`,forever:`永久`,local:{title:`只在本地`,body:`不上传,不需要账号`},originals:{title:`不碰原文件`,body:`先复制,再追加新记录`},search:{title:`可以搜索`,body:`全文、正则、时间线`}},browsers:{needsPermission:`需要权限`,historySize:`历史文件:{size}`,needOne:`至少选一个 PathKeep 能读取的浏览器。`,fullDiskAccess:{title:`Safari 需要“完全磁盘访问权限”`,body:`打开系统设置 → 隐私与安全性,把 PathKeep 加进去。不给也可以,会先跳过 Safari。`,open:`打开设置`,openFailed:`无法打开系统设置`,recheck:`重新检查`,recheckFailed:`重新检查失败`}},storage:{location:`存档位置`,revealMac:`在访达中显示`,revealOther:`打开文件夹`,revealFailed:`无法打开文件夹`,history:`浏览器历史`,estimate:`预计大小`,browsers:`浏览器`,note:`按你选的浏览器估算。之后每次备份,存档会再大一点。`},encryption:{on:{title:`加密`,body:`AES-256,需要密码解锁`},off:{title:`不加密`,body:`不需要密码。登录你这个账户的人都能读取。`},password:`密码`,passwordHint:`至少 10 个字符`,confirm:`再输入一次`,mismatch:`两次输入的密码不一样。`,strength:`密码强度:{level}`,weak:`太短`,ok:`还可以`,good:`不错`,strong:`很强`,keychainMac:`保存到 macOS 钥匙串`,keychainOther:`保存到系统钥匙串`,keychainBody:`后台备份要靠它解锁存档,没有它就无法运行。`,keychainUnavailable:`PathKeep 在这里找不到可用的系统钥匙串,后台备份将无法解锁加密的存档。`},schedule:{label:`备份频率`,recommended:`推荐`,hourly:{title:`每小时`,body:`几乎不会漏掉任何记录`},sixHours:{title:`每 6 小时`,body:`次数少一些,一天仍有好几次`},daily:{title:`每天一次`,body:`错过了会在登录时补上`},off:{title:`手动`,body:`只在你点“立即备份”时运行`},preview:{title:`将要安装的内容`,when:`完成设置之前不会安装任何东西。`,scheduler:`计划任务`,file:`文件`,showFile:`查看文件`,hideFile:`收起文件`,loading:`正在准备计划任务…`,failed:`无法准备计划任务。`,retry:`再试一次`},unsupported:{title:`PathKeep 无法在这里安装计划任务`,body:`设置完成后,“备份”页面会列出手动设置的步骤。`},noKeychain:`存档会被加密,而密码不在钥匙串里,所以后台备份将打不开它。`},ai:{off:{title:`先不用`,body:`只用全文和正则搜索,什么都不下载。`},local:{title:`本地语义搜索`,body:`下载一次静态嵌入模型,然后{where}建立索引。非常快,但找意思相近的页面不如一般的上下文嵌入模型。搜索全程离线。`},provider:{title:`连接 AI 服务`,body:`Ollama、OpenAI、Anthropic 等。只有你提问时才会发送相关片段。`},approxSize:`≈ {size}`,note:`不用 AI,PathKeep 照样完整可用。之后可以在“设置 → AI”更改。`},done:{browsers:`浏览器`,location:`存放位置`,encryption:`加密`,schedule:`自动备份`,ai:`AI`,online:`联网`,onlineValue:`会下载每个页面的预览图 · 可在「设置 → 通用」关闭`,encrypted:`已开启 · AES-256`,inKeychain:`密码在钥匙串中`,notEncrypted:`不加密`,start:`开始第一次备份`,working:`正在设置…`,open:`进入 PathKeep`,retry:`再试一次`,stages:{archive:`创建存档`,keychain:`把密码保存到钥匙串`,schedule:`安装计划任务`,backup:`第一次备份`,ai:`设置 AI`},failed:{archive:`无法创建存档`,keychain:`无法把密码保存到钥匙串`,schedule:`无法安装计划任务`,backup:`第一次备份失败`,ai:`无法设置 AI`},skip:{keychain:`不用钥匙串,继续`,schedule:`跳过,之后在“备份”里设置`,backup:`跳过,之后再备份`,ai:`跳过,之后在“设置”里设置`},stageState:{pending:`未开始`,running:`进行中`,done:`已完成`,failed:`失败`,skipped:`已跳过`},saved_one:`完成,共保存 {count} 条记录。`,saved_other:`完成,共保存 {count} 条记录。`,skippedBackup:`设置已完成。准备好了就点“立即备份”。`,safariSkipped:`Safari 已跳过:PathKeep 还没有“完全磁盘访问权限”。`,partial:`部分所选浏览器读取失败。读得到的都已保存,是哪些、为什么,请看“备份”。`,fullDiskAccess:`Safari 需要“完全磁盘访问权限”才能备份。请在系统设置 → 隐私与安全性中允许 PathKeep,然后再试一次。`,localAi:`语义搜索模型正在后台下载,可以在“设置 → AI”查看进度。`,notOpened:`存档已创建,但没能打开。`,alreadyRunning:`已经有一次备份在运行,结束后再试。`}},"zh-TW":{stepsLabel:`設定步驟`,progressLabel:`設定進度`,stepDone:`已完成`,saveFailed:`無法儲存你的選擇`,where:{mac:`在這台 Mac 上`,other:`在這台電腦上`},steps:{welcome:{label:`歡迎`,title:`你的瀏覽器正在刪掉你的歷史`,body:`Chrome、Edge、Arc 等 Chromium 瀏覽器預設只保留約 90 天。PathKeep {where}替你永久保存,之後可以搜尋、回顧和分析。`},browsers:{label:`選擇瀏覽器`,title:`要備份哪些瀏覽器?`,body:`我們{where}找到了以下瀏覽器。之後可以在「備份」裡隨時調整。`},storage:{label:`存放位置`,title:`存檔放在哪裡`,body:`存檔是一個本機資料庫,不會上傳到任何地方。`},encryption:{label:`加密`,title:`要不要加密?`,body:`加密後,沒有密碼就打不開存檔。密碼丟了無法找回。`},schedule:{label:`自動備份`,title:`多久備份一次?`,body:`PathKeep 會安裝一個系統排程,在背景運行,不需要開著視窗。`},ai:{label:`AI`,title:`要開啟 AI 功能嗎?`,body:`預設關閉。開啟後可以用自然語言搜尋,也可以問助理。`},done:{label:`完成`,title:`都設定好了`,body:`接下來會做第一次完整備份,之後每次只追加新的記錄。`}},nav:{back:`上一步`,next:`繼續`,skip:`跳過`,start:`開始設定`},welcome:{retentionTitle:`瀏覽器預設保留多久`,days90:`約 90 天`,year:`1 年`,bySize:`看容量`,forever:`永久`,local:{title:`只在本機`,body:`不上傳,不需要帳號`},originals:{title:`不碰原檔`,body:`先複製,再增量追加`},search:{title:`可以搜尋`,body:`全文、正則、時間線`}},browsers:{needsPermission:`需要權限`,historySize:`歷史檔案:{size}`,needOne:`至少選一個 PathKeep 能讀取的瀏覽器。`,fullDiskAccess:{title:`Safari 需要「完整磁碟取用權限」`,body:`打開系統設定 → 隱私權與安全性,把 PathKeep 加進去。不給也可以,會先跳過 Safari。`,open:`打開設定`,openFailed:`無法打開系統設定`,recheck:`重新檢查`,recheckFailed:`重新檢查失敗`}},storage:{location:`存檔位置`,revealMac:`在 Finder 中顯示`,revealOther:`打開資料夾`,revealFailed:`無法打開資料夾`,history:`瀏覽器歷史`,estimate:`預計大小`,browsers:`瀏覽器`,note:`依你選的瀏覽器估算。之後每次備份,存檔會再大一點。`},encryption:{on:{title:`加密`,body:`AES-256,需要密碼解鎖`},off:{title:`不加密`,body:`不需要密碼。登入你這個帳號的人都能讀取。`},password:`密碼`,passwordHint:`至少 10 個字元`,confirm:`再輸入一次`,mismatch:`兩次輸入的密碼不一樣。`,strength:`密碼強度:{level}`,weak:`太短`,ok:`還可以`,good:`不錯`,strong:`很強`,keychainMac:`存到 macOS 鑰匙圈`,keychainOther:`存到系統鑰匙圈`,keychainBody:`背景備份要靠它解鎖存檔,沒有它就無法運行。`,keychainUnavailable:`PathKeep 在這裡找不到可用的系統鑰匙圈,背景備份將無法解鎖加密的存檔。`},schedule:{label:`備份頻率`,recommended:`推薦`,hourly:{title:`每小時`,body:`幾乎不會漏掉任何記錄`},sixHours:{title:`每 6 小時`,body:`次數少一些,一天仍有好幾次`},daily:{title:`每天一次`,body:`錯過了會在登入時補上`},off:{title:`手動`,body:`只在你點「立即備份」時運行`},preview:{title:`將要安裝的內容`,when:`完成設定之前不會安裝任何東西。`,scheduler:`排程`,file:`檔案`,showFile:`查看檔案`,hideFile:`收起檔案`,loading:`正在準備排程…`,failed:`無法準備排程。`,retry:`再試一次`},unsupported:{title:`PathKeep 無法在這裡安裝排程`,body:`設定完成後,「備份」頁面會列出手動設定的步驟。`},noKeychain:`存檔會被加密,而密碼不在鑰匙圈裡,所以背景備份將打不開它。`},ai:{off:{title:`先不用`,body:`只用全文和正則搜尋,什麼都不下載。`},local:{title:`本機語意搜尋`,body:`下載一次靜態嵌入模型,然後{where}建立索引。非常快,但找意思相近的頁面不如一般的上下文嵌入模型。搜尋全程離線。`},provider:{title:`連接 AI 服務`,body:`Ollama、OpenAI、Anthropic 等。只有你提問時才會傳送相關片段。`},approxSize:`≈ {size}`,note:`不用 AI,PathKeep 照樣完整可用。之後可以在「設定 → AI」更改。`},done:{browsers:`瀏覽器`,location:`存放位置`,encryption:`加密`,schedule:`自動備份`,ai:`AI`,online:`連網`,onlineValue:`會下載每個頁面的預覽圖 · 可在「設定 → 一般」關閉`,encrypted:`已開啟 · AES-256`,inKeychain:`密碼在鑰匙圈中`,notEncrypted:`不加密`,start:`開始第一次備份`,working:`正在設定…`,open:`進入 PathKeep`,retry:`再試一次`,stages:{archive:`建立存檔`,keychain:`把密碼存到鑰匙圈`,schedule:`安裝排程`,backup:`第一次備份`,ai:`設定 AI`},failed:{archive:`無法建立存檔`,keychain:`無法把密碼存到鑰匙圈`,schedule:`無法安裝排程`,backup:`第一次備份失敗`,ai:`無法設定 AI`},skip:{keychain:`不用鑰匙圈,繼續`,schedule:`跳過,之後在「備份」裡設定`,backup:`跳過,之後再備份`,ai:`跳過,之後在「設定」裡設定`},stageState:{pending:`未開始`,running:`進行中`,done:`已完成`,failed:`失敗`,skipped:`已略過`},saved_one:`完成,共保存 {count} 條記錄。`,saved_other:`完成,共保存 {count} 條記錄。`,skippedBackup:`設定已完成。準備好了就點「立即備份」。`,safariSkipped:`Safari 已略過:PathKeep 還沒有「完整磁碟取用權限」。`,partial:`部分所選瀏覽器讀取失敗。讀得到的都已儲存,是哪些、為什麼,請看「備份」。`,fullDiskAccess:`Safari 需要「完整磁碟取用權限」才能備份。請在系統設定 → 隱私權與安全性中允許 PathKeep,然後再試一次。`,localAi:`語意搜尋模型正在背景下載,可以在「設定 → AI」查看進度。`,notOpened:`存檔已建立,但沒能打開。`,alreadyRunning:`已經有一次備份在運行,結束後再試。`}}}),be=g({en:{title:`Settings`,saveFailed:`Could not save this setting`,nav:{label:`Settings sections`,general:`General`,security:`Security`,ai:`AI`,background:`Background work`,storage:`Storage`,about:`About`},secret:{again:`Type it again`,minLength:`At least {count} characters.`,tooShort:`Use at least {count} characters.`,mismatch:`The two entries don’t match.`},general:{language:{title:`Language`,description:`Interface language`,system:`Match system`},appearance:{title:`Appearance`,description:`Light, dark or match system`},clock:{title:`Clock`,description:`How times are shown`,system:`Match system`,h12:`12-hour (1:30 PM)`,h23:`24-hour (13:30)`},insightsZone:{title:`Insights time zone`,description:`Insights put each visit on a day and an hour in this zone. It stays put when you travel; changing it builds Insights again.`,rebuilding:`Building Insights again in {zone}. Until that is done they stay in {old}.`,search:`Search for a city or zone`,none:`No zone matches.`},material:{title:`Window`,description:`Solid, or the system’s translucent glass that lets the desktop show through, blurred`,solid:`Solid`,glass:`Glass`},desktop:{title:`Open at login and menu bar icon`,trayTitle:`Open at login and tray icon`,loadFailed:`PathKeep could not read these settings. {message}`,changeFailed:`Could not change this. {message}`,login:{title:`Open at login`,description:`Start PathKeep in the background when you log in`},menuBar:{title:`Menu bar icon`,trayTitle:`Tray icon`,description:`Shows backup status and quick search`}},online:{title:`Online`,note:`These two contact websites. Everything else stays on this computer.`},previews:{title:`Link previews`,description:`Download the preview image each page offers. The site sees a request from your computer.`},summaries:{title:`Page summaries`,description:`Fetch a short summary of pages you visited, so search can find them by what they say. Sites never get your cookies or accounts.`,loadFailed:`Could not load this setting.`}},security:{archiveGroup:`Archive`,lockGroup:`App lock`,lockNote:`A passcode in front of the window. It does not encrypt anything and is separate from the archive password.`,encrypt:{title:`Encrypt archive`,on:`AES-256. Only you have the password.`,off:`Your history is stored unencrypted. Anyone who can read your files can read it.`},keychain:{title:`Save password in the keychain`,description:`Unlocks PathKeep without asking. Scheduled backups need it.`,unavailable:`The system keychain is not available on this computer.`,dialogTitle:`Save password in the keychain`,dialogBody:`Enter the password you use to unlock the archive. It goes into your system keychain.`,password:`Archive password`,saved:`Password saved in the keychain.`,saveFailed:`Could not save the password. {message}`,removed:`Password removed from the keychain.`,removeFailed:`The password was not removed from the keychain`},password:{title:`Change password`,description:`If you lose the password, your history cannot be recovered.`,action:`Change…`},rekey:{title:{encrypt:`Encrypt the archive`,change:`Change the archive password`,decrypt:`Turn off encryption?`},intro:{encrypt:`Choose a password. You’ll need it to open your history.`,change:`Enter the current password, then choose a new one. The old one stops working.`,decrypt:`Enter the current password. PathKeep will then store your history without encryption.`},currentPassword:`Current password`,wrongCurrent:`That is not the current password. Nothing was changed.`,newPassword:`New password`,keepInKeychain:`Save it in the system keychain`,noReset:`Nobody can reset this password, including PathKeep. Keep it somewhere safe.`,stepsTitle:`What happens`,step:{copy:`PathKeep saves a copy of the archive as it is now:`,writeEncrypted:`It writes an encrypted copy with the new password.`,writePlain:`It writes an unencrypted copy.`,swap:`The new file replaces the old one only if every step worked. The saved copy stays, so you can go back.`},plainWarning:`Anyone who can read your files will be able to read your history.`,run:{encrypt:`Encrypt`,change:`Change password`,decrypt:`Turn off encryption`},done:{encrypt:`The archive is encrypted.`,change:`Password changed.`,decrypt:`Encryption is off.`},keychainFailed:`The archive changed, but the keychain could not be updated, so “Save password in the keychain” stays as it was. Change it there to try again.`,previewFailed:`Could not check this change. {message}`,failed:`The archive was not changed. {message}`},appLock:{title:`App lock`,description:`Ask for a passcode when PathKeep opens or sits idle`},passcode:{title:`Passcode`,description:`Used to unlock PathKeep`,label:`Passcode`,set:`Set…`,change:`Change…`,remove:`Remove`,setTitle:`Set a passcode`,changeTitle:`Change the passcode`,dialogBody:`You’ll type it to unlock PathKeep. It is not your archive password.`,save:`Save passcode`,savedOn:`Passcode saved. App lock is on.`,changed:`Passcode changed.`,saveFailed:`Could not save the passcode. {message}`,removeTitle:`Remove the passcode?`,removeBody:`App lock turns off. Your archive and its password are not affected.`,removed:`Passcode removed. App lock is off.`,removeFailed:`Could not remove the passcode`,withHint:`Used to unlock PathKeep. Hint: {hint}`,hintLabel:`Hint (optional)`,hintNote:`Shown on the lock screen if you forget the passcode. Anyone at this computer can read it, so don’t write the passcode itself.`},touchId:{title:`Touch ID`,description:`Unlock PathKeep with your fingerprint`,unavailable:`Touch ID isn’t available on this Mac right now`},autoLock:{title:`Auto-lock`,description:`Lock PathKeep after it sits idle`,minutes_one:`{count} minute`,minutes_other:`{count} minutes`,hour:`1 hour`},lockNow:{title:`Lock now`,description:`Or press`,action:`Lock`}}},"zh-CN":{title:`设置`,saveFailed:`无法保存这项设置`,nav:{label:`设置分区`,general:`通用`,security:`安全`,ai:`AI`,background:`后台任务`,storage:`存储`,about:`关于`},secret:{again:`再输入一次`,minLength:`至少 {count} 个字符。`,tooShort:`请至少输入 {count} 个字符。`,mismatch:`两次输入的不一样。`},general:{language:{title:`语言`,description:`界面语言`,system:`跟随系统`},appearance:{title:`外观`,description:`浅色、深色或跟随系统`},clock:{title:`时间格式`,description:`时间怎么显示`,system:`跟随系统`,h12:`12 小时制(下午 1:30)`,h23:`24 小时制(13:30)`},insightsZone:{title:`洞察的时区`,description:`洞察按这个时区把每次浏览算进某一天、某个小时。出门旅行时它不跟着变;改了会重新整理洞察。`,rebuilding:`正在按{zone}重新整理洞察,完成之前仍是{old}。`,search:`搜索城市或时区`,none:`没有符合的时区。`},material:{title:`窗口`,description:`不透明,或用系统的毛玻璃,透出模糊的桌面`,solid:`不透明`,glass:`毛玻璃`},desktop:{title:`登录时启动和菜单栏图标`,trayTitle:`登录时启动和托盘图标`,loadFailed:`PathKeep 无法读取这些设置。{message}`,changeFailed:`无法更改。{message}`,login:{title:`登录时启动`,description:`登录电脑时在后台启动 PathKeep`},menuBar:{title:`菜单栏图标`,trayTitle:`托盘图标`,description:`显示备份状态和快速搜索`}},online:{title:`联网`,note:`只有这两项会访问网站,其他一切都留在这台电脑上。`},previews:{title:`链接预览`,description:`下载每个页面提供的预览图。网站会看到来自你电脑的请求。`},summaries:{title:`页面摘要`,description:`抓取你看过的页面的简短摘要,让搜索能按内容找到它们。网站不会拿到你的 Cookie 或账号。`,loadFailed:`无法加载这项设置。`}},security:{archiveGroup:`存档`,lockGroup:`应用锁`,lockNote:`挡在窗口前的密码。它不加密任何东西,和存档密码是两回事。`,encrypt:{title:`加密存档`,on:`AES-256,只有你知道密码。`,off:`你的历史以未加密的形式保存,能读取你文件的人都能看到。`},keychain:{title:`把密码存到钥匙串`,description:`打开 PathKeep 时不再询问密码。定时备份需要它。`,unavailable:`这台电脑上没有可用的系统钥匙串。`,dialogTitle:`把密码存到钥匙串`,dialogBody:`输入你用来解锁存档的密码,它会保存到系统钥匙串里。`,password:`存档密码`,saved:`密码已存到钥匙串。`,saveFailed:`无法保存密码。{message}`,removed:`已从钥匙串删除密码。`,removeFailed:`没能从钥匙串删除密码`},password:{title:`更改密码`,description:`密码一旦丢失,你的历史就无法恢复。`,action:`更改…`},rekey:{title:{encrypt:`加密存档`,change:`更改存档密码`,decrypt:`要关闭加密吗?`},intro:{encrypt:`设置一个密码,以后打开你的历史需要用到它。`,change:`先输入当前密码,再设置新密码。旧密码会失效。`,decrypt:`先输入当前密码,PathKeep 会改以不加密的方式保存你的历史。`},currentPassword:`当前密码`,wrongCurrent:`这不是当前密码,存档没有改动。`,newPassword:`新密码`,keepInKeychain:`存到系统钥匙串`,noReset:`没有人能重置这个密码,PathKeep 也不能。请把它保存在安全的地方。`,stepsTitle:`会发生什么`,step:{copy:`PathKeep 先把当前的存档保存一份副本:`,writeEncrypted:`再用新密码写出一份加密的存档。`,writePlain:`再写出一份不加密的存档。`,swap:`只有每一步都成功,新文件才会替换旧文件。副本会保留,需要时可以退回。`},plainWarning:`能读取你文件的人都能看到你的历史。`,run:{encrypt:`加密`,change:`更改密码`,decrypt:`关闭加密`},done:{encrypt:`存档已加密。`,change:`密码已更改。`,decrypt:`加密已关闭。`},keychainFailed:`存档已更改,但钥匙串没能更新,所以「把密码存到钥匙串」保持原样。到那里再改一次就会重试。`,previewFailed:`无法检查这项更改。{message}`,failed:`存档没有改动。{message}`},appLock:{title:`应用锁`,description:`打开 PathKeep 或闲置一段时间后要求输入密码`},passcode:{title:`应用密码`,description:`用来解锁 PathKeep`,label:`应用密码`,set:`设置…`,change:`更改…`,remove:`移除`,setTitle:`设置应用密码`,changeTitle:`更改应用密码`,dialogBody:`解锁 PathKeep 时输入。它不是你的存档密码。`,save:`保存密码`,savedOn:`应用密码已保存,应用锁已开启。`,changed:`应用密码已更改。`,saveFailed:`无法保存应用密码。{message}`,removeTitle:`要移除应用密码吗?`,removeBody:`应用锁会关闭。你的存档和存档密码不受影响。`,removed:`应用密码已移除,应用锁已关闭。`,removeFailed:`无法移除应用密码`,withHint:`用来解锁 PathKeep。提示:{hint}`,hintLabel:`提示(可选)`,hintNote:`忘记应用密码时会显示在锁定画面上。这台电脑前的任何人都看得到,别直接写下密码。`},touchId:{title:`触控 ID`,description:`用指纹解锁 PathKeep`,unavailable:`这台 Mac 现在用不了触控 ID`},autoLock:{title:`自动锁定`,description:`闲置一段时间后锁定 PathKeep`,minutes_one:`{count} 分钟`,minutes_other:`{count} 分钟`,hour:`1 小时`},lockNow:{title:`立即锁定`,description:`也可以按`,action:`锁定`}}},"zh-TW":{title:`設定`,saveFailed:`無法儲存這項設定`,nav:{label:`設定分區`,general:`一般`,security:`安全`,ai:`AI`,background:`背景工作`,storage:`儲存`,about:`關於`},secret:{again:`再輸入一次`,minLength:`至少 {count} 個字元。`,tooShort:`請至少輸入 {count} 個字元。`,mismatch:`兩次輸入的不一樣。`},general:{language:{title:`語言`,description:`介面語言`,system:`跟隨系統`},appearance:{title:`外觀`,description:`淺色、深色或跟隨系統`},clock:{title:`時間格式`,description:`時間怎麼顯示`,system:`跟隨系統`,h12:`12 小時制(下午 1:30)`,h23:`24 小時制(13:30)`},insightsZone:{title:`洞察的時區`,description:`洞察按這個時區把每次瀏覽算進某一天、某個小時。出門旅行時它不跟著變;改了會重新整理洞察。`,rebuilding:`正在按{zone}重新整理洞察,完成之前仍是{old}。`,search:`搜尋城市或時區`,none:`沒有符合的時區。`},material:{title:`視窗`,description:`不透明,或用系統的毛玻璃,透出模糊的桌面`,solid:`不透明`,glass:`毛玻璃`},desktop:{title:`登入時啟動和選單列圖示`,trayTitle:`登入時啟動和系統匣圖示`,loadFailed:`PathKeep 無法讀取這些設定。{message}`,changeFailed:`無法變更。{message}`,login:{title:`登入時啟動`,description:`登入電腦時在背景啟動 PathKeep`},menuBar:{title:`選單列圖示`,trayTitle:`系統匣圖示`,description:`顯示備份狀態和快速搜尋`}},online:{title:`連網`,note:`只有這兩項會連線到網站,其他一切都留在這台電腦上。`},previews:{title:`連結預覽`,description:`下載每個頁面提供的預覽圖。網站會看到來自你電腦的請求。`},summaries:{title:`頁面摘要`,description:`抓取你看過的頁面的簡短摘要,讓搜尋能依內容找到它們。網站不會拿到你的 Cookie 或帳號。`,loadFailed:`無法載入這項設定。`}},security:{archiveGroup:`存檔`,lockGroup:`App 鎖定`,lockNote:`擋在視窗前的密碼。它不加密任何東西,和存檔密碼是兩回事。`,encrypt:{title:`加密存檔`,on:`AES-256,只有你知道密碼。`,off:`你的歷史以未加密的形式儲存,能讀取你檔案的人都能看到。`},keychain:{title:`把密碼存到鑰匙圈`,description:`開啟 PathKeep 時不再詢問密碼。排程備份需要它。`,unavailable:`這台電腦上沒有可用的系統鑰匙圈。`,dialogTitle:`把密碼存到鑰匙圈`,dialogBody:`輸入你用來解鎖存檔的密碼,它會儲存到系統鑰匙圈。`,password:`存檔密碼`,saved:`密碼已存到鑰匙圈。`,saveFailed:`無法儲存密碼。{message}`,removed:`已從鑰匙圈刪除密碼。`,removeFailed:`沒能從鑰匙圈刪除密碼`},password:{title:`更改密碼`,description:`密碼一旦遺失,你的歷史就無法復原。`,action:`更改…`},rekey:{title:{encrypt:`加密存檔`,change:`更改存檔密碼`,decrypt:`要關閉加密嗎?`},intro:{encrypt:`設定一組密碼,之後開啟你的歷史需要用到它。`,change:`先輸入目前的密碼,再設定新密碼。舊密碼會失效。`,decrypt:`先輸入目前的密碼,PathKeep 會改以不加密的方式儲存你的歷史。`},currentPassword:`目前的密碼`,wrongCurrent:`這不是目前的密碼,存檔沒有變動。`,newPassword:`新密碼`,keepInKeychain:`存到系統鑰匙圈`,noReset:`沒有人能重設這組密碼,PathKeep 也不能。請把它存放在安全的地方。`,stepsTitle:`會發生什麼`,step:{copy:`PathKeep 先把目前的存檔保存一份副本:`,writeEncrypted:`再用新密碼寫出一份加密的存檔。`,writePlain:`再寫出一份不加密的存檔。`,swap:`只有每一步都成功,新檔案才會取代舊檔案。副本會保留,需要時可以退回。`},plainWarning:`能讀取你檔案的人都能看到你的歷史。`,run:{encrypt:`加密`,change:`更改密碼`,decrypt:`關閉加密`},done:{encrypt:`存檔已加密。`,change:`密碼已更改。`,decrypt:`加密已關閉。`},keychainFailed:`存檔已變更,但鑰匙圈沒能更新,所以「把密碼存到鑰匙圈」維持原樣。到那裡再改一次就會重試。`,previewFailed:`無法檢查這項變更。{message}`,failed:`存檔沒有變動。{message}`},appLock:{title:`App 鎖定`,description:`開啟 PathKeep 或閒置一段時間後要求輸入密碼`},passcode:{title:`App 密碼`,description:`用來解鎖 PathKeep`,label:`App 密碼`,set:`設定…`,change:`更改…`,remove:`移除`,setTitle:`設定 App 密碼`,changeTitle:`更改 App 密碼`,dialogBody:`解鎖 PathKeep 時輸入。它不是你的存檔密碼。`,save:`儲存密碼`,savedOn:`App 密碼已儲存,App 鎖定已開啟。`,changed:`App 密碼已更改。`,saveFailed:`無法儲存 App 密碼。{message}`,removeTitle:`要移除 App 密碼嗎?`,removeBody:`App 鎖定會關閉。你的存檔和存檔密碼不受影響。`,removed:`App 密碼已移除,App 鎖定已關閉。`,removeFailed:`無法移除 App 密碼`,withHint:`用來解鎖 PathKeep。提示:{hint}`,hintLabel:`提示(選填)`,hintNote:`忘記 App 密碼時會顯示在鎖定畫面上。這台電腦前的任何人都看得到,別直接寫下密碼。`},touchId:{title:`Touch ID`,description:`用指紋解鎖 PathKeep`,unavailable:`這台 Mac 現在無法使用 Touch ID`},autoLock:{title:`自動鎖定`,description:`閒置一段時間後鎖定 PathKeep`,minutes_one:`{count} 分鐘`,minutes_other:`{count} 分鐘`,hour:`1 小時`},lockNow:{title:`立即鎖定`,description:`也可以按`,action:`鎖定`}}}}),xe=g({en:{version:{title:`Version`,modified:`(modified)`},update:{title:`Updates`,description:`PathKeep checks only when you ask.`,check:`Check now`,checking:`Checking…`,upToDate:`You have the latest version.`,available:`Version {version} is available.`,install:`Download and install`,downloading:`Downloading the update…`,installing:`Installing the update…`,installed:`Version {version} is installed. Restart PathKeep to use it.`,restart:`Restart`,restartFailed:`Could not restart PathKeep`,unsupported:`This copy of PathKeep can’t update itself. Get new versions from the releases page.`,releases:`Open releases page`,openFailed:`Could not open the page`,failed:`Could not check for updates. {message}`},logs:{title:`Logs`,description:`Attach these when you report a problem.`,action:`Show logs`,failed:`Could not open the logs folder`,appLog:`App log`,windowLog:`Window log`,folder:`Folder`},paths:{copy:`Copy path`,copyLabel:`Copy path: {name}`,copied:`Path copied.`,copyFailed:`Could not copy the path`},crashes:{title:`Crash reports`,description:`PathKeep saves one here when something stops unexpectedly.`,show:`Show folder`,failed:`Could not open the crash reports folder`,none:`No crash recorded.`,latest:`Last one {when}: {message}`,closed:`PathKeep had to close.`},report:{title:`Copy diagnostics`,description:`Version, system and settings facts to paste into a bug report. No history, passwords or keys.`,action:`Copy`,copied:`Diagnostics copied.`,copyFailed:`Could not copy`,show:`Show what is copied`,hide:`Hide`},health:{title:`Check the archive`,description:`Looks for missing files and broken records. Changes nothing.`,run:`Check`,again:`Check again`,allGood_one:`{count} check passed.`,allGood_other:`All {count} checks passed.`,problems_one:`{count} problem found.`,problems_other:`{count} problems found.`,failed:`The check could not run. {message}`,ok:`Passed`,notOk:`Problem`,check:{config:`Settings file`,"archive-db":`Archive file`,"archive-unlock":`Archive unlocks`,"schema-version":`Archive format`,"manifest-chain":`Backup records`,"browser-sources":`Browsers`,"snapshot-artifacts":`Snapshots`,"import-audit-artifacts":`Import records`,"broken-visibility-references":`Hidden visits`,"derived-state-freshness":`Search and Insights data`,"archive-integrity":`Archive file is intact`,"source-evidence-integrity":`Original browser records are intact`,"intelligence-integrity":`Insights data is intact`,"agent-integrity":`Saved conversations are intact`,"canonical-references":`Pages and visits match up`,"cached-totals":`Totals match the archive`,"search-outbox":`Search keeps up with the archive`},repair:`Repair`,repairTitle:`Repair the archive?`,repairBody:`PathKeep rebuilds the records it can and clears outdated search and Insights data so it is built again. Your history is not deleted.`,repaired:`Repair finished.`,repairFailed:`The repair did not finish`}},"zh-CN":{version:{title:`版本`,modified:`(已修改)`},update:{title:`更新`,description:`只有在你要求时,PathKeep 才会检查更新。`,check:`立即检查`,checking:`正在检查…`,upToDate:`已是最新版本。`,available:`有新版本 {version}。`,install:`下载并安装`,downloading:`正在下载更新…`,installing:`正在安装更新…`,installed:`版本 {version} 已安装。重新启动 PathKeep 后生效。`,restart:`重新启动`,restartFailed:`无法重新启动 PathKeep`,unsupported:`这个版本的 PathKeep 无法自行更新,请从发布页面获取新版本。`,releases:`打开发布页面`,openFailed:`无法打开页面`,failed:`无法检查更新。{message}`},logs:{title:`日志`,description:`报告问题时可以附上这些文件。`,action:`显示日志`,failed:`无法打开日志文件夹`,appLog:`应用日志`,windowLog:`窗口日志`,folder:`文件夹`},paths:{copy:`复制路径`,copyLabel:`复制路径:{name}`,copied:`路径已复制。`,copyFailed:`无法复制路径`},crashes:{title:`崩溃报告`,description:`有东西意外停止时,PathKeep 会在这里保存一份报告。`,show:`显示文件夹`,failed:`无法打开崩溃报告文件夹`,none:`没有崩溃记录。`,latest:`最近一次({when}):{message}`,closed:`PathKeep 不得不关闭。`},report:{title:`复制诊断信息`,description:`版本、系统和设置等信息,可以贴到问题报告里。不含历史记录、密码或密钥。`,action:`复制`,copied:`诊断信息已复制。`,copyFailed:`无法复制`,show:`查看会复制的内容`,hide:`隐藏`},health:{title:`检查存档`,description:`查找丢失的文件和损坏的记录,不会做任何改动。`,run:`检查`,again:`再检查一次`,allGood_one:`{count} 项检查通过。`,allGood_other:`全部 {count} 项检查通过。`,problems_one:`发现 {count} 个问题。`,problems_other:`发现 {count} 个问题。`,failed:`检查无法运行。{message}`,ok:`通过`,notOk:`有问题`,check:{config:`设置文件`,"archive-db":`存档文件`,"archive-unlock":`存档能否解锁`,"schema-version":`存档格式`,"manifest-chain":`备份记录`,"browser-sources":`浏览器`,"snapshot-artifacts":`快照`,"import-audit-artifacts":`导入记录`,"broken-visibility-references":`已隐藏的记录`,"derived-state-freshness":`搜索和洞察数据`,"archive-integrity":`存档文件完好`,"source-evidence-integrity":`浏览器原始记录完好`,"intelligence-integrity":`洞察数据完好`,"agent-integrity":`已保存的对话完好`,"canonical-references":`页面与访问记录相互对应`,"cached-totals":`统计数字与存档一致`,"search-outbox":`搜索跟得上存档`},repair:`修复`,repairTitle:`要修复存档吗?`,repairBody:`PathKeep 会重建能重建的记录,并清除过时的搜索和洞察数据以便重新生成。你的历史不会被删除。`,repaired:`修复完成。`,repairFailed:`修复没有完成`}},"zh-TW":{version:{title:`版本`,modified:`(已修改)`},update:{title:`更新`,description:`只有在你要求時,PathKeep 才會檢查更新。`,check:`立即檢查`,checking:`正在檢查…`,upToDate:`已是最新版本。`,available:`有新版本 {version}。`,install:`下載並安裝`,downloading:`正在下載更新…`,installing:`正在安裝更新…`,installed:`版本 {version} 已安裝。重新啟動 PathKeep 後生效。`,restart:`重新啟動`,restartFailed:`無法重新啟動 PathKeep`,unsupported:`這個版本的 PathKeep 無法自行更新,請從發布頁面取得新版本。`,releases:`開啟發布頁面`,openFailed:`無法開啟頁面`,failed:`無法檢查更新。{message}`},logs:{title:`記錄檔`,description:`回報問題時可以附上這些檔案。`,action:`顯示記錄檔`,failed:`無法開啟記錄檔資料夾`,appLog:`應用程式記錄檔`,windowLog:`視窗記錄檔`,folder:`資料夾`},paths:{copy:`複製路徑`,copyLabel:`複製路徑:{name}`,copied:`路徑已複製。`,copyFailed:`無法複製路徑`},crashes:{title:`當機報告`,description:`有東西意外停止時,PathKeep 會在這裡儲存一份報告。`,show:`顯示資料夾`,failed:`無法開啟當機報告資料夾`,none:`沒有當機紀錄。`,latest:`最近一次({when}):{message}`,closed:`PathKeep 不得不關閉。`},report:{title:`複製診斷資訊`,description:`版本、系統和設定等資訊,可以貼到問題回報裡。不含歷史紀錄、密碼或金鑰。`,action:`複製`,copied:`診斷資訊已複製。`,copyFailed:`無法複製`,show:`查看會複製的內容`,hide:`隱藏`},health:{title:`檢查存檔`,description:`尋找遺失的檔案和損壞的記錄,不會做任何變動。`,run:`檢查`,again:`再檢查一次`,allGood_one:`{count} 項檢查通過。`,allGood_other:`全部 {count} 項檢查通過。`,problems_one:`發現 {count} 個問題。`,problems_other:`發現 {count} 個問題。`,failed:`檢查無法執行。{message}`,ok:`通過`,notOk:`有問題`,check:{config:`設定檔`,"archive-db":`存檔檔案`,"archive-unlock":`存檔能否解鎖`,"schema-version":`存檔格式`,"manifest-chain":`備份記錄`,"browser-sources":`瀏覽器`,"snapshot-artifacts":`快照`,"import-audit-artifacts":`匯入記錄`,"broken-visibility-references":`已隱藏的記錄`,"derived-state-freshness":`搜尋和洞察資料`,"archive-integrity":`存檔檔案完好`,"source-evidence-integrity":`瀏覽器原始記錄完好`,"intelligence-integrity":`洞察資料完好`,"agent-integrity":`已儲存的對話完好`,"canonical-references":`頁面與瀏覽記錄相互對應`,"cached-totals":`統計數字與存檔一致`,"search-outbox":`搜尋跟得上存檔`},repair:`修復`,repairTitle:`要修復存檔嗎?`,repairBody:`PathKeep 會重建能重建的記錄,並清除過時的搜尋和洞察資料以便重新產生。你的歷史不會被刪除。`,repaired:`修復完成。`,repairFailed:`修復沒有完成`}}}),Se=g({en:{title:`AI`,optionalNote:`Everything here is optional. PathKeep backs up, searches and analyzes your history without any of it.`,semantic:{title:`Semantic search`,descriptionService:`Find pages by meaning, not only by keywords. {name} builds the index.`,model:{label:`Model`,inApp:`In-app static model`,inAppAbout:`{model}, {dims} dimensions. It comes with PathKeep and runs on this computer. It is a static embedding model: a word means the same to it wherever it appears, so it cannot tell apple the fruit from Apple the company. That makes it very fast, but it finds pages by meaning less well than the usual contextual embedding models, which read every word in its context. To use one, add an embeddings service such as LM Studio or Ollama.`,add:`Add an embeddings service…`},serviceDialog:{title:`Add an embeddings service`,description:`A service that turns text into embeddings, OpenAI-compatible. To build the index, semantic search sends it each page’s title, site and the words in its address, with the page’s saved text when there is some, and each different search you have made; to find pages, your searches.`},serviceLocalNote:`Runs on this computer. Pages and searches stay here.`,serviceRemoteNote:`An online service. Each page’s title, site, the words in its address and its saved text, and your searches, are sent to it.`,serviceRemoveBody:`The service and its stored API key are removed from this computer. Semantic search goes back to the in-app static model.`,serviceRemoveBodyIndexed:`The service and its stored API key are removed from this computer. The index made with it can’t be used without it and is deleted. Semantic search goes back to the in-app static model, which has to build its own index first.`,switch:{title:`Switch semantic search to {name}?`,confirm:`Switch model`,inAppName:`the in-app static model`,onSave:`Saving switches semantic search to this model:`,ready:`The index made with {model} is complete, so semantic search uses it right away.`,newIndex:`{model} needs its own index: {count} visits, read in the background once you choose Build index. Nothing starts before that.`,newIndexCounting:`{model} needs its own index, read from your history in the background once you choose Build index. Nothing starts before that.`,newIndexLater:`{model} needs its own index: {count} visits, read in the background once semantic search is on.`,newIndexLaterCounting:`{model} needs its own index, read from your history in the background once semantic search is on.`,replaces:`Once it is complete, the index made with {old} is deleted. Going back to {old} means building that index again.`,dropsUnfinished_one:`The unfinished index made with {model} ({count} visit) is not kept: it is deleted the next time an index is built or updated.`,dropsUnfinished_other:`The unfinished index made with {model} ({count} visits) is not kept: it is deleted the next time an index is built or updated.`,service:`From then on every semantic search goes to {name}. When it isn’t running or can’t be reached, semantic search doesn’t work and no other model stands in; keyword search still works.`,static:`It is a static embedding model: very fast, but it finds pages by meaning less well than the usual contextual embedding models.`,download:`Building its index first downloads it once, about {size}.`},modelChange:`Another model needs its own index ({count} visits). Nothing starts until you build it in Settings → AI; until it is complete, semantic search keeps using {old}.`,modelChangeCounting:`Another model needs its own index. Nothing starts until you build it in Settings → AI; until it is complete, semantic search keeps using {old}.`,modelChangeLater:`Another model needs its own index ({count} visits). You can build it once semantic search is on.`,modelChangeLaterCounting:`Another model needs its own index. You can build it once semantic search is on.`,description:`Find pages by meaning, not only by keywords. The model runs on this computer. It downloads once, about {size}.`,offNote:`Turning it off keeps the downloaded model.`,downloading:`Downloading the language model…`,downloadProgress:`{done} of {total}`,cancel:`Cancel`,downloadFailed:`The download did not finish. {message}`,modelMissing:`The model is not downloaded yet.`,download:`Download`,retry:`Try again`,indexed_one:`{count} visit indexed`,indexed_other:`{count} visits indexed`,lastIndexed:`Last indexed {when}`,nothingIndexed:`Nothing indexed yet.`,indexing:`Building the index…`,indexProgress:`{done} of {total} visits`,speed:`{rate} a second`,etaSoon:`under a minute left`,etaMinutes_one:`about {count} minute left`,etaMinutes_other:`about {count} minutes left`,etaHours:`about {hours} h {minutes} min left`,indexWaiting:`Waiting for other background work to finish…`,needsBuild:`{model} has no index yet. Building it reads {count} visits in the background, and you can pause it at any time.`,needsBuildCounting:`{model} has no index yet. Building it reads your history in the background, and you can pause it at any time.`,unfinished_one:`The index made with {model} is not finished: {count} visit so far.`,unfinished_other:`The index made with {model} is not finished: {count} visits so far.`,meanwhilePrevious:`Until it is complete, semantic search keeps using {model}.`,meanwhilePartial:`Until it is complete, searching by meaning only finds visits already indexed.`,meanwhileCurrent_one:`Until this finishes, search uses the index you have now: {count} page.`,meanwhileCurrent_other:`Until this finishes, search uses the index you have now: {count} pages.`,olderText:`This index was made from an older version of the page text, which also carried visit times and leftover page code. It still works; rebuilt, it finds pages by meaning more reliably.`,olderTextUnfinished:`The visits indexed so far were read the older way. Start over to read every visit the current way, or continue and keep them.`,rebuildIndex:`Rebuild index`,startOver:`Start over`,build:`Build index`,continue:`Continue`,pause:`Pause`,cancelBuild:`Cancel`,inBackground:`Background work`,pausedByUser:`Paused at {done} of {total} visits.`,pausedByService:`{name} could not run the model, so building the index is paused. It said: {message}`,pausedByQueue:`All background work is paused. Building the index goes on when it resumes.`,actionFailed:`Could not do that. {message}`,autoUpdate:`Index new visits after each backup`,autoUpdateNote:`Starts once the index is complete.`,indexFailed:`Indexing failed. Rebuild the search index to try again.`,indexIncomplete:`The index is incomplete. Rebuild it to fix this.`,failed:`Could not change this setting. {message}`},provider:{title:`AI service`,description:`The model the assistant talks to.`,select:`AI service`,none:`None`,add:`Add provider…`,localNote:`Runs on this computer. Nothing is sent anywhere.`,remoteNote:`An online service. When you ask a question, the pages the assistant finds are sent to it.`,keyMissing:`No API key is stored for this service yet.`,checking:`Checking {name}…`,checkOk:`{name} answers and has {model}. Test connection runs the model once.`,checkNoModel:`{name} answers, but has no model called {model}. Check the model name.`,checkFailed:`Could not read {name}’s models: {message}`,test:`Test connection`,testing:`Testing…`,testOk:`Connected to {model} in {ms} ms.`,testFailed:`Could not connect. {message}`,testErrors:{"secret-missing":`The service did not accept the API key. Check the key and test again.`,"network-error":`Could not reach {address}. Check the address and that the service is running.`,"rate-limited":`The service is limiting requests right now. Try again in a while.`,"bad-model":`The service has no model called {model}. Check the model name.`,"bad-endpoint":`{address} reaches a server, but not its API. For LM Studio and Ollama the address usually ends in /v1, like http://localhost:1234/v1.`,"unsupported-capability":`This service cannot be used for this.`,"provider-disabled":`This service is turned off.`,other:`The service answered with an error: {message}`},remove:`Remove`,removeTitle:`Remove {name}?`,removeBody:`The service and its stored API key are removed from this computer. Your conversations are kept.`,removeFailed:`Could not remove the service.`,saved:`{name} is ready.`,updated:`{name} is saved.`,edit:`Edit`,editDialog:{title:`Edit {name}`,description:`Change how PathKeep reaches this service.`,submit:`Save`},saveFailed:`Could not save the service. {message}`,selectFailed:`Could not change the service. {message}`,dialog:{title:`Add an AI service`,description:`Choose where the assistant gets its answers from.`,submit:`Add service`,cancel:`Cancel`,saving:`Saving…`},form:{kind:`Service`,name:`Name`,namePlaceholder:`Optional`,baseUrl:`Address`,model:`Model`,modelPlaceholder:`For example {example}`,apiKey:`API key`,apiKeyHint:`Kept in your system keychain, never in PathKeep’s settings file.`,apiKeyOptional:`Optional: only for a server on this computer that asks for one. It is kept in the system keychain.`,apiKeyKeep:`Leave it empty to keep the saved key.`,optionalLater:`You can finish setup, including the API key and a connection test, later in Settings → AI.`},models:{browse:`Browse the list`,search:`Find a model`,empty:`No model matches.`,loading:`Reading the service’s models…`,found_one:`{count} model on this service. Pick it, or type a name.`,found_other:`{count} models on this service. Pick one, or type a name.`,none:`The service has no models yet. Download or load one there, or type a name.`,noneFor:{llm:`The service has no chat models, only embedding models. Type a name if it has one.`,embedding:`The service has no embedding models. In LM Studio and Ollama their names usually contain “embed”.`},failed:`Could not read the service’s models: {message} You can still type a name.`,loaded:`Loaded`,context:`reads {size}`,upTo:`up to {size}`},kinds:{ollama:`Ollama (this computer)`,"lm-studio":`LM Studio (this computer)`,openai:`OpenAI or compatible`,anthropic:`Anthropic`,gemini:`Google Gemini`},defaultName:{ollama:`Ollama`,"lm-studio":`LM Studio`,openai:`OpenAI`,anthropic:`Anthropic`,gemini:`Gemini`}},mcp:{title:`MCP server`,description:`Let tools like Claude read your archive. Read-only.`,how:`PathKeep does not keep a server running. Your tool starts one when it needs it, using the command below. This switch only allows that.`,details:`Connection details`,copy:`Copy`,copied:`Copied`,loadFailed:`Could not load the connection details.`,failed:`Could not change this setting. {message}`},mcpLog:{title:`What other apps read`,description:`Every request an app made through the MCP server: what it asked and how much came back.`,label:`Requests through the MCP server`,empty:`No app has asked anything yet.`,loadFailed:`Could not load the requests: {message}`,loadingMore:`Loading earlier requests…`,allShown:`That’s every request.`,moreFailed:`Couldn’t load earlier requests: {message}`,tool:{"search-history":`Searched your history`,"archive-status":`Checked the archive’s status`,"usage-guide":`Read how to use PathKeep`,other:`Used {tool}`},sent_one:`Sent {count} page of {matches} matching`,sent_other:`Sent {count} pages of {matches} matching`,matching_one:`{count} matching page`,matching_other:`{count} matching pages`,onSite:`on {site}`,asked:`“{query}”`},rebuild:{title:`Rebuild search index`,description:`Reads your whole history again and rebuilds the semantic index. You can keep using PathKeep meanwhile.`,action:`Rebuild`,needsSemantic:`Turn on local semantic search first.`,dialogTitle:`Rebuild the search index?`,dialogBody_one:`This indexes {count} visit again, in the background: you can keep using PathKeep, and its progress shows here. Search keeps using the current index until the new one is ready, so the disk holds both until then. Your history is not changed.`,dialogBody_other:`This indexes {count} visits again, in the background: you can keep using PathKeep, and its progress shows here. Search keeps using the current index until the new one is ready, so the disk holds both until then. Your history is not changed.`,dialogBodyUnknown:`This indexes your whole history again. It can take a while. Search keeps using the current index until the new one is ready, so the disk holds both until then. Your history is not changed.`,confirm:`Rebuild`,started:`Rebuilding the search index.`,failed:`Could not start the rebuild. {message}`},tuning:{title:`Search ranking`,description:`How searching by meaning in History orders results. It blends two lists, pages whose words match and pages whose meaning matches, then lifts starred pages a little.`,needsSemantic:`Used only when local semantic search is on. You can still set it now.`,k:{label:`Rank smoothing`,help:`How much the first few results of each list count over the rest. Lower lets the very top matches win; higher blends both lists more evenly.`},lexical:{label:`Word matches`,help:`How much pages containing your exact words count. 0 ignores them.`},semantic:{label:`Meaning matches`,help:`How much pages about the same idea count, even without your words. 0 ignores them.`},starred:{label:`Starred boost`,help:`How far starred pages move up. Kept small so a starred page never beats a much better match.`},range:`Default {value} · from {min} to {max}`,invalid:`Enter a number from {min} to {max}.`,save:`Save`,reset:`Reset to defaults`,saved:`Search ranking saved.`}},"zh-CN":{title:`AI`,optionalNote:`这里的一切都是可选的。没有这些,PathKeep 也能备份、搜索和分析你的历史。`,semantic:{title:`语义搜索`,descriptionService:`按含义而不只是关键词来查找页面。由 {name} 建立索引。`,model:{label:`模型`,inApp:`应用内置静态模型`,inAppAbout:`{model},{dims} 维。随 PathKeep 提供,在这台电脑上运行。它是静态嵌入(static embedding)模型:同一个词不管出现在哪里,对它来说意思都一样,所以分不清“苹果”是水果还是公司。因此它非常快,但找意思相近的页面不如一般的上下文嵌入(contextual embedding)模型,那种模型会看每个词的上下文。想用的话,添加一个嵌入服务,例如 LM Studio 或 Ollama。`,add:`添加嵌入服务…`},serviceDialog:{title:`添加嵌入服务`,description:`把文字转成嵌入向量的服务,需兼容 OpenAI。为了建立索引,语义搜索会把每个页面的标题、网站、网址里的词,以及保存的网页正文(如果有)发给它,也会发送你搜索过的每一组关键词;搜索时也会把你的搜索发给它。`},serviceLocalNote:`在这台电脑上运行,页面和搜索都留在这里。`,serviceRemoteNote:`在线服务。每个页面的标题、网站、网址里的词和保存的网页正文,以及你的搜索,都会发给它。`,serviceRemoveBody:`这个服务和它保存的 API 密钥会从这台电脑上移除,语义搜索改回使用应用内置静态模型。`,serviceRemoveBodyIndexed:`这个服务和它保存的 API 密钥会从这台电脑上移除。用它建立的索引少了它就用不了,会被删除。语义搜索改回使用应用内置静态模型,要先建立它自己的索引。`,switch:{title:`把语义搜索换成 {name}?`,confirm:`换模型`,inAppName:`应用内置静态模型`,onSave:`保存后,语义搜索就换成这个模型:`,ready:`用 {model} 建立的索引已经完整,语义搜索会直接用它。`,newIndex:`{model} 需要自己的索引:在后台读取 {count} 条访问记录,等你点“建立索引”才开始,在此之前什么都不会做。`,newIndexCounting:`{model} 需要自己的索引:在后台读取你的历史,等你点“建立索引”才开始,在此之前什么都不会做。`,newIndexLater:`{model} 需要自己的索引:开启语义搜索后在后台读取 {count} 条访问记录。`,newIndexLaterCounting:`{model} 需要自己的索引:开启语义搜索后在后台读取你的历史。`,replaces:`新索引完成后,用 {old} 建立的索引会被删除。之后想换回 {old},就得重新建立它的索引。`,dropsUnfinished_one:`用 {model} 建立、还没完成的索引({count} 条访问记录)不会保留:下次建立或更新索引时就会删除。`,dropsUnfinished_other:`用 {model} 建立、还没完成的索引({count} 条访问记录)不会保留:下次建立或更新索引时就会删除。`,service:`之后每次语义搜索都要经过 {name}。它没开或连不上时,语义搜索就用不了,也没有别的模型顶替;关键词搜索照常可用。`,static:`它是静态嵌入模型:非常快,但找意思相近的页面不如一般的上下文嵌入模型。`,download:`建立索引前要先下载一次,约 {size}。`},modelChange:`换成别的模型需要它自己的索引({count} 条访问记录)。要在“设置 → AI”里建立才会开始;建好之前,语义搜索继续用 {old}。`,modelChangeCounting:`换成别的模型需要它自己的索引。要在“设置 → AI”里建立才会开始;建好之前,语义搜索继续用 {old}。`,modelChangeLater:`换成别的模型需要它自己的索引({count} 条访问记录)。打开语义搜索后就能建立。`,modelChangeLaterCounting:`换成别的模型需要它自己的索引。打开语义搜索后就能建立。`,description:`按含义而不只是关键词来查找页面。模型在这台电脑上运行,只需下载一次,约 {size}。`,offNote:`关闭后会保留已下载的模型。`,downloading:`正在下载语言模型…`,downloadProgress:`{done} / {total}`,cancel:`取消`,downloadFailed:`下载没有完成。{message}`,modelMissing:`模型还没有下载。`,download:`下载`,retry:`重试`,indexed_one:`已索引 {count} 条访问记录`,indexed_other:`已索引 {count} 条访问记录`,lastIndexed:`上次索引:{when}`,nothingIndexed:`还没有索引任何内容。`,indexing:`正在建立索引…`,indexProgress:`{done} / {total} 条访问记录`,speed:`每秒 {rate} 条`,etaSoon:`剩不到一分钟`,etaMinutes_one:`大约还要 {count} 分钟`,etaMinutes_other:`大约还要 {count} 分钟`,etaHours:`大约还要 {hours} 小时 {minutes} 分钟`,indexWaiting:`正在等其他后台任务完成…`,needsBuild:`{model} 还没有索引。建立索引会在后台读取 {count} 条访问记录,随时可以暂停。`,needsBuildCounting:`{model} 还没有索引。建立索引会在后台读取你的历史,随时可以暂停。`,unfinished_one:`用 {model} 建立的索引还没完成:目前 {count} 条访问记录。`,unfinished_other:`用 {model} 建立的索引还没完成:目前 {count} 条访问记录。`,meanwhilePrevious:`完成之前,语义搜索继续用 {model}。`,meanwhilePartial:`完成之前,按含义搜索只找得到已经建立索引的访问记录。`,meanwhileCurrent_one:`完成之前,搜索继续用现有的索引:{count} 个页面。`,meanwhileCurrent_other:`完成之前,搜索继续用现有的索引:{count} 个页面。`,olderText:`这份索引是用旧版的页面文字建立的,里面还夹着访问时间和网页代码残片。它照样能用;重建之后,按含义搜索会找得更准。`,olderTextUnfinished:`目前已经建立索引的访问记录是用旧方式读的。可以从头重来,用现在的方式读每一条访问记录;也可以继续,保留已经建好的部分。`,rebuildIndex:`重建索引`,startOver:`从头重来`,build:`建立索引`,continue:`继续`,pause:`暂停`,cancelBuild:`取消`,inBackground:`后台任务`,pausedByUser:`已暂停:{done} / {total} 条访问记录。`,pausedByService:`{name} 没能运行这个模型,建立索引已暂停。它的回复:{message}`,pausedByQueue:`所有后台任务都已暂停,恢复后会继续建立索引。`,actionFailed:`没能完成这个操作。{message}`,autoUpdate:`每次备份后为新的访问记录建立索引`,autoUpdateNote:`索引完成后才会开始。`,indexFailed:`建立索引失败。请重建搜索索引再试一次。`,indexIncomplete:`索引不完整。请重建索引来修复。`,failed:`无法更改这项设置。{message}`},provider:{title:`AI 服务`,description:`助理使用的模型。`,select:`AI 服务`,none:`无`,add:`添加服务…`,localNote:`在这台电脑上运行,不会向任何地方发送内容。`,remoteNote:`这是在线服务。你提问时,助理找到的页面会发送给它。`,keyMissing:`还没有为这个服务保存 API 密钥。`,checking:`正在检查 {name}…`,checkOk:`{name} 有回应,也有 {model}。“测试连接”会实际运行一次模型。`,checkNoModel:`{name} 有回应,但没有叫 {model} 的模型。请检查模型名称。`,checkFailed:`没能读取 {name} 的模型:{message}`,test:`测试连接`,testing:`测试中…`,testOk:`已连接到 {model},耗时 {ms} 毫秒。`,testFailed:`无法连接。{message}`,testErrors:{"secret-missing":`服务不接受这个 API 密钥。检查密钥后再测试一次。`,"network-error":`连不上 {address}。检查地址,以及服务是否在运行。`,"rate-limited":`服务暂时限制了请求,稍后再试。`,"bad-model":`服务上没有名为 {model} 的模型。检查模型名称。`,"bad-endpoint":`{address} 有服务在运行,但不是它的 API 地址。LM Studio 和 Ollama 的地址通常以 /v1 结尾,例如 http://localhost:1234/v1。`,"unsupported-capability":`这个服务不能用在这里。`,"provider-disabled":`这个服务已关闭。`,other:`服务返回了错误:{message}`},remove:`移除`,removeTitle:`移除 {name}?`,removeBody:`这个服务和已保存的 API 密钥会从这台电脑上移除。你的对话会保留。`,removeFailed:`无法移除这个服务。`,saved:`{name} 已就绪。`,updated:`{name} 已保存。`,edit:`编辑`,editDialog:{title:`编辑 {name}`,description:`更改 PathKeep 连接这个服务的方式。`,submit:`保存`},saveFailed:`无法保存这个服务。{message}`,selectFailed:`无法更换服务。{message}`,dialog:{title:`添加 AI 服务`,description:`选择助理从哪里获得回答。`,submit:`添加服务`,cancel:`取消`,saving:`正在保存…`},form:{kind:`服务`,name:`名称`,namePlaceholder:`可选`,baseUrl:`地址`,model:`模型`,modelPlaceholder:`例如 {example}`,apiKey:`API 密钥`,apiKeyHint:`保存在系统钥匙串里,不会写进 PathKeep 的设置文件。`,apiKeyOptional:`可不填:只有这台电脑上要求密钥的服务器才需要。密钥保存在系统钥匙串里。`,apiKeyKeep:`留空就保留已保存的密钥。`,optionalLater:`之后可以在「设置 → AI」里完成设置,包括 API 密钥和连接测试。`},models:{browse:`浏览列表`,search:`查找模型`,empty:`没有相符的模型。`,loading:`正在读取服务上的模型…`,found_one:`服务上有 {count} 个模型。选一个,或输入名称。`,found_other:`服务上有 {count} 个模型。选一个,或输入名称。`,none:`服务上还没有模型。先在那里下载或加载一个,或输入名称。`,noneFor:{llm:`服务上只有 embedding 模型,没有聊天模型。如果有,请输入名称。`,embedding:`服务上没有 embedding 模型。LM Studio 和 Ollama 的 embedding 模型名称通常带有“embed”。`},failed:`读不到服务上的模型:{message} 仍然可以输入名称。`,loaded:`已加载`,context:`可读 {size}`,upTo:`最多 {size}`},kinds:{ollama:`Ollama(本机)`,"lm-studio":`LM Studio(本机)`,openai:`OpenAI 或兼容服务`,anthropic:`Anthropic`,gemini:`Google Gemini`},defaultName:{ollama:`Ollama`,"lm-studio":`LM Studio`,openai:`OpenAI`,anthropic:`Anthropic`,gemini:`Gemini`}},mcp:{title:`MCP 服务器`,description:`让 Claude 等工具读取你的存档,只读。`,how:`PathKeep 不会一直运行服务器。需要时,你的工具会用下面的命令自行启动。这个开关只是允许它这样做。`,details:`连接信息`,copy:`复制`,copied:`已复制`,loadFailed:`无法加载连接信息。`,failed:`无法更改这项设置。{message}`},mcpLog:{title:`其他应用读了什么`,description:`应用通过 MCP 服务器发出的每个请求:问了什么、拿到多少。`,label:`通过 MCP 服务器的请求`,empty:`还没有应用来问过。`,loadFailed:`无法载入请求:{message}`,loadingMore:`正在载入更早的请求…`,allShown:`所有请求都在这里了。`,moreFailed:`载入更早的请求失败:{message}`,tool:{"search-history":`搜索了你的历史`,"archive-status":`查看了存档状态`,"usage-guide":`读了 PathKeep 的用法`,other:`使用了 {tool}`},sent_one:`交出 {count} 页(符合 {matches} 页)`,sent_other:`交出 {count} 页(符合 {matches} 页)`,matching_one:`符合 {count} 页`,matching_other:`符合 {count} 页`,onSite:`限 {site}`,asked:`“{query}”`},rebuild:{title:`重建搜索索引`,description:`重新读取你的全部历史并重建语义索引。期间可以照常使用 PathKeep。`,action:`重建`,needsSemantic:`请先开启本地语义搜索。`,dialogTitle:`要重建搜索索引吗?`,dialogBody_one:`这会在后台重新索引 {count} 条访问记录,期间可以照常使用 PathKeep,进度显示在这里。新索引建好之前,搜索继续用现有的索引,所以这段时间磁盘上会同时有两份。你的历史不会被更改。`,dialogBody_other:`这会在后台重新索引 {count} 条访问记录,期间可以照常使用 PathKeep,进度显示在这里。新索引建好之前,搜索继续用现有的索引,所以这段时间磁盘上会同时有两份。你的历史不会被更改。`,dialogBodyUnknown:`这会重新索引你的全部历史,可能要花一些时间。新索引建好之前,搜索继续用现有的索引,所以这段时间磁盘上会同时有两份。你的历史不会被更改。`,confirm:`重建`,started:`正在重建搜索索引。`,failed:`无法开始重建。{message}`},tuning:{title:`搜索排序`,description:`在“记录”中按意思搜索时,结果如何排序。它会合并两份列表:文字相符的网页和意思相近的网页,再把加星的网页稍微往前排。`,needsSemantic:`只在开启本机语意搜索时使用。现在也可以先设置。`,k:{label:`排名平滑`,help:`每份列表前几名比其余结果重要多少。数值越小,最前面的结果越占优势;越大,两份列表混合得越平均。`},lexical:{label:`文字相符`,help:`包含你输入文字的网页占多少分量。0 表示不计入。`},semantic:{label:`意思相近`,help:`主题相同但不一定含有你输入文字的网页占多少分量。0 表示不计入。`},starred:{label:`加星网页加分`,help:`加星的网页往前排多少。数值保持得很小,加星的网页不会压过明显更相关的结果。`},range:`默认 {value} · 范围 {min} 到 {max}`,invalid:`请输入 {min} 到 {max} 之间的数字。`,save:`保存`,reset:`恢复默认值`,saved:`搜索排序已保存。`}},"zh-TW":{title:`AI`,optionalNote:`這裡的一切都是選用的。沒有這些,PathKeep 也能備份、搜尋和分析你的歷史。`,semantic:{title:`語意搜尋`,descriptionService:`依意思而不只是關鍵字來尋找頁面。由 {name} 建立索引。`,model:{label:`模型`,inApp:`App 內建靜態模型`,inAppAbout:`{model},{dims} 維。隨 PathKeep 提供,在這台電腦上執行。它是靜態嵌入(static embedding)模型:同一個字詞不論出現在哪裡,對它來說意思都一樣,所以分不出「蘋果」是水果還是公司。因此它非常快,但找意思相近的頁面不如一般的上下文嵌入(contextual embedding)模型,那種模型會看每個字詞的前後文。想用的話,新增一個嵌入服務,例如 LM Studio 或 Ollama。`,add:`新增嵌入服務…`},serviceDialog:{title:`新增嵌入服務`,description:`把文字轉成嵌入向量的服務,需相容 OpenAI。為了建立索引,語意搜尋會把每個頁面的標題、網站、網址裡的字詞,以及儲存的網頁內文(如果有)傳給它,也會傳送你搜尋過的每一組關鍵字;搜尋時也會把你的搜尋傳給它。`},serviceLocalNote:`在這台電腦上執行,頁面與搜尋都留在這裡。`,serviceRemoteNote:`線上服務。每個頁面的標題、網站、網址裡的字詞與儲存的網頁內文,以及你的搜尋,都會傳給它。`,serviceRemoveBody:`這個服務與它儲存的 API 金鑰會從這台電腦上移除,語意搜尋改回使用 App 內建靜態模型。`,serviceRemoveBodyIndexed:`這個服務與它儲存的 API 金鑰會從這台電腦上移除。用它建立的索引少了它就不能用,會被刪除。語意搜尋改回使用 App 內建靜態模型,要先建好它自己的索引。`,switch:{title:`把語意搜尋換成 {name}?`,confirm:`換模型`,inAppName:`App 內建靜態模型`,onSave:`儲存後,語意搜尋就換成這個模型:`,ready:`用 {model} 建立的索引已經完整,語意搜尋會直接用它。`,newIndex:`{model} 要有自己的索引:在背景讀取 {count} 次造訪,等你按「建立索引」才開始,在那之前什麼都不會做。`,newIndexCounting:`{model} 要有自己的索引:在背景讀取你的歷史,等你按「建立索引」才開始,在那之前什麼都不會做。`,newIndexLater:`{model} 要有自己的索引:開啟語意搜尋後在背景讀取 {count} 次造訪。`,newIndexLaterCounting:`{model} 要有自己的索引:開啟語意搜尋後在背景讀取你的歷史。`,replaces:`新索引完成後,用 {old} 建立的索引會被刪除。之後想換回 {old},就得重新建它的索引。`,dropsUnfinished_one:`用 {model} 建立、還沒完成的索引({count} 次造訪)不會保留:下次建立或更新索引時就會刪除。`,dropsUnfinished_other:`用 {model} 建立、還沒完成的索引({count} 次造訪)不會保留:下次建立或更新索引時就會刪除。`,service:`之後每次語意搜尋都要經過 {name}。它沒開或連不上時,語意搜尋就不能用,也沒有別的模型頂替;關鍵字搜尋照常可用。`,static:`它是靜態嵌入模型:非常快,但找意思相近的頁面不如一般的上下文嵌入模型。`,download:`建索引前要先下載一次,約 {size}。`},modelChange:`換成別的模型需要它自己的索引({count} 次造訪)。要在「設定 → AI」裡建立才會開始;建好之前,語意搜尋繼續用 {old}。`,modelChangeCounting:`換成別的模型需要它自己的索引。要在「設定 → AI」裡建立才會開始;建好之前,語意搜尋繼續用 {old}。`,modelChangeLater:`換成別的模型需要它自己的索引({count} 次造訪)。開啟語意搜尋後就能建立。`,modelChangeLaterCounting:`換成別的模型需要它自己的索引。開啟語意搜尋後就能建立。`,description:`依含義而不只是關鍵字來尋找頁面。模型在這台電腦上執行,只需下載一次,約 {size}。`,offNote:`關閉後會保留已下載的模型。`,downloading:`正在下載語言模型…`,downloadProgress:`{done} / {total}`,cancel:`取消`,downloadFailed:`下載沒有完成。{message}`,modelMissing:`模型還沒有下載。`,download:`下載`,retry:`重試`,indexed_one:`已建立 {count} 次造訪的索引`,indexed_other:`已建立 {count} 次造訪的索引`,lastIndexed:`上次建立索引:{when}`,nothingIndexed:`還沒有建立任何索引。`,indexing:`正在建立索引…`,indexProgress:`{done} / {total} 次造訪`,speed:`每秒 {rate} 次`,etaSoon:`剩不到一分鐘`,etaMinutes_one:`大約還要 {count} 分鐘`,etaMinutes_other:`大約還要 {count} 分鐘`,etaHours:`大約還要 {hours} 小時 {minutes} 分鐘`,indexWaiting:`正在等其他背景工作完成…`,needsBuild:`{model} 還沒有索引。建立索引會在背景讀取 {count} 次造訪,隨時可以暫停。`,needsBuildCounting:`{model} 還沒有索引。建立索引會在背景讀取你的歷史,隨時可以暫停。`,unfinished_one:`用 {model} 建立的索引還沒完成:目前 {count} 次造訪。`,unfinished_other:`用 {model} 建立的索引還沒完成:目前 {count} 次造訪。`,meanwhilePrevious:`完成之前,語意搜尋繼續用 {model}。`,meanwhilePartial:`完成之前,依意思搜尋只找得到已經建立索引的造訪。`,meanwhileCurrent_one:`完成之前,搜尋繼續用現有的索引:{count} 個頁面。`,meanwhileCurrent_other:`完成之前,搜尋繼續用現有的索引:{count} 個頁面。`,olderText:`這份索引是用舊版的頁面文字建立的,裡面還夾著造訪時間和網頁程式碼殘片。它照樣能用;重建之後,依意思搜尋會找得更準。`,olderTextUnfinished:`目前已經建立索引的造訪是用舊方式讀的。可以從頭重來,用現在的方式讀每一次造訪;也可以繼續,保留已經建好的部分。`,rebuildIndex:`重建索引`,startOver:`從頭重來`,build:`建立索引`,continue:`繼續`,pause:`暫停`,cancelBuild:`取消`,inBackground:`背景工作`,pausedByUser:`已暫停:{done} / {total} 次造訪。`,pausedByService:`{name} 沒能執行這個模型,建立索引已暫停。它的回覆:{message}`,pausedByQueue:`所有背景工作都已暫停,恢復後會繼續建立索引。`,actionFailed:`沒能完成這個操作。{message}`,autoUpdate:`每次備份後為新的造訪建立索引`,autoUpdateNote:`索引完成後才會開始。`,indexFailed:`建立索引失敗。請重建搜尋索引再試一次。`,indexIncomplete:`索引不完整。請重建索引來修復。`,failed:`無法變更這項設定。{message}`},provider:{title:`AI 服務`,description:`助理使用的模型。`,select:`AI 服務`,none:`無`,add:`新增服務…`,localNote:`在這台電腦上執行,不會向任何地方傳送內容。`,remoteNote:`這是線上服務。你提問時,助理找到的頁面會傳送給它。`,keyMissing:`還沒有為這個服務儲存 API 金鑰。`,checking:`正在檢查 {name}…`,checkOk:`{name} 有回應,也有 {model}。「測試連線」會實際執行一次模型。`,checkNoModel:`{name} 有回應,但沒有叫 {model} 的模型。請檢查模型名稱。`,checkFailed:`沒能讀取 {name} 的模型:{message}`,test:`測試連線`,testing:`測試中…`,testOk:`已連線到 {model},耗時 {ms} 毫秒。`,testFailed:`無法連線。{message}`,testErrors:{"secret-missing":`服務不接受這個 API 金鑰。檢查金鑰後再測試一次。`,"network-error":`連不上 {address}。檢查位址,以及服務是否在執行。`,"rate-limited":`服務暫時限制了請求,稍後再試。`,"bad-model":`服務上沒有叫 {model} 的模型。檢查模型名稱。`,"bad-endpoint":`{address} 有服務在執行,但不是它的 API 位址。LM Studio 和 Ollama 的位址通常以 /v1 結尾,例如 http://localhost:1234/v1。`,"unsupported-capability":`這個服務不能用在這裡。`,"provider-disabled":`這個服務已關閉。`,other:`服務回傳了錯誤:{message}`},remove:`移除`,removeTitle:`要移除 {name} 嗎?`,removeBody:`這個服務和已儲存的 API 金鑰會從這台電腦移除。你的對話會保留。`,removeFailed:`無法移除這個服務。`,saved:`{name} 已就緒。`,updated:`{name} 已儲存。`,edit:`編輯`,editDialog:{title:`編輯 {name}`,description:`變更 PathKeep 連線到這個服務的方式。`,submit:`儲存`},saveFailed:`無法儲存這個服務。{message}`,selectFailed:`無法更換服務。{message}`,dialog:{title:`新增 AI 服務`,description:`選擇助理要從哪裡取得回答。`,submit:`新增服務`,cancel:`取消`,saving:`正在儲存…`},form:{kind:`服務`,name:`名稱`,namePlaceholder:`選填`,baseUrl:`位址`,model:`模型`,modelPlaceholder:`例如 {example}`,apiKey:`API 金鑰`,apiKeyHint:`儲存在系統鑰匙圈裡,不會寫進 PathKeep 的設定檔。`,apiKeyOptional:`可不填:只有這台電腦上要求金鑰的伺服器才需要。金鑰儲存在系統鑰匙圈裡。`,apiKeyKeep:`留空就保留已儲存的金鑰。`,optionalLater:`之後可以在「設定 → AI」裡完成設定,包括 API 金鑰和連線測試。`},models:{browse:`瀏覽清單`,search:`尋找模型`,empty:`沒有相符的模型。`,loading:`正在讀取服務上的模型…`,found_one:`服務上有 {count} 個模型。選一個,或輸入名稱。`,found_other:`服務上有 {count} 個模型。選一個,或輸入名稱。`,none:`服務上還沒有模型。先在那裡下載或載入一個,或輸入名稱。`,noneFor:{llm:`服務上只有 embedding 模型,沒有聊天模型。如果有,請輸入名稱。`,embedding:`服務上沒有 embedding 模型。LM Studio 和 Ollama 的 embedding 模型名稱通常帶有「embed」。`},failed:`讀不到服務上的模型:{message} 仍然可以輸入名稱。`,loaded:`已載入`,context:`可讀 {size}`,upTo:`最多 {size}`},kinds:{ollama:`Ollama(本機)`,"lm-studio":`LM Studio(本機)`,openai:`OpenAI 或相容服務`,anthropic:`Anthropic`,gemini:`Google Gemini`},defaultName:{ollama:`Ollama`,"lm-studio":`LM Studio`,openai:`OpenAI`,anthropic:`Anthropic`,gemini:`Gemini`}},mcp:{title:`MCP 伺服器`,description:`讓 Claude 等工具讀取你的存檔,唯讀。`,how:`PathKeep 不會一直執行伺服器。需要時,你的工具會用下面的指令自行啟動。這個開關只是允許它這樣做。`,details:`連線資訊`,copy:`複製`,copied:`已複製`,loadFailed:`無法載入連線資訊。`,failed:`無法變更這項設定。{message}`},mcpLog:{title:`其他 App 讀了什麼`,description:`App 透過 MCP 伺服器發出的每個請求:問了什麼、拿到多少。`,label:`透過 MCP 伺服器的請求`,empty:`還沒有 App 來問過。`,loadFailed:`無法載入請求:{message}`,loadingMore:`正在載入更早的請求…`,allShown:`所有請求都在這裡了。`,moreFailed:`載入更早的請求失敗:{message}`,tool:{"search-history":`搜尋了你的歷史`,"archive-status":`查看了存檔狀態`,"usage-guide":`讀了 PathKeep 的用法`,other:`使用了 {tool}`},sent_one:`交出 {count} 頁(符合 {matches} 頁)`,sent_other:`交出 {count} 頁(符合 {matches} 頁)`,matching_one:`符合 {count} 頁`,matching_other:`符合 {count} 頁`,onSite:`限 {site}`,asked:`「{query}」`},rebuild:{title:`重建搜尋索引`,description:`重新讀取你的全部歷史並重建語意索引。期間可以照常使用 PathKeep。`,action:`重建`,needsSemantic:`請先開啟本機語意搜尋。`,dialogTitle:`要重建搜尋索引嗎?`,dialogBody_one:`這會在背景重新索引 {count} 次造訪,期間可以照常使用 PathKeep,進度顯示在這裡。新索引建好之前,搜尋繼續用現有的索引,所以這段時間磁碟上會同時有兩份。你的歷史不會被變更。`,dialogBody_other:`這會在背景重新索引 {count} 次造訪,期間可以照常使用 PathKeep,進度顯示在這裡。新索引建好之前,搜尋繼續用現有的索引,所以這段時間磁碟上會同時有兩份。你的歷史不會被變更。`,dialogBodyUnknown:`這會重新索引你的全部歷史,可能要花一些時間。新索引建好之前,搜尋繼續用現有的索引,所以這段時間磁碟上會同時有兩份。你的歷史不會被變更。`,confirm:`重建`,started:`正在重建搜尋索引。`,failed:`無法開始重建。{message}`},tuning:{title:`搜尋排序`,description:`在「紀錄」中依意思搜尋時,結果如何排序。它會合併兩份清單:文字相符的網頁和意思相近的網頁,再把加星的網頁稍微往前排。`,needsSemantic:`只在開啟本機語意搜尋時使用。現在也可以先設定。`,k:{label:`排名平滑`,help:`每份清單前幾名比其餘結果重要多少。數值越小,最前面的結果越占優勢;越大,兩份清單混合得越平均。`},lexical:{label:`文字相符`,help:`包含你輸入文字的網頁占多少分量。0 表示不計入。`},semantic:{label:`意思相近`,help:`主題相同但不一定含有你輸入文字的網頁占多少分量。0 表示不計入。`},starred:{label:`加星網頁加分`,help:`加星的網頁往前排多少。數值保持得很小,加星的網頁不會壓過明顯更相關的結果。`},range:`預設 {value} · 範圍 {min} 到 {max}`,invalid:`請輸入 {min} 到 {max} 之間的數字。`,save:`儲存`,reset:`恢復預設值`,saved:`搜尋排序已儲存。`}}}),Ce=g({en:{intro:`After each backup PathKeep updates Insights and, if you turned them on, the search index and page summaries. Backups never wait for this work.`,run:{title:`Run background work`,on:`Updates run on their own.`,paused:`Paused. New work waits here until you turn this back on. Backups still run.`,pausedToast:`Background work paused.`,resumedToast:`Background work resumed.`},concurrency:{title:`Tasks at a time`,description:`More finishes sooner but uses more of your computer. Applies to work that starts after you change it.`},state:{queued:`Waiting`,running:`Running`,succeeded:`Done`,failed:`Failed`,cancelled:`Cancelled`,paused:`Paused`,stale:`Interrupted`},job:{allBrowsers:`All browsers`,"visit-derive":`Page details`,"daily-rollup":`Daily totals`,"structural-rebuild":`Sessions and searches`,"full-rebuild":`Everything`,"enrichment-plugin":`Tidy a page title`,"content-fetch":`Page summary`,"index-build":`Build the search index`,"index-clear":`Clear the search index`,assistant:`Assistant answer`,unknown:`Background task`},when:{queued:`Added {when}`,running:`Started {when}`,succeeded:`Finished {when}`,failed:`Failed {when}`,cancelled:`Cancelled {when}`,other:`Updated {when}`},progress:`{current} of {total}`,retry:`Try again`,retryLabel:`Try again: {name}`,cancel:`Cancel`,cancelLabel:`Cancel: {name}`,retried:`Queued again.`,cancelled:`Cancelled.`,stopRequested:`Stopping. It ends as soon as it reaches a safe point.`,actionFailed:`That did not work`,recent:`Recent work`,showAll:`Show all`,showFewer:`Show fewer`,assistantRetired:`Ask no longer answers questions in the background, so this one was never answered. Ask it again in Ask.`,loadingMore:`Loading earlier work…`,allShown:`That’s all the work on record.`,moreFailed:`Couldn’t load earlier work: {message}`,empty:`Nothing has run recently.`,loadFailed:`Could not read this queue. {message}`,counts:{running_one:`{count} running`,running_other:`{count} running`,queued_one:`{count} waiting`,queued_other:`{count} waiting`,failed_one:`{count} failed`,failed_other:`{count} failed`,idle:`Nothing running.`},insights:{title:`Insights and page details`,description:`Works out sessions, searches and daily totals from your history.`,rebuild:`Rebuild`,confirmTitle:`Rebuild Insights?`,confirmBody:`This brings Insights up to date with your whole history, skipping parts that are already current. To start from nothing, clear Insights data below first. It runs in the background; your history is not changed.`,pausedNote:`Background work is paused, so the rebuild waits until you resume it.`,started:`Rebuild queued.`,failed:`Could not start the rebuild`},ai:{title:`Search index and assistant`,description:`Builds the index for searching by meaning and runs assistant questions that were queued.`,off:`Searching by meaning and the assistant are off.`,openAi:`AI settings`,replay:`Run again`,replayLabel:`Run again: {name}`,resume:`Continue`,resumeLabel:`Continue: {name}`,pause:`Pause`,pauseLabel:`Pause: {name}`,pausing:`Pausing. It stops once the visits it is reading now are saved.`,resumed:`Continuing.`,pausedBy:{user:`Paused by you.`,service:`Paused because the service could not run the model: {message}`,queue:`Paused with all background work.`}},summaries:{title:`Page summaries`,off:`Off. Turn on “Page summaries” in General to fetch short summaries of pages you visited.`,openGeneral:`General settings`,stored_one:`{count} page summarized.`,stored_other:`{count} pages summarized.`,fetch:`Fetch now`,fetchHint:`Queues your starred, recent and most-visited pages that have no summary yet, or one an older version of PathKeep made.`,queued_one:`{count} page queued.`,queued_other:`{count} pages queued.`,nothingToFetch:`Nothing to fetch: those pages already have a summary or were tried recently.`,fetchFailed:`Could not queue pages`,loadFailed:`Could not read page summary status.`},previews:{title:`Link previews`,off:`Off. Turn on “Link previews” in General to show the picture a page offers for sharing.`,coverage:`{withImage} of {eligible} pages have a preview image. {checked} checked so far.`,coverageLoading:`Counting pages…`,coverageFailed:`Could not count pages.`,mode:{label:`When to fetch`,on_demand:`When shown`,background:`After each backup`},keep:{label:`Keep images`,off:`Until cleared`,days30:`For 30 days`,days90:`For 90 days`,size100:`Up to 100 MB`,size500:`Up to 500 MB`,custom:`Custom`},clean:`Clean up now`,cleanTitle:`Clean up link previews?`,cleanBody:`Removes the saved preview images the “Keep images” rule ({rule}) no longer allows, and images no page uses. They are downloaded again if a page shows them. Your history is not touched.`,cleanHint:`Removes images the “Keep images” rule no longer allows.`,cleaned_one:`Removed {count} image and freed {size}.`,cleaned_other:`Removed {count} images and freed {size}.`,cleanFailed:`Could not clean up link previews`},data:{group:`Search and Insights data`,note:`Worked out from your history. You can clear it and build it again at any time; your history is never touched.`,title:`Insights data`,description:`Each part, its version and when it was last built.`,module:{"visit-derived-facts":`Page details`,"daily-rollups":`Daily totals`,sessions:`Sessions`,"search-trails":`Searches`,"refind-pages":`Pages you come back to`,"activity-mix":`Activity mix`,"search-effectiveness":`Search results that worked`,"domain-deep-dive":`Site details`},status:{ready:`Up to date`,stale:`Out of date`,idle:`Not built yet`,disabled:`Off`,running:`Updating`,failed:`Failed`},version:`Version {version}`,builtAt:`Built {when}`,stale:{"module-version-changed":`PathKeep was updated since this was built.`,"missing-build-timestamp":`The last build did not finish cleanly.`,"archive-data-changed":`New history arrived since this was built.`,"visibility-or-rollback-changed":`Visits were hidden or brought back since this was built.`,"first-build-running":`The first build hasn’t finished; the numbers so far cover only the browsers done.`},plugins:{title:`Extra page details`,description:`Details added to pages after a backup. Stored separately from your history.`,"title-normalization":`Tidy page titles`,"readable-content-refetch":`Page summaries`,stored_one:`{count} page`,stored_other:`{count} pages`,off:`Off`,lastRun:`Last ran {when}`,neverRun:`Has not run yet`,lastError:`Last problem: {message}`},clear:`Clear…`,clearBusy:`Wait for the running rebuild to finish first.`,clearTitle:`Clear Insights data?`,clearBody:`PathKeep deletes the data it worked out for Insights. Insights stay empty until they are built again, when you rebuild them or the next time PathKeep opens.`,clearCounting:`Counting what will be removed…`,clearCountFailed:`Could not count what will be removed. {message}`,clearWill:`Removes:`,clearRows:{visits_one:`Details for {count} visit`,visits_other:`Details for {count} visits`,daily_one:`{count} daily total`,daily_other:`{count} daily totals`,structural_one:`{count} session, search and revisit record`,structural_other:`{count} session, search and revisit records`,runtime_one:`{count} rebuild record or saved view`,runtime_other:`{count} rebuild records and saved views`},clearNothing:`There is nothing to clear right now.`,clearKeeps:`Kept: your history, stars, notes, the search index, page summaries and link previews.`,clearConfirm:`Clear`,cleared:`Insights data cleared. Insights are empty until they are built again.`,rebuildNow:`Rebuild now`,clearFailed:`Could not clear Insights data`}},"zh-CN":{intro:`每次备份后,PathKeep 会更新洞察;如果你开启了,也会更新搜索索引和网页摘要。备份从不等这些工作完成。`,run:{title:`运行后台任务`,on:`更新会自动进行。`,paused:`已暂停。新任务会在这里等候,直到你重新开启。备份照常进行。`,pausedToast:`后台任务已暂停。`,resumedToast:`后台任务已恢复。`},concurrency:{title:`同时运行的任务数`,description:`数量越多完成越快,但会占用更多电脑资源。修改后对之后开始的任务生效。`},state:{queued:`等待中`,running:`运行中`,succeeded:`已完成`,failed:`失败`,cancelled:`已取消`,paused:`已暂停`,stale:`已中断`},job:{allBrowsers:`所有浏览器`,"visit-derive":`网页细节`,"daily-rollup":`每日统计`,"structural-rebuild":`浏览段落与搜索`,"full-rebuild":`全部`,"enrichment-plugin":`整理网页标题`,"content-fetch":`网页摘要`,"index-build":`建立搜索索引`,"index-clear":`清除搜索索引`,assistant:`助手回答`,unknown:`后台任务`},when:{queued:`{when}加入`,running:`{when}开始`,succeeded:`{when}完成`,failed:`{when}失败`,cancelled:`{when}取消`,other:`{when}更新`},progress:`{current} / {total}`,retry:`重试`,retryLabel:`重试:{name}`,cancel:`取消`,cancelLabel:`取消:{name}`,retried:`已重新排队。`,cancelled:`已取消。`,stopRequested:`正在停止,到达安全的停止点就会结束。`,actionFailed:`操作没有成功`,recent:`最近的任务`,showAll:`显示全部`,showFewer:`收起`,assistantRetired:`Ask 已经不在后台回答问题,所以这个问题没有被回答。请在 Ask 里再问一次。`,loadingMore:`正在载入更早的任务…`,allShown:`所有任务记录都在这里了。`,moreFailed:`载入更早的任务失败:{message}`,empty:`最近没有运行任何任务。`,loadFailed:`无法读取这个队列。{message}`,counts:{running_one:`{count} 项运行中`,running_other:`{count} 项运行中`,queued_one:`{count} 项等待中`,queued_other:`{count} 项等待中`,failed_one:`{count} 项失败`,failed_other:`{count} 项失败`,idle:`没有正在运行的任务。`},insights:{title:`洞察与网页细节`,description:`从你的历史记录中整理出浏览段落、搜索和每日统计。`,rebuild:`重建`,confirmTitle:`重建洞察?`,confirmBody:`这会让洞察跟上你的全部历史记录,已经是最新的部分会跳过。若要从头计算,请先清除下方的洞察数据。它在后台运行,你的历史记录不会被改动。`,pausedNote:`后台任务已暂停,重建会等到你恢复后才开始。`,started:`重建已加入队列。`,failed:`无法开始重建`},ai:{title:`搜索索引与助手`,description:`建立按意思搜索用的索引,并运行排队中的助手问题。`,off:`按意思搜索和助手都已关闭。`,openAi:`AI 设置`,replay:`再运行一次`,replayLabel:`再运行一次:{name}`,resume:`继续`,resumeLabel:`继续:{name}`,pause:`暂停`,pauseLabel:`暂停:{name}`,pausing:`正在暂停,正在读取的这批访问记录存好后就会停下。`,resumed:`继续进行。`,pausedBy:{user:`你暂停了它。`,service:`服务没能运行模型,已暂停:{message}`,queue:`随所有后台任务一起暂停。`}},summaries:{title:`网页摘要`,off:`已关闭。在“通用”中开启“网页摘要”,即可抓取你访问过网页的简短摘要。`,openGeneral:`通用设置`,stored_one:`已为 {count} 个网页生成摘要。`,stored_other:`已为 {count} 个网页生成摘要。`,fetch:`立即抓取`,fetchHint:`把还没有摘要、或摘要由旧版 PathKeep 生成的加星、最近访问和最常访问的网页加入队列。`,queued_one:`已将 {count} 个网页加入队列。`,queued_other:`已将 {count} 个网页加入队列。`,nothingToFetch:`没有需要抓取的网页:它们已有摘要,或最近已经尝试过。`,fetchFailed:`无法将网页加入队列`,loadFailed:`无法读取网页摘要状态。`},previews:{title:`链接预览`,off:`已关闭。在“通用”中开启“链接预览”,即可显示网页提供的分享图片。`,coverage:`{eligible} 个网页中有 {withImage} 个有预览图。目前已检查 {checked} 个。`,coverageLoading:`正在统计网页…`,coverageFailed:`无法统计网页。`,mode:{label:`何时抓取`,on_demand:`显示时`,background:`每次备份后`},keep:{label:`保留图片`,off:`直到清除`,days30:`30 天`,days90:`90 天`,size100:`最多 100 MB`,size500:`最多 500 MB`,custom:`自定义`},clean:`立即清理`,cleanTitle:`清理链接预览?`,cleanBody:`删除“保留图片”规则({rule})已不允许保留的预览图,以及没有网页使用的图片。网页再次显示时会重新下载。你的历史记录不会被改动。`,cleanHint:`删除“保留图片”规则已不允许保留的图片。`,cleaned_one:`已删除 {count} 张图片,释放 {size}。`,cleaned_other:`已删除 {count} 张图片,释放 {size}。`,cleanFailed:`无法清理链接预览`},data:{group:`搜索与洞察数据`,note:`这些数据是从你的历史记录中计算出来的,随时可以清除并重新建立,你的历史记录不会被改动。`,title:`洞察数据`,description:`每个部分的版本,以及上次建立的时间。`,module:{"visit-derived-facts":`网页细节`,"daily-rollups":`每日统计`,sessions:`浏览段落`,"search-trails":`搜索`,"refind-pages":`经常回来的网页`,"activity-mix":`活动组成`,"search-effectiveness":`有用的搜索结果`,"domain-deep-dive":`网站细节`},status:{ready:`最新`,stale:`已过期`,idle:`尚未建立`,disabled:`已关闭`,running:`更新中`,failed:`失败`},version:`版本 {version}`,builtAt:`{when}建立`,stale:{"module-version-changed":`建立之后 PathKeep 已更新。`,"missing-build-timestamp":`上次建立没有顺利完成。`,"archive-data-changed":`建立之后有新的历史记录。`,"visibility-or-rollback-changed":`建立之后有访问记录被隐藏或恢复。`,"first-build-running":`第一次计算还没完成,现在的数字只涵盖已算好的浏览器。`},plugins:{title:`额外的网页信息`,description:`备份后为网页补充的信息,与你的历史记录分开存放。`,"title-normalization":`整理网页标题`,"readable-content-refetch":`网页摘要`,stored_one:`{count} 个网页`,stored_other:`{count} 个网页`,off:`已关闭`,lastRun:`{when}运行`,neverRun:`尚未运行`,lastError:`上次的问题:{message}`},clear:`清除…`,clearBusy:`请先等正在运行的重建完成。`,clearTitle:`清除洞察数据?`,clearBody:`PathKeep 会删除为洞察计算出来的数据。在重新建立之前(你点“重建”,或下次打开 PathKeep 时),洞察会是空的。`,clearCounting:`正在统计将删除的内容…`,clearCountFailed:`无法统计将删除的内容。{message}`,clearWill:`将删除:`,clearRows:{visits_one:`{count} 次访问的细节`,visits_other:`{count} 次访问的细节`,daily_one:`{count} 条每日统计`,daily_other:`{count} 条每日统计`,structural_one:`{count} 条浏览段落、搜索与回访记录`,structural_other:`{count} 条浏览段落、搜索与回访记录`,runtime_one:`{count} 条重建记录与保存的视图`,runtime_other:`{count} 条重建记录与保存的视图`},clearNothing:`目前没有可清除的内容。`,clearKeeps:`会保留:你的历史记录、加星、笔记、搜索索引、网页摘要和链接预览。`,clearConfirm:`清除`,cleared:`洞察数据已清除。重新建立之前洞察会是空的。`,rebuildNow:`立即重建`,clearFailed:`无法清除洞察数据`}},"zh-TW":{intro:`每次備份後,PathKeep 會更新洞察;如果你開啟了,也會更新搜尋索引和網頁摘要。備份從不等這些工作完成。`,run:{title:`執行背景工作`,on:`更新會自動進行。`,paused:`已暫停。新工作會在這裡等候,直到你重新開啟。備份照常進行。`,pausedToast:`背景工作已暫停。`,resumedToast:`背景工作已恢復。`},concurrency:{title:`同時執行的工作數`,description:`數量越多完成越快,但會占用更多電腦資源。修改後對之後開始的工作生效。`},state:{queued:`等待中`,running:`執行中`,succeeded:`已完成`,failed:`失敗`,cancelled:`已取消`,paused:`已暫停`,stale:`已中斷`},job:{allBrowsers:`所有瀏覽器`,"visit-derive":`網頁細節`,"daily-rollup":`每日統計`,"structural-rebuild":`瀏覽段落與搜尋`,"full-rebuild":`全部`,"enrichment-plugin":`整理網頁標題`,"content-fetch":`網頁摘要`,"index-build":`建立搜尋索引`,"index-clear":`清除搜尋索引`,assistant:`助理回答`,unknown:`背景工作`},when:{queued:`{when}加入`,running:`{when}開始`,succeeded:`{when}完成`,failed:`{when}失敗`,cancelled:`{when}取消`,other:`{when}更新`},progress:`{current} / {total}`,retry:`重試`,retryLabel:`重試:{name}`,cancel:`取消`,cancelLabel:`取消:{name}`,retried:`已重新排隊。`,cancelled:`已取消。`,stopRequested:`正在停止,到達安全的停止點就會結束。`,actionFailed:`操作沒有成功`,recent:`最近的工作`,showAll:`顯示全部`,showFewer:`收起`,assistantRetired:`Ask 已經不在背景回答問題,所以這個問題沒有被回答。請在 Ask 裡再問一次。`,loadingMore:`正在載入更早的工作…`,allShown:`所有工作紀錄都在這裡了。`,moreFailed:`載入更早的工作失敗:{message}`,empty:`最近沒有執行任何工作。`,loadFailed:`無法讀取這個佇列。{message}`,counts:{running_one:`{count} 項執行中`,running_other:`{count} 項執行中`,queued_one:`{count} 項等待中`,queued_other:`{count} 項等待中`,failed_one:`{count} 項失敗`,failed_other:`{count} 項失敗`,idle:`沒有正在執行的工作。`},insights:{title:`洞察與網頁細節`,description:`從你的歷史紀錄中整理出瀏覽段落、搜尋和每日統計。`,rebuild:`重建`,confirmTitle:`重建洞察?`,confirmBody:`這會讓洞察跟上你的全部歷史紀錄,已經是最新的部分會略過。若要從頭計算,請先清除下方的洞察資料。它在背景執行,你的歷史紀錄不會被改動。`,pausedNote:`背景工作已暫停,重建會等到你恢復後才開始。`,started:`重建已加入佇列。`,failed:`無法開始重建`},ai:{title:`搜尋索引與助理`,description:`建立依意思搜尋用的索引,並執行排隊中的助理問題。`,off:`依意思搜尋和助理都已關閉。`,openAi:`AI 設定`,replay:`再執行一次`,replayLabel:`再執行一次:{name}`,resume:`繼續`,resumeLabel:`繼續:{name}`,pause:`暫停`,pauseLabel:`暫停:{name}`,pausing:`正在暫停,正在讀取的這批造訪存好後就會停下。`,resumed:`繼續進行。`,pausedBy:{user:`你暫停了它。`,service:`服務沒能執行模型,已暫停:{message}`,queue:`隨所有背景工作一起暫停。`}},summaries:{title:`網頁摘要`,off:`已關閉。在「一般」中開啟「網頁摘要」,即可抓取你造訪過網頁的簡短摘要。`,openGeneral:`一般設定`,stored_one:`已為 {count} 個網頁產生摘要。`,stored_other:`已為 {count} 個網頁產生摘要。`,fetch:`立即抓取`,fetchHint:`把還沒有摘要、或摘要由舊版 PathKeep 產生的加星、最近造訪和最常造訪的網頁加入佇列。`,queued_one:`已將 {count} 個網頁加入佇列。`,queued_other:`已將 {count} 個網頁加入佇列。`,nothingToFetch:`沒有需要抓取的網頁:它們已有摘要,或最近已經嘗試過。`,fetchFailed:`無法將網頁加入佇列`,loadFailed:`無法讀取網頁摘要狀態。`},previews:{title:`連結預覽`,off:`已關閉。在「一般」中開啟「連結預覽」,即可顯示網頁提供的分享圖片。`,coverage:`{eligible} 個網頁中有 {withImage} 個有預覽圖。目前已檢查 {checked} 個。`,coverageLoading:`正在統計網頁…`,coverageFailed:`無法統計網頁。`,mode:{label:`何時抓取`,on_demand:`顯示時`,background:`每次備份後`},keep:{label:`保留圖片`,off:`直到清除`,days30:`30 天`,days90:`90 天`,size100:`最多 100 MB`,size500:`最多 500 MB`,custom:`自訂`},clean:`立即清理`,cleanTitle:`清理連結預覽?`,cleanBody:`刪除「保留圖片」規則({rule})已不允許保留的預覽圖,以及沒有網頁使用的圖片。網頁再次顯示時會重新下載。你的歷史紀錄不會被改動。`,cleanHint:`刪除「保留圖片」規則已不允許保留的圖片。`,cleaned_one:`已刪除 {count} 張圖片,釋放 {size}。`,cleaned_other:`已刪除 {count} 張圖片,釋放 {size}。`,cleanFailed:`無法清理連結預覽`},data:{group:`搜尋與洞察資料`,note:`這些資料是從你的歷史紀錄中計算出來的,隨時可以清除並重新建立,你的歷史紀錄不會被改動。`,title:`洞察資料`,description:`每個部分的版本,以及上次建立的時間。`,module:{"visit-derived-facts":`網頁細節`,"daily-rollups":`每日統計`,sessions:`瀏覽段落`,"search-trails":`搜尋`,"refind-pages":`常回來的網頁`,"activity-mix":`活動組成`,"search-effectiveness":`有用的搜尋結果`,"domain-deep-dive":`網站細節`},status:{ready:`最新`,stale:`已過期`,idle:`尚未建立`,disabled:`已關閉`,running:`更新中`,failed:`失敗`},version:`版本 {version}`,builtAt:`{when}建立`,stale:{"module-version-changed":`建立之後 PathKeep 已更新。`,"missing-build-timestamp":`上次建立沒有順利完成。`,"archive-data-changed":`建立之後有新的歷史紀錄。`,"visibility-or-rollback-changed":`建立之後有造訪紀錄被隱藏或恢復。`,"first-build-running":`第一次計算還沒完成,現在的數字只涵蓋已算好的瀏覽器。`},plugins:{title:`額外的網頁資訊`,description:`備份後為網頁補充的資訊,與你的歷史紀錄分開存放。`,"title-normalization":`整理網頁標題`,"readable-content-refetch":`網頁摘要`,stored_one:`{count} 個網頁`,stored_other:`{count} 個網頁`,off:`已關閉`,lastRun:`{when}執行`,neverRun:`尚未執行`,lastError:`上次的問題:{message}`},clear:`清除…`,clearBusy:`請先等正在執行的重建完成。`,clearTitle:`清除洞察資料?`,clearBody:`PathKeep 會刪除為洞察計算出來的資料。在重新建立之前(你按「重建」,或下次打開 PathKeep 時),洞察會是空的。`,clearCounting:`正在統計將刪除的內容…`,clearCountFailed:`無法統計將刪除的內容。{message}`,clearWill:`將刪除:`,clearRows:{visits_one:`{count} 次造訪的細節`,visits_other:`{count} 次造訪的細節`,daily_one:`{count} 筆每日統計`,daily_other:`{count} 筆每日統計`,structural_one:`{count} 筆瀏覽段落、搜尋與回訪紀錄`,structural_other:`{count} 筆瀏覽段落、搜尋與回訪紀錄`,runtime_one:`{count} 筆重建紀錄與儲存的檢視`,runtime_other:`{count} 筆重建紀錄與儲存的檢視`},clearNothing:`目前沒有可清除的內容。`,clearKeeps:`會保留:你的歷史紀錄、加星、筆記、搜尋索引、網頁摘要和連結預覽。`,clearConfirm:`清除`,cleared:`洞察資料已清除。重新建立之前洞察會是空的。`,rebuildNow:`立即重建`,clearFailed:`無法清除洞察資料`}}}),we=g({en:{moveGroup:`Move and restore`,location:{title:`Archive location`,showFinder:`Show in Finder`,show:`Show in folder`,failed:`Could not open the folder`},usage:{title:`Disk usage`,archive:`Archive`,indexes:`Search indexes`,snapshots:`Snapshots`,other:`Other`,failed:`Could not measure disk usage right now.`},freeSpace:{rowTitle:`Free up space`,rowDescription:`Delete old snapshots, exports and leftovers. Your history stays.`,action:`Review…`,title:`Free up space`,intro:`Pick what to delete. Your history is not on this list.`,loadFailed:`Could not check what can be deleted. {message}`,nothing:`Nothing to clean up right now.`,bucket:{snapshots:{title:`Snapshots`,description:`Copies of browser history and safety copies made before big changes.`},exports:{title:`Exports`,description:`Files you exported earlier.`},staging:{title:`Temporary files`,description:`Left over from backups and imports.`},quarantine:{title:`Set-aside files`,description:`Files PathKeep moved aside during a restore or repair.`}},snapshotWarning:`Deleting snapshots also deletes the safety copies you could restore from.`,delete:`Delete {size}`,done:`Freed {size}.`,failed:`Nothing was deleted. {message}`},previews:{title:`Link preview images`,description_one:`{count} image, {size}`,description_other:`{count} images, {size}`,statsFailed:`Could not measure the preview images.`,action:`Clear…`,confirmTitle:`Delete all link preview images?`,confirmBody_one:`{count} image ({size}) is deleted. PathKeep downloads previews again only if link previews are on.`,confirmBody_other:`{count} images ({size}) are deleted. PathKeep downloads previews again only if link previews are on.`,cleared:`Freed {size}.`,clearFailed:`Could not delete the preview images`},export:{title:`Export history`,description:`Save your whole history as one file`,format:`Export format`,formats:{html:`HTML`,markdown:`Markdown`,text:`Plain text`,jsonl:`JSON Lines`},action:`Export…`,stop:`Stop`,stopping:`Stopping…`,cancelled:`Export stopped. No file was saved.`,progressLabel:`Export progress`,progress:`{written} of about {total} visits · {size}`,progressNoTotal:`{written} visits · {size}`,finishing:`Saving the file…`,leftUnderMinute:`Less than a minute left`,left_one:`About {count} minute left`,left_other:`About {count} minutes left`,done_one:`Exported {count} visit.`,done_other:`Exported {count} visits.`,failed:`Export failed`},move:{title:`Move to another computer`,description:`Pack everything into one file, or open a file made on another computer.`,exportAction:`Export…`,importAction:`Import…`,choose:`Choose…`,exportTitle:`Pack PathKeep into one file`,exportIntro:`The file holds your history, where each visit came from, your Ask chats and your settings, encrypted with a password you choose here. Search and Insights are rebuilt on the other computer.`,saveTo:`Save to`,exportPassword:`Password for this file`,exportPasswordConfirm:`Type it again`,exportPasswordHint:`You’ll need it to open the file on the other computer, where it becomes the archive’s password. It can’t be recovered.`,passwordsDiffer:`The two passwords don’t match.`,stays:`Your app passcode and the backup schedule stay on this computer.`,export:`Export`,exported:`Saved {size}.`,exportFailed:`Could not write the file. {message}`,importTitle:`Open a PathKeep file`,importIntro:`PathKeep checks the file first and shows what is in it. Nothing changes until you confirm.`,file:`File`,check:`Check file`,checkFailed:`This file can’t be used. {message}`,sourcePassword:`Password of this file`,oldPasswordHint:`This file was made by PathKeep 0.3: its password is the archive password you used on that computer.`,wrongPassword:`That password doesn’t open this file.`,replaces:`This replaces the archive on this computer. The current one is kept next to it as a backup folder.`,replace:`Replace my archive`,import:`Import`,imported:`Import finished.`,importFailed:`Import failed. Your archive was not changed. {message}`,summary:{made:`Made`,version:`PathKeep version`,encrypted:`Encrypted`,yes:`Yes`,no:`No`,size:`Size`,upgrade:`It was made by an older PathKeep and will be updated as it opens.`,noChats:`Files from PathKeep 0.3 don’t include Ask chats; they stay on the other computer.`}},restore:{rowTitle:`Restore from a safety copy`,rowDescription:`PathKeep keeps a copy before risky changes like a new password`,action:`Choose…`,title:`Restore from a safety copy`,intro:`Your archive goes back to how it was when the copy was made.`,loadFailed:`Could not list the safety copies. {message}`,empty:`There are no safety copies yet.`,op:{rekey:`Before a password change`,reconcile:`Before an encryption repair`,import:`Before an import`,periodic:`Regular copy`,unknown:`Safety copy`},password:`Password of this copy`,warning:`Anything added since then is not in the copy. Your current archive is moved aside, not deleted.`,confirm:`Restore`,done:`Archive restored.`,failed:`The restore did not finish. {message}`},wipe:{rowTitle:`Delete all data`,rowDescription:`Archive, indexes, snapshots and exports are removed. This cannot be undone.`,action:`Delete…`,title:`Delete all data?`,intro:`PathKeep removes everything it stored and starts over.`,previewFailed:`Could not check what would be deleted. {message}`,summary:`{visits} and {size} of files will be deleted:`,keychain:`The archive password saved in the keychain is removed too.`,schedule:`Automatic backup is turned off and removed from the system:`,final:`This cannot be undone. Export or move your data first if you might want it.`,scheduleFailed:`Your data is deleted, but automatic backup could not be removed. {message} Turn it off in Backup after setup.`,typeWord:`Type {word} to confirm`,confirm:`Delete forever`,failed:`Nothing was deleted. {message}`}},"zh-CN":{moveGroup:`迁移与恢复`,location:{title:`存档位置`,showFinder:`在访达中显示`,show:`在文件夹中显示`,failed:`无法打开文件夹`},usage:{title:`磁盘用量`,archive:`存档`,indexes:`搜索索引`,snapshots:`快照`,other:`其他`,failed:`暂时无法计算磁盘用量。`},freeSpace:{rowTitle:`释放空间`,rowDescription:`删除旧快照、导出文件和残留文件。你的历史不受影响。`,action:`查看…`,title:`释放空间`,intro:`选择要删除的内容。你的历史不在这个列表里。`,loadFailed:`无法检查可以删除的内容。{message}`,nothing:`现在没有需要清理的内容。`,bucket:{snapshots:{title:`快照`,description:`浏览器历史的副本,以及重大更改前保存的安全副本。`},exports:{title:`导出文件`,description:`你之前导出的文件。`},staging:{title:`临时文件`,description:`备份和导入时留下的文件。`},quarantine:{title:`移到一边的文件`,description:`PathKeep 在恢复或修复时移到一边的文件。`}},snapshotWarning:`删除快照也会删除可以用来恢复的安全副本。`,delete:`删除 {size}`,done:`已释放 {size}。`,failed:`没有删除任何内容。{message}`},previews:{title:`链接预览图`,description_one:`{count} 张图片,{size}`,description_other:`{count} 张图片,{size}`,statsFailed:`无法计算预览图占用的空间。`,action:`清除…`,confirmTitle:`要删除所有链接预览图吗?`,confirmBody_one:`将删除 {count} 张图片({size})。只有开启链接预览时,PathKeep 才会重新下载。`,confirmBody_other:`将删除 {count} 张图片({size})。只有开启链接预览时,PathKeep 才会重新下载。`,cleared:`已释放 {size}。`,clearFailed:`无法删除预览图`},export:{title:`导出历史`,description:`把你的全部历史保存为一个文件`,format:`导出格式`,formats:{html:`HTML`,markdown:`Markdown`,text:`纯文本`,jsonl:`JSON Lines`},action:`导出…`,stop:`停止`,stopping:`正在停止…`,cancelled:`导出已停止,没有保存文件。`,progressLabel:`导出进度`,progress:`已写入 {written} / 约 {total} 条记录 · {size}`,progressNoTotal:`已写入 {written} 条记录 · {size}`,finishing:`正在保存文件…`,leftUnderMinute:`剩余不到一分钟`,left_one:`大约还要 {count} 分钟`,left_other:`大约还要 {count} 分钟`,done_one:`已导出 {count} 条记录。`,done_other:`已导出 {count} 条记录。`,failed:`导出失败`},move:{title:`迁移到另一台电脑`,description:`把所有内容打包成一个文件,或打开在另一台电脑上制作的文件。`,exportAction:`导出…`,importAction:`导入…`,choose:`选择…`,exportTitle:`把 PathKeep 打包成一个文件`,exportIntro:`文件包含你的历史、每条记录的来源、Ask 对话和设置,并用你在这里设置的密码加密。搜索和智能分析会在另一台电脑上重建。`,saveTo:`保存到`,exportPassword:`文件密码`,exportPasswordConfirm:`再输入一次`,exportPasswordHint:`在另一台电脑上打开文件时需要它,之后它就是那边存档的密码。忘记了就无法找回。`,passwordsDiffer:`两次输入的密码不一致。`,stays:`应用密码和备份计划会留在这台电脑上。`,export:`导出`,exported:`已保存 {size}。`,exportFailed:`无法写入文件。{message}`,importTitle:`打开 PathKeep 文件`,importIntro:`PathKeep 会先检查文件并显示其中的内容。在你确认之前不会有任何改动。`,file:`文件`,check:`检查文件`,checkFailed:`这个文件无法使用。{message}`,sourcePassword:`文件密码`,oldPasswordHint:`这个文件由 PathKeep 0.3 导出:它的密码就是你在那台电脑上用的存档密码。`,wrongPassword:`这个密码打不开这个文件。`,replaces:`这会替换这台电脑上的存档。当前的存档会作为备份文件夹保留在旁边。`,replace:`替换我的存档`,import:`导入`,imported:`导入完成。`,importFailed:`导入失败,你的存档没有改动。{message}`,summary:{made:`制作时间`,version:`PathKeep 版本`,encrypted:`已加密`,yes:`是`,no:`否`,size:`大小`,upgrade:`它由较旧版本的 PathKeep 制作,打开时会自动更新。`,noChats:`PathKeep 0.3 导出的文件不含助理对话;它们仍留在原来的电脑上。`}},restore:{rowTitle:`从安全副本恢复`,rowDescription:`在更改密码等有风险的操作之前,PathKeep 会先保存一份副本`,action:`选择…`,title:`从安全副本恢复`,intro:`你的存档会回到副本保存时的状态。`,loadFailed:`无法列出安全副本。{message}`,empty:`还没有任何安全副本。`,op:{rekey:`更改密码之前`,reconcile:`修复加密之前`,import:`导入之前`,periodic:`定期副本`,unknown:`安全副本`},password:`这份副本的密码`,warning:`之后新增的内容不在副本里。当前的存档会被移到一边,不会删除。`,confirm:`恢复`,done:`存档已恢复。`,failed:`恢复没有完成。{message}`},wipe:{rowTitle:`删除所有数据`,rowDescription:`存档、索引、快照和导出文件都会被删除,无法恢复。`,action:`删除…`,title:`要删除所有数据吗?`,intro:`PathKeep 会删除它保存的一切,然后从头开始。`,previewFailed:`无法检查将被删除的内容。{message}`,summary:`将删除 {visits},共 {size} 的文件:`,keychain:`保存在钥匙串里的存档密码也会被删除。`,schedule:`自动备份也会关闭,并从系统中移除:`,final:`此操作无法撤销。如果以后可能还需要,请先导出或迁移你的数据。`,scheduleFailed:`数据已删除,但自动备份没能移除。{message} 设置完成后,请到「备份」关闭它。`,typeWord:`输入 {word} 以确认`,confirm:`永久删除`,failed:`没有删除任何内容。{message}`}},"zh-TW":{moveGroup:`搬移與還原`,location:{title:`存檔位置`,showFinder:`在 Finder 中顯示`,show:`在資料夾中顯示`,failed:`無法開啟資料夾`},usage:{title:`磁碟用量`,archive:`存檔`,indexes:`搜尋索引`,snapshots:`快照`,other:`其他`,failed:`暫時無法計算磁碟用量。`},freeSpace:{rowTitle:`釋放空間`,rowDescription:`刪除舊快照、匯出檔案和殘留檔案。你的歷史不受影響。`,action:`檢視…`,title:`釋放空間`,intro:`選擇要刪除的內容。你的歷史不在這個清單裡。`,loadFailed:`無法檢查可以刪除的內容。{message}`,nothing:`目前沒有需要清理的內容。`,bucket:{snapshots:{title:`快照`,description:`瀏覽器歷史的副本,以及重大變更前保存的安全副本。`},exports:{title:`匯出檔案`,description:`你之前匯出的檔案。`},staging:{title:`暫存檔案`,description:`備份和匯入時留下的檔案。`},quarantine:{title:`移到一旁的檔案`,description:`PathKeep 在還原或修復時移到一旁的檔案。`}},snapshotWarning:`刪除快照也會刪除可以用來還原的安全副本。`,delete:`刪除 {size}`,done:`已釋放 {size}。`,failed:`沒有刪除任何內容。{message}`},previews:{title:`連結預覽圖`,description_one:`{count} 張圖片,{size}`,description_other:`{count} 張圖片,{size}`,statsFailed:`無法計算預覽圖佔用的空間。`,action:`清除…`,confirmTitle:`要刪除所有連結預覽圖嗎?`,confirmBody_one:`將刪除 {count} 張圖片({size})。只有開啟連結預覽時,PathKeep 才會重新下載。`,confirmBody_other:`將刪除 {count} 張圖片({size})。只有開啟連結預覽時,PathKeep 才會重新下載。`,cleared:`已釋放 {size}。`,clearFailed:`無法刪除預覽圖`},export:{title:`匯出歷史`,description:`把你的全部歷史存成一個檔案`,format:`匯出格式`,formats:{html:`HTML`,markdown:`Markdown`,text:`純文字`,jsonl:`JSON Lines`},action:`匯出…`,stop:`停止`,stopping:`正在停止…`,cancelled:`匯出已停止,沒有儲存檔案。`,progressLabel:`匯出進度`,progress:`已寫入 {written} / 約 {total} 筆記錄 · {size}`,progressNoTotal:`已寫入 {written} 筆記錄 · {size}`,finishing:`正在儲存檔案…`,leftUnderMinute:`剩不到一分鐘`,left_one:`大約還要 {count} 分鐘`,left_other:`大約還要 {count} 分鐘`,done_one:`已匯出 {count} 筆記錄。`,done_other:`已匯出 {count} 筆記錄。`,failed:`匯出失敗`},move:{title:`搬到另一台電腦`,description:`把所有內容打包成一個檔案,或開啟在另一台電腦上製作的檔案。`,exportAction:`匯出…`,importAction:`匯入…`,choose:`選擇…`,exportTitle:`把 PathKeep 打包成一個檔案`,exportIntro:`檔案包含你的歷史、每筆記錄的來源、Ask 對話和設定,並用你在這裡設定的密碼加密。搜尋和智慧分析會在另一台電腦上重建。`,saveTo:`儲存到`,exportPassword:`檔案密碼`,exportPasswordConfirm:`再輸入一次`,exportPasswordHint:`在另一台電腦上開啟檔案時需要它,之後它就是那邊存檔的密碼。忘記了就無法找回。`,passwordsDiffer:`兩次輸入的密碼不一致。`,stays:`App 密碼和備份排程會留在這台電腦上。`,export:`匯出`,exported:`已儲存 {size}。`,exportFailed:`無法寫入檔案。{message}`,importTitle:`開啟 PathKeep 檔案`,importIntro:`PathKeep 會先檢查檔案並顯示其中的內容。在你確認之前不會有任何變動。`,file:`檔案`,check:`檢查檔案`,checkFailed:`這個檔案無法使用。{message}`,sourcePassword:`檔案密碼`,oldPasswordHint:`這個檔案由 PathKeep 0.3 匯出:它的密碼就是你在那台電腦上用的存檔密碼。`,wrongPassword:`這組密碼打不開這個檔案。`,replaces:`這會取代這台電腦上的存檔。目前的存檔會以備份資料夾的形式保留在旁邊。`,replace:`取代我的存檔`,import:`匯入`,imported:`匯入完成。`,importFailed:`匯入失敗,你的存檔沒有變動。{message}`,summary:{made:`製作時間`,version:`PathKeep 版本`,encrypted:`已加密`,yes:`是`,no:`否`,size:`大小`,upgrade:`它由較舊版本的 PathKeep 製作,開啟時會自動更新。`,noChats:`PathKeep 0.3 匯出的檔案不含助理對話;它們仍留在原來的電腦上。`}},restore:{rowTitle:`從安全副本還原`,rowDescription:`在更改密碼等有風險的操作之前,PathKeep 會先保存一份副本`,action:`選擇…`,title:`從安全副本還原`,intro:`你的存檔會回到副本保存時的狀態。`,loadFailed:`無法列出安全副本。{message}`,empty:`還沒有任何安全副本。`,op:{rekey:`更改密碼之前`,reconcile:`修復加密之前`,import:`匯入之前`,periodic:`定期副本`,unknown:`安全副本`},password:`這份副本的密碼`,warning:`之後新增的內容不在副本裡。目前的存檔會被移到一旁,不會刪除。`,confirm:`還原`,done:`存檔已還原。`,failed:`還原沒有完成。{message}`},wipe:{rowTitle:`刪除所有資料`,rowDescription:`存檔、索引、快照和匯出檔案都會被刪除,無法復原。`,action:`刪除…`,title:`要刪除所有資料嗎?`,intro:`PathKeep 會刪除它儲存的一切,然後從頭開始。`,previewFailed:`無法檢查將被刪除的內容。{message}`,summary:`將刪除 {visits},共 {size} 的檔案:`,keychain:`存在鑰匙圈裡的存檔密碼也會被刪除。`,schedule:`自動備份也會關閉,並從系統中移除:`,final:`此操作無法復原。如果之後可能還需要,請先匯出或搬移你的資料。`,scheduleFailed:`資料已刪除,但自動備份沒能移除。{message} 設定完成後,請到「備份」關閉它。`,typeWord:`輸入 {word} 以確認`,confirm:`永久刪除`,failed:`沒有刪除任何內容。{message}`}}}),Te={common:fe,shell:g({en:{nav:{label:`Main navigation`,home:`Home`,history:`History`,insights:`Insights`,ask:`Ask`,backup:`Backup`,settings:`Settings`,palette:`Command palette (⌘K)`,lock:`Lock PathKeep (⌘L)`,language:`Change language`,themeToLight:`Switch to light mode`,themeToDark:`Switch to dark mode`,back:`Back (Alt+←)`,backMac:`Back (⌘[)`,forward:`Forward (Alt+→)`,forwardMac:`Forward (⌘])`},window:{label:`Window`,minimize:`Minimize`,maximize:`Maximize`,restore:`Restore`,close:`Close`},quit:{title:`PathKeep is still working`,body:`If PathKeep quits now, this stops:`,waitingTitle:`PathKeep will quit when this is done`,waitingBody:`You can still quit now or keep PathKeep open. Quitting now stops this:`,doneTitle:`Nothing is running now`,doneBody:`Everything has finished, so quitting won’t stop anything.`,running:`Running now`,wait:`Quit when done`,quitNow:`Quit now`,quit:`Quit`,keepOpen:`Keep PathKeep open`,work:{backup:`Backing up`,"history-export":`Exporting history`,"history-import":`Importing history`,"move-export":`Exporting everything for another computer`,"move-import":`Bringing in a file from another computer`,restore:`Restoring the archive`,"free-up-space":`Freeing up space`,"archive-upgrade":`Upgrading the archive`,"password-change":`Changing the archive password`,"encryption-change":`Changing the archive’s encryption`,"data-wipe":`Deleting all data`,"import-undo":`Undoing or restoring an import`},ifQuit:{backup:`The next backup copies what this one didn’t get to.`,export:`No file is saved. You can export again later.`,import:`What it imported so far stays. Import the same file again to finish.`,archive:`It stops partway without damaging the archive. You can run it again later.`,wipe:`PathKeep finishes deleting the next time it opens.`,undo:`It stops partway. Undo or restore the import again to finish.`}},palette:{placeholder:`Search pages, visits or commands…`,empty:`Nothing matches.`,pages:`Go to`,actions:`Actions`,pageResults:`Pages`,searching:`Searching your archive…`,backupNow:`Back up now`,toggleTheme:`Toggle light / dark`,lock:`Lock PathKeep`,newChat:`New chat`,hintNavigate:`navigate`,hintOpen:`open`},backup:{partial_one:`Backup incomplete · {count} new visit saved`,partial_other:`Backup incomplete · {count} new visits saved`,partialNothingNew:`Backup incomplete · no new visits saved`,now:`Back up now`,running:`Backing up…`,runningDetail:`Backing up {done} of {total} sources`,lastAgo:`Backed up {ago}`,neverRun:`Not backed up yet`,nextAt:`next {time}`,scheduleOff:`automatic backup off`,done_one:`Backup done · {count} new visit`,done_other:`Backup done · {count} new visits`,doneNothingNew:`Backup done · no new visits`,failed:`Backup failed`,warnings_one:`{count} warning: something was left out or didn’t finish.`,warnings_other:`{count} warnings: some things were left out or didn’t finish.`,viewDetails:`Details`,fullDiskAccess:`Safari was skipped because PathKeep does not have Full Disk Access.`,errors:{"backup-no-profiles":`PathKeep found no browser profile on this computer to back up.`}},lock:{appTitle:`PathKeep is locked`,appBody:`Enter your passcode to continue.`,archiveTitle:`Your archive is encrypted`,archiveBody:`Enter the archive password to unlock it.`,passcode:`Passcode`,password:`Password`,unlock:`Unlock`,remember:`Remember in the system keychain`,wrong:`That did not work. Check it and try again.`,unlocking:`Unlocking…`,needsPasscode:`Set a passcode first, then PathKeep can lock.`,touchId:`Unlock with Touch ID`,touchIdUnavailable:`Touch ID isn’t available right now. Use your passcode.`,touchIdFailed:`Touch ID didn’t unlock PathKeep. Use your passcode.`,forgot:`Forgot passcode?`,hint:`Your hint:`,noHint:`No hint was saved with this passcode.`,onlyWindow:`App lock only guards this window. Your archive and its password are not affected.`,turnOff:`To turn it off, quit PathKeep, open config.json in this folder, change "enabled": true under "appLock" to false, and open PathKeep again.`,showFolderMac:`Show in Finder`,showFolder:`Show folder`,showFolderFailed:`Could not open the folder`},boot:{loading:`Opening your archive…`,errorTitle:`PathKeep could not start`,retry:`Try again`,revealLogs:`Show logs`},upgrade:{title:`Updating your archive`,body:`This version keeps your history in a new format. PathKeep copies the archive into it once; you can leave this window open while it works.`,size:`Archive size`,freeSpace:`Free space it needs`,kept:`Your current archive files stay as they are.`,resumable:`If the update stops, it continues where it left off.`,password:`Archive password`,passwordHint:`The password you use to open PathKeep.`,wrongPassword:`That password doesn’t open this archive.`,start:`Update archive`,checking:`Checking the archive…`,locked:{title:`Some files use an earlier password`,body:`Your password opens the archive, but not the files below. They were encrypted with a password you used before; versions before 0.4 changed the password of the archive only. The update can go ahead without them.`,files:{SourceEvidence:`Raw browser records kept with each backup`,Intelligence:`Insights, saved page text and AI indexes`,Agent:`Ask chats`},kept:`These files stay where they are and are not changed. The new archive starts without what they hold.`,back:`Back`,continue:`Update without them`},progress:`{done} of {total}`,schema:{title:`Updating your archive`,body:`This version stores your search index differently, so it updates the archive once. On a large archive this takes a while; if PathKeep is closed, it carries on next time.`},failed:`The update did not finish. Your archive was not changed.`,phases:{storageConversion:`Copying the archive`,contentVerification:`Checking the copy`,schemaMigration:`Updating the archive`,registrableDomainBackfill:`Updating site names`,searchReprojection:`Building the search index`,intelligence:`Preparing Insights`,finalizing:`Finishing`}},recovery:{title:`Your archive will not open`,body:`The archive file looks damaged. PathKeep found verified snapshots you can restore from. Restoring replaces the damaged file; nothing is deleted until you confirm.`,snapshot:`Snapshot from {date}`,restore:`Restore this snapshot`,restoring:`Restoring…`,none:`No snapshots are available. Your archive file is still on disk; see the logs for details.`},error:{route:`This screen hit an error`,reload:`Reload screen`},theme:{light:`Light`,dark:`Dark`,system:`Match system`},crashNotice:`PathKeep closed unexpectedly last time. A crash report was saved.`,revealCrash:`Show report`},"zh-CN":{nav:{label:`主导航`,home:`首页`,history:`记录`,insights:`洞察`,ask:`助理`,backup:`备份`,settings:`设置`,palette:`命令面板(⌘K)`,lock:`锁定 PathKeep(⌘L)`,language:`切换语言`,themeToLight:`切换到浅色`,themeToDark:`切换到深色`,back:`上一页(Alt+←)`,backMac:`上一页(⌘[)`,forward:`下一页(Alt+→)`,forwardMac:`下一页(⌘])`},window:{label:`窗口`,minimize:`最小化`,maximize:`最大化`,restore:`还原`,close:`关闭`},quit:{title:`PathKeep 还有工作没做完`,body:`现在退出的话,下面这些会停下来:`,waitingTitle:`做完就退出 PathKeep`,waitingBody:`也可以现在就退出,或者不退出。现在退出的话,下面这些会停下来:`,doneTitle:`工作都做完了`,doneBody:`现在退出不会中断任何工作。`,running:`正在进行`,wait:`做完再退出`,quitNow:`现在退出`,quit:`退出`,keepOpen:`不退出`,work:{backup:`正在备份`,"history-export":`正在导出历史`,"history-import":`正在导入历史`,"move-export":`正在打包所有内容,准备迁移到另一台电脑`,"move-import":`正在打开另一台电脑上制作的文件`,restore:`正在还原存档`,"free-up-space":`正在释放空间`,"archive-upgrade":`正在升级存档`,"password-change":`正在更改存档密码`,"encryption-change":`正在更改存档加密`,"data-wipe":`正在删除所有数据`,"import-undo":`正在撤销或恢复一次导入`},ifQuit:{backup:`下次备份会补上这次没做完的部分。`,export:`不会保存文件,之后可以再导出一次。`,import:`已经导入的会保留,之后再导入同一个文件就能做完。`,archive:`会停在中途,但存档不会损坏,之后可以再做一次。`,wipe:`下次打开 PathKeep 时会把删除做完。`,undo:`会停在中途,之后再撤销或恢复这次导入一次就能做完。`}},palette:{placeholder:`搜索页面、记录或命令…`,empty:`没有匹配的结果。`,pages:`前往`,actions:`操作`,pageResults:`页面`,searching:`正在搜索存档…`,backupNow:`立即备份`,toggleTheme:`切换深浅色`,lock:`锁定 PathKeep`,newChat:`新对话`,hintNavigate:`选择`,hintOpen:`打开`},backup:{partial_one:`备份未完成,已保存 {count} 条新记录`,partial_other:`备份未完成,已保存 {count} 条新记录`,partialNothingNew:`备份未完成,未新增访问记录`,now:`立即备份`,running:`备份中…`,runningDetail:`正在备份第 {done} / {total} 个来源`,lastAgo:`{ago}已备份`,neverRun:`还没有备份过`,nextAt:`下次 {time}`,scheduleOff:`自动备份已关闭`,done_one:`备份完成,新增 {count} 条记录`,done_other:`备份完成,新增 {count} 条记录`,doneNothingNew:`备份完成,没有新增访问记录`,failed:`备份失败`,warnings_one:`{count} 条警告:有内容被跳过或没有完成。`,warnings_other:`{count} 条警告:有内容被跳过或没有完成。`,viewDetails:`详情`,fullDiskAccess:`Safari 已跳过:PathKeep 没有完全磁盘访问权限。`,errors:{"backup-no-profiles":`PathKeep 在这台电脑上找不到可以备份的浏览器配置文件。`}},lock:{appTitle:`PathKeep 已锁定`,appBody:`输入密码继续。`,archiveTitle:`存档已加密`,archiveBody:`输入存档密码解锁。`,passcode:`密码`,password:`密码`,unlock:`解锁`,remember:`保存到系统钥匙串`,wrong:`密码不对,请检查后重试。`,unlocking:`正在解锁…`,needsPasscode:`先设置一个密码,PathKeep 才能锁定。`,touchId:`用触控 ID 解锁`,touchIdUnavailable:`触控 ID 现在用不了,请输入密码。`,touchIdFailed:`触控 ID 没能解锁 PathKeep,请输入密码。`,forgot:`忘记密码?`,hint:`你的提示:`,noHint:`这个密码没有保存提示。`,onlyWindow:`应用锁只挡住这个窗口,你的存档和存档密码不受影响。`,turnOff:`要关闭应用锁:退出 PathKeep,打开这个文件夹里的 config.json,把 "appLock" 下的 "enabled": true 改成 false,再重新打开 PathKeep。`,showFolderMac:`在访达中显示`,showFolder:`打开文件夹`,showFolderFailed:`无法打开文件夹`},boot:{loading:`正在打开存档…`,errorTitle:`PathKeep 无法启动`,retry:`重试`,revealLogs:`查看日志`},upgrade:{title:`正在更新存档`,body:`新版本用新的格式保存历史。PathKeep 会把存档复制成新格式一次,过程中可以放着这个窗口不管。`,size:`存档大小`,freeSpace:`需要的可用空间`,kept:`现有的存档文件会原样保留。`,resumable:`如果中途停止,下次会从停下的地方继续。`,password:`存档密码`,passwordHint:`就是你打开 PathKeep 时用的密码。`,wrongPassword:`这个密码打不开这个存档。`,start:`更新存档`,checking:`正在检查存档…`,locked:{title:`有些文件用的是以前的密码`,body:`你的密码能打开存档,但打不开下面这些文件。它们是用你以前用过的密码加密的:0.4 之前的版本改密码时只改了存档本身。更新可以不带上它们继续。`,files:{SourceEvidence:`每次备份时保留的浏览器原始记录`,Intelligence:`洞察、保存的网页正文和 AI 索引`,Agent:`助理对话`},kept:`这些文件会原样留在原处,不会被改动。新存档里不会有它们的内容。`,back:`返回`,continue:`不带上它们,继续更新`},progress:`{done} / {total}`,schema:{title:`正在更新存档`,body:`这个版本用不同的方式保存搜索索引,所以会更新一次存档。存档很大时需要一段时间;如果关掉 PathKeep,下次打开会接着做。`},failed:`更新没有完成,存档没有被改动。`,phases:{storageConversion:`正在复制存档`,contentVerification:`正在检查副本`,schemaMigration:`正在更新存档`,registrableDomainBackfill:`正在更新网站名称`,searchReprojection:`正在建立搜索索引`,intelligence:`正在准备智能分析`,finalizing:`即将完成`}},recovery:{title:`存档打不开`,body:`存档文件看起来已损坏。PathKeep 找到了可以恢复的已验证快照。恢复会替换损坏的文件,确认之前什么都不会被删除。`,snapshot:`{date} 的快照`,restore:`恢复这个快照`,restoring:`正在恢复…`,none:`没有可用的快照。存档文件仍在磁盘上,详情请看日志。`},error:{route:`这个页面出错了`,reload:`重新加载`},theme:{light:`浅色`,dark:`深色`,system:`跟随系统`},crashNotice:`PathKeep 上次意外退出,已保存崩溃报告。`,revealCrash:`查看报告`},"zh-TW":{nav:{label:`主導覽`,home:`首頁`,history:`紀錄`,insights:`洞察`,ask:`助理`,backup:`備份`,settings:`設定`,palette:`指令面板(⌘K)`,lock:`鎖定 PathKeep(⌘L)`,language:`切換語言`,themeToLight:`切換到淺色`,themeToDark:`切換到深色`,back:`上一頁(Alt+←)`,backMac:`上一頁(⌘[)`,forward:`下一頁(Alt+→)`,forwardMac:`下一頁(⌘])`},window:{label:`視窗`,minimize:`最小化`,maximize:`最大化`,restore:`還原`,close:`關閉`},quit:{title:`PathKeep 還有工作沒做完`,body:`現在結束的話,下面這些會停下來:`,waitingTitle:`做完就結束 PathKeep`,waitingBody:`也可以現在就結束,或是不結束。現在結束的話,下面這些會停下來:`,doneTitle:`工作都做完了`,doneBody:`現在結束不會中斷任何工作。`,running:`正在進行`,wait:`做完再結束`,quitNow:`現在結束`,quit:`結束`,keepOpen:`不結束`,work:{backup:`正在備份`,"history-export":`正在匯出歷史紀錄`,"history-import":`正在匯入歷史紀錄`,"move-export":`正在打包所有內容,準備搬到另一台電腦`,"move-import":`正在打開另一台電腦上製作的檔案`,restore:`正在還原存檔`,"free-up-space":`正在釋放空間`,"archive-upgrade":`正在升級存檔`,"password-change":`正在更改存檔密碼`,"encryption-change":`正在更改存檔加密`,"data-wipe":`正在刪除所有資料`,"import-undo":`正在復原或還原一次匯入`},ifQuit:{backup:`下次備份會補上這次沒做完的部分。`,export:`不會留下檔案,之後可以再匯出一次。`,import:`已經匯入的會保留,之後再匯入同一個檔案就能做完。`,archive:`會停在中途,但存檔不會損壞,之後可以再做一次。`,wipe:`下次打開 PathKeep 時會把刪除做完。`,undo:`會停在中途,之後再復原或還原這次匯入一次就能做完。`}},palette:{placeholder:`搜尋頁面、記錄或指令…`,empty:`沒有符合的結果。`,pages:`前往`,actions:`操作`,pageResults:`頁面`,searching:`正在搜尋存檔…`,backupNow:`立即備份`,toggleTheme:`切換深淺色`,lock:`鎖定 PathKeep`,newChat:`新對話`,hintNavigate:`選擇`,hintOpen:`打開`},backup:{partial_one:`備份未完成,已儲存 {count} 筆新記錄`,partial_other:`備份未完成,已儲存 {count} 筆新記錄`,partialNothingNew:`備份未完成,未新增造訪`,now:`立即備份`,running:`備份中…`,runningDetail:`正在備份第 {done} / {total} 個來源`,lastAgo:`{ago}已備份`,neverRun:`還沒有備份過`,nextAt:`下次 {time}`,scheduleOff:`自動備份已關閉`,done_one:`備份完成,新增 {count} 條記錄`,done_other:`備份完成,新增 {count} 條記錄`,doneNothingNew:`備份完成,沒有新增造訪`,failed:`備份失敗`,warnings_one:`{count} 則警告:有內容被略過或沒有完成。`,warnings_other:`{count} 則警告:有內容被略過或沒有完成。`,viewDetails:`詳情`,fullDiskAccess:`Safari 已略過:PathKeep 沒有「完整磁碟取用權限」。`,errors:{"backup-no-profiles":`PathKeep 在這台電腦上找不到可以備份的瀏覽器設定檔。`}},lock:{appTitle:`PathKeep 已鎖定`,appBody:`輸入密碼繼續。`,archiveTitle:`存檔已加密`,archiveBody:`輸入存檔密碼解鎖。`,passcode:`密碼`,password:`密碼`,unlock:`解鎖`,remember:`存到系統鑰匙圈`,wrong:`密碼不對,請檢查後再試一次。`,unlocking:`正在解鎖…`,needsPasscode:`先設定一組密碼,PathKeep 才能鎖定。`,touchId:`用 Touch ID 解鎖`,touchIdUnavailable:`Touch ID 現在無法使用,請輸入密碼。`,touchIdFailed:`Touch ID 沒能解鎖 PathKeep,請輸入密碼。`,forgot:`忘記密碼?`,hint:`你的提示:`,noHint:`這組密碼沒有儲存提示。`,onlyWindow:`App 鎖定只擋住這個視窗,你的存檔和存檔密碼不受影響。`,turnOff:`要關閉 App 鎖定:結束 PathKeep,開啟這個資料夾裡的 config.json,把 "appLock" 下的 "enabled": true 改成 false,再重新開啟 PathKeep。`,showFolderMac:`在 Finder 中顯示`,showFolder:`開啟資料夾`,showFolderFailed:`無法開啟資料夾`},boot:{loading:`正在打開存檔…`,errorTitle:`PathKeep 無法啟動`,retry:`再試一次`,revealLogs:`查看日誌`},upgrade:{title:`正在更新存檔`,body:`新版本用新的格式儲存歷史。PathKeep 會把存檔複製成新格式一次,過程中可以放著這個視窗不管。`,size:`存檔大小`,freeSpace:`需要的可用空間`,kept:`現有的存檔檔案會原樣保留。`,resumable:`如果中途停止,下次會從停下的地方繼續。`,password:`存檔密碼`,passwordHint:`就是你開啟 PathKeep 時用的密碼。`,wrongPassword:`這組密碼打不開這個存檔。`,start:`更新存檔`,checking:`正在檢查存檔…`,locked:{title:`有些檔案用的是以前的密碼`,body:`你的密碼能開啟存檔,但打不開下面這些檔案。它們是用你以前用過的密碼加密的:0.4 之前的版本改密碼時只改了存檔本身。更新可以不帶上它們繼續。`,files:{SourceEvidence:`每次備份時保留的瀏覽器原始記錄`,Intelligence:`洞察、儲存的網頁內文和 AI 索引`,Agent:`助理對話`},kept:`這些檔案會原樣留在原處,不會被改動。新存檔裡不會有它們的內容。`,back:`返回`,continue:`不帶上它們,繼續更新`},progress:`{done} / {total}`,schema:{title:`正在更新存檔`,body:`這個版本用不同的方式保存搜尋索引,所以會更新一次存檔。存檔很大時需要一段時間;如果關掉 PathKeep,下次打開會接著做。`},failed:`更新沒有完成,存檔沒有被改動。`,phases:{storageConversion:`正在複製存檔`,contentVerification:`正在檢查副本`,schemaMigration:`正在更新存檔`,registrableDomainBackfill:`正在更新網站名稱`,searchReprojection:`正在建立搜尋索引`,intelligence:`正在準備智慧分析`,finalizing:`即將完成`}},recovery:{title:`存檔打不開`,body:`存檔檔案看起來已損壞。PathKeep 找到了可以還原的已驗證快照。還原會取代損壞的檔案,確認之前什麼都不會被刪除。`,snapshot:`{date} 的快照`,restore:`還原這個快照`,restoring:`正在還原…`,none:`沒有可用的快照。存檔檔案仍在磁碟上,詳情請看日誌。`},error:{route:`這個畫面出錯了`,reload:`重新載入`},theme:{light:`淺色`,dark:`深色`,system:`跟隨系統`},crashNotice:`PathKeep 上次意外結束,已儲存當機報告。`,revealCrash:`查看報告`}}),spaces:g({en:{browsing:{name:`Browsing history`,shortName:`Browsing`,visits_one:`{count} visit`,visits_other:`{count} visits`,browsers_one:`{count} browser`,browsers_other:`{count} browsers`},switcher:{label:`Switch data type. Now: {name}`,statusLine:`{first} · {second}`},palette:{page:`{space} · {page}`,switchTo:`Switch to`,search:`Search “{space}” for “{query}”`},tasks:{running_one:`{count} background task running`,running_other:`{count} background tasks running`,attention_one:`Background tasks: {count} needs a look`,attention_other:`Background tasks: {count} need a look`,idle:`No background tasks running`,title:`Background tasks`,preparing:`Preparing`,nothingRunning:`Nothing is running.`,nextBackup:`Nothing is running. Next scheduled backup: {time}.`,scheduleOff:`Nothing is running. Automatic backup is off.`,queued_one:`{count} more waiting`,queued_other:`{count} more waiting`,needsLook_one:`{count} needs a look`,needsLook_other:`{count} need a look`,backupAll:`Back up everything now`,open:`Open background tasks`,backup:`Backup`,takeout:`Google Takeout import`,browserFile:`Browser history import`,importProgress:`{done} of {total}`}},"zh-CN":{browsing:{name:`浏览记录`,shortName:`浏览记录`,visits_one:`{count} 条`,visits_other:`{count} 条`,browsers_one:`{count} 个浏览器`,browsers_other:`{count} 个浏览器`},switcher:{label:`切换数据类型。当前:{name}`,statusLine:`{first} · {second}`},palette:{page:`{space} · {page}`,switchTo:`切换到`,search:`在「{space}」中搜索「{query}」`},tasks:{running_one:`后台有 {count} 项任务在运行`,running_other:`后台有 {count} 项任务在运行`,attention_one:`后台任务:{count} 项需要你看一下`,attention_other:`后台任务:{count} 项需要你看一下`,idle:`后台没有在运行的任务`,title:`后台任务`,preparing:`准备中`,nothingRunning:`现在没有在运行的任务。`,nextBackup:`现在没有在运行的任务。下次自动备份在 {time}。`,scheduleOff:`现在没有在运行的任务。自动备份已关闭。`,queued_one:`还有 {count} 项在排队`,queued_other:`还有 {count} 项在排队`,needsLook_one:`{count} 项需要你看一下`,needsLook_other:`{count} 项需要你看一下`,backupAll:`全部立即备份`,open:`打开后台任务`,backup:`备份`,takeout:`导入 Google Takeout`,browserFile:`导入浏览器的历史文件`,importProgress:`{done} / {total}`}},"zh-TW":{browsing:{name:`瀏覽紀錄`,shortName:`瀏覽紀錄`,visits_one:`{count} 筆`,visits_other:`{count} 筆`,browsers_one:`{count} 個瀏覽器`,browsers_other:`{count} 個瀏覽器`},switcher:{label:`切換資料類型。現在:{name}`,statusLine:`{first} · {second}`},palette:{page:`{space} · {page}`,switchTo:`切換到`,search:`在「{space}」搜尋「{query}」`},tasks:{running_one:`背景有 {count} 項任務在跑`,running_other:`背景有 {count} 項任務在跑`,attention_one:`背景任務:{count} 項需要你看一下`,attention_other:`背景任務:{count} 項需要你看一下`,idle:`背景沒有在跑的任務`,title:`背景任務`,preparing:`準備中`,nothingRunning:`現在沒有在跑的任務。`,nextBackup:`現在沒有在跑的任務。下次排程備份在 {time}。`,scheduleOff:`現在沒有在跑的任務。自動備份關著。`,queued_one:`還有 {count} 項在排隊`,queued_other:`還有 {count} 項在排隊`,needsLook_one:`{count} 項需要你看一下`,needsLook_other:`{count} 項需要你看一下`,backupAll:`全部立即備份`,open:`打開背景任務`,backup:`備份`,takeout:`匯入 Google Takeout`,browserFile:`匯入瀏覽器的歷史檔案`,importProgress:`{done} / {total}`}}}),home:ge,history:pe,historyPage:me,historySearch:he,insights:_e,ask:se,backup:ce,backupSchedule:de,backupImport:le,backupRuns:ue,settings:be,settingsAi:Se,settingsBackground:Ce,settingsStorage:we,settingsAbout:xe,onboarding:ye,maintenance:ve};function F(e){return Object.fromEntries(Object.entries(Te).map(([t,n])=>[t,n[e]]))}var Ee={en:F(`en`),"zh-CN":F(`zh-CN`),"zh-TW":F(`zh-TW`)};function De(e,t=``,n=new Map){for(let[r,i]of Object.entries(e)){let e=t?`${t}.${r}`:r;typeof i==`string`?n.set(e,i):De(i,e,n)}return n}var Oe=Object.fromEntries(h.map(e=>[e,De(Ee[e])])),ke=Object.fromEntries(h.map(e=>[e,new Intl.PluralRules(e)]));function Ae(e){let t=Oe[e],n=Oe.en;return(r,i)=>{let a;if(i&&typeof i.count==`number`){let o=ke[e].select(i.count);a=t.get(`${r}_${o}`)??t.get(`${r}_other`)??n.get(`${r}_${o===`one`?`one`:`other`}`)}return a??=t.get(r)??n.get(r),a===void 0?r:i?a.replace(/\{(\w+)\}/g,(t,n)=>{let r=i[n];return r===void 0?t:typeof r==`number`?r.toLocaleString(L(e)):r}):a}}function je(){let e=typeof navigator>`u`?[]:[...navigator.languages??[],navigator.language];for(let t of e){let e=t?.toLowerCase()??``;if(e.startsWith(`zh`))return/hant|tw|hk|mo/.test(e)?`zh-TW`:`zh-CN`;if(e.startsWith(`en`))return`en`}return`en`}function I(e){return e&&e!==`system`?e:je()}function L(e){return e===`en`?`en-US`:e}var Me={en:`English`,"zh-CN":`简体中文`,"zh-TW":`繁體中文`},Ne=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Pe=o(((e,t)=>{t.exports=Ne()})),Fe=Pe(),Ie=`pathkeep-language-preference`,Le=`pathkeep-clock-preference`,Re=`pathkeep-system-clock`,ze=[`system`,`en`,`zh-CN`,`zh-TW`],Be=[`system`,`h12`,`h23`];function Ve(e){try{return localStorage.getItem(e)}catch{return null}}function He(e,t){try{localStorage.setItem(e,t)}catch{}}function Ue(e){return e===`h12`||e===`h23`?e:void 0}function We(){try{let e=localStorage.getItem(Ie);if(ze.includes(e))return e}catch{}return`system`}function Ge({children:e}){let[t,n]=(0,f.useState)(We),r=I(t),[i,a]=(0,f.useState)(()=>{let e=Ve(Le);return Be.includes(e)?e:`system`}),[o,s]=(0,f.useState)(()=>Ue(Ve(Re)));(0,f.useEffect)(()=>{document.documentElement.lang=L(r)},[r]),(0,f.useEffect)(()=>{let e=!0;return oe.systemClock().then(t=>{e&&(s(Ue(t)),He(Re,t??``))}).catch(()=>void 0),()=>{e=!1}},[]);let c=(0,f.useMemo)(()=>({language:r,locale:L(r),preference:t,t:Ae(r),setPreference:e=>{He(Ie,e),n(e)},clock:i,hourCycle:i===`system`?o:i,setClock:e=>{He(Le,e),a(e)}}),[r,t,i,o]);return(0,Fe.jsx)(p.Provider,{value:c,children:e})}var Ke=864e5,qe=/^\d{4}-\d{2}-\d{2}$/,Je=new Map;function Ye(e){let t=Je.get(e);return t||(t=new Intl.DateTimeFormat(`en-US`,{timeZone:e,year:`numeric`,month:`2-digit`,day:`2-digit`}),Je.set(e,t)),t}function R(e,t){let n=Ye(t).formatToParts(e),r=e=>n.find(t=>t.type===e)?.value??``;return`${r(`year`)}-${r(`month`)}-${r(`day`)}`}function Xe(e,t=Date.now()){return R(t,e)}function z(e){let[t,n,r]=e.split(`-`).map(Number);return Date.UTC(t,n-1,r)}function Ze(e){return new Date(e).toISOString().slice(0,10)}function Qe(e){return!!e&&qe.test(e)&&Ze(z(e))===e}function $e(e,t){return Ze(z(e)+t*Ke)}function et(e,t){return Math.round((z(t)-z(e))/Ke)}function tt(e){return new Date(z(e))}function nt(){return new Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`}function rt(e,t){if(e===t)return!0;try{let n=e=>new Intl.DateTimeFormat(`en-US`,{timeZone:e}).resolvedOptions().timeZone;return n(e)===n(t)}catch{return!1}}function it(e=[]){let t=typeof Intl.supportedValuesOf==`function`?Intl.supportedValuesOf(`timeZone`):[];return[...new Set([...t,`UTC`,...e])]}function at(e,t,n){try{return new Intl.DateTimeFormat(t,{timeZone:e,timeZoneName:n}).formatToParts(Date.now()).find(e=>e.type===`timeZoneName`)?.value??``}catch{return``}}var B=new Map;function ot(e,t){let n=`${t}|${e}`,r=B.get(n);if(!r){let i=(e.split(`/`).at(-1)??e).replaceAll(`_`,` `),a=at(e,t,`longGeneric`);r={place:i,name:/^GMT[+\-−]?/.test(a)?``:a,offset:at(e,t,`shortOffset`)},B.set(n,r)}return r}function st(e,t){return B.has(`${t}|${e}`)}var V=new Map;function H(e,t={}){let n=`n|${e}|${JSON.stringify(t)}`,r=V.get(n);return r||(r=new Intl.NumberFormat(e,t),V.set(n,r)),r}function U(e,t){let n=`d|${e}|${JSON.stringify(t)}`,r=V.get(n);return r||(r=new Intl.DateTimeFormat(e,t),V.set(n,r)),r}function W(e){return e instanceof Date?e:new Date(e)}function ct(e){let t=W(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate())}function lt(e){let t=U(e,{hour:`numeric`}).resolvedOptions().hourCycle;return t===`h11`||t===`h12`?`h12`:`h23`}function ut(e){return{hour:e===`h12`?`numeric`:`2-digit`,minute:`2-digit`,hourCycle:e}}function dt(e,t,n=void 0,r=null){let i=n??lt(e),a=r?.timeZone,o={...ut(i),timeZone:a,timeZoneName:r?.label?`short`:void 0},s=t=>U(e,{...t,timeZone:a}),c=e=>s(o).format(W(e)),l=(e,t)=>{let n=W(e),r=W(t),i=s(o);return i.format(n)===i.format(r)?i.format(n):i.formatRange(n,r)},u=(t,n)=>U(e,{...n,timeZone:`UTC`}).format(Date.UTC(2e3,0,1,t)),d=e=>u(e,{hour:i===`h12`?`numeric`:`2-digit`,hourCycle:i}),f=e=>u(e,ut(i)),p=(e,t)=>a?et(R(W(e).getTime(),a),R(t.getTime(),a)):Math.round((ct(t).getTime()-ct(e).getTime())/864e5);return{number:t=>H(e).format(t),compact:t=>H(e,{notation:`compact`,maximumFractionDigits:1}).format(t),percent:(t,n=!1)=>H(e,{style:`percent`,maximumFractionDigits:1,signDisplay:n?`exceptZero`:`auto`}).format(t),bytes:t=>{let n=[`B`,`KB`,`MB`,`GB`,`TB`],r=t,i=0;for(;r>=1024&&i=100||i===0?0:r>=10?1:2}).format(r)} ${n[i]}`},date:(e,t={dateStyle:`medium`})=>s(t).format(W(e)),day:(t,n={dateStyle:`medium`})=>U(e,{...n,timeZone:`UTC`}).format(tt(t)),monthDay:e=>s({month:`short`,day:`numeric`}).format(W(e)),time:c,timeRange:l,hour:d,clockTime:f,hourSpan:e=>`${f(e)}–${f((e+1)%24)}`,weekdayDate:e=>s({weekday:`long`,month:`long`,day:`numeric`}).format(W(e)),relative:(e,n=Date.now(),r=`date`)=>{let i=Math.max(0,n-W(e).getTime()),a=Math.floor(i/6e4);if(a<1)return t(`common.justNow`);if(a<60)return t(`common.minutesAgo`,{count:a});let o=Math.floor(a/60);if(o<24)return t(`common.hoursAgo`,{count:o});let c=Math.floor(o/24);if(c<30)return t(`common.daysAgo`,{count:c});if(r===`elapsed`){let e=Math.floor(c/30);return e<12?t(`common.monthsAgo`,{count:e}):t(`common.yearsAgo`,{count:Math.floor(c/365)||1})}return s({dateStyle:`medium`}).format(W(e))},shortWhen:(e,n=new Date)=>{let r=W(e),i=p(r,n);return i===0?c(r):i===1?t(`common.yesterday`):s({month:`short`,day:`numeric`}).format(r)},dayAndTime:(e,n=new Date)=>{let r=W(e),i=p(r,n),a=c(r);return i===0?`${t(`common.today`)} ${a}`:i===1?`${t(`common.yesterday`)} ${a}`:`${s({month:`short`,day:`numeric`}).format(r)} ${a}`}}}function ft(){return pt(null)}function pt(e){let{locale:t,t:n,hourCycle:r}=m(),i=e?.timeZone,a=e?.label??!1;return(0,f.useMemo)(()=>dt(t,n,r,i?{timeZone:i,label:a}:null),[t,n,r,i,a])}var mt=`lock-required`,ht=`full-disk-access`,gt=class extends Error{code;actionHint;retryHint;constructor(e,t){super(e,{cause:t?.cause}),this.name=`CommandInvokeError`,this.code=t?.code??null,this.actionHint=t?.actionHint??null,this.retryHint=t?.retryHint??null}};function G(e){if(e instanceof gt)return e.code;if(typeof e==`object`&&e){let t=e;if((typeof t.message==`string`||typeof t.error==`string`)&&typeof t.code==`string`)return t.code}return null}function _t(e){return e.includes(`Full Disk Access`)||e.includes(`Safari History.db is not readable yet`)}function vt(e){let t=G(e);return t===null?e instanceof Error&&_t(e.message):t===ht}function yt(e){let t=G(e);return t===null?e instanceof Error?e.message.includes(`database key is required`)||e.message.includes(`PathKeep is currently locked`):!1:t===mt}function bt(e){return yt(e)||G(e)===`archive-password-required`}var xt=new Set([`get_day_insights`,`get_sessions`,`get_search_queries`,`get_compare_sets`]),St=e=>typeof e==`string`&&/^\d{4}-\d{2}-\d{2}$/.test(e);function Ct(e,t){let n=t?.request;if(!n)return null;if(xt.has(e)){let e=n.dateRange,t=n.date??(e?.start===e?.end?e?.start:void 0);if(St(t))return`days/${t.slice(0,7)}`}return e===`get_domain_deep_dive`&&n.registrableDomain?`site/${encodeURIComponent(n.registrableDomain)}`:null}var wt=e=>new Date(e).toISOString().replace(`.000Z`,`Z`).replace(`Z`,`+00:00`);function Tt(e){return e.visits.map(([t,n,r,i,a,o,s,c])=>{let[l,u,d]=e.pages[r];return{id:t,profileId:e.profiles[n],url:l,title:u,domain:d,favicon:null,visitedAt:wt(i),visitTime:i,durationMs:a,transition:o,sourceVisitId:s,appId:e.apps[c],enrichmentExcerpt:null}})}var Et={checkForAppUpdate:()=>P(`check_for_app_update`),downloadAndInstallAppUpdate:e=>P(`download_and_install_app_update`,{request:{expectedVersion:e??null}}),relaunchAfterUpdate:()=>P(`relaunch_after_update`)},Dt=2e3;function K(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function Ot(e){let t=e,n=K(t.message);if(n)return n;let r=K(t.error);if(r)return r;let i=K(t.reason);if(i)return i;let a=K(t.description);if(a)return a;try{let t=JSON.stringify(e);if(t&&t!==`{}`&&t!==`null`)return t}catch{}return null}function kt(e,t){if(e instanceof Error)return q(K(e.message)||`${e.name||`Error`}${t?`: ${t}`:``}`);let n=K(e);if(n)return q(n);if(typeof e==`object`&&e){let t=Ot(e);if(t)return q(t)}if(e===null)return q(t?`${t}: null`:`null`);if(e===void 0)return q(t?`${t}: undefined`:`undefined`);if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`||typeof e==`symbol`)return q(String(e));let r=typeof e;return q(t?`${t}: <${r}>`:`<${r}>`)}function q(e){return e.length<=Dt?e:`${e.slice(0,1999)}…`}var At=async()=>()=>{};async function jt(e){return At(`pathkeep://updater-progress`,t=>{t&&e(t)})}var Mt=`https://github.com/t41372/PathKeep/releases`;function Nt(){return new Date().toISOString()}function Pt(e){return{availability:{supported:!1,checkedAt:Nt(),available:!1,currentVersion:e??null,version:null,notes:null,publishedAt:null,error:`In-browser preview cannot check desktop update channels. Use a packaged desktop build instead.`,downloadUrl:Mt},pendingUpdate:null}}async function Ft(e){if(!O())return Pt(e);let t=await Et.checkForAppUpdate();return{availability:{...t.availability,currentVersion:t.availability.currentVersion??e??null,downloadUrl:t.availability.downloadUrl??`https://github.com/t41372/PathKeep/releases`},pendingUpdate:t.pendingUpdate}}async function It(e,t){if(!O()){let n={phase:`unsupported`,version:e.version,message:`In-browser preview cannot download or install desktop updates.`,downloadedBytes:null,contentLength:null};return t?.(n),n}let n=null,r=()=>{};k()&&(r=await jt(e=>{n=e.phase,t?.(e)}));try{let r=await Et.downloadAndInstallAppUpdate(e.version);return n!==r.phase&&t?.(r),r}catch(n){let r={phase:`error`,version:e.version,downloadedBytes:null,contentLength:null,message:kt(n,`install_app_update ${e.version}`)};return t?.(r),r}finally{r()}}async function Lt(){return O()?await Et.relaunchAfterUpdate():!1}function Rt(e,t,n){let r=e.exactly(`get_url_annotation`,{url:t}),i=new Date().toISOString();return{url:t,notes:``,tags:[],createdAt:i,...r,...n,updatedAt:i}}var zt=e=>{let t=e.latest(`schedule_status`);return{applied:!0,platform:t.platform,files:t.detectedFiles,message:``,stepResults:[]}},Bt={save_config:(e,t)=>({...t.latest(`app_snapshot`),config:e.config}),set_content_fetch_settings:(e,t)=>t.latest(`app_snapshot`),store_ai_provider_api_key:(e,t)=>t.latest(`app_snapshot`),clear_ai_provider_api_key:(e,t)=>t.latest(`app_snapshot`),set_launch_at_login:(e,t)=>({...t.latest(`get_desktop_integration`),launchAtLogin:e.enabled}),set_menu_bar_icon:(e,t)=>({...t.latest(`get_desktop_integration`),menuBarIcon:e.enabled}),lock_app_session:(e,t)=>t.latest(`app_lock_status`),set_app_lock_passcode:(e,t)=>t.latest(`app_lock_status`),clear_app_lock_passcode:(e,t)=>t.latest(`app_lock_status`),set_url_notes:(e,t)=>Rt(t,e.request.url,{notes:e.request.notes,sourceProfile:e.request.sourceProfile??null}),replace_url_tags:(e,t)=>Rt(t,e.request.url,{tags:e.request.tags,sourceProfile:e.request.sourceProfile??null}),set_star:()=>void 0,unset_star:()=>void 0,mark_og_images_shown:()=>void 0,set_site_category:()=>void 0,record_frontend_error:()=>void 0,run_backup_now:(e,t)=>{let n=t.latest(`app_snapshot`).recentRuns[0],r=new Date().toISOString();return{dueSkipped:!1,run:n&&{...n,id:n.id+1,startedAt:r,finishedAt:r,trigger:`manual`,newVisits:0,newUrls:0,newDownloads:0},profiles:[],warnings:[]}},apply_schedule:(e,t)=>zt(t),remove_schedule:(e,t)=>zt(t),repair_schedule:(e,t)=>zt(t),run_ai_queue_jobs:(e,t)=>t.latest(`load_ai_queue_status`),retry_intelligence_job:(e,t)=>t.latest(`load_intelligence_runtime`),cancel_intelligence_job:(e,t)=>t.latest(`load_intelligence_runtime`),check_for_app_update:(e,t)=>({availability:{supported:!1,checkedAt:new Date().toISOString(),available:!1,currentVersion:t.latest(`app_build_info`).version,version:null,notes:null,publishedAt:null,error:null,downloadUrl:Mt},pendingUpdate:null}),export_history:()=>null,open_path_in_file_manager:()=>``,reveal_logs:()=>``},Vt={en:`The demo can’t do this: it runs in your browser and saves nothing.`,"zh-TW":`demo 做不到這件事:它在瀏覽器裡跑,什麼都不會儲存。`,"zh-CN":`demo 做不到这件事:它在浏览器里运行,什么都不会保存。`};function J(e){return Array.isArray(e)?`[${e.map(J).join(`,`)}]`:e&&typeof e==`object`?`{${Object.keys(e).filter(t=>e[t]!==void 0).sort().map(t=>`${JSON.stringify(t)}:${J(e[t])}`).join(`,`)}}`:JSON.stringify(e??null)}var Y=(e,t)=>`${e} ${J(t)}`,Ht={load_history_favicons:((e,t)=>({items:t=>t[e]??[],key:e=>e.url,learn:(e,t)=>t.map(e=>[e.url,e]),reply:(e,n)=>e.map(e=>({...t(e),...n.get(e.url),...e}))}))(`entries`,()=>({favicon:null})),load_history_og_images:{items:e=>e.entries??[],key:e=>e.url,learn:()=>[],reply:e=>e.map(({url:e})=>({url:e,ogImage:null,fetchStatus:`missing`}))},load_site_favicons:{items:e=>e.domains??[],key:e=>e,learn:(e,t)=>t.map(e=>[e.domain,e]),reply:(e,t)=>e.map(e=>t.get(e)??{domain:e,favicon:null})},get_star_status:{items:e=>e.request?.entityKeys??[],key:e=>e,learn:(e,t)=>Object.entries(t),reply:(e,t)=>Object.fromEntries(e.map(e=>[e,t.get(e)??!1]))}},X=new Map,Z=new Map,Ut=new Map,Wt=new Map,Gt=[],Kt=null,qt,Jt=null;function Yt(e){for(let t of e.calls){X.set(Y(t.command,t.args),t),Z.set(t.command,[...Z.get(t.command)??[],t]);let e=Ht[t.command];if(e&&t.status<400){let n=Ut.get(t.command)??new Map;for(let[r,i]of e.learn(t.args,t.response))n.set(r,i);Ut.set(t.command,n)}}for(let t of e.searches??[]){Wt.set(J(t.request),t);for(let e of t.events)e.type===`step`&&!e.data.provisional&&(Kt=e.data)}Gt=e.pages??[],Jt=e.calls.find(e=>e.command===`query_history`&&e.response?.searchState)?.response?.searchState??null}var Q=new Map;function Xt(e){return Q.has(e)||Q.set(e,fetch(`./recording/${e}.json`).then(e=>e.ok?e.json():null)),Q.get(e)}async function Zt(e,t){let n=Ct(e,t);if(!n||Q.has(n)){n&&await Q.get(n);return}let r=await Xt(n);for(let e of r??[])X.set(Y(e.command,e.args),e),Z.set(e.command,[...Z.get(e.command)??[],e])}async function Qt(){return qt??=Tt(await Xt(`timeline`)??{pages:[],profiles:[],apps:[],visits:[]}),qt}var $t=e=>{let t=e.toLowerCase().split(/\s+/).filter(Boolean);return e=>{let n=`${e.title??``} ${e.url}`.toLowerCase();return t.every(e=>n.includes(e))}};async function en(e){if(e.regexMode)return null;let t=t=>(!e.profileId||t.profileId===e.profileId)&&(!e.browserKind||t.profileId.startsWith(`${e.browserKind}:`))&&(!e.domain||t.domain===e.domain||t.domain.endsWith(`.${e.domain}`))&&(e.startTimeMs==null||t.visitTime>=e.startTimeMs)&&(e.endTimeMs==null||t.visitTime<=e.endTimeMs),n;if(e.q){if(!e.groupByUrl)return null;n=Gt.map(e=>e.visit).filter(n=>t(n)&&$t(e.q??``)(n)),n.sort((t,n)=>(e.sort===`relevance`?(n.visitCount??0)-(t.visitCount??0):0)||n.visitTime-t.visitTime)}else{let e=await Qt();if(e.length===0)return null;n=e.filter(t)}e.sort===`oldest`&&n.reverse();let r=t=>e.q?`demo:${t.url}`:`${t.visitTime}|${t.id}`,i=e.cursor?n.findIndex(t=>r(t)===e.cursor)+1:0,a=e.limit??100,o=n.slice(i,i+a),s=i+ae+(t.visitCount??1),0):null,items:o,page:1,pageSize:a,pageCount:1,hasPrevious:i>0,hasNext:s,nextCursor:s&&o.length>0?r(o[o.length-1]):null}}function tn(e,t=``,n=new Map){if(e&&typeof e==`object`)for(let[r,i]of Object.entries(e))tn(i,`${t}.${r}`,n);else n.set(t,e);return n}var nn=864e5,rn=e=>typeof e==`string`&&/^\d{4}-\d{2}-\d{2}/.test(e)?Date.parse(e):typeof e==`number`&&e>0xe8d4a51000?e:null;function an(e,t){let n=0;for(let[r,i]of e){let e=t.get(r);if(e===i)n+=1;else{let[t,r]=[rn(i),rn(e)];t!==null&&r!==null&&(n-=Math.min(Math.abs(t-r)/nn,3650)/3650)}}return n}function on(e){throw console.warn(`[demo] not recorded:`,e),new gt(Vt[I(We())]??Vt.en,{code:`demo`})}function $(e){if(e.status>=400){let t=e.response??{};throw new gt(t.message??`"${e.command}" failed.`,{cause:e.response,code:t.code,actionHint:t.actionHint,retryHint:t.retryHint})}return structuredClone(e.response)}var sn={get_digest_summary:[`get_intelligence_primary_overview`,`digestSummary`],get_top_sites:[`get_intelligence_primary_overview`,`topSites`],get_refind_pages:[`get_intelligence_primary_overview`,`refindPages`],get_search_engine_ranking:[`get_intelligence_primary_overview`,`searchEngineRanking`],get_top_search_concepts:[`get_intelligence_primary_overview`,`topSearchConcepts`],get_query_families:[`get_intelligence_primary_overview`,`queryFamilies`],get_activity_mix:[`get_intelligence_primary_overview`,`activityMix`],get_discovery_trend:[`get_intelligence_primary_overview`,`discoveryTrendDay`],get_habit_patterns:[`get_intelligence_primary_overview`,`habitPatterns`],get_stable_sources:[`get_intelligence_secondary_overview`,`stableSources`],get_search_effectiveness:[`get_intelligence_secondary_overview`,`searchEffectiveness`],get_friction_signals:[`get_intelligence_secondary_overview`,`frictionSignals`],get_reopened_investigations:[`get_intelligence_secondary_overview`,`reopenedInvestigations`],get_breadth_index:[`get_intelligence_secondary_overview`,`breadthIndex`],get_path_flows:[`get_intelligence_secondary_overview`,`pathFlows`],get_compare_sets:[`get_intelligence_secondary_overview`,`compareSets`],get_multi_browser_diff:[`get_intelligence_secondary_overview`,`multiBrowserDiff`]},cn=e=>{let t=e?.request;return J({dateRange:t?.dateRange,profileId:t?.profileId??null})};function ln(e,t){let n=sn[e],r=t?.request;if(!n||!r||r.cursor!=null||r.sortBy!=null&&r.sortBy!==`visits`)return;let[i,a]=n,o=cn(t),s=Z.get(i)?.find(e=>e.status<400&&cn(e.args)===o);if(s)return structuredClone(s.response[a])}var un={latest(e){let t=Z.get(e)?.at(-1);return t||on(e),$(t)},exactly(e,t){let n=X.get(Y(e,t));return n?$(n):void 0}},dn=new Set([`app_snapshot`,`save_config`,`set_content_fetch_settings`,`store_ai_provider_api_key`,`clear_ai_provider_api_key`]),fn=e=>({...e,config:{...e.config,insightsZoneKeptFor:nt()}});async function pn(e,t){let n=await mn(e,t);return dn.has(e)?fn(n):n}async function mn(e,t){let n=Ht[e];if(n){let r=n.items(t??{});return n.reply(r,Ut.get(e)??new Map)}await Zt(e,t);let r=X.get(Y(e,t));if(r)return $(r);if(e===`query_history`){let e=await en(t.query);if(e)return console.info(`[demo] listed in the page:`,t.query),e}if(e===`open_visited_page`||e===`open_external_url`){let e=t?.url;return e&&/^https?:\/\//.test(e)&&window.open(e,`_blank`,`noopener,noreferrer`),``}let i=Bt[e];if(i)return i(t,un);let a=ln(e,t);if(a!==void 0)return console.info(`[demo] taken from its batch:`,e),a;let o=Z.get(e);o||on(e);let s=tn(t),c=o[0],l=-1/0;for(let e of o){let t=an(s,tn(e.args));t>l&&([c,l]=[e,t])}return console.info(`[demo] nearest answer:`,e),$(c)}function hn(e){let t=Wt.get(J(e));if(t)return structuredClone(t);console.info(`[demo] searched in the page:`,e.query);let n=(e.query??``).trim(),r;if(e.regex){let e=null;try{e=new RegExp(n,`iu`)}catch{}r=t=>+!!e?.test(t)}else{let e=n.toLowerCase().split(/\s+/).filter(Boolean);r=t=>{let n=t.toLowerCase();return e.every(e=>n.includes(e))?e.length:0}}let i=Gt.filter(({visit:t})=>e.profileId&&t.profileId!==e.profileId||e.browserKind&&!t.profileId.startsWith(`${e.browserKind}:`)||e.domain&&!t.domain.endsWith(e.domain)||e.startTimeMs!=null&&t.visitTimee.endTimeMs?!1:!e.starred).map(e=>({...e,score:r(e.visit.title??``)*2+r(e.visit.url)})).filter(e=>e.score>0),a={newest:(e,t)=>t.visit.visitTime-e.visit.visitTime,oldest:(e,t)=>e.visit.visitTime-t.visit.visitTime,visits:(e,t)=>(t.visit.visitCount??0)-(e.visit.visitCount??0),relevance:(e,t)=>t.score-e.score||(t.visit.visitCount??0)-(e.visit.visitCount??0)};i.sort(a[e.sort??`relevance`]??a.relevance);let o=i.reduce((e,t)=>e+(t.visit.visitCount??1),0),s={...Kt,page:1,items:i,provisional:!1,count:{value:i.length,exact:!0},visits:{value:o,exact:!0},cursor:null};return{request:e,started:{sessionId:`demo-${Date.now()}`,indexer:s.indexer},events:[{type:`indexer`,data:s.indexer},{type:`step`,data:s}]}}var gn=`modulepreload`,_n=function(e,t){return new URL(e,t).href},vn={},yn=function(e){return e.pathname.endsWith(`.css`)},bn=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},xn=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=_n(t,n);let r=s(t),i=yn(r);return bn(vn,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`:gn,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),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)})},Sn=`pathkeep-language-preference`;function Cn(e){let t=Date,n=e-t.now();class r extends t{constructor(...e){e.length===0?super(t.now()+n):super(...e)}static now(){return t.now()+n}static[Symbol.hasInstance](e){return e instanceof t}}globalThis.Date=new Proxy(r,{apply:()=>new r().toString()})}(async()=>{let e=new URLSearchParams(location.search).get(`lang`);if(e===`en`||e===`zh-CN`||e===`zh-TW`)try{localStorage.setItem(Sn,e)}catch{}{let e=await(await fetch(`./recording/index.json`)).json();Yt(e),Cn(Date.parse(e.recordedAt))}if(await xn(()=>import(`./main-CmsrHzbA.js`).then(e=>e.t),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]),import.meta.url),parent===window)return;let t=document.getElementById(`root`),n=new MutationObserver(()=>{t?.querySelector(`main`)&&(n.disconnect(),requestAnimationFrame(()=>requestAnimationFrame(()=>parent.postMessage(`pathkeep-demo-ready`,location.origin))))});t&&n.observe(t,{childList:!0,subtree:!0})})();export{Me as A,A as B,it as C,Ge as D,ot as E,P as F,x as G,C as H,M as I,m as J,_ as K,O as L,I as M,Ee as N,We as O,oe as P,l as Q,j as R,Qe as S,Xe as T,b as U,ne as V,S as W,o as X,d as Y,s as Z,nt as _,It as a,et as b,kt as c,vt as d,yt as f,$e as g,pt as h,Ft as i,L as j,Pe as k,G as l,ft as m,hn as n,Lt as o,ct as p,h as q,Mt as r,At as s,xn as t,bt as u,R as v,rt as w,st as x,tt as y,k as z}; \ No newline at end of file diff --git a/site/public/app/assets/insights-Dw_jeUg7.js b/site/public/app/assets/insights-Dw_jeUg7.js new file mode 100644 index 00000000..3ffde172 --- /dev/null +++ b/site/public/app/assets/insights-Dw_jeUg7.js @@ -0,0 +1 @@ +import{F as e,T as t,g as n}from"./index-CteWxeiL.js";async function r(t,n){let r=await e(t,n);return r&&typeof r==`object`&&`data`in r&&`meta`in r?r:{data:r,meta:null}}var i={timeZone:()=>e(`get_insights_time_zone`),digest:e=>r(`get_digest_summary`,{request:e}),discoveryTrend:e=>r(`get_discovery_trend`,{request:{...e,granularity:`day`}}),activityMix:e=>r(`get_activity_mix`,{request:e}),activityMixTrend:t=>e(`get_activity_mix_trend`,{request:{...t,granularity:`day`}}),onThisDay:e=>r(`get_on_this_day`,{profileId:e}),topSites:(e,t=10,n=null,i=`visits`)=>r(`get_top_sites`,{request:{...e,sortBy:i,limit:t,cursor:n}}),sitesInCategory:(e,t,n=20,i=null)=>r(`get_sites_in_category`,{request:{...t,category:e,limit:n,cursor:i}}),setSiteCategory:(t,n)=>e(`set_site_category`,{site:t,category:n}),rhythm:e=>r(`get_browsing_rhythm`,{request:e}),searchConcepts:(e,t=12,n=null)=>r(`get_top_search_concepts`,{request:{...e,limit:t,cursor:n}}),frequentSearches:(e,t=10,n=null)=>r(`get_frequent_searches`,{request:{...e,limit:t,cursor:n}}),searchFamilies:(e,t=null)=>r(`get_search_families`,{request:{query:e,profileId:t}}),queryFamilies:(e,t=200,n=null)=>r(`get_query_families`,{request:{...e,cursor:n,pageSize:t}}),refindPages:(e,t=8,n=null)=>r(`get_refind_pages`,{request:{...e,limit:t,cursor:n}}),reopenedInvestigations:(e,t=20,n=null)=>r(`get_reopened_investigations`,{request:{...e,limit:t,cursor:n}}),day:e=>r(`get_day_insights`,{request:{date:e}}),sessions:(t,n=50,r=null)=>e(`get_sessions`,{request:{...t,cursor:r,pageSize:n}}),sessionDetail:t=>e(`get_session_detail`,{sessionId:t}),searchQueries:(e,t={})=>r(`get_search_queries`,{request:{...e,sort:t.sort??`newest`,cursor:t.cursor??null,pageSize:t.pageSize??50}}),site:(e,t)=>r(`get_domain_deep_dive`,{request:{...t,registrableDomain:e}}),queryFamilyDetail:(e,t)=>r(`get_query_family_detail`,{request:{...t,familyId:e}}),trailDetail:t=>e(`get_trail_detail`,{trailId:t}),refindPageDetail:(e,t)=>r(`get_refind_page_detail`,{request:{...t,canonicalUrl:e}}),breadth:e=>r(`get_breadth_index`,{request:e}),habits:e=>r(`get_habit_patterns`,{request:e}),browsers:e=>r(`get_multi_browser_diff`,{request:e}),interruptedHabits:(e=null)=>r(`get_interrupted_habits`,{request:{profileId:e}}),searchEngines:e=>r(`get_search_engine_ranking`,{request:e}),paths:(e,t=3,n=15,i=null)=>r(`get_path_flows`,{request:{...e,stepCount:t,limit:n,cursor:i}}),searchEffectiveness:e=>r(`get_search_effectiveness`,{request:{...e,engine:null,topicsLimit:null,topicsCursor:null}}),searchLandings:(e,t=10,n=null)=>r(`get_stable_sources`,{request:{...e,limit:t,cursor:n}}),friction:(e,t=10,n=null)=>r(`get_friction_signals`,{request:{...e,limit:t,cursor:n}}),compareSets:(e,t=6,n=null)=>r(`get_compare_sets`,{request:{...e,limit:t,cursor:n}}),observedInteractions:(e,t=10,n=null)=>r(`get_observed_interactions`,{request:{...e,limit:t,cursor:n}})};function a(e){return e?.meta?.state===`stale`}function o(e){return a(e.state.data)?5e3:!1}function s(e){let t=e=>String(e).padStart(2,`0`);return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function c(e,r){let i=t(r);return{start:n(i,-(e-1)),end:i}}function l(e){return{start:`${e}-01-01`,end:`${e}-12-31`}}export{s as a,c as i,i as n,o,a as r,l as t}; \ No newline at end of file diff --git a/site/public/app/assets/insights-page-DGrDUyy5.js b/site/public/app/assets/insights-page-DGrDUyy5.js new file mode 100644 index 00000000..a8e9039c --- /dev/null +++ b/site/public/app/assets/insights-page-DGrDUyy5.js @@ -0,0 +1 @@ +import{i as e,n as t,r as n,t as r}from"./section-card-BTUr59O6.js";import{J as i,Q as a,Y as o,b as s,g as c,k as l,y as u}from"./index-CteWxeiL.js";import{A as d,B as f,D as p,E as m,F as h,H as ee,I as te,L as ne,M as re,N as ie,O as ae,P as oe,R as se,S as ce,T as g,U as le,V as _,a as v,i as y,j as ue,k as b,n as x,o as de,r as S,s as C,v as w,w as fe,x as pe,y as T,z as me}from"./parts-CrmjhOE3.js";import{i as E,r as he,t as ge}from"./mix-card-PK6D6caA.js";import{Jt as _e,Wt as ve,qt as D}from"./main-CmsrHzbA.js";import{t as O}from"./recharts-bar-chart-Dd_fYVwX.js";import{t as k}from"./site-icon-9eLiTdFC.js";import{i as ye,r as be,t as xe}from"./topic-icon-BmfUGk2_.js";import{a as Se,i as A,n as j,r as Ce,t as we}from"./select-BpsmShuc.js";import{o as M}from"./app-CVcZz016.js";import{r as N}from"./insights-Dw_jeUg7.js";import{r as P}from"./zone-CAMroIcN.js";import{a as F,f as I,m as Te,o as L,r as Ee,s as R,t as De}from"./links-4-O_q9FA.js";import{i as Oe,r as ke,t as z}from"./share-bar-BJplRG-f.js";import{t as Ae}from"./esm-DQKxnO1B.js";import{O as je,i as B,r as V}from"./query-DyHGS9i8.js";import{t as H}from"./intelligence-CeVzSBj6.js";import{t as Me}from"./browser-icons-DSlRrt_0.js";import{n as Ne}from"./queries-DuRWdcwY.js";import{n as U,t as Pe}from"./scope-controls-D5BaDTvG.js";import{t as Fe}from"./zone-notice-DaxZN8ca.js";import{t as Ie}from"./rotate-ccw-DbPdZ2ia.js";import{t as W}from"./search-C-9jHG2I.js";var G=a(o(),1),K=l();function Le(e,t){let n=0,r=0;for(let i=e;i<=t;i=c(i,1)){let e=u(i).getUTCDay();e===0||e===6?r+=1:n+=1}return{weekdays:n,weekends:r}}function Re({scope:e,rhythm:t}){let{t:n}=i(),r=P(),a=b(e),o=_(e,(a.data?.data.points??[]).map(e=>e.dateKey));if(e.range===`all`&&a.data===void 0)return null;let{weekdays:s,weekends:c}=Le(o.start,o.end),l=0,u=0,d=Array(24).fill(0);for(let e of t.cells)e.dow===0||e.dow===6?u+=e.visitCount:l+=e.visitCount,d[e.hour]+=e.visitCount;let f=s?l/s:0,p=c?u/c:0,m=Math.max(f,p,1),h=d.map((e,t)=>({hour:t,visits:e})).filter(e=>e.visits>0).sort((e,t)=>t.visits-e.visits).slice(0,3);return(0,K.jsxs)(`div`,{className:`flex flex-col gap-3 text-[13px]`,children:[(0,K.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr_auto] items-center gap-x-3 gap-y-1.5`,children:[{label:n(`insights.rhythm.weekday`),value:f},{label:n(`insights.rhythm.weekend`),value:p}].map(e=>(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:e.label}),(0,K.jsx)(`dd`,{className:`h-1.5 overflow-hidden rounded-full bg-muted`,children:(0,K.jsx)(`span`,{className:`block h-full rounded-full bg-brand transition-[width] duration-500`,style:{width:`${e.value/m*100}%`}})}),(0,K.jsx)(`dd`,{className:`text-xs text-muted-foreground tabular`,children:n(`insights.rhythm.perDay`,{visits:r.number(Math.round(e.value))})})]},e.label))}),h.length>0&&(0,K.jsxs)(`p`,{className:`text-muted-foreground`,children:[n(`insights.rhythm.busiest`),` `,h.map((e,t)=>(0,K.jsxs)(`span`,{children:[t>0&&`, `,(0,K.jsx)(`span`,{className:`font-medium text-foreground tabular`,children:r.hourSpan(e.hour)})]},e.hour))]})]})}function ze({scope:e}){let{t}=i(),n=P(),a=g(e),o=a.data?.data,s=I(e),c=s?t(`insights.kpi.vsPrevious`,{days:s}):void 0,l=e=>s?e:void 0,u=o===void 0&&!a.isError,d=N(a.data);return a.isError&&o===void 0?(0,K.jsx)(`div`,{className:`rounded-xl border bg-card px-4 py-3.5 shadow-card`,children:(0,K.jsx)(r,{error:a.error,onRetry:()=>void a.refetch()})}):(0,K.jsxs)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(128px,1fr))] gap-3`,children:[(0,K.jsx)(x,{label:t(`insights.kpi.visits`),metric:l(o?.totalVisits),value:n.compact(o?.totalVisits.value??0),hint:c,loading:u,updating:d}),(0,K.jsx)(x,{label:t(`insights.kpi.domains`),metric:l(o?.distinctDomains),value:n.number(o?.distinctDomains?.value??0),hint:c,loading:u,updating:d}),(0,K.jsx)(x,{label:t(`insights.kpi.searches`),metric:l(o?.totalSearches),value:n.compact(o?.totalSearches.value??0),hint:c,loading:u,updating:d}),(0,K.jsx)(x,{label:t(`insights.kpi.activeTime`),metric:l(o?.activeTimeMs),value:de(o?.activeTimeMs?.value??0,t,n),hint:c,loading:u,updating:d}),s!==null&&(0,K.jsx)(x,{label:t(`insights.kpi.newSites`),metric:l(o?.newDomains),value:n.number(o?.newDomains.value??0),explain:t(`insights.kpi.newSitesDetail`),hint:c,loading:u,updating:d}),(0,K.jsx)(x,{label:t(`insights.kpi.deepDives`),metric:l(o?.deepReadPages),value:n.number(o?.deepReadPages.value??0),explain:t(`insights.kpi.deepDivesDetail`),hint:c,loading:u,updating:d}),(0,K.jsx)(x,{label:t(`insights.kpi.reopened`),metric:l(o?.refindPages),value:n.number(o?.refindPages.value??0),explain:t(`insights.kpi.reopenedDetail`),hint:c,loading:u,updating:d})]})}function Be({scope:t}){let{t:n}=i(),a=P(),o=_e(),s=fe(t),c=s.data?.length??`day`,l=(0,G.useMemo)(()=>({pages:{label:n(`insights.daily.pages`),colors:{light:[`var(--brand)`],dark:[`var(--brand)`]}},searches:{label:n(`insights.daily.searches`),colors:{light:[`var(--blue)`],dark:[`var(--blue)`]}}}),[n]),u=s.data?.bars??[];return(0,K.jsx)(e,{title:n(`insights.daily.title`),subtitle:n({day:`insights.daily.hint`,week:`insights.daily.perWeek`,month:`insights.daily.perMonth`}[c]),action:(0,K.jsxs)(`span`,{className:`flex items-center gap-3 text-xs text-muted-foreground`,children:[(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:`size-2 rounded-[2px] bg-brand`}),n(`insights.daily.pages`)]}),(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:`size-2 rounded-[2px] bg-blue`}),n(`insights.daily.searches`)]}),(0,K.jsx)(v,{meta:s.data?.meta})]}),children:(0,K.jsx)(`div`,{className:`h-[220px]`,children:s.isError&&s.data===void 0?(0,K.jsx)(r,{error:s.error,onRetry:()=>void s.refetch()}):(0,K.jsxs)(O,{data:u,config:l,xDataKey:`dateKey`,isLoading:s.data===void 0,className:`aspect-auto h-full`,barRadius:3,barGap:2,chartProps:{onClick:e=>{c===`day`&&typeof e.activeLabel==`string`&&o(De(e.activeLabel,t))},style:c===`day`?{cursor:`pointer`}:void 0},children:[(0,K.jsx)(O.Grid,{vertical:!1,strokeDasharray:`3 4`}),(0,K.jsx)(O.XAxis,{dataKey:`dateKey`,tickLine:!1,axisLine:!1,minTickGap:32,tickFormatter:e=>f(a,c,e),className:`font-mono`}),(0,K.jsx)(O.Tooltip,{}),(0,K.jsx)(O.Bar,{dataKey:`pages`}),(0,K.jsx)(O.Bar,{dataKey:`searches`})]})})})}var q={visits:e=>e.visitCount,unique_days:e=>e.uniqueDays,average_daily_visits:e=>e.averageDailyVisits};function Ve({scope:t}){let{t:n}=i(),r=P(),[a,o]=(0,G.useState)(`visits`),s=me(t,a),c=q[a],l=e=>a===`average_daily_visits`?r.number(Math.round(c(e)*10)/10):r.compact(c(e));return(0,K.jsx)(e,{title:n(`insights.topSites.title`),action:(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,K.jsxs)(we,{value:a,onValueChange:e=>o(e),children:[(0,K.jsx)(A,{size:`sm`,"aria-label":n(`insights.topSites.orderLabel`),className:`h-7 gap-1 border-none bg-transparent px-2 text-xs text-muted-foreground shadow-none`,children:(0,K.jsx)(Se,{})}),(0,K.jsx)(j,{align:`end`,children:Object.keys(q).map(e=>(0,K.jsx)(Ce,{value:e,children:n(`insights.topSites.order.${e}`)},e))})]}),(0,K.jsx)(v,{meta:s.data?.meta})]}),children:(0,K.jsx)(y,{query:s,skeleton:(0,K.jsx)(S,{rows:6}),isEmpty:e=>e.data.items.length===0,empty:n(`insights.topSites.empty`),children:e=>{let n=Math.max(1,...e.data.items.map(c));return(0,K.jsx)(E,{fill:!0,maxHeight:228,children:(0,K.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:e.data.items.map(e=>(0,K.jsx)(`li`,{children:(0,K.jsxs)(D,{to:R(e.registrableDomain,t),className:`relative flex h-8 items-center gap-2.5 rounded-md px-2 text-[13px] hover:no-underline`,children:[(0,K.jsx)(k,{domain:e.registrableDomain}),(0,K.jsx)(`span`,{className:`flex-1 truncate font-medium`,children:e.registrableDomain}),(0,K.jsx)(z,{value:c(e),max:n}),(0,K.jsx)(`span`,{className:`w-12 text-right font-mono text-xs text-muted-foreground`,children:l(e)})]})},e.registrableDomain))})})}})})}function He({scope:t}){let{t:n}=i(),a=P(),o=re(t),s=n(`insights.rhythm.weekdays`),c=(0,G.useMemo)(()=>s.split(`,`),[s]),l=(0,G.useMemo)(()=>{let e=o.data?.data.cells??[],t=new Map(e.map(e=>[`${e.dow}-${e.hour}`,e.visitCount])),r=o.data?.data.maxCount??0,i=[1,2,3,4,5,6,0];return Array.from({length:24},(e,o)=>i.map((e,i)=>{let s=t.get(`${e}-${o}`)??0;return{key:`${e}-${o}`,level:ye(s,r),label:n(`insights.rhythm.cell`,{day:c[i]??``,hour:a.clockTime(o),visits:n(`common.visits`,{count:s})})}}))},[o.data,n,c,a]);return(0,K.jsx)(e,{title:n(`insights.rhythm.title`),subtitle:n(`insights.rhythm.subtitle`),action:(0,K.jsx)(v,{meta:o.data?.meta}),children:o.isError&&o.data===void 0?(0,K.jsx)(r,{error:o.error,onRetry:()=>void o.refetch()}):o.data===void 0?(0,K.jsx)(M,{className:`h-[150px]`}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{className:`overflow-x-auto`,children:(0,K.jsx)(be,{columns:l,label:n(`insights.rhythm.subtitle`),cellSize:16,gap:3,rowLabels:c,columnLabels:Array.from({length:24},(e,t)=>t%6==0||t===23?a.hour(t):null)})}),(0,K.jsx)(Re,{scope:t,rhythm:o.data.data})]})})}function J({scope:t}){let{t:n}=i(),r=P(),a=m(t),o=ue(t);return(0,K.jsxs)(e,{title:n(`insights.searches.title`),action:(0,K.jsx)(v,{meta:a.data?.meta}),children:[(0,K.jsx)(y,{query:a,skeleton:(0,K.jsx)(S,{rows:2}),isEmpty:e=>e.data.length===0,empty:n(`insights.searches.empty`),children:e=>(0,K.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.data.map(e=>(0,K.jsxs)(D,{to:L(e.query,t),className:`flex h-7 items-center gap-1.5 rounded-full border bg-card px-3 text-[13px] transition-colors hover:bg-muted hover:no-underline`,children:[e.query,(0,K.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:e.count})]},e.query))})}),(0,K.jsxs)(`div`,{className:`mt-3 flex items-center justify-between gap-2`,children:[(0,K.jsx)(`h3`,{className:`text-sm font-semibold`,children:n(`insights.refind.title`)}),(0,K.jsx)(v,{meta:o.data?.meta,explain:n(`insights.refind.explain`)})]}),(0,K.jsx)(y,{query:o,skeleton:(0,K.jsx)(S,{rows:3}),isEmpty:e=>e.data.items.length===0,empty:n(`insights.refind.empty`),children:e=>{let i=new Map;for(let t of e.data.items)i.set(t.title??``,(i.get(t.title??``)??0)+1);return(0,K.jsx)(E,{fill:!0,maxHeight:180,children:(0,K.jsx)(`ul`,{className:`-mx-2 flex flex-col`,children:e.data.items.map(e=>{let a=Ue(e.url),o=(i.get(e.title??``)??0)>1;return(0,K.jsx)(`li`,{children:(0,K.jsxs)(D,{to:F(e.canonicalUrl,t,e.profileId),className:C,children:[(0,K.jsx)(k,{domain:a.host}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,K.jsx)(`span`,{className:`truncate`,children:e.title||e.url}),e.title&&(0,K.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:o?a.hostAndPath:a.host})]}),(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground tabular`,children:n(`insights.refind.days`,{count:e.crossDayCount,days:r.number(e.crossDayCount)})})]})},e.canonicalUrl)})})})}})]})}function Ue(e){try{let t=new URL(e),n=t.pathname===`/`?``:t.pathname;return{host:t.hostname,hostAndPath:`${t.hostname}${n}`}}catch{return{host:e,hostAndPath:e}}}function We({scope:t,query:n}){let{t:r}=i(),a=s(t.dates.start,t.dates.end)>=31,o=t.range===`all`?r(`insights.groups.all`):t.range===`custom`?`${t.dates.start} – ${t.dates.end}`:r(`insights.groups.recent`,{days:s(t.dates.start,t.dates.end)+1});return(0,K.jsx)(e,{title:r(`insights.groups.title`),subtitle:(0,K.jsxs)(K.Fragment,{children:[r(a?`insights.groups.monthly`:`insights.groups.range`,{range:o}),a&&(0,K.jsx)(`span`,{className:`block`,children:r(`insights.groups.wholeMonths`)}),a&&t.profileId&&(0,K.jsx)(`span`,{className:`block`,children:r(`insights.groups.allBrowsers`)}),n.data?.staticModel&&(0,K.jsx)(D,{to:`/settings/ai`,className:`block underline underline-offset-2`,children:r(`insights.groups.static`)})]}),action:(0,K.jsx)(v,{meta:n.data?.meta,explain:r(`insights.groups.explain`)}),children:(0,K.jsx)(y,{query:n,skeleton:(0,K.jsx)(`div`,{role:`status`,"aria-label":r(`insights.groups.loading`),children:(0,K.jsx)(S,{rows:4,height:70})}),isEmpty:e=>!e.data.some(e=>e.updating||e.groups.length),empty:r(`insights.groups.empty`),children:e=>e.monthly?(0,K.jsx)(Ge,{windows:e.data,scope:t}):(0,K.jsx)(E,{maxHeight:460,children:(0,K.jsx)(Y,{window:e.data[0],scope:t})})})})}function Ge({windows:e,scope:t}){let n=(0,G.useRef)(null),r=Ae({count:e.length,getScrollElement:()=>n.current?.parentElement??null,estimateSize:()=>310,getItemKey:t=>e[t].range.start,overscan:1}),i=P();return(0,K.jsx)(E,{maxHeight:460,children:(0,K.jsx)(`div`,{ref:n,className:`relative w-full`,style:{height:r.getTotalSize()},children:r.getVirtualItems().map(n=>{let a=e[n.index];return(0,K.jsxs)(`div`,{"data-index":n.index,ref:r.measureElement,className:`absolute top-0 left-0 w-full pb-5`,style:{transform:`translateY(${n.start}px)`},"data-search-month":a.range.start.slice(0,7),children:[(0,K.jsx)(`h3`,{className:`mb-2 text-[13px] font-semibold`,children:i.day(a.range.start,{month:`long`,year:`numeric`})}),(0,K.jsx)(Y,{window:a,scope:t})]},n.key)})})})}function Y({window:e,scope:t}){let{t:n}=i();return!e||e.updating?(0,K.jsxs)(`div`,{role:`status`,className:`flex flex-col gap-2 text-xs text-muted-foreground`,children:[n(`insights.groups.updating`),(0,K.jsx)(S,{rows:3,height:60})]}):e.groups.length?(0,K.jsx)(`ul`,{className:`flex flex-col gap-3`,children:e.groups.map(n=>(0,K.jsx)(Ke,{group:n,window:e,scope:t},n.wordings[0]))}):(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n(`insights.groups.empty`)})}function Ke({group:e,window:t,scope:n}){let{t:r}=i(),a=P(),o=Array.from({length:s(t.range.start,t.range.end)+1},(e,n)=>c(t.range.start,n)),l=new Set(e.days);return(0,K.jsx)(`li`,{"data-search-group":e.wordings[0],children:(0,K.jsxs)(D,{to:L(e.wordings[0],n),className:`-mx-2 flex flex-col gap-1.5 rounded-md px-2 py-1 text-[13px] transition-colors hover:bg-muted hover:no-underline`,children:[(0,K.jsxs)(`span`,{className:`line-clamp-2 break-words`,children:[(0,K.jsx)(`span`,{className:`font-medium`,children:e.wordings[0]}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.wordings.slice(1,3).map(e=>` · ${e}`).join(``)})]}),e.distinctSearches>3&&(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:r(`insights.groups.others`,{count:e.distinctSearches-3})}),(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground tabular`,children:[r(`insights.groups.searchCount`,{count:e.searches}),r(`insights.groups.dayCount`,{count:e.days.length}),r(`insights.groups.pageCount`,{count:e.pagesOpened})].join(` · `)}),(0,K.jsx)(`span`,{className:`flex gap-0.5`,role:`group`,"aria-label":r(`insights.groups.strip`),children:o.map(e=>(0,K.jsx)(`span`,{role:`img`,"data-date":e,"data-searched":l.has(e),title:a.day(e),"aria-label":r(l.has(e)?`insights.groups.searched`:`insights.groups.notSearched`,{date:a.day(e)}),className:V(`h-2 min-w-0 flex-1 rounded-[2px]`,l.has(e)?`bg-heat-4`:`bg-heat-0`)},e))})]})})}function qe({scope:t}){let{t:n}=i(),a=P(),o=b(t),s=g(t),{length:c,bars:l,total:u}=(0,G.useMemo)(()=>{let e=new Map((o.data?.data.points??[]).map(e=>[e.dateKey,{sites:e.newDomainCount}])),n=0;for(let t of e.values())n+=t.sites;return{...ee(_(t,e.keys()),e,{sites:0}),total:n}},[o.data,t]),d=(0,G.useMemo)(()=>({sites:{label:n(`insights.newSites.series`),colors:{light:[`var(--green)`],dark:[`var(--green)`]}}}),[n]),p=s.data?.data.distinctDomains.value??0,m=I(t)!==null&&p>0?n(`insights.newSites.share`,{share:a.percent(Math.min(1,u/p))}):null;return(0,K.jsx)(e,{title:n(`insights.newSites.title`),subtitle:o.data&&u>0?[n(`insights.newSites.total`,{count:u,sites:a.number(u)}),m].filter(Boolean).join(` · `):void 0,action:(0,K.jsx)(v,{meta:o.data?.meta,explain:n(`insights.newSites.explain`)}),children:(0,K.jsx)(`div`,{className:u===0?void 0:`h-[180px]`,children:o.isError&&o.data===void 0?(0,K.jsx)(r,{error:o.error,onRetry:()=>void o.refetch()}):o.data&&u===0?(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:N(o.data)?n(`insights.stale`):n(`insights.newSites.none`)}):(0,K.jsxs)(O,{data:l,config:d,xDataKey:`dateKey`,isLoading:o.data===void 0,className:`aspect-auto h-full`,barRadius:3,children:[(0,K.jsx)(O.Grid,{vertical:!1,strokeDasharray:`3 4`}),(0,K.jsx)(O.XAxis,{dataKey:`dateKey`,tickLine:!1,axisLine:!1,minTickGap:32,tickFormatter:e=>f(a,c,e),className:`font-mono`}),(0,K.jsx)(O.Tooltip,{}),(0,K.jsx)(O.Bar,{dataKey:`sites`})]})})})}function Je(e,t,n){let r=(n,r)=>e.setQueryData(w(t,n),r);r(`digest`,n.digestSummary),r(`top-sites`,n.topSites),r(`activity-mix`,n.activityMix),r(`refind`,n.refindPages),r(`search-engines`,n.searchEngineRanking),r(`search-concepts`,n.topSearchConcepts),r(`query-families`,n.queryFamilies),r(`new-sites`,n.discoveryTrendDay),r(`habits`,n.habitPatterns),r(`interrupted-habits`,n.interruptedHabits)}function Ye(e,t,n){let r=(n,r)=>e.setQueryData(w(t,n),r);r(`threads`,n.reopenedInvestigations),r(`breadth`,n.breadthIndex),r(`paths`,n.pathFlows),r(`browsers`,n.multiBrowserDiff),r(`effectiveness`,n.searchEffectiveness),r(`friction`,n.frictionSignals),r(`compare-sets`,n.compareSets),r(`search-landings`,n.stableSources)}function Xe(e){let t=je(),n=!B({queryKey:w(e,`overview`,`primary`),queryFn:async()=>{let n=await H.getPrimaryOverview(T(e));return Je(t,e,n),n.totalDurationMs}}).isPending;return{primary:n,secondary:!B({queryKey:w(e,`overview`,`secondary`),queryFn:async()=>{let n=await H.getSecondaryOverview(T(e));return Ye(t,e,n),n.totalDurationMs},enabled:n}).isPending}}function Ze({scope:t}){let{t:n}=i(),r=P(),a=d(t);return(0,K.jsx)(e,{title:n(`insights.paths.title`),subtitle:n(`insights.paths.subtitle`),action:(0,K.jsx)(v,{meta:a.data?.meta,explain:n(`insights.paths.explain`)}),children:(0,K.jsx)(y,{query:a,skeleton:(0,K.jsx)(S,{rows:5}),isEmpty:e=>e.data.items.length===0,empty:n(`insights.paths.empty`),children:e=>(0,K.jsx)(E,{fill:!0,maxHeight:240,children:(0,K.jsx)(`ul`,{className:`flex flex-col gap-1`,children:e.data.items.map(e=>(0,K.jsxs)(`li`,{className:`flex items-center justify-between gap-3 py-1 text-[13px]`,children:[(0,K.jsx)(`span`,{className:`flex min-w-0 flex-1 items-center gap-1`,children:e.steps.map((e,r)=>(0,K.jsxs)(G.Fragment,{children:[r>0&&(0,K.jsx)(ve,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-label":n(`insights.paths.then`)}),e.registrableDomain?(0,K.jsxs)(D,{to:R(e.registrableDomain,t),className:`flex min-w-0 items-center gap-1.5 rounded-md px-1 hover:bg-muted hover:no-underline`,children:[(0,K.jsx)(k,{domain:e.registrableDomain}),(0,K.jsx)(`span`,{className:`truncate`,children:e.label})]}):(0,K.jsx)(`span`,{className:`truncate px-1`,children:e.label})]},e.index))}),(0,K.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular`,children:n(`insights.paths.times`,{count:e.occurrenceCount,times:r.number(e.occurrenceCount)})})]},e.flowId))})})})})}function Qe({scope:t}){let{t:n}=i(),r=P(),a=se(t);return(0,K.jsx)(e,{title:n(`insights.threads.title`),subtitle:n(`insights.threads.subtitle`),action:(0,K.jsx)(v,{meta:a.data?.meta,explain:n(`insights.threads.explain`)}),children:(0,K.jsx)(y,{query:a,skeleton:(0,K.jsx)(S,{rows:4,height:40}),isEmpty:e=>e.data.length===0,empty:n(`insights.threads.empty`),children:e=>(0,K.jsx)(`ul`,{className:`-mx-2 flex flex-col`,children:e.data.map(e=>{let i=e.anchorType===`query_family`;return(0,K.jsx)(`li`,{children:(0,K.jsxs)(D,{to:i?L(e.anchorLabel,t):F(e.anchorId,t),className:V(C,`items-start py-2`),children:[(0,K.jsx)(`span`,{className:`mt-px`,children:(0,K.jsx)(xe,{topic:e})}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.anchorLabel}),(0,K.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[i?n(`insights.threads.searched`,{count:e.occurrenceCount,times:r.number(e.occurrenceCount)}):n(`insights.threads.opened`,{count:e.distinctDays,days:r.number(e.distinctDays)}),` · `,n(`insights.threads.last`,{when:r.relative(e.lastSeenAt)})]})]})]})},e.investigationId)})})})})}function $e(e){return e>=75?`wide`:e>=45?`mixed`:`focused`}function et({scope:t}){let{t:n}=i(),r=P(),a=pe(t),o=g(t).data?.data.newDomains.value;return(0,K.jsx)(e,{title:n(`insights.breadth.title`),action:(0,K.jsx)(v,{meta:a.data?.meta,explain:n(`insights.breadth.explain`)}),children:(0,K.jsx)(y,{query:a,skeleton:(0,K.jsx)(M,{className:`h-28`}),isEmpty:e=>e.data.concentrationDomainCount===0,empty:n(`insights.topSites.empty`),children:e=>{let i=Math.round(e.data.breadthScore),a=$e(i);return(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,K.jsx)(`p`,{className:`text-[15px] leading-snug`,children:n(`insights.breadth.half`,{count:e.data.concentrationDomainCount,sites:r.number(e.data.concentrationDomainCount)})}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,K.jsx)(`div`,{role:`meter`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,"aria-label":n(`insights.breadth.meter`),className:`relative h-2 rounded-full bg-gradient-to-r from-blue/30 via-muted to-brand/40`,children:(0,K.jsx)(`span`,{className:`absolute top-1/2 size-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-card bg-foreground shadow-card transition-[left] duration-500`,style:{left:`${i}%`}})}),(0,K.jsxs)(`div`,{className:`flex justify-between text-[11px] text-muted-foreground`,children:[(0,K.jsx)(`span`,{children:n(`insights.breadth.focusedEnd`)}),(0,K.jsx)(`span`,{children:n(`insights.breadth.wideEnd`)})]})]}),(0,K.jsxs)(`p`,{className:`text-[13px] text-muted-foreground`,children:[n(`insights.breadth.${a}`),t.range!==`all`&&o!=null&&o>0&&` ${n(`insights.breadth.newSites`,{count:o,sites:r.number(o)})}`]})]})}})})}function tt(e,t){switch(e.habitType){case`daily_habit`:return t(`insights.habits.daily`);case`weekly_habit`:return t(`insights.habits.weekly`);default:return t(`insights.habits.periodic`,{days:String(Math.round(e.meanIntervalDays))})}}function nt({scope:t}){let{t:n}=i(),r=P(),a=ae(t);return(0,K.jsx)(e,{title:n(`insights.habits.title`),subtitle:n(`insights.habits.subtitle`),action:(0,K.jsx)(v,{meta:a.data?.meta,explain:n(`insights.habits.explain`)}),children:(0,K.jsx)(y,{query:a,skeleton:(0,K.jsx)(S,{rows:4,height:40}),isEmpty:e=>e.data.length===0,empty:n(`insights.habits.empty`),children:e=>(0,K.jsx)(`ul`,{className:`-mx-2 flex flex-col`,children:e.data.map(e=>(0,K.jsx)(`li`,{children:(0,K.jsxs)(D,{to:R(e.registrableDomain,t),className:V(C,`py-2`),children:[(0,K.jsx)(k,{domain:e.registrableDomain}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.registrableDomain}),(0,K.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[tt(e,n),` ·`,` `,n(`insights.habits.days`,{count:e.visitCount,days:r.number(e.visitCount)})]})]}),e.isInterrupted?(0,K.jsx)(`span`,{className:`rounded-md bg-brand-soft px-1.5 py-0.5 text-[11px] text-brand`,children:n(`insights.habits.stopped`,{when:r.relative(e.lastVisitedAt)})}):(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:r.relative(e.lastVisitedAt)})]})},e.registrableDomain))})})})}function rt({scope:t}){let{t:n}=i(),r=P(),a=ce(t),o=Ne(),s=new Map((o.data??[]).map(e=>[e.profileId,e]));return(0,K.jsx)(e,{title:n(`insights.browsers.title`),action:(0,K.jsx)(v,{meta:a.data?.meta,explain:n(`insights.browsers.explain`)}),children:(0,K.jsx)(y,{query:a,skeleton:(0,K.jsx)(S,{rows:3,height:40}),isEmpty:e=>e.data.profiles.length<2,empty:n(`insights.browsers.single`),children:e=>{let{profiles:i,sharedDomains:a,exclusiveDomains:o,categoryDistributions:c}=e.data,l=i.reduce((e,t)=>e+t.visitCount,0),u=[...i].sort((e,t)=>t.visitCount-e.visitCount);return(0,K.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,K.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:u.map(e=>{let i=s.get(e.profileId),a=o.filter(t=>t.profileId===e.profileId).sort((e,t)=>t.visitCount-e.visitCount).slice(0,3),u=(c.find(t=>t.profileId===e.profileId)?.categories??[]).filter(e=>e.domainCategory!==ke).sort((e,t)=>t.visitCount-e.visitCount).slice(0,2);return(0,K.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,K.jsxs)(`span`,{className:`flex items-baseline justify-between gap-2 text-[13px]`,children:[(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 font-medium`,children:[i&&(0,K.jsx)(Me,{browserName:i.browserName,decorative:!0,className:`size-4 shrink-0`}),(0,K.jsx)(`span`,{className:`truncate`,children:i?U(i,n):e.profileName})]}),(0,K.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular`,children:[n(`common.visits`,{count:e.visitCount}),` ·`,` `,n(`common.sites`,{count:e.domainCount})]})]}),(0,K.jsx)(`span`,{className:`h-1.5 overflow-hidden rounded-full bg-muted`,children:(0,K.jsx)(`span`,{className:`block h-full rounded-full bg-brand transition-[width] duration-500`,style:{width:`${l?e.visitCount/l*100:0}%`}})}),u.length>0&&(0,K.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:n(`insights.browsers.kinds`,{kinds:u.map(e=>`${n(`insights.mix.categories.${Oe(e.domainCategory)}`)} ${r.percent(e.share)}`).join(n(`insights.browsers.kindsJoin`))})}),a.length>0&&(0,K.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[n(`insights.browsers.only`),` `,a.map((e,n)=>(0,K.jsxs)(`span`,{children:[n>0&&`, `,(0,K.jsx)(D,{to:R(e.registrableDomain,t),className:`text-foreground hover:underline`,children:e.registrableDomain})]},e.registrableDomain))]})]},e.profileId)})}),(0,K.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[n(`insights.browsers.shared`,{count:a.length,sites:r.number(a.length)}),a.length>0&&(0,K.jsxs)(K.Fragment,{children:[` `,n(`insights.browsers.sharedTop`),` `,a.slice(0,3).map((e,r)=>(0,K.jsxs)(`span`,{children:[r>0&&n(`insights.browsers.kindsJoin`),(0,K.jsx)(D,{to:R(e,t),className:`text-foreground hover:underline`,children:e})]},e))]})]})]})}})})}function X({scope:t}){let{t:n}=i(),r=P(),a=h(t);return(0,K.jsx)(e,{title:n(`insights.engines.title`),action:(0,K.jsx)(v,{meta:a.data?.meta,explain:n(`insights.engines.explain`)}),children:(0,K.jsx)(y,{query:a,skeleton:(0,K.jsx)(S,{rows:4}),isEmpty:e=>e.data.length===0,empty:n(`insights.searches.empty`),children:e=>{let t=e.data.reduce((e,t)=>e+t.searchCount,0),n=Math.max(1,...e.data.map(e=>e.searchCount));return(0,K.jsx)(E,{maxHeight:228,children:(0,K.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:e.data.map(e=>(0,K.jsxs)(`li`,{className:`relative flex h-8 items-center gap-2.5 px-2 text-[13px]`,children:[e.site?(0,K.jsx)(k,{domain:e.site,className:`size-4 rounded-[4px] text-[9px]`}):(0,K.jsx)(W,{className:`size-3.5 text-muted-foreground`,"aria-hidden":!0}),(0,K.jsx)(`span`,{className:`flex-1 truncate font-medium`,children:e.displayName||e.searchEngine}),(0,K.jsx)(z,{value:e.searchCount,max:n,tone:`blue`}),(0,K.jsxs)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:[r.compact(e.searchCount),` ·`,` `,r.percent(t?e.searchCount/t:0)]})]},e.searchEngine))})})}})})}function Z({scope:t}){let{t:n}=i(),r=P(),a=ie(t);return(0,K.jsx)(e,{title:n(`insights.words.title`),subtitle:n(`insights.words.subtitle`),action:(0,K.jsx)(v,{meta:a.data?.meta,explain:n(`insights.words.explain`)}),children:(0,K.jsx)(y,{query:a,skeleton:(0,K.jsx)(S,{rows:3}),isEmpty:e=>e.data.items.length===0,empty:n(`insights.searches.empty`),children:e=>(0,K.jsx)(E,{maxHeight:180,children:(0,K.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.data.items.map(e=>(0,K.jsxs)(D,{to:Ee({q:e.term}),className:`flex h-7 items-center gap-1.5 rounded-full border bg-card px-3 text-[13px] transition-colors hover:bg-muted hover:no-underline`,children:[e.term,(0,K.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:r.compact(e.frequency)})]},e.term))})})})})}function it({scope:t}){let{t:n}=i(),r=P(),a=oe(t),o=e=>r.number(Math.round(e*10)/10);return(0,K.jsx)(e,{title:n(`insights.outcomes.title`),action:(0,K.jsx)(v,{meta:a.data?.meta,explain:n(`insights.outcomes.explain`)}),children:(0,K.jsx)(y,{query:a,skeleton:(0,K.jsx)(S,{rows:4}),isEmpty:e=>e.data.engineStats.length===0,empty:n(`insights.searches.empty`),children:e=>(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,K.jsx)(`ul`,{className:`flex flex-col gap-2 text-[13px]`,children:e.data.engineStats.slice(0,4).map(e=>(0,K.jsxs)(`li`,{className:`flex flex-col gap-0.5`,children:[(0,K.jsxs)(`span`,{className:`flex items-baseline justify-between gap-2`,children:[(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.displayName||e.searchEngine}),(0,K.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular`,children:n(`insights.outcomes.searches`,{count:e.totalTrails,searches:r.number(e.totalTrails)})})]}),(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n(`insights.outcomes.engine`,{rewordings:o(e.avgReformulations),pages:o(e.avgDepth)})})]},e.searchEngine))}),e.data.hardestTopics.items.length>0&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,K.jsx)(`h3`,{className:`text-[13px] font-semibold`,children:n(`insights.outcomes.mostReturned`)}),(0,K.jsx)(`ul`,{className:`-mx-2 flex flex-col`,children:e.data.hardestTopics.items.map(e=>(0,K.jsx)(`li`,{children:(0,K.jsxs)(D,{to:L(e.queryFamily,t),className:`flex min-w-0 items-center gap-2.5 rounded-md px-2 py-1.5 text-[13px] transition-colors hover:bg-muted hover:no-underline`,children:[(0,K.jsx)(W,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":!0}),(0,K.jsx)(`span`,{className:`flex-1 truncate`,children:e.queryFamily}),(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground tabular`,children:n(`insights.outcomes.topic`,{count:e.searchCount,searches:r.number(e.searchCount),days:r.number(Math.max(1,Math.round(e.reSearchLagDays)))})})]})},e.topicKey))})]})]})})})}function at({scope:t}){let{t:n}=i(),r=P(),a=p(t);return(0,K.jsx)(e,{title:n(`insights.tries.title`),subtitle:n(`insights.tries.subtitle`),action:(0,K.jsx)(v,{meta:a.data?.meta,explain:n(`insights.tries.explain`)}),children:(0,K.jsx)(y,{query:a,skeleton:(0,K.jsx)(S,{rows:5,height:40}),isEmpty:e=>e.data.items.length===0,empty:n(`insights.tries.empty`),children:e=>(0,K.jsx)(E,{maxHeight:264,children:(0,K.jsx)(`ul`,{className:`-mx-2 flex flex-col`,children:e.data.items.map((e,i)=>(0,K.jsx)(`li`,{children:(0,K.jsxs)(D,{to:L(e.searchQuery,t),className:C,children:[(0,K.jsx)(Ie,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":!0}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,K.jsx)(`span`,{className:`truncate`,children:e.searchQuery}),(0,K.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[e.reformulationCount>0&&n(`insights.tries.reworded`,{count:e.reformulationCount,times:r.number(e.reformulationCount)}),e.registrableDomain?n(`insights.tries.endedOn`,{site:e.registrableDomain}):n(`insights.tries.noResult`)].filter(Boolean).join(` · `)})]})]})},`${e.searchQuery}-${i}`))})})})})}function ot({scope:t}){let{t:n}=i(),r=P(),a=ne(t);return(0,K.jsx)(e,{title:n(`insights.landings.title`),subtitle:n(`insights.landings.subtitle`),action:(0,K.jsx)(v,{meta:a.data?.meta,explain:n(`insights.landings.explain`)}),children:(0,K.jsx)(y,{query:a,skeleton:(0,K.jsx)(S,{rows:6}),isEmpty:e=>e.data.items.length===0,empty:n(`insights.searches.empty`),children:e=>{let i=Math.max(1,...e.data.items.map(e=>e.searchCount));return(0,K.jsx)(E,{maxHeight:228,children:(0,K.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:e.data.items.map(e=>(0,K.jsx)(`li`,{children:(0,K.jsxs)(D,{to:R(e.registrableDomain,t),className:`relative flex h-8 items-center gap-2.5 rounded-md px-2 text-[13px] hover:no-underline`,children:[(0,K.jsx)(k,{domain:e.registrableDomain}),(0,K.jsx)(`span`,{className:`flex-1 truncate font-medium`,children:e.registrableDomain}),(0,K.jsx)(z,{value:e.searchCount,max:i}),(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground tabular`,children:n(`insights.landings.counts`,{count:e.searchCount,searches:r.compact(e.searchCount),queries:r.number(e.queryCount)})})]})},e.registrableDomain))})})}})})}function Q({children:e}){return(0,K.jsx)(`div`,{className:`grid grid-cols-[minmax(0,1.5fr)_minmax(0,1fr)] gap-4 max-[900px]:grid-cols-1`,children:e})}function $({children:e}){return(0,K.jsx)(`h2`,{className:`mt-3 text-[15px] font-semibold`,children:e})}function st(){let{t:e}=i(),[r]=Te(),a=Xe(r),o=te(r);return(0,K.jsx)(le,{value:a,children:(0,K.jsxs)(n,{wide:!0,children:[(0,K.jsx)(t,{title:e(`insights.title`),subtitle:e(`insights.subtitle`),actions:(0,K.jsx)(Pe,{})}),(0,K.jsx)(Fe,{}),(0,K.jsx)(ze,{scope:r}),(0,K.jsxs)(Q,{children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,K.jsx)(Be,{scope:r}),(0,K.jsx)(ge,{scope:r})]}),(0,K.jsx)(Ve,{scope:r})]}),(0,K.jsx)($,{children:e(`insights.sections.time`)}),(0,K.jsxs)(Q,{children:[(0,K.jsx)(He,{scope:r}),(0,K.jsx)(qe,{scope:r})]}),(0,K.jsx)($,{children:e(`insights.sections.searching`)}),(0,K.jsxs)(Q,{children:[o.visible?(0,K.jsx)(We,{scope:r,query:o.query}):(0,K.jsx)(J,{scope:r}),o.visible?(0,K.jsx)(J,{scope:r}):(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,K.jsx)(X,{scope:r}),(0,K.jsx)(Z,{scope:r})]})]}),o.visible&&(0,K.jsxs)(Q,{children:[(0,K.jsx)(X,{scope:r}),(0,K.jsx)(Z,{scope:r})]}),(0,K.jsxs)(Q,{children:[(0,K.jsx)(it,{scope:r}),(0,K.jsx)(at,{scope:r})]}),(0,K.jsxs)(Q,{children:[(0,K.jsx)(ot,{scope:r}),(0,K.jsx)(he,{scope:r})]}),(0,K.jsx)($,{children:e(`insights.patterns`)}),(0,K.jsxs)(Q,{children:[(0,K.jsx)(Qe,{scope:r}),(0,K.jsx)(nt,{scope:r})]}),(0,K.jsxs)(Q,{children:[(0,K.jsx)(Ze,{scope:r}),(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,K.jsx)(et,{scope:r}),(0,K.jsx)(rt,{scope:r})]})]})]})})}export{st as default}; \ No newline at end of file diff --git a/site/public/app/assets/intelligence-CeVzSBj6.js b/site/public/app/assets/intelligence-CeVzSBj6.js new file mode 100644 index 00000000..c8a2b9d4 --- /dev/null +++ b/site/public/app/assets/intelligence-CeVzSBj6.js @@ -0,0 +1 @@ +import{F as e}from"./index-CteWxeiL.js";var t={storeProviderApiKey:t=>e(`store_ai_provider_api_key`,{input:t}),clearProviderApiKey:t=>e(`clear_ai_provider_api_key`,{providerId:t}),testProviderConnection:t=>e(`test_ai_provider_connection`,{request:t}),listProviderModels:t=>e(`list_ai_provider_models`,{request:t}),getQueueStatus:()=>e(`load_ai_queue_status`),listMcpQueries:(t,n)=>e(`load_mcp_queries`,{cursor:t,limit:n}),listQueueJobs:t=>e(`list_ai_jobs`,{request:t}),runQueueJobs:t=>e(`run_ai_queue_jobs`,{maxJobs:t}),replayJob:t=>e(`replay_ai_job`,{jobId:t}),cancelJob:t=>e(`cancel_ai_job`,{jobId:t}),pauseJob:t=>e(`pause_ai_job`,{jobId:t}),buildIndex:t=>e(`build_ai_index`,{request:t}),estimateReembed:t=>e(`estimate_reembed`,{scope:t}),searchHistory:t=>e(`search_ai_history`,{request:t}),chatContext:t=>e(`ai_chat_context`,{request:t}),sendChat:t=>e(`ai_chat_send`,{request:t}),cancelChat:t=>e(`ai_chat_cancel`,{runId:t}),saveConversation:t=>e(`save_ai_conversation`,{request:t}),listConversations:(t={})=>e(`list_ai_conversations`,{request:t}),loadConversation:t=>e(`load_ai_conversation`,{conversationId:t}),deleteConversation:t=>e(`delete_ai_conversation`,{conversationId:t}),renameConversation:t=>e(`rename_ai_conversation`,{request:t}),exportConversation:t=>e(`export_ai_conversation`,{request:t}),listSearchEngineRules:()=>e(`list_search_engine_rules`),upsertSearchEngineRule:t=>e(`upsert_search_engine_rule`,{input:t}),deleteSearchEngineRule:t=>e(`delete_search_engine_rule`,{ruleId:t}),queueCoreIntelligenceRebuild:t=>e(`queue_core_intelligence_rebuild`,{request:t}),previewClearDerivedState:()=>e(`preview_clear_derived_intelligence`),clearDerivedState:()=>e(`clear_derived_intelligence`),getPrimaryOverview:t=>e(`get_intelligence_primary_overview`,{request:t}),getSecondaryOverview:t=>e(`get_intelligence_secondary_overview`,{request:t}),getDayInsights:t=>e(`get_day_insights`,{request:t}),getRuntime:()=>e(`load_intelligence_runtime`),listRuntimeJobs:t=>e(`list_intelligence_jobs`,{request:t}),retryRuntimeJob:t=>e(`retry_intelligence_job`,{jobId:t}),cancelRuntimeJob:t=>e(`cancel_intelligence_job`,{jobId:t}),previewIntegrations:()=>e(`preview_ai_integrations`),downloadStaticEmbeddingModel:()=>e(`download_static_embedding_model`),cancelStaticEmbeddingModelDownload:()=>e(`cancel_ai_embedding_model_download`),resetAiIndexBuild:()=>e(`reset_ai_index_build`,{request:{fullRebuild:!0,clearOnly:!1}})};export{t}; \ No newline at end of file diff --git a/site/public/app/assets/librewolf-Cl9rHKex.svg b/site/public/app/assets/librewolf-Cl9rHKex.svg new file mode 100644 index 00000000..2c6262a3 --- /dev/null +++ b/site/public/app/assets/librewolf-Cl9rHKex.svg @@ -0,0 +1,90 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/site/public/app/assets/links-4-O_q9FA.js b/site/public/app/assets/links-4-O_q9FA.js new file mode 100644 index 00000000..eac3fbe8 --- /dev/null +++ b/site/public/app/assets/links-4-O_q9FA.js @@ -0,0 +1 @@ +import{c as e}from"./spaces-BqDG3Cu2.js";import{Q as t,S as n,T as r,Y as i,b as a,g as o}from"./index-CteWxeiL.js";import{t as s}from"./search-params-CHojWQdJ.js";import{i as c}from"./zone-CAMroIcN.js";var l=t(i(),1),u=[`all`,`y1`,`d90`,`d30`,`d7`],d={y1:365,d90:90,d30:30,d7:7},f=`1900-01-01`;function p(e){return u.includes(e)}function m(e,t){return e===`all`?{start:f,end:t}:{start:o(t,-(d[e]-1)),end:t}}function h(e,t){return{range:e,dates:m(e,r(t)),profileId:null,zone:t}}function g(e,t,i=Date.now()){let a=r(t,i),o=e.get(`profile`)||null,s=e.get(`range`);if(s===`custom`){let r=e.get(`start`),i=e.get(`end`);if(n(r)&&n(i)&&r<=i&&i<=a)return{range:`custom`,dates:{start:r,end:i},profileId:o,zone:t}}let c=p(s)?s:`all`;return{range:c,dates:m(c,a),profileId:o,zone:t}}function _(e,t=new URLSearchParams){for(let e of[`range`,`start`,`end`,`profile`])t.delete(e);return e.range!==`all`&&t.set(`range`,e.range),e.range===`custom`&&(t.set(`start`,e.dates.start),t.set(`end`,e.dates.end)),e.profileId&&t.set(`profile`,e.profileId),t}function v(e){return[e.dates.start,e.dates.end,e.profileId,e.zone]}function y(e){return e.range===`all`?null:a(e.dates.start,e.dates.end)+1}function b(){let[e,t]=s(),n=c().shown;return[(0,l.useMemo)(()=>g(e,n),[e,n]),(0,l.useCallback)(e=>t(t=>{let i=g(t,n),a=e.range??i.range;return _({range:a,dates:a===`custom`?e.dates??i.dates:m(a,r(n)),profileId:e.profileId===void 0?i.profileId:e.profileId,zone:n},t)}),[t,n])]}function x(e,t,n){let r=(t?_(t,new URLSearchParams(n)):new URLSearchParams(n)).toString();return r?`${e}?${r}`:e}var S=(t=``)=>e(`browsing`,`insights`,t),C=e=>x(S(),e),w=(e,t)=>x(S(`/day/${e}`),t),T=(e,t)=>x(S(`/site/${encodeURIComponent(e)}`),t),E=(e,t)=>x(S(`/search/${encodeURIComponent(e)}`),t),D=(e,t,n)=>x(S(`/page/${encodeURIComponent(e)}`),t,n?new URLSearchParams({scores:n}):void 0);function O(e){return e.range===`all`?void 0:`${e.dates.start}..${e.dates.end}`}function k(t){let n=new URLSearchParams;t.q&&n.set(`q`,t.q),t.date&&n.set(`date`,t.date),t.domain&&n.set(`domain`,t.domain),t.visit&&n.set(`visit`,String(t.visit));let r=n.toString();return e(`browsing`,`history`,r?`?${r}`:``)}export{D as a,f as c,u as d,y as f,C as i,p as l,b as m,O as n,E as o,v as p,k as r,T as s,w as t,h as u}; \ No newline at end of file diff --git a/site/public/app/assets/loader-circle-BRt0w1nZ.js b/site/public/app/assets/loader-circle-BRt0w1nZ.js new file mode 100644 index 00000000..aef5d555 --- /dev/null +++ b/site/public/app/assets/loader-circle-BRt0w1nZ.js @@ -0,0 +1 @@ +import{c as e}from"./button-C0JM8asg.js";var t={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};t.node;var n=e(t);export{n as t}; \ No newline at end of file diff --git a/site/public/app/assets/main-CP-I-o71.css b/site/public/app/assets/main-CP-I-o71.css new file mode 100644 index 00000000..b8da4246 --- /dev/null +++ b/site/public/app/assets/main-CP-I-o71.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-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--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-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:"Geist Variable", var(--font-han), system-ui, sans-serif;--font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:"Geist Mono Variable", ui-monospace, "SF Mono", Menlo, Consolas, monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--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;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-2xl:1rem;--shadow-lg:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--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;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-2xl:40px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Geist Variable", var(--font-han), system-ui, sans-serif;--default-mono-font-family:"Geist Mono Variable", ui-monospace, "SF Mono", Menlo, Consolas, monospace;--shadow-card:var(--shadow-card);--shadow-float:var(--shadow-float)}}@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}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}html,body,#root{overscroll-behavior:none;height:100%;margin:0;overflow:hidden}body{font-family:"Geist Variable", var(--font-han), system-ui, sans-serif;color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:var(--wall);font-synthesis:none;font-size:14px}html[data-window-material=glass] body{background:0 0}html[data-window-material=glass]{--window:#fafafc24;--panel:#ffffff6b}html.dark[data-window-material=glass]{--window:#1818222e;--panel:#1e1e2a4d}.space-tile{background:oklch(.62 .12 var(--tile-h) / .16);color:oklch(.5 .12 var(--tile-h))}.dark .space-tile{background:oklch(.74 .11 var(--tile-h) / .2);color:oklch(.82 .1 var(--tile-h))}.tabular{font-variant-numeric:tabular-nums}::selection{background:var(--brand-soft)}}@layer components;@layer utilities{.\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.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}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-y-0{inset-block:0}.-top-0\.5{top:calc(var(--spacing) * -.5)}.-top-\[3px\]{top:-3px}.top-0{top:0}.top-1{top:var(--spacing)}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-5{top:calc(var(--spacing) * 5)}.top-10{top:calc(var(--spacing) * 10)}.top-100{top:calc(var(--spacing) * 100)}.top-200{top:calc(var(--spacing) * 200)}.top-\[17px\]{top:17px}.top-\[50\%\]{top:50%}.top-full{top:100%}.-right-\[5\.5px\]{right:-5.5px}.right-0{right:0}.right-0\.5{right:calc(var(--spacing) * .5)}.right-1\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-2\.5{right:calc(var(--spacing) * 2.5)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.-bottom-3{bottom:calc(var(--spacing) * -3)}.bottom-0{bottom:0}.bottom-1{bottom:var(--spacing)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-4{bottom:calc(var(--spacing) * 4)}.-left-1{left:calc(var(--spacing) * -1)}.-left-\[5\.5px\]{left:-5.5px}.left-0{left:0}.left-1{left:var(--spacing)}.left-1\.5{left:calc(var(--spacing) * 1.5)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-4{left:calc(var(--spacing) * 4)}.left-\[18px\]{left:18px}.left-\[50\%\]{left:50%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-10000{z-index:10000}.order-last{order:9999}.col-span-2{grid-column:span 2/span 2}.col-start-2{grid-column-start:2}.row-0{grid-row:0}.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}}.m-5{margin:calc(var(--spacing) * 5)}.m-auto{margin:auto}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.-mx-1\.5{margin-inline:calc(var(--spacing) * -1.5)}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-mx-3{margin-inline:calc(var(--spacing) * -3)}.-mx-5{margin-inline:calc(var(--spacing) * -5)}.mx-1{margin-inline:var(--spacing)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-5{margin-inline:calc(var(--spacing) * 5)}.mx-auto{margin-inline:auto}.-my-1{margin-block:calc(var(--spacing) * -1)}.-my-1\.5{margin-block:calc(var(--spacing) * -1.5)}.my-0\.5{margin-block:calc(var(--spacing) * .5)}.my-1{margin-block:var(--spacing)}.my-1\.5{margin-block:calc(var(--spacing) * 1.5)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-2\.5{margin-block:calc(var(--spacing) * 2.5)}.my-4{margin-block:calc(var(--spacing) * 4)}.my-6{margin-block:calc(var(--spacing) * 6)}.my-\[3px\]{margin-block:3px}.-mt-1\.5{margin-top:calc(var(--spacing) * -1.5)}.-mt-2{margin-top:calc(var(--spacing) * -2)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.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-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-16{margin-top:calc(var(--spacing) * 16)}.mt-auto{margin-top:auto}.mt-px{margin-top:1px}.mr-0\.5{margin-right:calc(var(--spacing) * .5)}.mr-1{margin-right:var(--spacing)}.mr-2\.5{margin-right:calc(var(--spacing) * 2.5)}.-mb-3{margin-bottom:calc(var(--spacing) * -3)}.-mb-5{margin-bottom:calc(var(--spacing) * -5)}.-mb-7{margin-bottom:calc(var(--spacing) * -7)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.-ml-2{margin-left:calc(var(--spacing) * -2)}.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-5{margin-left:calc(var(--spacing) * 5)}.ml-7{margin-left:calc(var(--spacing) * 7)}.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}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.hidden\!{display:none!important}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.field-sizing-content{field-sizing:content}.aspect-\[1\.91\/1\]{aspect-ratio:1.91}.aspect-auto{aspect-ratio:auto}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-\(--cell-size\){width:var(--cell-size);height:var(--cell-size)}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.size-\[7px\]{width:7px;height:7px}.size-\[13px\]{width:13px;height:13px}.size-\[15px\]{width:15px;height:15px}.size-\[17px\]{width:17px;height:17px}.size-\[18px\]{width:18px;height:18px}.size-\[22px\]{width:22px;height:22px}.size-\[34px\]{width:34px;height:34px}.size-auto{width:auto;height:auto}.size-full{width:100%;height:100%}.h-\(--cell-size\){height:var(--cell-size)}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1{height:var(--spacing)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.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-6\.5{height:calc(var(--spacing) * 6.5)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-32{height:calc(var(--spacing) * 32)}.h-40{height:calc(var(--spacing) * 40)}.h-64{height:calc(var(--spacing) * 64)}.h-\[1\.15rem\]{height:1.15rem}.h-\[2px\]{height:2px}.h-\[3px\]{height:3px}.h-\[4px\]{height:4px}.h-\[26px\]{height:26px}.h-\[30px\]{height:30px}.h-\[34px\]{height:34px}.h-\[38px\]{height:38px}.h-\[42px\]{height:42px}.h-\[46px\]{height:46px}.h-\[52px\]{height:52px}.h-\[54px\]{height:54px}.h-\[56px\]{height:56px}.h-\[58px\]{height:58px}.h-\[72px\]{height:72px}.h-\[76px\]{height:76px}.h-\[104px\]{height:104px}.h-\[110px\]{height:110px}.h-\[150px\]{height:150px}.h-\[180px\]{height:180px}.h-\[200px\]{height:200px}.h-\[210px\]{height:210px}.h-\[220px\]{height:220px}.h-\[230px\]{height:230px}.h-\[340px\]{height:340px}.h-\[calc\(100\%-1px\)\]{height:calc(100% - 1px)}.h-\[clamp\(340px\,calc\(100vh-352px\)\,600px\)\]{height:clamp(340px,100vh - 352px,600px)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-\(--radix-dropdown-menu-content-available-height\){max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-\(--radix-select-content-available-height\){max-height:var(--radix-select-content-available-height)}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[50vh\]{max-height:50vh}.max-h-\[200px\]{max-height:200px}.max-h-\[220px\]{max-height:220px}.max-h-\[240px\]{max-height:240px}.max-h-\[260px\]{max-height:260px}.max-h-\[300px\]{max-height:300px}.max-h-\[320px\]{max-height:320px}.max-h-\[340px\]{max-height:340px}.max-h-\[360px\]{max-height:360px}.max-h-\[364px\]{max-height:364px}.max-h-\[420px\]{max-height:420px}.max-h-\[460px\]{max-height:460px}.max-h-\[calc\(100dvh-2rem\)\]{max-height:calc(100dvh - 2rem)}.max-h-\[min\(70vh\,40rem\)\]{max-height:min(70vh,40rem)}.max-h-\[min\(420px\,60vh\)\]{max-height:min(420px,60vh)}.max-h-\[min\(460px\,calc\(100vh-280px\)\)\]{max-height:min(460px,100vh - 280px)}.min-h-0{min-height:0}.min-h-2{min-height:calc(var(--spacing) * 2)}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-10{min-height:calc(var(--spacing) * 10)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-28{min-height:calc(var(--spacing) * 28)}.min-h-\[2px\]{min-height:2px}.min-h-\[18px\]{min-height:18px}.min-h-\[30px\]{min-height:30px}.min-h-\[38px\]{min-height:38px}.min-h-\[48px\]{min-height:48px}.min-h-\[72px\]{min-height:72px}.min-h-\[200px\]{min-height:200px}.min-h-px{min-height:1px}.w-\(--cell-size\){width:var(--cell-size)}.w-\(--radix-popper-anchor-width\){width:var(--radix-popper-anchor-width)}.w-0{width:0}.w-1{width:var(--spacing)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-2\/3{width:66.6667%}.w-3{width:calc(var(--spacing) * 3)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-5\/6{width:83.3333%}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-40{width:calc(var(--spacing) * 40)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\[2px\]{width:2px}.w-\[3px\]{width:3px}.w-\[4px\]{width:4px}.w-\[36px\]{width:36px}.w-\[52px\]{width:52px}.w-\[60px\]{width:60px}.w-\[64px\]{width:64px}.w-\[72px\]{width:72px}.w-\[76px\]{width:76px}.w-\[84px\]{width:84px}.w-\[120px\]{width:120px}.w-\[132px\]{width:132px}.w-\[150px\]{width:150px}.w-\[168px\]{width:168px}.w-\[190px\]{width:190px}.w-\[200px\]{width:200px}.w-\[210px\]{width:210px}.w-\[220px\]{width:220px}.w-\[240px\]{width:240px}.w-\[252px\]{width:252px}.w-\[260px\]{width:260px}.w-\[280px\]{width:280px}.w-\[300px\]{width:300px}.w-\[320px\]{width:320px}.w-\[340px\]{width:340px}.w-\[380px\]{width:380px}.w-\[400px\]{width:400px}.w-\[460px\]{width:460px}.w-\[480px\]{width:480px}.w-\[540px\]{width:540px}.w-\[560px\]{width:560px}.w-\[580px\]{width:580px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\[40\%\]{max-width:40%}.max-w-\[48\%\]{max-width:48%}.max-w-\[60px\]{max-width:60px}.max-w-\[80\%\]{max-width:80%}.max-w-\[85\%\]{max-width:85%}.max-w-\[120px\]{max-width:120px}.max-w-\[220px\]{max-width:220px}.max-w-\[240px\]{max-width:240px}.max-w-\[260px\]{max-width:260px}.max-w-\[280px\]{max-width:280px}.max-w-\[320px\]{max-width:320px}.max-w-\[360px\]{max-width:360px}.max-w-\[420px\]{max-width:420px}.max-w-\[440px\]{max-width:440px}.max-w-\[460px\]{max-width:460px}.max-w-\[560px\]{max-width:560px}.max-w-\[600px\]{max-width:600px}.max-w-\[620px\]{max-width:620px}.max-w-\[640px\]{max-width:640px}.max-w-\[680px\]{max-width:680px}.max-w-\[760px\]{max-width:760px}.max-w-\[780px\]{max-width:780px}.max-w-\[960px\]{max-width:960px}.max-w-\[1040px\]{max-width:1040px}.max-w-\[1080px\]{max-width:1080px}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.min-w-\(--cell-size\){min-width:var(--cell-size)}.min-w-0{min-width:0}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-8{min-width:calc(var(--spacing) * 8)}.min-w-9{min-width:calc(var(--spacing) * 9)}.min-w-10{min-width:calc(var(--spacing) * 10)}.min-w-24{min-width:calc(var(--spacing) * 24)}.min-w-28{min-width:calc(var(--spacing) * 28)}.min-w-32{min-width:calc(var(--spacing) * 32)}.min-w-64{min-width:calc(var(--spacing) * 64)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[38px\]{min-width:38px}.min-w-\[76px\]{min-width:76px}.min-w-\[92px\]{min-width:92px}.min-w-\[96px\]{min-width:96px}.min-w-\[110px\]{min-width:110px}.min-w-\[120px\]{min-width:120px}.min-w-\[150px\]{min-width:150px}.min-w-\[160px\]{min-width:160px}.min-w-\[200px\]{min-width:200px}.min-w-\[260px\]{min-width:260px}.min-w-\[300px\]{min-width:300px}.min-w-\[320px\]{min-width:320px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.basis-full{flex-basis:100%}.border-collapse{border-collapse:collapse}.origin-\(--radix-dropdown-menu-content-transform-origin\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\(--radix-popover-content-transform-origin\){transform-origin:var(--radix-popover-content-transform-origin)}.origin-\(--radix-select-content-transform-origin\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.origin-center{transform-origin:50%}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;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-full{--tw-translate-y:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-none{translate:none}.scale-0{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-3d{scale:var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)}.-rotate-90{rotate:-90deg}.rotate-45{rotate:45deg}.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, )}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-indeterminate{animation:1.4s ease-in-out infinite indeterminate}.animate-pulse{animation:var(--animate-pulse)}.animate-rise{animation:.22s cubic-bezier(.2,.7,.2,1) both rise}.animate-shake{animation:.3s ease-in-out shake}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x, ) var(--tw-pan-y, ) var(--tw-pinch-zoom, )}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.scroll-my-1{scroll-margin-block:var(--spacing)}.scroll-py-1{scroll-padding-block:var(--spacing)}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.appearance-none{appearance:none}.auto-rows-\[8px\]{grid-auto-rows:8px}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.grid-cols-\[64px_minmax\(0\,1fr\)_64px_72px_72px\]{grid-template-columns:64px minmax(0,1fr) 64px 72px 72px}.grid-cols-\[96px_minmax\(0\,1fr\)\]{grid-template-columns:96px minmax(0,1fr)}.grid-cols-\[170px_1fr\]{grid-template-columns:170px 1fr}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[auto_1fr_auto\]{grid-template-columns:auto 1fr auto}.grid-cols-\[minmax\(0\,1\.5fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr)}.grid-cols-\[minmax\(0\,1\.6fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}.grid-cols-\[minmax\(0\,1fr\)_88px_56px_80px_32px\]{grid-template-columns:minmax(0,1fr) 88px 56px 80px 32px}.grid-cols-\[minmax\(0\,1fr\)_88px_56px_92px_72px_80px_32px\]{grid-template-columns:minmax(0,1fr) 88px 56px 92px 72px 80px 32px}.grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.grid-cols-\[repeat\(auto-fill\,minmax\(220px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(min\(100\%\,440px\)\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(min(100%,440px),1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(min\(100\%\,456px\)\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(min(100%,456px),1fr))}.grid-cols-\[repeat\(auto-fit\,minmax\(128px\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(128px,1fr))}.grid-cols-\[repeat\(auto-fit\,minmax\(170px\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}.grid-cols-\[repeat\(auto-fit\,minmax\(180px\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.grid-cols-\[repeat\(auto-fit\,minmax\(190px\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}.grid-cols-\[repeat\(auto-fit\,minmax\(200px\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.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{gap:0}.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-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-7{gap:calc(var(--spacing) * 7)}.gap-\[--spacing\(var\(--gap\)\)\]{gap:calc(var(--spacing) * var(--gap))}.gap-\[2px\]{gap:2px}.gap-\[3px\]{gap:3px}.gap-\[18px\]{gap:18px}.gap-px{gap:1px}: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-reverse>:not(:last-child)){--tw-space-y-reverse:1}.gap-x-1\.5{column-gap:calc(var(--spacing) * 1.5)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-2\.5{column-gap:calc(var(--spacing) * 2.5)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-x-8{column-gap:calc(var(--spacing) * 8)}: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-reverse>:not(:last-child)){--tw-space-x-reverse:1}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.gap-y-4{row-gap:calc(var(--spacing) * 4)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}: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-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}:where(.divide-border>:not(:last-child)){border-color:var(--border)}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.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-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[1px\]{border-radius:1px}.rounded-\[2px\]{border-radius:2px}.rounded-\[3px\]{border-radius:3px}.rounded-\[4px\]{border-radius:4px}.rounded-\[5px\]{border-radius:5px}.rounded-\[7px\]{border-radius:7px}.rounded-\[8px\]{border-radius:8px}.rounded-\[9px\]{border-radius:9px}.rounded-\[10px\]{border-radius:10px}.rounded-\[18px\]{border-radius:18px}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-\[3px\]{border-top-left-radius:3px;border-top-right-radius:3px}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-md{border-bottom-right-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.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-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-bs{border-block-start-style:var(--tw-border-style);border-block-start-width:1px}.border-be{border-block-end-style:var(--tw-border-style);border-block-end-width:1px}.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-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-amber-500\/25{border-color:#f99c0040}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/25{border-color:color-mix(in oklab, var(--color-amber-500) 25%, transparent)}}.border-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/40{border-color:color-mix(in oklab, var(--color-amber-500) 40%, transparent)}}.border-background{border-color:var(--background)}.border-border,.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\/50{border-color:color-mix(in oklab, var(--border) 50%, transparent)}}.border-brand,.border-brand\/25{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/25{border-color:color-mix(in oklab, var(--brand) 25%, transparent)}}.border-brand\/30{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/30{border-color:color-mix(in oklab, var(--brand) 30%, transparent)}}.border-brand\/35{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/35{border-color:color-mix(in oklab, var(--brand) 35%, transparent)}}.border-brand\/40{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/40{border-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.border-brand\/50{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/50{border-color:color-mix(in oklab, var(--brand) 50%, transparent)}}.border-card{border-color:var(--card)}.border-current{border-color:currentColor}.border-destructive,.border-destructive\/25{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/25{border-color:color-mix(in oklab, var(--destructive) 25%, transparent)}}.border-destructive\/30{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/30{border-color:color-mix(in oklab, var(--destructive) 30%, transparent)}}.border-foreground,.border-foreground\/10{border-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.border-foreground\/10{border-color:color-mix(in oklab, var(--foreground) 10%, transparent)}}.border-foreground\/30{border-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.border-foreground\/30{border-color:color-mix(in oklab, var(--foreground) 30%, transparent)}}.border-foreground\/\[0\.06\]{border-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.border-foreground\/\[0\.06\]{border-color:color-mix(in oklab, var(--foreground) 6%, transparent)}}.border-foreground\/\[0\.07\]{border-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.border-foreground\/\[0\.07\]{border-color:color-mix(in oklab, var(--foreground) 7.0%, transparent)}}.border-input{border-color:var(--input)}.border-muted-foreground\/30{border-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.border-muted-foreground\/30{border-color:color-mix(in oklab, var(--muted-foreground) 30%, transparent)}}.border-primary{border-color:var(--primary)}.border-transparent{border-color:#0000}.border-t-primary{border-top-color:var(--primary)}.border-t-transparent{border-top-color:#0000}.bg-\[\#28c840\]{background-color:#28c840}.bg-\[\#febc2e\]{background-color:#febc2e}.bg-\[\#ff5f57\]{background-color:#ff5f57}.bg-\[oklch\(0\.62_0\.12_var\(--h\)\/0\.16\)\]{background-color:oklch(.62 .12 var(--h)/.16)}.bg-\[oklch\(0\.75_0\.15_80\)\]{background-color:oklch(75% .15 80)}.bg-\[var\(--sdm-bg\,inherit\)\]{background-color:var(--sdm-bg,inherit)}.bg-\[var\(--sdm-tbg\)\]{background-color:var(--sdm-tbg)}.bg-accent,.bg-accent\/15{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\/15{background-color:color-mix(in oklab, var(--accent) 15%, transparent)}}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/8{background-color:#f99c0014}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/8{background-color:color-mix(in oklab, var(--color-amber-500) 8%, transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-amber-500\/12{background-color:#f99c001f}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/12{background-color:color-mix(in oklab, var(--color-amber-500) 12%, transparent)}}.bg-background,.bg-background\/30{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/30{background-color:color-mix(in oklab, var(--background) 30%, transparent)}}.bg-background\/40{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/40{background-color:color-mix(in oklab, var(--background) 40%, transparent)}}.bg-background\/50{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/50{background-color:color-mix(in oklab, var(--background) 50%, transparent)}}.bg-background\/60{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/60{background-color:color-mix(in oklab, var(--background) 60%, transparent)}}.bg-background\/70{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/70{background-color:color-mix(in oklab, var(--background) 70%, transparent)}}.bg-background\/80{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/80{background-color:color-mix(in oklab, var(--background) 80%, transparent)}}.bg-background\/90{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/90{background-color:color-mix(in oklab, var(--background) 90%, transparent)}}.bg-background\/95{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/95{background-color:color-mix(in oklab, var(--background) 95%, transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.bg-black\/10{background-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-blue,.bg-blue\/70{background-color:var(--blue)}@supports (color:color-mix(in lab, red, red)){.bg-blue\/70{background-color:color-mix(in oklab, var(--blue) 70%, transparent)}}.bg-border{background-color:var(--border)}.bg-brand{background-color:var(--brand)}.bg-brand-soft,.bg-brand-soft\/60{background-color:var(--brand-soft)}@supports (color:color-mix(in lab, red, red)){.bg-brand-soft\/60{background-color:color-mix(in oklab, var(--brand-soft) 60%, transparent)}}.bg-brand\/12{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/12{background-color:color-mix(in oklab, var(--brand) 12%, transparent)}}.bg-brand\/70{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/70{background-color:color-mix(in oklab, var(--brand) 70%, transparent)}}.bg-brand\/80{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/80{background-color:color-mix(in oklab, var(--brand) 80%, transparent)}}.bg-card,.bg-card\/40{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\/40{background-color:color-mix(in oklab, var(--card) 40%, transparent)}}.bg-card\/50{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\/50{background-color:color-mix(in oklab, var(--card) 50%, transparent)}}.bg-card\/60{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\/60{background-color:color-mix(in oklab, var(--card) 60%, transparent)}}.bg-card\/95{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\/95{background-color:color-mix(in oklab, var(--card) 95%, transparent)}}.bg-destructive,.bg-destructive\/5{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/5{background-color:color-mix(in oklab, var(--destructive) 5%, transparent)}}.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.bg-destructive\/\[0\.06\]{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/\[0\.06\]{background-color:color-mix(in oklab, var(--destructive) 6%, transparent)}}.bg-foreground,.bg-foreground\/10{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.bg-foreground\/10{background-color:color-mix(in oklab, var(--foreground) 10%, transparent)}}.bg-foreground\/20{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.bg-foreground\/20{background-color:color-mix(in oklab, var(--foreground) 20%, transparent)}}.bg-foreground\/25{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.bg-foreground\/25{background-color:color-mix(in oklab, var(--foreground) 25%, transparent)}}.bg-foreground\/60{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.bg-foreground\/60{background-color:color-mix(in oklab, var(--foreground) 60%, transparent)}}.bg-foreground\/70{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.bg-foreground\/70{background-color:color-mix(in oklab, var(--foreground) 70%, transparent)}}.bg-foreground\/75{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.bg-foreground\/75{background-color:color-mix(in oklab, var(--foreground) 75%, transparent)}}.bg-foreground\/80{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.bg-foreground\/80{background-color:color-mix(in oklab, var(--foreground) 80%, transparent)}}.bg-foreground\/\[0\.04\]{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.bg-foreground\/\[0\.04\]{background-color:color-mix(in oklab, var(--foreground) 4%, transparent)}}.bg-foreground\/\[0\.022\]{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.bg-foreground\/\[0\.022\]{background-color:color-mix(in oklab, var(--foreground) 2.2%, transparent)}}.bg-gray-200{background-color:var(--color-gray-200)}.bg-green,.bg-green\/10{background-color:var(--green)}@supports (color:color-mix(in lab, red, red)){.bg-green\/10{background-color:color-mix(in oklab, var(--green) 10%, transparent)}}.bg-green\/12{background-color:var(--green)}@supports (color:color-mix(in lab, red, red)){.bg-green\/12{background-color:color-mix(in oklab, var(--green) 12%, transparent)}}.bg-heat-0{background-color:var(--heat-0)}.bg-heat-1{background-color:var(--heat-1)}.bg-heat-2{background-color:var(--heat-2)}.bg-heat-3{background-color:var(--heat-3)}.bg-heat-4{background-color:var(--heat-4)}.bg-muted{background-color:var(--muted)}.bg-muted-foreground,.bg-muted-foreground\/30{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.bg-muted-foreground\/30{background-color:color-mix(in oklab, var(--muted-foreground) 30%, transparent)}}.bg-muted-foreground\/40{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.bg-muted-foreground\/40{background-color:color-mix(in oklab, var(--muted-foreground) 40%, transparent)}}.bg-muted-foreground\/50{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.bg-muted-foreground\/50{background-color:color-mix(in oklab, var(--muted-foreground) 50%, transparent)}}.bg-muted\/20{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/20{background-color:color-mix(in oklab, var(--muted) 20%, transparent)}}.bg-muted\/30{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/30{background-color:color-mix(in oklab, var(--muted) 30%, transparent)}}.bg-muted\/40{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/40{background-color:color-mix(in oklab, var(--muted) 40%, transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/50{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.bg-muted\/60{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/60{background-color:color-mix(in oklab, var(--muted) 60%, transparent)}}.bg-muted\/80{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/80{background-color:color-mix(in oklab, var(--muted) 80%, transparent)}}.bg-panel,.bg-panel\/95{background-color:var(--panel)}@supports (color:color-mix(in lab, red, red)){.bg-panel\/95{background-color:color-mix(in oklab, var(--panel) 95%, transparent)}}.bg-popover,.bg-popover\/90{background-color:var(--popover)}@supports (color:color-mix(in lab, red, red)){.bg-popover\/90{background-color:color-mix(in oklab, var(--popover) 90%, transparent)}}.bg-primary,.bg-primary\/20{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\/20{background-color:color-mix(in oklab, var(--primary) 20%, transparent)}}.bg-red{background-color:var(--red)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red\/10{background-color:var(--red)}@supports (color:color-mix(in lab, red, red)){.bg-red\/10{background-color:color-mix(in oklab, var(--red) 10%, transparent)}}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.bg-transparent\!{background-color:#0000!important}.bg-user-bubble{background-color:var(--user-bubble)}.bg-violet{background-color:var(--violet)}.bg-window{background-color:var(--window)}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-background\/80{--tw-gradient-from:var(--background)}@supports (color:color-mix(in lab, red, red)){.from-background\/80{--tw-gradient-from:color-mix(in oklab, var(--background) 80%, transparent)}}.from-background\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-blue\/30{--tw-gradient-from:var(--blue)}@supports (color:color-mix(in lab, red, red)){.from-blue\/30{--tw-gradient-from:color-mix(in oklab, var(--blue) 30%, transparent)}}.from-blue\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-muted{--tw-gradient-via:var(--muted);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-brand\/40{--tw-gradient-to:var(--brand)}@supports (color:color-mix(in lab, red, red)){.to-brand\/40{--tw-gradient-to:color-mix(in oklab, var(--brand) 40%, transparent)}}.to-brand\/40{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-repeat{background-repeat:repeat}.mask-no-clip{-webkit-mask-clip:no-clip;mask-clip:no-clip}.mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}.fill-brand{fill:var(--brand)}.fill-current{fill:currentColor}.fill-foreground{fill:var(--foreground)}.fill-primary{fill:var(--primary)}.stroke-brand{stroke:var(--brand)}.stroke-foreground\/12{stroke:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.stroke-foreground\/12{stroke:color-mix(in oklab, var(--foreground) 12%, transparent)}}.object-contain{object-fit:contain}.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-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-10{padding:calc(var(--spacing) * 10)}.p-\[1\.5px\]{padding:1.5px}.p-\[3px\]{padding:3px}.p-\[18px\]{padding:18px}.px-\(--cell-size\){padding-inline:var(--cell-size)}.px-0{padding-inline:0}.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-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-7{padding-inline:calc(var(--spacing) * 7)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-10{padding-inline:calc(var(--spacing) * 10)}.px-\[18px\]{padding-inline:18px}.py-0{padding-block:0}.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-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-7{padding-block:calc(var(--spacing) * 7)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-9{padding-block:calc(var(--spacing) * 9)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-\[2px\]{padding-block:2px}.py-px{padding-block:1px}.pt-0{padding-top:0}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-1\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pt-9{padding-top:calc(var(--spacing) * 9)}.pt-\[16vh\]{padding-top:16vh}.pr-1{padding-right:var(--spacing)}.pr-1\.5{padding-right:calc(var(--spacing) * 1.5)}.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-5{padding-right:calc(var(--spacing) * 5)}.pr-7{padding-right:calc(var(--spacing) * 7)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pr-\[168px\]{padding-right:168px}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-2\.5{padding-bottom:calc(var(--spacing) * 2.5)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-3\.5{padding-bottom:calc(var(--spacing) * 3.5)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-12{padding-bottom:calc(var(--spacing) * 12)}.pl-0\.5{padding-left:calc(var(--spacing) * .5)}.pl-1\.5{padding-left:calc(var(--spacing) * 1.5)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-2\.5{padding-left:calc(var(--spacing) * 2.5)}.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-\[22px\]{padding-left:22px}.pl-\[38px\]{padding-left:38px}.pl-\[50px\]{padding-left:50px}.pl-\[68px\]{padding-left:68px}.pl-\[104px\]{padding-left:104px}.pl-\[108px\]{padding-left:108px}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-right\!{text-align:right!important}.align-middle{vertical-align:middle}.font-mono{font-family:Geist Mono Variable,ui-monospace,SF Mono,Menlo,Consolas,monospace}.font-sans{font-family:"Geist Variable", var(--font-han), system-ui, sans-serif}.font-serif{font-family:var(--font-serif)}.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-sm\/relaxed{font-size:var(--text-sm);line-height:var(--leading-relaxed)}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.8rem\]{font-size:.8rem}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11\.5px\]{font-size:11.5px}.text-\[11px\]{font-size:11px}.text-\[12\.5px\]{font-size:12.5px}.text-\[12px\]{font-size:12px}.text-\[13\.5px\]{font-size:13.5px}.text-\[13px\]{font-size:13px}.text-\[14\.5px\]{font-size:14.5px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[18px\]{font-size:18px}.text-\[20px\]{font-size:20px}.text-\[22px\]{font-size:22px}.text-\[28px\]{font-size:28px}.text-\[30px\]{font-size:30px}.text-\[32px\]{font-size:32px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-\[1\.6\]{--tw-leading:1.6;line-height:1.6}.leading-\[1\.15\]{--tw-leading:1.15;line-height:1.15}.leading-\[1\.45\]{--tw-leading:1.45;line-height:1.45}.leading-\[1\.55\]{--tw-leading:1.55;line-height:1.55}.leading-\[1\.65\]{--tw-leading:1.65;line-height:1.65}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.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-\[-0\.02em\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\[-0\.025em\]{--tw-tracking:-.025em;letter-spacing:-.025em}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.text-pretty{text-wrap:pretty}.text-wrap{text-wrap:wrap}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.wrap-anywhere{overflow-wrap:anywhere}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[oklch\(0\.5_0\.12_var\(--h\)\)\]{color:oklch(.5 .12 var(--h))}.text-\[var\(--sdm-c\,inherit\)\]{color:var(--sdm-c,inherit)}.text-accent-foreground{color:var(--accent-foreground)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-background{color:var(--background)}.text-blue{color:var(--blue)}.text-border,.text-border\/60{color:var(--border)}@supports (color:color-mix(in lab, red, red)){.text-border\/60{color:color-mix(in oklab, var(--border) 60%, transparent)}}.text-brand{color:var(--brand)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-foreground,.text-foreground\/60{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\/60{color:color-mix(in oklab, var(--foreground) 60%, transparent)}}.text-foreground\/70{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\/70{color:color-mix(in oklab, var(--foreground) 70%, transparent)}}.text-foreground\/80{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\/80{color:color-mix(in oklab, var(--foreground) 80%, transparent)}}.text-foreground\/85{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\/85{color:color-mix(in oklab, var(--foreground) 85%, transparent)}}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-green{color:var(--green)}.text-muted-foreground,.text-muted-foreground\/40{color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\/40{color:color-mix(in oklab, var(--muted-foreground) 40%, transparent)}}.text-muted-foreground\/50{color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\/50{color:color-mix(in oklab, var(--muted-foreground) 50%, transparent)}}.text-muted-foreground\/60{color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\/60{color:color-mix(in oklab, var(--muted-foreground) 60%, transparent)}}.text-muted-foreground\/70{color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\/70{color:color-mix(in oklab, var(--muted-foreground) 70%, transparent)}}.text-muted-foreground\/80{color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\/80{color:color-mix(in oklab, var(--muted-foreground) 80%, transparent)}}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-red{color:var(--red)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-user-bubble-foreground{color:var(--user-bubble-foreground)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal, ) var(--tw-slashed-zero, ) var(--tw-numeric-figure, ) var(--tw-numeric-spacing, ) var(--tw-numeric-fraction, )}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal, ) var(--tw-slashed-zero, ) var(--tw-numeric-figure, ) var(--tw-numeric-spacing, ) var(--tw-numeric-fraction, )}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal, ) var(--tw-slashed-zero, ) var(--tw-numeric-figure, ) var(--tw-numeric-spacing, ) var(--tw-numeric-fraction, )}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal, ) var(--tw-slashed-zero, ) var(--tw-numeric-figure, ) var(--tw-numeric-spacing, ) var(--tw-numeric-fraction, )}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal, ) var(--tw-slashed-zero, ) var(--tw-numeric-figure, ) var(--tw-numeric-spacing, ) var(--tw-numeric-fraction, )}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal, ) var(--tw-slashed-zero, ) var(--tw-numeric-figure, ) var(--tw-numeric-spacing, ) var(--tw-numeric-fraction, )}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal, ) var(--tw-slashed-zero, ) var(--tw-numeric-figure, ) var(--tw-numeric-spacing, ) var(--tw-numeric-fraction, )}.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, )}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.decoration-muted-foreground\/50{-webkit-text-decoration-color:var(--muted-foreground);-webkit-text-decoration-color:var(--muted-foreground);-webkit-text-decoration-color:var(--muted-foreground);text-decoration-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.decoration-muted-foreground\/50{-webkit-text-decoration-color:color-mix(in oklab, var(--muted-foreground) 50%, transparent);-webkit-text-decoration-color:color-mix(in oklab, var(--muted-foreground) 50%, transparent);-webkit-text-decoration-color:color-mix(in oklab, var(--muted-foreground) 50%, transparent);text-decoration-color:color-mix(in oklab, var(--muted-foreground) 50%, transparent)}}.decoration-dotted{text-decoration-style:dotted}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-55{opacity:.55}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-85{opacity:.85}.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-card{--tw-shadow:var(--shadow-card);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-float{--tw-shadow:var(--shadow-float);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-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px 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-none{--tw-shadow:0 0 #0000;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)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--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-0{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(0px + 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-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)}.inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-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-brand\/50{--tw-ring-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.ring-brand\/50{--tw-ring-color:color-mix(in oklab, var(--brand) 50%, transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.outline-ring\/50{outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.outline-ring\/50{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.blur{--tw-blur:blur(8px);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, )}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);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, )}.invert{--tw-invert:invert(100%);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, )}.sepia{--tw-sepia:sepia(100%);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, )}.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, )}.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, )!important}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.backdrop-blur-2xl{--tw-backdrop-blur:blur(var(--blur-2xl));-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.backdrop-blur-\[40px\]{--tw-backdrop-blur:blur(40px);-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.backdrop-saturate-150{--tw-backdrop-saturate:saturate(150%);-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.backdrop-saturate-\[1\.4\]{--tw-backdrop-saturate:saturate(1.4);-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.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-\[background-color\,color\,box-shadow\]{transition-property:background-color,color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background-color\]{transition-property:background-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,box-shadow\]{transition-property:border-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[height\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[left\]{transition-property:left;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[stroke-dashoffset\]{transition-property:stroke-dashoffset;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;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-shadow{transition-property:box-shadow;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))}.transition-none{transition-property:none}.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}.duration-500{--tw-duration:.5s;transition-duration:.5s}.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)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-95{--tw-enter-scale:.95}.\!paused{animation-play-state:paused!important}.\!running{animation-play-state:running!important}.\[--cell-size\:--spacing\(8\)\]{--cell-size:calc(var(--spacing) * 8)}.\[animation-duration\:1\.1s\]{animation-duration:1.1s}.\[counter-increment\:line_0\]{counter-increment:line 0}.\[counter-reset\:line\]{counter-reset:line}.block-max{block-size:max-content}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.fade-in{--tw-enter-opacity:0}.paused{animation-play-state:paused}.ring-inset{--tw-ring-inset:inset}.running{animation-play-state:running}.zoom-in{--tw-enter-scale:0}.zoom-out{--tw-exit-scale:0}:is(:where(.group):focus-within .group-focus-within\:opacity-100){opacity:1}@media (hover:hover){:is(:where(.group):hover .group-hover\:block){display:block}:is(:where(.group):hover .group-hover\:bg-foreground){background-color:var(--foreground)}:is(:where(.group):hover .group-hover\:opacity-100),:is(:where(.group\/turn):hover .group-hover\/turn\:opacity-100){opacity:1}}:is(:where(.group)[data-disabled=true] .group-data-\[disabled\=true\]\:pointer-events-none){pointer-events:none}:is(:where(.group)[data-disabled=true] .group-data-\[disabled\=true\]\:opacity-50){opacity:.5}:is(:where(.group\/day)[data-focused=true] .group-data-\[focused\=true\]\/day\:relative){position:relative}:is(:where(.group\/day)[data-focused=true] .group-data-\[focused\=true\]\/day\:z-10){z-index:10}:is(:where(.group\/day)[data-focused=true] .group-data-\[focused\=true\]\/day\:border-ring){border-color:var(--ring)}:is(:where(.group\/day)[data-focused=true] .group-data-\[focused\=true\]\/day\:ring-\[3px\]){--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}:is(:where(.group\/day)[data-focused=true] .group-data-\[focused\=true\]\/day\:ring-ring\/50){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){:is(:where(.group\/day)[data-focused=true] .group-data-\[focused\=true\]\/day\:ring-ring\/50){--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}:is(:where(.group\/tabs)[data-orientation=horizontal] .group-data-\[orientation\=horizontal\]\/tabs\:h-9){height:calc(var(--spacing) * 9)}:is(:where(.group\/tabs)[data-orientation=vertical] .group-data-\[orientation\=vertical\]\/tabs\:h-fit){height:fit-content}:is(:where(.group\/tabs)[data-orientation=vertical] .group-data-\[orientation\=vertical\]\/tabs\:w-full){width:100%}:is(:where(.group\/tabs)[data-orientation=vertical] .group-data-\[orientation\=vertical\]\/tabs\:flex-col){flex-direction:column}:is(:where(.group\/tabs)[data-orientation=vertical] .group-data-\[orientation\=vertical\]\/tabs\:justify-start){justify-content:flex-start}:is(:where(.group\/switch)[data-size=default] .group-data-\[size\=default\]\/switch\:size-4){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}:is(:where(.group\/alert-dialog-content)[data-size=sm] .group-data-\[size\=sm\]\/alert-dialog-content\:grid){display:grid}:is(:where(.group\/alert-dialog-content)[data-size=sm] .group-data-\[size\=sm\]\/alert-dialog-content\:grid-cols-2){grid-template-columns:repeat(2,minmax(0,1fr))}:is(:where(.group\/switch)[data-size=sm] .group-data-\[size\=sm\]\/switch\:size-3){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}:is(:where(.group)[data-state=checked] .group-data-\[state\=checked\]\:scale-100){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}:is(:where(.group)[data-state=checked] .group-data-\[state\=checked\]\:border-foreground){border-color:var(--foreground)}:is(:where(.group)[data-state=open] .group-data-\[state\=open\]\:rotate-180),:is(:where(.group\/section)[data-state=open] .group-data-\[state\=open\]\/section\:rotate-180){rotate:180deg}:is(:where(.group\/steps)[data-state=open] .group-data-\[state\=open\]\/steps\:rotate-90){rotate:90deg}:is(:where(.group\/tabs-list)[data-variant=line] .group-data-\[variant\=line\]\/tabs-list\:bg-transparent){background-color:#0000}:is(:where(.peer):disabled~.peer-disabled\:cursor-not-allowed){cursor:not-allowed}:is(:where(.peer):disabled~.peer-disabled\:opacity-50){opacity:.5}.selection\:bg-primary ::selection{background-color:var(--primary)}.selection\:bg-primary::selection{background-color:var(--primary)}.selection\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.before\:mr-4:before{content:var(--tw-content);margin-right:calc(var(--spacing) * 4)}.before\:inline-block:before{content:var(--tw-content);display:inline-block}.before\:w-6:before{content:var(--tw-content);width:calc(var(--spacing) * 6)}.before\:text-right:before{content:var(--tw-content);text-align:right}.before\:font-mono:before{content:var(--tw-content);font-family:Geist Mono Variable,ui-monospace,SF Mono,Menlo,Consolas,monospace}.before\:text-\[13px\]:before{content:var(--tw-content);font-size:13px}.before\:text-muted-foreground\/50:before{content:var(--tw-content);color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.before\:text-muted-foreground\/50:before{color:color-mix(in oklab, var(--muted-foreground) 50%, transparent)}}.before\:content-\[attr\(data-initial\)\]:before{--tw-content:attr(data-initial);content:var(--tw-content)}.before\:content-\[counter\(line\)\]:before{--tw-content:counter(line);content:var(--tw-content)}.before\:select-none:before{content:var(--tw-content);-webkit-user-select:none;user-select:none}.before\:\[counter-increment\:line\]:before{content:var(--tw-content);counter-increment:line}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-y-0:after{content:var(--tw-content);inset-block:0}.after\:-left-4:after{content:var(--tw-content);left:calc(var(--spacing) * -4)}.after\:w-11:after{content:var(--tw-content);width:calc(var(--spacing) * 11)}.after\:bg-foreground:after{content:var(--tw-content);background-color:var(--foreground)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:transition-opacity:after{content:var(--tw-content);transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}:is(:where(.group\/tabs)[data-orientation=horizontal] .group-data-\[orientation\=horizontal\]\/tabs\:after\:inset-x-0):after{content:var(--tw-content);inset-inline:0}:is(:where(.group\/tabs)[data-orientation=horizontal] .group-data-\[orientation\=horizontal\]\/tabs\:after\:bottom-\[-5px\]):after{content:var(--tw-content);bottom:-5px}:is(:where(.group\/tabs)[data-orientation=horizontal] .group-data-\[orientation\=horizontal\]\/tabs\:after\:h-0\.5):after{content:var(--tw-content);height:calc(var(--spacing) * .5)}:is(:where(.group\/tabs)[data-orientation=vertical] .group-data-\[orientation\=vertical\]\/tabs\:after\:inset-y-0):after{content:var(--tw-content);inset-block:0}:is(:where(.group\/tabs)[data-orientation=vertical] .group-data-\[orientation\=vertical\]\/tabs\:after\:-right-1):after{content:var(--tw-content);right:calc(var(--spacing) * -1)}:is(:where(.group\/tabs)[data-orientation=vertical] .group-data-\[orientation\=vertical\]\/tabs\:after\:w-0\.5):after{content:var(--tw-content);width:calc(var(--spacing) * .5)}.first\:mt-0:first-child{margin-top:0}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.first\:pt-0:first-child{padding-top:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.focus-within\:border-ring:focus-within{border-color:var(--ring)}.focus-within\:opacity-100:focus-within{opacity:1}.focus-within\:ring-\[3px\]:focus-within{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\:ring-ring\/30:focus-within{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-within\:ring-ring\/30:focus-within{--tw-ring-color:color-mix(in oklab, var(--ring) 30%, transparent)}}.focus-within\:ring-ring\/50:focus-within{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-within\:ring-ring\/50:focus-within{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}@media (hover:hover){.hover\:scale-125:hover{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:border-foreground\/30:hover{border-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.hover\:border-foreground\/30:hover{border-color:color-mix(in oklab, var(--foreground) 30%, transparent)}}.hover\:bg-accent:hover,.hover\:bg-accent\/60:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-accent\/60:hover{background-color:color-mix(in oklab, var(--accent) 60%, transparent)}}.hover\:bg-background:hover{background-color:var(--background)}.hover\:bg-card:hover,.hover\:bg-card\/80:hover{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-card\/80:hover{background-color:color-mix(in oklab, var(--card) 80%, transparent)}}.hover\:bg-card\/90:hover{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-card\/90:hover{background-color:color-mix(in oklab, var(--card) 90%, transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}.hover\:bg-foreground\/5:hover{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-foreground\/5:hover{background-color:color-mix(in oklab, var(--foreground) 5%, transparent)}}.hover\:bg-foreground\/10:hover{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-foreground\/10:hover{background-color:color-mix(in oklab, var(--foreground) 10%, transparent)}}.hover\:bg-foreground\/\[0\.03\]:hover{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-foreground\/\[0\.03\]:hover{background-color:color-mix(in oklab, var(--foreground) 3%, transparent)}}.hover\:bg-foreground\/\[0\.035\]:hover{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-foreground\/\[0\.035\]:hover{background-color:color-mix(in oklab, var(--foreground) 3.5%, transparent)}}.hover\:bg-muted:hover,.hover\:bg-muted\/40:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/40:hover{background-color:color-mix(in oklab, var(--muted) 40%, transparent)}}.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.hover\:bg-muted\/60:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/60:hover{background-color:color-mix(in oklab, var(--muted) 60%, transparent)}}.hover\:bg-muted\/70:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/70:hover{background-color:color-mix(in oklab, var(--muted) 70%, transparent)}}.hover\:bg-popover:hover{background-color:var(--popover)}.hover\:bg-primary-foreground\/15:hover{background-color:var(--primary-foreground)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary-foreground\/15:hover{background-color:color-mix(in oklab, var(--primary-foreground) 15%, transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.hover\:bg-red:hover{background-color:var(--red)}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.hover\:bg-transparent:hover{background-color:#0000}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-brand:hover{color:var(--brand)}.hover\:text-destructive:hover{color:var(--destructive)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:text-white:hover{color:var(--color-white)}.hover\:no-underline:hover{text-decoration-line:none}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:z-10:focus{z-index:10}.focus\:border-ring:focus{border-color:var(--ring)}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.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-ring:focus{--tw-ring-color:var(--ring)}.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-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:z-10:focus-visible{z-index:10}.focus-visible\:scale-125:focus-visible{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:bg-foreground\/10:focus-visible{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:bg-foreground\/10:focus-visible{background-color:color-mix(in oklab, var(--foreground) 10%, transparent)}}.focus-visible\:bg-muted:focus-visible{background-color:var(--muted)}.focus-visible\:bg-red:focus-visible{background-color:var(--red)}.focus-visible\:text-white:focus-visible{color:var(--color-white)}.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(0px + 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-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-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.focus-visible\:ring-ring:focus-visible,.focus-visible\:ring-ring\/40:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 40%, transparent)}}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:ring-ring\/60:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/60:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 60%, transparent)}}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-ring:focus-visible{outline-color:var(--ring)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-default:disabled{cursor:default}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}.has-focus\:border-ring:has(:focus){border-color:var(--ring)}.has-focus\:ring-\[3px\]:has(:focus){--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.has-focus\:ring-ring\/50:has(:focus){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.has-focus\:ring-ring\/50:has(:focus){--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.has-data-\[slot\=alert-dialog-media\]\:grid-rows-\[auto_auto_1fr\]:has([data-slot=alert-dialog-media]){grid-template-rows:auto auto 1fr}.has-data-\[slot\=alert-dialog-media\]\:gap-x-6:has([data-slot=alert-dialog-media]){column-gap:calc(var(--spacing) * 6)}.has-\[\[data-state\=checked\]\]\:border-foreground\/30:has([data-state=checked]){border-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.has-\[\[data-state\=checked\]\]\:border-foreground\/30:has([data-state=checked]){border-color:color-mix(in oklab, var(--foreground) 30%, transparent)}}.has-\[\[data-state\=checked\]\]\:bg-muted:has([data-state=checked]){background-color:var(--muted)}.has-\[\>svg\]\:px-1\.5:has(>svg){padding-inline:calc(var(--spacing) * 1.5)}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing) * 2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing) * 4)}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.aria-selected\:text-muted-foreground[aria-selected=true]{color:var(--muted-foreground)}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[highlighted\]\:bg-accent[data-highlighted]{background-color:var(--accent)}.data-\[highlighted\]\:text-accent-foreground[data-highlighted]{color:var(--accent-foreground)}.data-\[inset\]\:pl-8[data-inset]{padding-left:calc(var(--spacing) * 8)}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=horizontal\]\:flex-col[data-orientation=horizontal]{flex-direction:column}.data-\[orientation\=vertical\]\:h-full[data-orientation=vertical]{height:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[range-end\=true\]\:rounded-md[data-range-end=true]{border-radius:calc(var(--radius) - 2px)}.data-\[range-end\=true\]\:rounded-r-md[data-range-end=true]{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.data-\[range-end\=true\]\:bg-primary[data-range-end=true]{background-color:var(--primary)}.data-\[range-end\=true\]\:text-primary-foreground[data-range-end=true]{color:var(--primary-foreground)}.data-\[range-middle\=true\]\:rounded-none[data-range-middle=true]{border-radius:0}.data-\[range-middle\=true\]\:bg-accent[data-range-middle=true]{background-color:var(--accent)}.data-\[range-middle\=true\]\:text-accent-foreground[data-range-middle=true]{color:var(--accent-foreground)}.data-\[range-start\=true\]\:rounded-md[data-range-start=true]{border-radius:calc(var(--radius) - 2px)}.data-\[range-start\=true\]\:rounded-l-md[data-range-start=true]{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.data-\[range-start\=true\]\:bg-primary[data-range-start=true]{background-color:var(--primary)}.data-\[range-start\=true\]\:text-primary-foreground[data-range-start=true]{color:var(--primary-foreground)}.data-\[selected-single\=true\]\:bg-primary[data-selected-single=true]{background-color:var(--primary)}.data-\[selected-single\=true\]\:text-primary-foreground[data-selected-single=true]{color:var(--primary-foreground)}.data-\[selected\=true\]\:rounded-none[data-selected=true]{border-radius:0}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[size\=default\]\:h-9[data-size=default]{height:calc(var(--spacing) * 9)}.data-\[size\=default\]\:h-\[1\.15rem\][data-size=default]{height:1.15rem}.data-\[size\=default\]\:w-8[data-size=default]{width:calc(var(--spacing) * 8)}.data-\[size\=sm\]\:h-3\.5[data-size=sm]{height:calc(var(--spacing) * 3.5)}.data-\[size\=sm\]\:h-8[data-size=sm]{height:calc(var(--spacing) * 8)}.data-\[size\=sm\]\:w-6[data-size=sm]{width:calc(var(--spacing) * 6)}.data-\[size\=sm\]\:max-w-xs[data-size=sm]{max-width:var(--container-xs)}:is(.\*\*\:data-\[slot\=command-input-wrapper\]\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing) * 12)}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing) * 2)}.data-\[spacing\=0\]\:rounded-none[data-spacing="0"]{border-radius:0}.data-\[spacing\=0\]\:shadow-none[data-spacing="0"]{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.data-\[spacing\=0\]\:first\:rounded-l-md[data-spacing="0"]:first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.data-\[spacing\=0\]\:last\:rounded-r-md[data-spacing="0"]:last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}:is(:where(.group\/tabs-list)[data-variant=default] .group-data-\[variant\=default\]\/tabs-list\:data-\[state\=active\]\:shadow-sm)[data-state=active]{--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)}:is(:where(.group\/tabs-list)[data-variant=line] .group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:bg-transparent)[data-state=active]{background-color:#0000}:is(:where(.group\/tabs-list)[data-variant=line] .group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:shadow-none)[data-state=active]{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}:is(:where(.group\/tabs-list)[data-variant=line] .group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:after\:opacity-100)[data-state=active]:after{content:var(--tw-content);opacity:1}.data-\[state\=checked\]\:translate-x-\[calc\(100\%-2px\)\][data-state=checked]{--tw-translate-x:calc(100% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:border-foreground[data-state=checked]{border-color:var(--foreground)}.data-\[state\=checked\]\:border-primary[data-state=checked]{border-color:var(--primary)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:animate-collapsible-up[data-state=closed]{animation:collapsible-up var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\[state\=on\]\:border-primary[data-state=on]{border-color:var(--primary)}.data-\[state\=on\]\:bg-accent[data-state=on]{background-color:var(--accent)}.data-\[state\=on\]\:bg-card[data-state=on]{background-color:var(--card)}.data-\[state\=on\]\:bg-primary[data-state=on]{background-color:var(--primary)}.data-\[state\=on\]\:text-accent-foreground[data-state=on]{color:var(--accent-foreground)}.data-\[state\=on\]\:text-foreground[data-state=on]{color:var(--foreground)}.data-\[state\=on\]\:text-primary-foreground[data-state=on]{color:var(--primary-foreground)}.data-\[state\=on\]\:shadow-card[data-state=on]{--tw-shadow:var(--shadow-card);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.data-\[state\=open\]\:animate-collapsible-down[data-state=open]{animation:collapsible-down var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:bg-foreground\/5[data-state=open]{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.data-\[state\=open\]\:bg-foreground\/5[data-state=open]{background-color:color-mix(in oklab, var(--foreground) 5%, transparent)}}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\[state\=open\]\:text-foreground[data-state=open]{color:var(--foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:opacity-100[data-state=open]{opacity:1}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\[state\=unchecked\]\:invisible[data-state=unchecked]{visibility:hidden}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}.data-\[variant\=destructive\]\:text-destructive[data-variant=destructive]{color:var(--destructive)}.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.data-\[variant\=destructive\]\:focus\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}.data-\[variant\=line\]\:rounded-none[data-variant=line]{border-radius:0}.data-\[spacing\=0\]\:data-\[variant\=outline\]\:border-l-0[data-spacing="0"][data-variant=outline]{border-left-style:var(--tw-border-style);border-left-width:0}.data-\[spacing\=0\]\:data-\[variant\=outline\]\:first\:border-l[data-spacing="0"][data-variant=outline]:first-child{border-left-style:var(--tw-border-style);border-left-width:1px}.data-\[spacing\=default\]\:data-\[variant\=outline\]\:shadow-xs[data-spacing=default][data-variant=outline]{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.supports-\[backdrop-filter\]\:bg-background\/70{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.supports-\[backdrop-filter\]\:bg-background\/70{background-color:color-mix(in oklab, var(--background) 70%, transparent)}}.supports-\[backdrop-filter\]\:backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.supports-\[backdrop-filter\]\:backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}}@media (prefers-reduced-motion:no-preference){.motion-safe\:animate-spin{animation:var(--animate-spin)}.motion-safe\:\[animation-duration\:1\.1s\]{animation-duration:1.1s}}@media (prefers-reduced-motion:reduce){.motion-reduce\:animate-none{animation:none}.motion-reduce\:transition-none{transition-property:none}}@media not all and (width>=1240px){.max-\[1240px\]\:w-\[360px\]{width:360px}}@media not all and (width>=1000px){.max-\[1000px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media not all and (width>=900px){.max-\[900px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media not all and (width>=760px){.max-\[760px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media not all and (width>=640px){.max-\[640px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.max-\[640px\]\:flex-col{flex-direction:column}.max-\[640px\]\:items-end{align-items:flex-end}}@media (width>=1180px){.min-\[1180px\]\:block{display:block}.min-\[1180px\]\:inline{display:inline}}@media (width>=1500px){.min-\[1500px\]\:block{display:block}}@media (width>=1800px){.min-\[1800px\]\:px-12{padding-inline:calc(var(--spacing) * 12)}}@media (width>=40rem){.sm\:block{display:block}.sm\:flex{display:flex}.sm\:max-w-\[440px\]{max-width:440px}.sm\:max-w-\[460px\]{max-width:460px}.sm\:max-w-\[520px\]{max-width:520px}.sm\:max-w-\[540px\]{max-width:540px}.sm\:max-w-\[560px\]{max-width:560px}.sm\:max-w-\[580px\]{max-width:580px}.sm\:max-w-\[760px\]{max-width:760px}.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\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:text-left{text-align:left}:is(:where(.group\/alert-dialog-content)[data-size=default] .sm\:group-data-\[size\=default\]\/alert-dialog-content\:row-span-2){grid-row:span 2/span 2}:is(:where(.group\/alert-dialog-content)[data-size=default] .sm\:group-data-\[size\=default\]\/alert-dialog-content\:place-items-start){place-items:start}:is(:where(.group\/alert-dialog-content)[data-size=default] .sm\:group-data-\[size\=default\]\/alert-dialog-content\:text-left){text-align:left}:is(:where(.group\/alert-dialog-content):has([data-slot=alert-dialog-media]) :is(:where(.group\/alert-dialog-content)[data-size=default] .sm\:group-data-\[size\=default\]\/alert-dialog-content\:group-has-data-\[slot\=alert-dialog-media\]\/alert-dialog-content\:col-start-2)){grid-column-start:2}:is(:where(.group\/alert-dialog-content)[data-size=default] .sm\:group-data-\[size\=default\]\/alert-dialog-content\:has-data-\[slot\=alert-dialog-media\]\:grid-rows-\[auto_1fr\]):has([data-slot=alert-dialog-media]){grid-template-rows:auto 1fr}.data-\[size\=default\]\:sm\:max-w-lg[data-size=default]{max-width:var(--container-lg)}}@media (width>=48rem){.md\:block{display:block}.md\:flex{display:flex}.md\:flex-row{flex-direction:row}.md\:p-12{padding:calc(var(--spacing) * 12)}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (width>=64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (width>=400px){.\@min-\[400px\]\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@container (width>=820px){.\@min-\[820px\]\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:bg-\[oklch\(0\.74_0\.11_var\(--h\)\/0\.2\)\]:is(.dark *){background-color:oklch(.74 .11 var(--h)/.2)}.dark\:bg-\[var\(--shiki-dark-bg\,var\(--sdm-bg\,inherit\)\)\]:is(.dark *){background-color:var(--shiki-dark-bg,var(--sdm-bg,inherit))}.dark\:bg-\[var\(--shiki-dark-bg\,var\(--sdm-tbg\)\)\]:is(.dark *){background-color:var(--shiki-dark-bg,var(--sdm-tbg))}.dark\:bg-destructive\/60:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-destructive\/60:is(.dark *){background-color:color-mix(in oklab, var(--destructive) 60%, transparent)}}.dark\:bg-gray-700:is(.dark *){background-color:var(--color-gray-700)}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.dark\:bg-popover:is(.dark *){background-color:var(--popover)}.dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:bg-white\/\[0\.03\]:is(.dark *){background-color:#ffffff08}@supports (color:color-mix(in lab, red, red)){.dark\:bg-white\/\[0\.03\]:is(.dark *){background-color:color-mix(in oklab, var(--color-white) 3%, transparent)}}.dark\:bg-white\/\[0\.05\]:is(.dark *){background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-white\/\[0\.05\]:is(.dark *){background-color:color-mix(in oklab, var(--color-white) 5%, transparent)}}.dark\:text-\[oklch\(0\.82_0\.1_var\(--h\)\)\]:is(.dark *){color:oklch(.82 .1 var(--h))}.dark\:text-\[var\(--shiki-dark\,var\(--sdm-c\,inherit\)\)\]:is(.dark *){color:var(--shiki-dark,var(--sdm-c,inherit))}.dark\:text-amber-300:is(.dark *){color:var(--color-amber-300)}.dark\:text-amber-400:is(.dark *){color:var(--color-amber-400)}.dark\:text-border:is(.dark *),.dark\:text-border\/50:is(.dark *){color:var(--border)}@supports (color:color-mix(in lab, red, red)){.dark\:text-border\/50:is(.dark *){color:color-mix(in oklab, var(--border) 50%, transparent)}}.dark\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.dark\:text-muted-foreground:is(.dark *){color:var(--muted-foreground)}@media (hover:hover){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.dark\:hover\:text-accent-foreground:is(.dark *):hover{color:var(--accent-foreground)}.dark\:hover\:text-foreground:is(.dark *):hover{color:var(--foreground)}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[state\=active\]\:border-input:is(.dark *)[data-state=active]{border-color:var(--input)}.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.dark\:data-\[state\=active\]\:text-foreground:is(.dark *)[data-state=active]{color:var(--foreground)}:is(:where(.group\/tabs-list)[data-variant=line] .dark\:group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:border-transparent:is(.dark *))[data-state=active]{border-color:#0000}:is(:where(.group\/tabs-list)[data-variant=line] .dark\:group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:bg-transparent:is(.dark *))[data-state=active]{background-color:#0000}.dark\:data-\[state\=checked\]\:bg-primary:is(.dark *)[data-state=checked]{background-color:var(--primary)}.dark\:data-\[state\=checked\]\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--primary-foreground)}.dark\:data-\[state\=unchecked\]\:bg-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--foreground)}.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab, var(--input) 80%, transparent)}}.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:var(--muted-foreground)}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke=\#ccc]{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke=\#ccc]{stroke:color-mix(in oklab, var(--border) 50%, transparent)}}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:var(--border)}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke=\#fff]{stroke:#0000}.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke=\#ccc]{stroke:var(--border)}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-muted .recharts-radial-bar-background-sector,.\[\&_\.recharts-rectangle\.recharts-tooltip-cursor\]\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:var(--muted)}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke=\#ccc]{stroke:var(--border)}.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke=\#fff]{stroke:#0000}.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{outline-offset:2px;outline:2px solid #0000}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing) * 12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-item\]\]\:py-2 [cmdk-item]{padding-block:calc(var(--spacing) * 2)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing) * 5)}.\[\&_a\]\:text-brand a{color:var(--brand)}.\[\&_a\]\:underline a{text-decoration-line:underline}.\[\&_a\]\:underline-offset-2 a{text-underline-offset:2px}@media (hover:hover){.\[\&_a\]\:hover\:underline a:hover{text-decoration-line:underline}}.\[\&_blockquote\]\:my-2 blockquote{margin-block:calc(var(--spacing) * 2)}.\[\&_blockquote\]\:border-l-2 blockquote{border-left-style:var(--tw-border-style);border-left-width:2px}.\[\&_blockquote\]\:pl-3 blockquote{padding-left:calc(var(--spacing) * 3)}.\[\&_blockquote\]\:text-muted-foreground blockquote{color:var(--muted-foreground)}.\[\&_code\]\:rounded code{border-radius:.25rem}.\[\&_code\]\:bg-muted code{background-color:var(--muted)}.\[\&_code\]\:px-1 code{padding-inline:var(--spacing)}.\[\&_code\]\:py-0\.5 code{padding-block:calc(var(--spacing) * .5)}.\[\&_code\]\:font-mono code{font-family:Geist Mono Variable,ui-monospace,SF Mono,Menlo,Consolas,monospace}.\[\&_code\]\:text-\[12\.5px\] code{font-size:12.5px}.\[\&_code\]\:text-\[13px\] code{font-size:13px}.\[\&_h1\]\:mt-4 h1{margin-top:calc(var(--spacing) * 4)}.\[\&_h1\]\:mb-2 h1{margin-bottom:calc(var(--spacing) * 2)}.\[\&_h1\]\:text-lg h1{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_h1\]\:font-semibold h1{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h2\]\:mt-4 h2{margin-top:calc(var(--spacing) * 4)}.\[\&_h2\]\:mb-2 h2{margin-bottom:calc(var(--spacing) * 2)}.\[\&_h2\]\:text-base h2{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_h2\]\:font-semibold h2{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h3\]\:mt-3 h3{margin-top:calc(var(--spacing) * 3)}.\[\&_h3\]\:mb-1\.5 h3{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:font-semibold h3{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_img\]\:size-3\.5 img{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&_img\]\:size-5 img{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.\[\&_li\]\:my-0\.5 li{margin-block:calc(var(--spacing) * .5)}.\[\&_ol\]\:my-2 ol{margin-block:calc(var(--spacing) * 2)}.\[\&_ol\]\:list-decimal ol{list-style-type:decimal}.\[\&_ol\]\:pl-5 ol{padding-left:calc(var(--spacing) * 5)}.\[\&_p\]\:my-2 p{margin-block:calc(var(--spacing) * 2)}.\[\&_p\:first-child\]\:mt-0 p:first-child{margin-top:0}.\[\&_p\:last-child\]\:mb-0 p:last-child{margin-bottom:0}.\[\&_pre\]\:my-2 pre{margin-block:calc(var(--spacing) * 2)}.\[\&_pre\]\:overflow-x-auto pre{overflow-x:auto}.\[\&_pre\]\:rounded-lg pre{border-radius:var(--radius)}.\[\&_pre\]\:bg-muted pre{background-color:var(--muted)}.\[\&_pre\]\:p-3 pre{padding:calc(var(--spacing) * 3)}.\[\&_pre_code\]\:bg-transparent pre code{background-color:#0000}.\[\&_pre_code\]\:p-0 pre code{padding:0}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:h-auto svg{height:auto}.\[\&_svg\]\:w-auto svg{width:auto}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\]\:text-muted-foreground svg{color:var(--muted-foreground)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-6 svg:not([class*=size-]){width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\[\&_table\]\:my-2 table{margin-block:calc(var(--spacing) * 2)}.\[\&_table\]\:w-full table{width:100%}.\[\&_table\]\:border-collapse table{border-collapse:collapse}.\[\&_table\]\:text-\[13px\] table{font-size:13px}.\[\&_td\]\:border-b td{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_td\]\:px-2 td{padding-inline:calc(var(--spacing) * 2)}.\[\&_td\]\:px-3 td{padding-inline:calc(var(--spacing) * 3)}.\[\&_td\]\:py-1\.5 td{padding-block:calc(var(--spacing) * 1.5)}.\[\&_td\]\:py-2 td{padding-block:calc(var(--spacing) * 2)}.\[\&_th\]\:border-b th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_th\]\:px-2 th{padding-inline:calc(var(--spacing) * 2)}.\[\&_th\]\:px-3 th{padding-inline:calc(var(--spacing) * 3)}.\[\&_th\]\:py-1\.5 th{padding-block:calc(var(--spacing) * 1.5)}.\[\&_th\]\:py-2 th{padding-block:calc(var(--spacing) * 2)}.\[\&_th\]\:text-left th{text-align:left}.\[\&_th\]\:font-medium th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_thead\]\:sticky thead{position:sticky}.\[\&_thead\]\:top-0 thead{top:0}.\[\&_thead\]\:z-10 thead{z-index:10}.\[\&_ul\]\:my-2 ul{margin-block:calc(var(--spacing) * 2)}.\[\&_ul\]\:list-disc ul{list-style-type:disc}.\[\&_ul\]\:pl-5 ul{padding-left:calc(var(--spacing) * 5)}.\[\&\:\:-webkit-search-cancel-button\]\:hidden::-webkit-search-cancel-button{display:none}.\[\&\:first-child\[data-selected\=true\]_button\]\:rounded-l-md:first-child[data-selected=true] button{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}:is(.rtl\:\*\*\:\[\.rdp-button\\_next\>svg\]\:rotate-180:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_next>svg),:is(.rtl\:\*\*\:\[\.rdp-button\\_previous\>svg\]\:rotate-180:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_previous>svg){rotate:180deg}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}:is(.data-\[variant\=destructive\]\:\*\:\[svg\]\:text-destructive\![data-variant=destructive]>*):is(svg){color:var(--destructive)!important}:is(.\*\:\[svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-8>*):is(svg:not([class*=size-])){width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.\[\&\:last-child\[data-selected\=true\]_button\]\:rounded-r-md:last-child[data-selected=true] button{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:nth-child\(2\)\[data-selected\=true\]_button\]\:rounded-l-md:nth-child(2)[data-selected=true] button{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\>\*\:first-child\]\:mt-0>:first-child{margin-top:0}.\[\&\>\*\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&\>\*\:last-child\:not\(\[data-sd-caret-hidden\]\)\]\:after\:inline>:last-child:not([data-sd-caret-hidden]):after{content:var(--tw-content);display:inline}.\[\&\>\*\:last-child\:not\(\[data-sd-caret-hidden\]\)\]\:after\:align-baseline>:last-child:not([data-sd-caret-hidden]):after{content:var(--tw-content);vertical-align:baseline}.\[\&\>\*\:last-child\:not\(\[data-sd-caret-hidden\]\)\]\:after\:content-\[var\(--streamdown-caret\)\]>:last-child:not([data-sd-caret-hidden]):after{--tw-content:var(--streamdown-caret);content:var(--tw-content)}.\[\&\>\[data-slot\=progress-indicator\]\]\:bg-brand>[data-slot=progress-indicator]{background-color:var(--brand)}.\[\&\>a\]\:underline>a{text-decoration-line:underline}.\[\&\>a\]\:underline-offset-4>a{text-underline-offset:4px}.\[\&\>a\:hover\]\:text-primary>a:hover{color:var(--primary)}.\[\&\>p\]\:inline>p{display:inline}.\[\&\>span\]\:text-xs>span{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&\>span\]\:opacity-70>span{opacity:.7}.\[\&\>span\:first-child\]\:top-\[9px\]>span:first-child{top:9px}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-3>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:size-3\.5>svg{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:h-2\.5>svg{height:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:h-3>svg{height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:w-2\.5>svg{width:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:w-3>svg{width:calc(var(--spacing) * 3)}.\[\&\>svg\]\:text-muted-foreground>svg{color:var(--muted-foreground)}[data-slot=card-content] .\[\[data-slot\=card-content\]_\&\]\:bg-transparent,[data-slot=popover-content] .\[\[data-slot\=popover-content\]_\&\]\:bg-transparent{background-color:#0000}[data-slot=tooltip-content] .\[\[data-slot\=tooltip-content\]_\&\]\:bg-background\/20{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){[data-slot=tooltip-content] .\[\[data-slot\=tooltip-content\]_\&\]\:bg-background\/20{background-color:color-mix(in oklab, var(--background) 20%, transparent)}}[data-slot=tooltip-content] .\[\[data-slot\=tooltip-content\]_\&\]\:text-background{color:var(--background)}[data-slot=tooltip-content] .dark\:\[\[data-slot\=tooltip-content\]_\&\]\:bg-background\/10:is(.dark *){background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){[data-slot=tooltip-content] .dark\:\[\[data-slot\=tooltip-content\]_\&\]\:bg-background\/10:is(.dark *){background-color:color-mix(in oklab, var(--background) 10%, transparent)}}@media (hover:hover){a.\[a\&\]\:hover\:bg-accent:hover{background-color:var(--accent)}a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:color-mix(in oklab, var(--secondary) 90%, transparent)}}a.\[a\&\]\:hover\:text-accent-foreground:hover{color:var(--accent-foreground)}a.\[a\&\]\:hover\:underline:hover{text-decoration-line:underline}}li .\[li_\&\]\:pl-6{padding-left:calc(var(--spacing) * 6)}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./geist-cyrillic-ext-wght-normal-DjL33-gN.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./geist-cyrillic-wght-normal-BEAKL7Jp.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./geist-vietnamese-wght-normal-6IgcOCM7.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./geist-latin-ext-wght-normal-DC-KSUi6.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./geist-latin-wght-normal-BgDaEnEv.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./geist-mono-symbols2-wght-normal-CO5SzqOn.woff2)format("woff2-variations");unicode-range:U+2000-2001,U+2004-2008,U+200A,U+23B8-23BD,U+2500-259F}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./geist-mono-vietnamese-wght-normal-DadHysG0.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./geist-mono-latin-wght-normal-XN7g48iV.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--radius:.75rem;--wall:radial-gradient(120% 90% at 20% 10%, #dfe9f7 0%, #e9eef6 40%, #f7e6dc 85%, #f3d9cb 100%);--window:#fafafc9e;--panel:#ffffffa8;--background:#f6f6f8;--foreground:#0a0a0b;--card:#ffffffc7;--card-foreground:#0a0a0b;--popover:#fff;--popover-foreground:#0a0a0b;--primary:#18181b;--primary-foreground:#fafafa;--secondary:#0f0f1e0b;--secondary-foreground:#18181b;--muted:#0f0f1e0b;--muted-foreground:#6b6b74;--accent:#0f0f1e0f;--accent-foreground:#0a0a0b;--destructive:oklch(60% .2 25);--border:#0f0f1e14;--input:#0f0f1e1f;--ring:oklch(70% .17 48/.55);--brand:oklch(70% .17 48);--brand-soft:oklch(70% .17 48/.12);--blue:oklch(62% .15 252);--green:oklch(62% .15 150);--violet:oklch(62% .15 300);--red:oklch(60% .2 25);--heat-0:#0f0f1e0f;--heat-1:oklch(90% .05 52);--heat-2:oklch(82% .1 50);--heat-3:oklch(74% .15 48);--heat-4:oklch(64% .18 44);--chart-1:oklch(56% .2 265);--chart-2:oklch(64% .14 38);--chart-3:oklch(45% .09 140);--chart-4:oklch(45% .2 331);--chart-5:oklch(66% .14 240);--chart-6:oklch(30% .01 260);--chart-other:oklch(65% .01 260);--shadow-card:0 1px 2px #0f0f1e0f, 0 1px 1px #0f0f1e08;--shadow-float:0 12px 32px #0f0f1e24, 0 2px 6px #0f0f1e0f;--user-bubble:#18181b;--user-bubble-foreground:#fafafa}.dark{--wall:radial-gradient(120% 90% at 30% 10%, #2a2840 0%, #1a1a2a 45%, #1f1622 80%, #2a1a1c 100%);--window:#1818229e;--panel:#1e1e2a8c;--background:#17171f;--foreground:#f4f4f5;--card:#ffffff0e;--card-foreground:#f4f4f5;--popover:#22222e;--popover-foreground:#f4f4f5;--primary:#f4f4f5;--primary-foreground:#18181b;--secondary:#ffffff0d;--secondary-foreground:#f4f4f5;--muted:#ffffff0d;--muted-foreground:#a1a1aa;--accent:#ffffff12;--accent-foreground:#f4f4f5;--destructive:oklch(68% .18 25);--border:#ffffff14;--input:#ffffff1f;--ring:oklch(74% .16 50/.55);--brand:oklch(74% .16 50);--brand-soft:oklch(74% .16 50/.16);--blue:oklch(72% .13 252);--green:oklch(72% .13 150);--violet:oklch(72% .13 300);--red:oklch(68% .18 25);--heat-0:#ffffff0f;--heat-1:oklch(38% .07 48);--heat-2:oklch(50% .11 48);--heat-3:oklch(62% .15 48);--heat-4:oklch(76% .16 52);--chart-1:oklch(66% .18 275);--chart-2:oklch(75% .1 32);--chart-3:oklch(88% .17 149);--chart-4:oklch(64% .2 337);--chart-5:oklch(76% .12 240);--chart-6:oklch(95% .02 260);--chart-other:oklch(54% 0 260);--shadow-card:0 1px 2px #0000004d;--shadow-float:0 16px 40px #00000073;--user-bubble:#f4f4f5;--user-bubble-foreground:#18181b}html[data-space-hue]{--brand:oklch(.6 .11 var(--space-h));--brand-soft:oklch(.6 .11 var(--space-h) / .13);--ring:oklch(.6 .11 var(--space-h) / .5);--heat-1:oklch(.92 .04 var(--space-h));--heat-2:oklch(.84 .07 var(--space-h));--heat-3:oklch(.72 .1 var(--space-h));--heat-4:oklch(.6 .12 var(--space-h));--window:oklch(.975 .014 var(--space-h) / .6);--wall:radial-gradient(120% 90% at 20% 10%, oklch(.92 .04 calc(var(--space-h) - 25)) 0%, oklch(.95 .025 var(--space-h)) 45%, oklch(.92 .045 calc(var(--space-h) + 18)) 85%, oklch(.89 .055 calc(var(--space-h) + 25)) 100%)}html.dark[data-space-hue]{--brand:oklch(.74 .11 var(--space-h));--brand-soft:oklch(.74 .11 var(--space-h) / .16);--ring:oklch(.74 .11 var(--space-h) / .5);--heat-1:oklch(.36 .05 var(--space-h));--heat-2:oklch(.48 .08 var(--space-h));--heat-3:oklch(.6 .1 var(--space-h));--heat-4:oklch(.74 .11 var(--space-h));--window:oklch(.23 .02 var(--space-h) / .62);--wall:radial-gradient(120% 90% at 30% 10%, oklch(.3 .05 calc(var(--space-h) - 20)) 0%, oklch(.21 .025 var(--space-h)) 45%, oklch(.22 .035 calc(var(--space-h) + 20)) 80%, oklch(.26 .045 calc(var(--space-h) + 25)) 100%)}html[data-window-material=glass][data-space-hue]{--window:oklch(.96 .035 var(--space-h) / .3)}html.dark[data-window-material=glass][data-space-hue]{--window:oklch(.25 .04 var(--space-h) / .35)}:root{--font-han:"PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "PingFang SC", "Noto Sans SC", "Microsoft YaHei"}:root:lang(zh-CN){--font-han:"PingFang SC", "Noto Sans SC", "Microsoft YaHei", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei"}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@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-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{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-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@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-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}@keyframes collapsible-down{0%{height:0}to{height:var(--radix-collapsible-content-height,var(--bits-collapsible-content-height,var(--reka-collapsible-content-height,var(--kb-collapsible-content-height,auto))))}}@keyframes collapsible-up{0%{height:var(--radix-collapsible-content-height,var(--bits-collapsible-content-height,var(--reka-collapsible-content-height,var(--kb-collapsible-content-height,auto))))}to{height:0}}@keyframes shake{20%,60%{transform:translate(-6px)}40%,80%{transform:translate(6px)}}@keyframes indeterminate{0%{transform:translate(-100%)}to{transform:translate(300%)}}@keyframes rise{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}} diff --git a/site/public/app/assets/main-CmsrHzbA.js b/site/public/app/assets/main-CmsrHzbA.js new file mode 100644 index 00000000..8943ce7e --- /dev/null +++ b/site/public/app/assets/main-CmsrHzbA.js @@ -0,0 +1,24 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ask-page-dpmr3YMI.js","./query-DyHGS9i8.js","./index-CteWxeiL.js","./react-dom-BQvtGpns.js","./app-CVcZz016.js","./title-bar-BFG00FKz.js","./intelligence-CeVzSBj6.js","./providers-C9r3YfIk.js","./dist-BNmHZVEB.js","./button-C0JM8asg.js","./es2015-Do4eDMnQ.js","./copy-Da1fgnNr.js","./spaces-BqDG3Cu2.js","./rotate-ccw-DbPdZ2ia.js","./open-link-CxuCFjAI.js","./site-icon-9eLiTdFC.js","./favicon-CMH05BYD.js","./explorer-BFleEu6E.js","./chevron-down-Cjj85Wup.js","./loader-circle-BRt0w1nZ.js","./useQueries-C1BwFSJv.js","./plus-ClAV9by2.js","./dialog-Euero0G3.js","./x-G5NChC4d.js","./reveal-BcKh5OKz.js","./useInfiniteQuery-_wRbirEp.js","./settings-page-9CfTpnqU.js","./sparkles-85KrG7mR.js","./sliders-horizontal-CjNvoOS9.js","./archive-tDw2mIBu.js","./audit-CvU9jKUz.js","./switch-BQ_KsZoI.js","./dist-Bj5Hol67.js","./esm-DQKxnO1B.js","./wait-for-next-paint-ByKguCWJ.js","./select-BpsmShuc.js","./dist-DjbtVayB.js","./zone-CAMroIcN.js","./insights-Dw_jeUg7.js","./theme-B8UKnN8k.js","./zone-notice-DaxZN8ca.js","./circle-C2ges-Y_.js","./onboarding-page-ZYN0_QLJ.js","./arrow-left-DBf6LAhG.js","./schedule-actions-CWE6basD.js","./schedule-BcYH--Ck.js","./schedule-copy-DPACeJ9I.js","./browser-icons-DSlRrt_0.js","./search-C-9jHG2I.js"])))=>i.map(i=>d[i]); +import{B as e,D as t,F as n,I as r,J as i,K as a,L as o,M as s,O as c,P as l,Q as u,R as d,V as f,W as p,X as m,Y as h,Z as g,c as _,f as v,j as y,k as b,l as x,m as S,s as C,t as w,u as T,z as E}from"./index-CteWxeiL.js";import{t as ee}from"./react-dom-BQvtGpns.js";import{D,O,i as k,n as A,r as j,t as M}from"./query-DyHGS9i8.js";import{a as te,c as N,i as ne,t as re}from"./button-C0JM8asg.js";import{t as ie}from"./loader-circle-BRt0w1nZ.js";import{n as ae,r as oe,t as se}from"./theme-B8UKnN8k.js";import{a as ce,c as P,i as le,l as ue,o as de,r as fe,s as pe}from"./app-CVcZz016.js";import{a as me,c as F,d as I,f as he,g as ge,h as _e,i as ve,l as ye,m as L,n as be,o as xe,p as Se,r as Ce,s as we,t as Te,u as Ee}from"./es2015-Do4eDMnQ.js";import{a as De,i as Oe,n as ke,o as Ae,r as je,t as Me}from"./dist-Bj5Hol67.js";import{n as Ne}from"./dist-DjbtVayB.js";import{_ as Pe,a as Fe,c as Ie,i as Le,n as Re,o as ze,r as Be,s as Ve,t as He}from"./schedule-BcYH--Ck.js";import{t as Ue}from"./useInfiniteQuery-_wRbirEp.js";import{t as We}from"./intelligence-CeVzSBj6.js";import{d as Ge,f as Ke,i as qe,l as Je,n as Ye,o as Xe,p as Ze,r as Qe,s as $e,t as et,u as tt}from"./spaces-BqDG3Cu2.js";import{n as nt,t as rt}from"./archive-tDw2mIBu.js";import{t as it}from"./zone-CAMroIcN.js";import{t as at}from"./search-C-9jHG2I.js";import{a as ot,n as st,o as ct,r as lt,t as ut}from"./dialog-Euero0G3.js";import{a as dt,i as ft,n as pt,o as mt,r as ht,t as gt}from"./dist-BNmHZVEB.js";import{t as _t}from"./circle-C2ges-Y_.js";import{i as vt,n as yt,t as bt}from"./window-DVG07HkV.js";import{i as xt}from"./event-CTND-agQ.js";var R=u(h(),1),St=e=>{throw TypeError(e)},Ct=(e,t,n)=>t.has(e)||St(`Cannot `+n),wt=(e,t,n)=>(Ct(e,t,`read from private field`),n?n.call(e):t.get(e)),Tt=(e,t,n)=>t.has(e)?St(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),Et=(e,t,n,r)=>(Ct(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),Dt=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ot=/^[\\/]{2}/;function kt(e,t){return t+e.replace(/\\/g,`/`)}var At=(e=>(e.Pop=`POP`,e.Push=`PUSH`,e.Replace=`REPLACE`,e))(At||{}),jt=`popstate`;function Mt(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function Nt(e={}){function t(e,t){let{pathname:n=`/`,search:r=``,hash:i=``}=Rt(e.location.hash.substring(1));return!n.startsWith(`/`)&&!n.startsWith(`.`)&&(n=`/`+n),It(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){let n=e.document.querySelector(`base`),r=``;if(n&&n.getAttribute(`href`)){let t=e.location.href,n=t.indexOf(`#`);r=n===-1?t:t.slice(0,n)}return r+`#`+(typeof t==`string`?t:Lt(t))}function r(e,t){B(e.pathname.charAt(0)===`/`,`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}return zt(t,n,r,e)}function z(e,t){if(e===!1||e==null)throw Error(t)}function B(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Pt(){return Math.random().toString(36).substring(2,10)}function Ft(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function It(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?Rt(t):t,state:n,key:t&&t.key||r||Pt(),mask:i}}function Lt({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function Rt(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function zt(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=Mt(e)?e:It(h.location,e,t);n&&n(r,e),l=u()+1;let d=Ft(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=Mt(e)?e:It(h.location,e,t);n&&n(r,e),l=u();let i=Ft(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return Bt(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(jt,d),c=e,()=>{i.removeEventListener(jt,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function Bt(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),z(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:Lt(t);return i=i.replace(/ $/,`%20`),!n&&Ot.test(i)&&(i=r+i),new URL(i,r)}var Vt,Ht=class{constructor(e){if(Tt(this,Vt,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(wt(this,Vt).has(e))return wt(this,Vt).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){wt(this,Vt).set(e,t)}};Vt=new WeakMap;var V=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function Ut(e){return V.has(e)}var Wt=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function Gt(e){return Wt.has(e)}function Kt(e){return e.index===!0}function qt(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(z(e.index!==!0||!e.children,`Cannot specify children on an index route`),z(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),Kt(e)){let n={...e,id:s};return r[s]=Jt(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=Jt(n,t(n)),e.children&&(n.children=qt(e.children,t,o,r,i)),n}})}function Jt(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Yt(e,t,n=`/`){return Xt(e,t,n,!1)}function Xt(e,t,n,r,i){let a=_n((typeof t==`string`?Rt(t):t).pathname||`/`,n);if(a==null)return null;let o=i??Qt(e),s=null,c=gn(a);for(let e=0;s==null&&e{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;z(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Dn([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(z(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),$t(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:un(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=hn(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of en(e.path))a(e,t,!0,n)}),t}function en(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=en(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function tn(e){e.sort((e,t)=>e.score===t.score?dn(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var nn=/^:[\w-]+$/,rn=3,an=2,on=1,sn=10,cn=-2,ln=e=>e===`*`;function un(e,t){let n=e.split(`/`),r=n.length;return n.some(ln)&&(r+=cn),t&&(r+=an),n.filter(e=>!ln(e)).reduce((e,t)=>e+(nn.test(t)?rn:t===``?on:sn),r)}function dn(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function fn(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e{if(t===`*`){let e=s[r]||``;o=On(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function hn(e,t=!1,n=!0){B(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function gn(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return B(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function _n(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function vn({basename:e,pathname:t}){return t===`/`?e:Dn([e,t])}var yn=e=>Dt.test(e);function bn(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Rt(e):e,a;return n?(n=En(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?xn(n.substring(1),`/`):xn(n,t)):a=t,{pathname:a,search:An(r),hash:jn(i)}}function xn(e,t){let n=On(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Sn(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Cn(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function wn(e){let t=Cn(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Tn(e,t,n,r=!1){let i;typeof e==`string`?i=Rt(e):(i={...e},z(!i.pathname||!i.pathname.includes(`?`),Sn(`?`,`pathname`,`search`,i)),z(!i.pathname||!i.pathname.includes(`#`),Sn(`#`,`pathname`,`hash`,i)),z(!i.search||!i.search.includes(`#`),Sn(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=bn(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var En=e=>e.replace(/[\\/]{2,}/g,`/`),Dn=e=>En(e.join(`/`));function On(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var kn=e=>On(e).replace(/^\/*/,`/`),An=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,jn=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Mn=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],Nn=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Pn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Fn(e){return Dn(e.map(e=>e.route.path).filter(Boolean))||`/`}var In=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ln(e,t){let n=e;if(typeof n!=`string`||!Dt.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(In)try{let e=new URL(window.location.href),r=Ot.test(n)?new URL(kt(n,e.protocol)):new URL(n),a=_n(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{B(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Rn=Symbol(`Uninstrumented`);function zn(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=Vn(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=Vn(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[Rn]??i,a=Vn(n[e],t,(...e)=>Un(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[Rn]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[Rn]??e,r=Vn(n.middleware,t,(...e)=>Un(e[0]));return r?(r[Rn]=t,r):e})),r}function Bn(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[Rn]??e.navigate,r=Vn(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?Lt(n):`.`,...Wn(e,r??{})}});r&&(r[Rn]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[Rn]??e.fetch,r=Vn(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...Wn(e,i??{})}});r&&(r[Rn]=t,e.fetch=r)}return e}function Vn(e,t,n){return e.length===0?null:async(...r)=>{let i=await Hn(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function Hn(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=Hn(e,t,n,r-1),a=await o,z(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function Un(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:Gn(t),params:{...r},pattern:i,context:Kn(n)}}function Wn(e,t){return{currentUrl:Lt(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function Gn(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Kn(e){if(Jn(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var qn=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Jn(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===qn}var Yn=new URL(`http://localhost`);function Xn(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),Yn)}catch{return Yn}}function Zn(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function Qn(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function $n(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!Zn(i,n),s=!Zn(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!Qn(e,i)||!Zn(i,a)))throw Error(`External navigation is not allowed`)}var er=[`POST`,`PUT`,`PATCH`,`DELETE`],tr=new Set(er),nr=[`GET`,...er],rr=new Set(nr),ir=new Set([301,302,303,307,308]),ar=new Set([307,308]),or={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},sr={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},cr={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},lr=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),ur=`remix-router-transitions`,dr=Symbol(`ResetLoaderData`),fr,pr,mr,hr,gr=class{constructor(e){Tt(this,fr),Tt(this,pr),Tt(this,mr),Tt(this,hr),Et(this,fr,e),Et(this,pr,Qt(e))}get stableRoutes(){return wt(this,fr)}get activeRoutes(){return wt(this,mr)??wt(this,fr)}get branches(){return wt(this,hr)??wt(this,pr)}get hasHMRRoutes(){return wt(this,mr)!=null}setRoutes(e){Et(this,fr,e),Et(this,pr,Qt(e))}setHmrRoutes(e){Et(this,mr,e),Et(this,hr,Qt(e))}commitHmrRoutes(){wt(this,mr)&&(Et(this,fr,wt(this,mr)),Et(this,pr,wt(this,hr)),Et(this,mr,void 0),Et(this,hr,void 0))}};fr=new WeakMap,pr=new WeakMap,mr=new WeakMap,hr=new WeakMap;function _r(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;z(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||lr,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),...zn(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new gr(qt(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Pr,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=Xt(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=ai(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=ii(s.activeRoutes);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&Ke(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=Ke(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1,S=!x;else if(!v.some(e=>Sr(e.route)))x=!0,S=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}S=!1,x=!0,r.forEach(e=>{let r=Cr(e.route,t,n);S||=r.renderFallback,x&&=!r.shouldLoad})}let C,w={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:S,navigation:or,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=`POP`,E=null,ee=!1,D,O=!1,k=new Map,A=null,j=!1,M=!1,te=new Set,N=new Map,ne=0,re=-1,ie=new Map,ae=new Set,oe=new Map,se=new Map,ce=new Set,P=new Map,le,ue=null;function de(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(le){le(),le=void 0;return}B(P.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=Be({currentLocation:w.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{le=e});e.history.go(r*-1),ze(i,{state:`blocked`,location:n,proceed(){ze(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(w.blockers);e.set(i,cr),me({blockers:e})}}),E?.resolve(),E=null}else return ge(t,n)}),n){ki(t,k);let e=()=>Ai(t,k);t.addEventListener(`pagehide`,e),A=()=>t.removeEventListener(`pagehide`,e)}return w.initialized||ge(`POP`,w.location,{initialHydration:!0}),C}function fe(){d&&d(),A&&A(),f.clear(),D&&D.abort(),w.fetchers.forEach((e,t)=>je(w.fetchers,t)),w.blockers.forEach((e,t)=>Re(t))}function pe(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(w,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function me(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),w={...w,...e};let n=[],r=[];w.fetchers.forEach((e,t)=>{e.state===`idle`&&(ce.has(t)?n.push(t):r.push(t))}),ce.forEach(e=>{!w.fetchers.has(e)&&!N.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(w,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>je(w.fetchers,e)),r.forEach(e=>w.fetchers.delete(e))}function F(t,n,{flushSync:r}={}){let i=w.actionData!=null&&w.navigation.formMethod!=null&&bi(w.navigation.formMethod)&&w.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?w.actionData:null;let o=n.loaderData?ti(w.loaderData,n.loaderData,n.matches||[],n.errors):w.loaderData,c=w.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,cr)));let l=!j&&Ge(t,n.matches||w.matches),u=ee===!0||w.navigation.formMethod!=null&&bi(w.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),j||T===`POP`||(T===`PUSH`?e.history.push(t,t.state):T===`REPLACE`&&e.history.replace(t,t.state));let d;if(T===`POP`&&!j&&t!==w.location){let e=k.get(w.location.pathname);e&&e.has(t.pathname)?d={currentLocation:w.location,nextLocation:t}:k.has(t.pathname)&&(d={currentLocation:t,nextLocation:w.location})}else if(O){let e=k.get(w.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),k.set(w.location.pathname,e)),d={currentLocation:w.location,nextLocation:t}}me({...n,actionData:a,loaderData:o,historyAction:T,location:t,initialized:!0,renderFallback:!1,navigation:or,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),T=`POP`,ee=!1,O=!1,j=!1,M=!1,E?.resolve(),E=null,ue?.resolve(),ue=null}async function I(t,n){if(E?.resolve(),E=null,typeof t==`number`){E||=ji();let n=E.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=br(!1,yr(w.location,w.matches,c,t,n?.fromRouteId,n?.relative),n),o;if(n?.mask){let t=typeof n.mask==`string`?Rt(n.mask):{...w.location.mask,...n.mask};if(o={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},Ot.test(o.pathname))throw Error(`External navigation is not allowed`);o.pathname.startsWith(`\\`)&&(o.pathname=o.pathname.replace(/^\\+/,`/`)),$n(typeof n.mask==`string`?n.mask:Lt(n.mask),Lt(o),e.history.createURL(`/`),`reject`)}let s=w.location,l=It(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)},$n(t==null?e.history.createHref(w.location):typeof t==`string`?t:Lt(t),e.history.createHref(l.mask||l),e.history.createURL(`/`),`reject`);let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&bi(i.formMethod)&&i.formAction===w.location.pathname+w.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=Be({currentLocation:s,nextLocation:l,historyAction:d});m?ze(m,{state:`blocked`,location:l,proceed(){ze(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),I(t,n)},reset(){let e=new Map(w.blockers);e.set(m,cr),me({blockers:e})}}):await ge(d,l,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function he(){ue||=ji(),Ee(),me({revalidation:`loading`});let e=ue.promise;return w.navigation.state===`submitting`?e:w.navigation.state===`idle`?(ge(w.historyAction,w.location,{startUninterruptedRevalidation:!0}),e):(ge(T||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:O===!0}),e)}async function ge(t,n,r){D&&D.abort(),D=null,T=t,j=(r&&r.startUninterruptedRevalidation)===!0,We(w.location,w.matches),ee=(r&&r.preventScrollReset)===!0,O=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&w.matches&&w.matches.length>0&&!y?w.matches:Xt(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&w.initialized&&!M&&ci(w.location,n)&&!(r&&r.submission&&bi(r.submission.formMethod))){F(n,{matches:a},{flushSync:o});return}let l=Ke(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),!a){let{error:e,notFoundMatches:t,route:r}=Ve(n.pathname);F(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;D=new AbortController;let d=Yr(e.history,n,D.signal,r&&r.submission),f=e.getContext?await e.getContext():new Ht,p;if(r&&r.pendingError)p=[ri(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&bi(r.submission.formMethod)){let i=await _e(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(pi(t)&&Pn(t.error)&&t.error.status===404){D=null,F(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=wi(n,a,t,r.submission),o=!1,l.active=!1,d=Yr(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await ve(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(D=null,F(n,{matches:h||a,...ni(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function _e(t,n,i,l,u,d,f,p,m={}){if(Ee(),me({navigation:Ti(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await qe(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=ii(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=ri(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Ve(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=Si(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:ai(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await we(t,n,Br(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(mi(h)){let n;return n=m&&m.replace!=null?m.replace:Jr(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===w.location.pathname+w.location.search,await Ce(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(pi(h)){let e=ri(l,g.route.id);return(m&&m.replace)!==!0&&(T=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function ve(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||wi(n,i,l,p),x=p||m||Ci(b),S=!j&&!g;if(d){if(S){let e=ye(v);me({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await qe(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=ii(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=ri(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Ve(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:T,revalidatingFetchers:E}=xr(t,u,a,o,e.history,w,i,x,n,g?[]:r,g===!0,M,te,ce,oe,ae,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(re=++ne,!e.dataStrategy&&!T.some(e=>e.shouldLoad)&&!T.some(e=>e.route.middleware&&e.route.middleware.length>0)&&E.length===0){let e=new Map(w.fetchers),t=Fe(e);return F(n,{matches:i,loaderData:{},errors:v&&pi(v[1])?{[v[0]]:v[1].error}:null,...ni(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=ye(v);t!==void 0&&(e.actionData=t)}E.length>0&&(e.fetchers=L(E)),me(e,{flushSync:_})}E.forEach(e=>{Ne(e.key),e.controller&&N.set(e.key,e.controller)});let ee=()=>E.forEach(e=>Ne(e.key));D&&D.signal.addEventListener(`abort`,ee);let{loaderResults:O,fetcherResults:k}=await Te(T,E,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};D&&D.signal.removeEventListener(`abort`,ee),E.forEach(e=>N.delete(e.key));let A=oi(O);if(A)return await Ce(t,A.result,!0,{replace:h}),{shortCircuited:!0};if(A=oi(k),A)return ae.add(A.key),await Ce(t,A.result,!0,{replace:h}),{shortCircuited:!0};let ie=new Map(w.fetchers),{loaderData:se,errors:P}=ei(w,i,O,v,E,k,ie);g&&w.errors&&(P={...w.errors,...P});let le=Fe(ie),ue=Ie(re,ie),de=le||ue||E.length>0;return{matches:i,loaderData:se,errors:P,...de?{workingFetchers:ie}:{}}}function ye(e){if(e&&!pi(e[1]))return{[e[0]]:e[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function L(e){let t=new Map(w.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Ei(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function be(t,n,r,i){Ne(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=yr(w.location,w.matches,c,r,n,i?.relative),u=Xt(o,l,c,!1,s.branches),d=Ke(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){Oe(t,n,ai(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=br(!0,l,i);if(m){Oe(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new Ht,g=(i&&i.preventScrollReset)===!0;p&&bi(p.formMethod)?await xe(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate):(oe.set(t,{routeId:n,path:f}),await Se(t,n,f,u,h,d.active,a,g,p))}async function xe(t,n,i,l,u,d,f,p,m,h){Ee(),oe.delete(t),De(t,Di(m,w.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=Yr(e.history,i,g.signal,m);if(d){let e=await qe(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Oe(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{Oe(t,n,ai(404,{pathname:i}),{flushSync:f});return}}let v=Si(l,i);if(!v.route.action&&!v.route.lazy){Oe(t,n,ai(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}N.set(t,g);let y=ne,b=Br(a,o,_,i,l,v,r,u),x=await we(_,i,b,u,t),S=x[v.route.id];if(!S){for(let e of b)if(x[e.route.id]){S=x[e.route.id];break}}if(_.signal.aborted){N.get(t)===g&&N.delete(t);return}if(ce.has(t)){if(mi(S)||pi(S)){De(t,Oi(void 0));return}}else{if(mi(S)){if(N.delete(t),re>y){De(t,Oi(void 0));return}return ae.add(t),De(t,Ei(m)),Ce(_,S,!1,{fetcherSubmission:m,preventScrollReset:p})}if(pi(S)){Oe(t,n,S.error);return}}let C=w.navigation.location||w.location,E=Yr(e.history,C,g.signal),ee=s.activeRoutes,O=w.navigation.state===`idle`?w.matches:Xt(ee,w.navigation.location,c,!1,s.branches);z(O,`Didn't find any matches after fetcher action`);let k=++ne;ie.set(t,k);let{dsMatches:A,revalidatingFetchers:j}=xr(E,u,a,o,e.history,w,O,m,C,r,!1,M,te,ce,oe,ae,ee,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,S],h),se=Ei(m,S.data),P=new Map(w.fetchers);P.set(t,se),j.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=P.get(t),r=Ei(void 0,n?n.data:void 0);P.set(t,r),Ne(t),e.controller&&N.set(t,e.controller)}),me({fetchers:P});let le=()=>j.forEach(e=>Ne(e.key));g.signal.addEventListener(`abort`,le);let{loaderResults:ue,fetcherResults:de}=await Te(A,j,E,C,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,le),ie.delete(t),N.delete(t),j.forEach(e=>N.delete(e.key));let fe=w.fetchers.has(t),pe=e=>{if(!fe)return e;let n=new Map(e.fetchers);return n.set(t,Oi(S.data)),{...e,fetchers:n}},I=oi(ue);if(I)return w=pe(w),Ce(E,I.result,!1,{preventScrollReset:p});if(I=oi(de),I)return ae.add(I.key),w=pe(w),Ce(E,I.result,!1,{preventScrollReset:p});let he=new Map(w.fetchers);fe&&he.set(t,Oi(S.data));let{loaderData:ge,errors:_e}=ei(w,O,ue,void 0,j,de,he);Ie(k,he),w.navigation.state===`loading`&&k>re?(z(T,`Expected pending action`),D&&D.abort(),F(w.navigation.location,{matches:O,loaderData:ge,errors:_e,fetchers:he})):(me({errors:_e,loaderData:ti(w.loaderData,ge,O,_e),fetchers:he}),M=!1)}async function Se(t,n,i,s,c,l,u,d,f){let p=w.fetchers.get(t);De(t,Ei(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Yr(e.history,i,m.signal);if(l){let e=await qe(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Oe(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{Oe(t,n,ai(404,{pathname:i}),{flushSync:u});return}}let g=Si(s,i);N.set(t,m);let _=ne,v=await we(h,i,Br(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(N.get(t)===m&&N.delete(t),!h.signal.aborted){if(ce.has(t))De(t,Oi(void 0));else if(mi(y)){if(re>_){De(t,Oi(void 0));return}ae.add(t),await Ce(h,y,!1,{preventScrollReset:d})}else pi(y)?Oe(t,n,y.error):De(t,Oi(y.data))}}async function Ce(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(E?.resolve(),E=null),i.response.headers.has(`X-Remix-Revalidate`)&&(M=!0);let d=i.response.headers.get(`Location`);z(d,`Expected a Location header on the redirect Response`);let f=d,p=new URL(r.url);d=Jr(d,p,c,e.history),$n(f,d,p,`allow-explicit`);let m=It(w.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(yn(d)){let n=Bt(t,d,!0);e=n.origin!==t.location.origin||_n(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}D=null;let h=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:g,formAction:_,formEncType:v}=w.navigation;!o&&!s&&g&&_&&v&&(o=Ci(w.navigation));let y=o||s;ar.has(i.response.status)&&y&&bi(y.formMethod)?await ge(h,m,{submission:{...y,formAction:d},preventScrollReset:l||ee,enableViewTransition:a?O:void 0}):await ge(h,m,{overrideNavigation:wi(m,[],h,o),fetcherSubmission:s,preventScrollReset:l||ee,enableViewTransition:a?O:void 0})}async function we(e,t,n,r,i){let a,o={};try{a=await Vr(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!bi(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;a.hasOwnProperty(e.route.id)||w.loaderData.hasOwnProperty(e.route.id)||w.errors&&w.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(fi(r)){let i=r.result;o[t]={type:`redirect`,response:Gr(i,e,t,n,c)}}else o[t]=await Wr(r);return o}async function Te(e,t,n,r,i){let a=we(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await we(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:ai(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Ee(){M=!0,oe.forEach((e,t)=>{N.has(t)&&te.add(t),Ne(t)})}function De(e,t,n={}){let r=new Map(w.fetchers);r.set(e,t),me({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function Oe(e,t,n,r={}){let i=ri(w.matches,t),a=new Map(w.fetchers);je(a,e),me({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function ke(e){return se.set(e,(se.get(e)||0)+1),ce.has(e)&&ce.delete(e),w.fetchers.get(e)||sr}function Ae(e,t){Ne(e,t?.reason),De(e,Oi(null))}function je(e,t){let n=w.fetchers.get(t);N.has(t)&&!(n&&n.state===`loading`&&ie.has(t))&&Ne(t),oe.delete(t),ie.delete(t),ae.delete(t),ce.delete(t),te.delete(t),e.delete(t)}function Me(e){let t=(se.get(e)||0)-1;t<=0?(se.delete(e),ce.add(e)):se.set(e,t),me({fetchers:new Map(w.fetchers)})}function Ne(e,t){let n=N.get(e);n&&(n.abort(t),N.delete(e))}function Pe(e,t){for(let n of e){let e=t.get(n);z(e,`Expected fetcher: ${n}`);let r=Oi(e.data);t.set(n,r)}}function Fe(e){let t=[],n=!1;for(let r of ae){let i=e.get(r);z(i,`Expected fetcher: ${r}`),i.state===`loading`&&(ae.delete(r),t.push(r),n=!0)}return Pe(t,e),n}function Ie(e,t){let n=[];for(let[r,i]of ie)if(i0}function Le(e,t){let n=w.blockers.get(e)||cr;return P.get(e)!==t&&P.set(e,t),n}function Re(e){w.blockers.delete(e),P.delete(e)}function ze(e,t){let n=w.blockers.get(e)||cr;z(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(w.blockers);r.set(e,t),me({blockers:r})}function Be({currentLocation:e,nextLocation:t,historyAction:n}){if(P.size===0)return;P.size>1&&B(!1,`A router only supports one blocker at a time`);let r=Array.from(P.entries()),[i,a]=r[r.length-1],o=w.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Ve(e){let t=ai(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=ii(n);return{notFoundMatches:r,route:i,error:t}}function He(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===or){_=!0;let e=Ge(w.location,w.matches);e!=null&&me({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function Ue(e,t){return h&&h(e,t.map(e=>Zt(e,w.loaderData)))||e.key}function We(e,t){if(m&&g){let n=Ue(e,t);m[n]=g()}}function Ge(e,t){if(m){let n=Ue(e,t),r=m[n];if(typeof r==`number`)return r}return null}function Ke(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:Xt(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:Xt(n,r,c,!0,e)}}return{active:!1,matches:null}}async function qe(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||Dr(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=Xt(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=Xt(s.activeRoutes,n,c,!0,u),!(f&&l.lengthe.route.id===t[n].route.id)}function Ye(e){o={},s.setHmrRoutes(qt(e,a,void 0,o))}function Xe(e,t,n=!1){Dr(e,t,s,o,a,n),s.hasHMRRoutes||me({})}return C={get basename(){return c},get future(){return u},get state(){return w},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:de,subscribe:pe,enableScrollRestoration:He,navigate:I,fetch:be,revalidate:he,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ke,resetFetcher:Ae,deleteFetcher:Me,dispose:fe,getBlocker:Le,deleteBlocker:Re,patchRoutes:Xe,_internalFetchControllers:N,_internalSetRoutes:Ye,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){me(e)}},e.instrumentations&&(C=Bn(C,e.instrumentations.map(e=>e.router).filter(Boolean))),C}function vr(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function yr(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Tn(r||`.`,wn(o),_n(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=xi(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=vn({basename:n,pathname:c.pathname})),Lt(c)}function br(e,t,n){if(!n||!vr(n))return{path:t};if(n.formMethod&&!yi(n.formMethod))return{path:t,error:ai(405,{method:n.formMethod})};let r=()=>({path:t,error:ai(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=si(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!bi(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n} +`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!bi(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}z(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Zr(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Zr(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Qr(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Qr(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(bi(c.formMethod))return{path:t,submission:c};let l=Rt(t);return e&&l.search&&xi(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:Lt(l),submission:c}}function xr(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?pi(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&pi(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,ee=E&&E>=400,D={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},O=Fn(o),k=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!Sr(s))f=!1;else if(u){let{shouldLoad:e}=Cr(s,a.loaderData,a.errors);f=e}else wr(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return zr(n,r,e,c,O,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:ee?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?Tr(a.matches[o],i)&&(p=!0):p=!0;let m={...D,defaultShouldRevalidate:p},h=Er(i,m);return zr(n,r,e,c,O,i,l,t,h,m,x)}),A=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=Xt(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;A.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=Si(b,e.path),C=new AbortController,w=Yr(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=Br(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=Br(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!ee&&d;let a={...D,defaultShouldRevalidate:i};Er(S,a)&&(T=Br(n,r,w,e.path,b,S,l,t,a))}T&&A.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:k,revalidatingFetchers:A}}function Sr(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Cr(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Sr(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function wr(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Tr(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Er(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Dr(e,t,n,r,i,a){let o;if(e){let t=r[e];z(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>Or(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=qt(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;et.children?.some(t=>Or(e,t)))??!1}var kr=new WeakMap,Ar=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(z(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=kr.get(i);o||(o={},kr.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=Ut(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)B(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)B(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},jr=new WeakMap;function Mr(e,t,n,r,i){let a=n[e.id];if(z(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=jr.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{z(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=Gt(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?B(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?B(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return jr.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=Ar({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function Nr(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Pr(e){return e.matches.some(e=>e.route.middleware)?Fr(e,()=>Nr(e)):Nr(e)}function Fr(e,t){return Ir(e,t,e=>{if(vi(e))throw e;return e},ui,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=ri(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function Ir(e,t,n,r,i){let{matches:a,...o}=e;return await Lr(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Lr(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await Lr(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function Rr(e,t,n,r,i){let a=Ar({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=Mr(r.route,bi(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function zr(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Rr(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Er(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Er(a,{...l,defaultShouldRevalidate:e}):Er(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!bi(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(bi(n.method)||!p)?Hr({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function Br(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?zr(e,t,n,r,Fn(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Rr(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Vr(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:Xr(t,n),pattern:Fn(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return Fr(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function Hr({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=bi(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:Xr(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw ai(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw ai(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Ur(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Wr(e){let{result:t,type:n}=e;if(gi(t)){let e;try{e=await Ur(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Nn(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?hi(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:li(t),statusCode:Pn(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Pn(t)?t.status:void 0}:hi(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function Gr(e,t,n,r,i){let a=e.headers.get(`Location`);if(z(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!yn(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=yr(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Kr=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function qr(e){try{return Kr.includes(new URL(e).protocol)}catch{return!1}}function Jr(e,t,n,r){if(yn(e)){let r=e,i=Ot.test(r)?new URL(kt(r,t.protocol)):new URL(r);if(qr(i.toString()))throw Error(`Invalid redirect location`);let a=_n(i.pathname,n)!=null;if(i.origin===t.origin&&a)return En(i.pathname)+i.search+i.hash}try{if(qr(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function Yr(e,t,n,r){let i=e.createURL(si(t)).toString(),a={signal:n};if(r&&bi(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?Zr(r.formData):r.formData}return new Request(i,a)}function Xr(e,t){let n=new URL(e.url),r=typeof t==`string`?Rt(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);n.search=e.size?`?${e.toString()}`:``}else n.search=``;return n.hash=r.hash||``,n}function Zr(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Qr(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function $r(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&pi(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(z(!mi(f),`Cannot handle redirect results in processLoaderData`),pi(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=ri(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=dr),c||(c=!0,s=Pn(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function ei(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=$r(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(z(s,`Did not find corresponding fetcher result`),pi(s)){let t=ri(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(mi(s))z(!1,`Unhandled fetcher revalidation redirect`);else{let e=Oi(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function ti(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==dr).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function ni(e){return e?pi(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ri(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function ii(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function ai(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new Nn(e||500,o,Error(s),!0)}function oi(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(mi(r))return{key:n,result:r}}}function si(e){return Lt({...typeof e==`string`?Rt(e):e,hash:``})}function ci(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function li(e){return new Nn(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function ui(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&di(t))}function di(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function fi(e){return gi(e.result)&&ir.has(e.result.status)}function pi(e){return e.type===`error`}function mi(e){return(e&&e.type)===`redirect`}function hi(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function gi(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function _i(e){return ir.has(e)}function vi(e){return gi(e)&&_i(e.status)&&e.headers.has(`Location`)}function yi(e){return rr.has(e.toUpperCase())}function bi(e){return tr.has(e.toUpperCase())}function xi(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Si(e,t){let n=typeof t==`string`?Rt(t).search:t.search;if(e[e.length-1].route.index&&xi(n||``))return e[e.length-1];let r=Cn(e);return r[r.length-1]}function Ci(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(t&&n&&r){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function wi(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Ti(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function Ei(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Di(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Oi(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function ki(e,t){try{let n=e.sessionStorage.getItem(ur);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function Ai(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(ur,JSON.stringify(n))}catch(e){B(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function ji(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Mi=R.createContext(null);Mi.displayName=`DataRouter`;var Ni=R.createContext(null);Ni.displayName=`DataRouterState`;var Pi=R.createContext(!1);function Fi(){return R.useContext(Pi)}var Ii=R.createContext({isTransitioning:!1});Ii.displayName=`ViewTransition`;var Li=R.createContext(new Map);Li.displayName=`Fetchers`;var Ri=R.createContext(null);Ri.displayName=`Await`;var zi=R.createContext(null);zi.displayName=`Navigation`;var Bi=R.createContext(null);Bi.displayName=`Location`;var Vi=R.createContext({outlet:null,matches:[],isDataRoute:!1});Vi.displayName=`Route`;var Hi=R.createContext(null);Hi.displayName=`RouteError`;var Ui=`REACT_ROUTER_ERROR`,Wi=`REDIRECT`,Gi=`ROUTE_ERROR_RESPONSE`;function Ki(e){if(e.startsWith(`${Ui}:${Wi}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function qi(e){if(e.startsWith(`${Ui}:${Gi}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Nn(t.status,t.statusText,t.data)}catch{}}function Ji(e,{relative:t}={}){z(Yi(),`useHref() may be used only in the context of a component.`);let{basename:n,navigator:r}=R.useContext(zi),{hash:i,pathname:a,search:o}=ia(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Dn([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Yi(){return R.useContext(Bi)!=null}function Xi(){return z(Yi(),`useLocation() may be used only in the context of a component.`),R.useContext(Bi).location}function Zi(){return R.useContext(Bi).navigationType}var Qi=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function $i(e){R.useContext(zi).static||R.useLayoutEffect(e)}function ea(){let{isDataRoute:e}=R.useContext(Vi);return e?ba():ta()}function ta(){z(Yi(),`useNavigate() may be used only in the context of a component.`);let e=R.useContext(Mi),{basename:t,navigator:n}=R.useContext(zi),{matches:r}=R.useContext(Vi),{pathname:i}=Xi(),a=JSON.stringify(wn(r)),o=R.useRef(!1);return $i(()=>{o.current=!0}),R.useCallback((r,s={})=>{if(B(o.current,Qi),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Tn(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Dn([t,c.pathname])),$n(typeof r==`string`?r:Lt(r),n.createHref(c),Xn(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var H=R.createContext(null);function na(e){let t=R.useContext(Vi).outlet;return R.useMemo(()=>t&&R.createElement(H.Provider,{value:e},t),[t,e])}function ra(){let{matches:e}=R.useContext(Vi);return e[e.length-1]?.params??{}}function ia(e,{relative:t}={}){let{matches:n}=R.useContext(Vi),{pathname:r}=Xi(),i=JSON.stringify(wn(n));return R.useMemo(()=>Tn(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function aa(e,t,n){z(Yi(),`useRoutes() may be used only in the context of a component.`);let{navigator:r}=R.useContext(zi),{matches:i}=R.useContext(Vi),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Sa(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant (or called \`useRoutes()\`) at "${s}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let u=Xi(),d;if(t){let e=typeof t==`string`?Rt(t):t;z(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):Yt(e,{pathname:p});B(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),B(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let h=fa(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Dn([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Dn([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?R.createElement(Bi.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function oa(){let e=ya(),t=Pn(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=R.createElement(R.Fragment,null,R.createElement(`p`,null,`💿 Hey developer 👋`),R.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,R.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,R.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),R.createElement(R.Fragment,null,R.createElement(`h2`,null,`Unexpected Application Error!`),R.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?R.createElement(`pre`,{style:i},n):null,o)}var sa=R.createElement(oa,null),ca=class extends R.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=qi(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:R.createElement(Vi.Provider,{value:this.props.routeContext},R.createElement(Hi.Provider,{value:e,children:this.props.component}));return this.context?R.createElement(ua,{error:e},t):t}};ca.contextType=Pi;var la=new WeakMap;function ua({children:e,error:t}){let{basename:n,navigator:r}=R.useContext(zi);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Ki(t.digest);if(e){let i=la.get(t);if(i)throw i;let a=Ln(e.location,n),o=a.absoluteURL||a.to;if($n(e.location,o,Xn(r),`allow-explicit`),qr(o))throw Error(`Invalid redirect location`);if(In&&!la.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw la.set(t,n),n}}return R.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function da({routeContext:e,match:t,children:n}){let r=R.useContext(Mi);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),R.createElement(Vi.Provider,{value:e},n)}function fa(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);z(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Fn(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||sa,o&&(s<0&&c===0?(Sa(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?R.createElement(n.route.Component,null):n.route.element?n.route.element:e,R.createElement(da,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?R.createElement(ca,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function pa(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ma(e){let t=R.useContext(Mi);return z(t,pa(e)),t}function ha(e){let t=R.useContext(Ni);return z(t,pa(e)),t}function ga(e){let t=R.useContext(Vi);return z(t,pa(e)),t}function _a(e){let t=ga(e),n=t.matches[t.matches.length-1];return z(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function va(){return _a(`useRouteId`)}function ya(){let e=R.useContext(Hi),t=ha(`useRouteError`),n=_a(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ba(){let{router:e}=ma(`useNavigate`),t=_a(`useNavigate`),n=R.useRef(!1);return $i(()=>{n.current=!0}),R.useCallback(async(r,i={})=>{B(n.current,Qi),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var xa={};function Sa(e,t,n){!t&&!xa[e]&&(xa[e]=!0,B(!1,n))}var Ca={};function wa(e,t){!e&&!Ca[t]&&(Ca[t]=!0,console.warn(t))}var Ta=R.useOptimistic,Ea=()=>void 0;function Da(e){return Ta?Ta(e):[e,Ea]}function Oa(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&B(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:R.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&B(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:R.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&B(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:R.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var ka=[`HydrateFallback`,`hydrateFallbackElement`],Aa=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function ja({router:e,flushSync:t,onError:n,useTransitions:r}){r=Fi()||r;let[i,a]=R.useState(e.state),[o,s]=Da(i),[c,l]=R.useState(),[u,d]=R.useState({isTransitioning:!1}),[f,p]=R.useState(),[m,h]=R.useState(),[g,_]=R.useState(),v=R.useRef(new Map),y=R.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:Fn(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),wa(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(wa(g==null||y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!g||!y)t&&u?t(()=>a(i)):r===!1?a(i):R.startTransition(()=>{r===!0&&s(e=>Ma(e,i)),a(i)});else if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n))}else m?(f?.resolve(),m.skipTransition(),_({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);R.useLayoutEffect(()=>e.subscribe(y),[e,y]),R.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new Aa)},[u]),R.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):R.startTransition(()=>{r===!0&&s(e=>Ma(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),R.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),R.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),_(void 0))},[u.isTransitioning,g]);let b=R.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),x=e.basename||`/`,S=R.useMemo(()=>({router:e,navigator:b,static:!1,basename:x,onError:n}),[e,b,x,n]);return R.createElement(R.Fragment,null,R.createElement(Mi.Provider,{value:S},R.createElement(Ni.Provider,{value:o},R.createElement(Li.Provider,{value:v.current},R.createElement(Ii.Provider,{value:u},R.createElement(La,{basename:x,location:o.location,navigationType:o.historyAction,navigator:b,useTransitions:r},R.createElement(Na,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function Ma(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Na=R.memo(Pa);function Pa({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return aa(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Fa({to:e,replace:t,state:n,relative:r}){z(Yi(),` may be used only in the context of a component.`);let{static:i,navigator:a}=R.useContext(zi);B(!i,` must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.`);let{matches:o}=R.useContext(Vi),{pathname:s}=Xi(),c=ea(),l=Tn(e,wn(o),s,r===`path`);$n(typeof e==`string`?e:Lt(e),a.createHref(l),Xn(a),`reject`);let u=JSON.stringify(l);return R.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function Ia(e){return na(e.context)}function La({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){z(!Yi(),`You cannot render a inside another . You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=R.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Rt(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=R.useMemo(()=>{let e=_n(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return B(h!=null,` is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the won't render anything.`),h==null?null:R.createElement(zi.Provider,{value:c},R.createElement(Bi.Provider,{children:t,value:h}))}R.Component;var Ra=`get`,za=`application/x-www-form-urlencoded`;function Ba(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Va(e){return Ba(e)&&e.tagName.toLowerCase()===`button`}function Ha(e){return Ba(e)&&e.tagName.toLowerCase()===`form`}function Ua(e){return Ba(e)&&e.tagName.toLowerCase()===`input`}function Wa(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ga(e,t){return e.button===0&&(!t||t===`_self`)&&!Wa(e)}function Ka(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function qa(e,t){let n=Ka(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Ja=null;function Ya(){if(Ja===null)try{new FormData(document.createElement(`form`),0),Ja=!1}catch{Ja=!0}return Ja}var Xa=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Za(e){return e!=null&&!Xa.has(e)?(B(!1,`"${e}" is not a valid \`encType\` for \`
    \`/\`\` and will default to "${za}"`),null):e}function Qa(e,t){let n,r,i,a,o;if(Ha(e)){let o=e.getAttribute(`action`);r=o?_n(o,t):null,n=e.getAttribute(`method`)||Ra,i=Za(e.getAttribute(`enctype`))||za,a=new FormData(e)}else if(Va(e)||Ua(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a + ) + } + { + screens.map((s) => ( + {s.alt[lang]} + )) + } + + { + tabs && ( +
    + {screens.map((s) => ( + + ))} +
    + ) + } + + { + (caption || Astro.slots.has('caption')) && ( +
    + {caption} + +
    + ) + } + diff --git a/site/src/components/Spaces.astro b/site/src/components/Spaces.astro new file mode 100644 index 00000000..806e60de --- /dev/null +++ b/site/src/components/Spaces.astro @@ -0,0 +1,40 @@ +--- +/** + * What PathKeep keeps: one painted panel per space, in that space's + * colour, with its name and what it covers set on the dark foot of the + * paint. + */ +import type { Copy } from '../content/copy' +import { halfPanelSizes, paintings } from '../content/paintings' +import Marked from './Marked.astro' +import Painting from './Painting.astro' +import Phrases from './Phrases.astro' + +interface Props { + copy: Copy +} + +const k = Astro.props.copy.keeps +--- + +
    +
    +

    +

    {k.body}

    +
    +
    + { + k.spaces.map((s) => ( +
    + +
    +

    {s.name}

    +

    +

    {s.pages}

    +
    +
    + )) + } +
    +

    {k.more}

    +
    diff --git a/site/src/content/brands.ts b/site/src/content/brands.ts new file mode 100644 index 00000000..7800e8cf --- /dev/null +++ b/site/src/content/brands.ts @@ -0,0 +1,61 @@ +/** + * The marks that stand beside a product's name in the copy, where it + * writes `{key:Name}` (rendered by `Marked.astro`), set in one colour, the + * colour of the text around them. Every product the page names has one. + * + * Several owners publish rules asking for permission before their logo is + * used (Microsoft, OpenAI, Google, Apple, Mozilla, Anthropic); the page + * shows the marks only to say which products PathKeep works with, never + * to suggest endorsement. If an owner objects, delete its entry here and + * the `{key:` … `}` around its name in the three copy files. + */ +import { + siArc, + siBrave, + siClaudecode, + siFirefoxbrowser, + siGooglechrome, + siPi, + siSafari, +} from 'simple-icons' + +export interface Mark { + /** One path, filled. */ + path: string + viewBox: string +} + +/** Simple Icons draws on a 24-unit square. */ +const si = (icon: { path: string }): Mark => ({ + path: icon.path, + viewBox: '0 0 24 24', +}) + +export const marks: Record = { + chrome: si(siGooglechrome), + // Simple Icons 10.4.0's microsoftedge; later releases dropped Microsoft's + // marks at Microsoft's request. + edge: { + viewBox: '0 0 24 24', + path: 'M21.86 17.86q.14 0 .25.12.1.13.1.25t-.11.33l-.32.46-.43.53-.44.5q-.21.25-.38.42l-.22.23q-.58.53-1.34 1.04-.76.51-1.6.91-.86.4-1.74.64t-1.67.24q-.9 0-1.69-.28-.8-.28-1.48-.78-.68-.5-1.22-1.17-.53-.66-.92-1.44-.38-.77-.58-1.6-.2-.83-.2-1.67 0-1 .32-1.96.33-.97.87-1.8.14.95.55 1.77.41.82 1.02 1.5.6.68 1.38 1.21.78.54 1.64.9.86.36 1.77.56.92.2 1.8.2 1.12 0 2.18-.24 1.06-.23 2.06-.72l.2-.1.2-.05zm-15.5-1.27q0 1.1.27 2.15.27 1.06.78 2.03.51.96 1.24 1.77.74.82 1.66 1.4-1.47-.2-2.8-.74-1.33-.55-2.48-1.37-1.15-.83-2.08-1.9-.92-1.07-1.58-2.33T.36 14.94Q0 13.54 0 12.06q0-.81.32-1.49.31-.68.83-1.23.53-.55 1.2-.96.66-.4 1.35-.66.74-.27 1.5-.39.78-.12 1.55-.12.7 0 1.42.1.72.12 1.4.35.68.23 1.32.57.63.35 1.16.83-.35 0-.7.07-.33.07-.65.23v-.02q-.63.28-1.2.74-.57.46-1.05 1.04-.48.58-.87 1.26-.38.67-.65 1.39-.27.71-.42 1.44-.15.72-.15 1.38zM11.96.06q1.7 0 3.33.39 1.63.38 3.07 1.15 1.43.77 2.62 1.93 1.18 1.16 1.98 2.7.49.94.76 1.96.28 1 .28 2.08 0 .89-.23 1.7-.24.8-.69 1.48-.45.68-1.1 1.22-.64.53-1.45.88-.54.24-1.11.36-.58.13-1.16.13-.42 0-.97-.03-.54-.03-1.1-.12-.55-.1-1.05-.28-.5-.19-.84-.5-.12-.09-.23-.24-.1-.16-.1-.33 0-.15.16-.35.16-.2.35-.5.2-.28.36-.68.16-.4.16-.95 0-1.06-.4-1.96-.4-.91-1.06-1.64-.66-.74-1.52-1.28-.86-.55-1.79-.89-.84-.3-1.72-.44-.87-.14-1.76-.14-1.55 0-3.06.45T.94 7.55q.71-1.74 1.81-3.13 1.1-1.38 2.52-2.35Q6.68 1.1 8.37.58q1.7-.52 3.58-.52Z', + }, + firefox: si(siFirefoxbrowser), + safari: si(siSafari), + arc: si(siArc), + brave: si(siBrave), + claudecode: si(siClaudecode), + // Codex's own icon: resources/blossom-black.svg in the Codex VS Code + // extension (openai.chatgpt) 26.1106.51428. + codex: { + viewBox: '0 0 24 24', + path: 'M13.795 23.856q-1.188 0-2.256-.448a6.1 6.1 0 0 1-1.9-1.247 5.8 5.8 0 0 1-1.875.306 5.8 5.8 0 0 1-2.944-.777 6.1 6.1 0 0 1-2.184-2.12q-.807-1.34-.808-2.99 0-.682.19-1.482a6.3 6.3 0 0 1-1.472-2.002 5.76 5.76 0 0 1 .024-4.85q.546-1.177 1.52-2.024a5.5 5.5 0 0 1 2.303-1.2A5.55 5.55 0 0 1 5.485 2.62 6.06 6.06 0 0 1 7.575.925 5.85 5.85 0 0 1 10.21.313q1.187 0 2.255.447a6.1 6.1 0 0 1 1.9 1.248 5.8 5.8 0 0 1 1.875-.306q1.59 0 2.944.776a5.9 5.9 0 0 1 2.16 2.12q.832 1.34.832 2.99 0 .682-.19 1.483a6.2 6.2 0 0 1 1.472 2.024q.522 1.13.522 2.378 0 1.272-.546 2.449a6.1 6.1 0 0 1-1.543 2.048 5.45 5.45 0 0 1-2.28 1.177 5.4 5.4 0 0 1-1.115 2.402 5.8 5.8 0 0 1-2.066 1.695 5.85 5.85 0 0 1-2.635.612M7.93 20.913q1.188 0 2.066-.495l4.463-2.542a.52.52 0 0 0 .238-.448v-2.024L8.95 18.676a.97.97 0 0 1-1.044 0L3.419 16.11a.7.7 0 0 1-.024.165v.282q0 1.201.57 2.213.594.99 1.639 1.554 1.044.59 2.326.589m.238-3.838q.143.07.26.07a.46.46 0 0 0 .238-.07l1.781-1.012-5.722-3.296q-.522-.306-.522-.918v-5.11a4.27 4.27 0 0 0-1.9 1.602 4.13 4.13 0 0 0-.712 2.354q0 1.155.594 2.213.593 1.06 1.543 1.601zm5.627 5.227q1.258 0 2.279-.565a4.25 4.25 0 0 0 1.614-1.554q.594-.99.594-2.213v-5.085q0-.283-.237-.424l-1.805-1.036v6.568q0 .613-.522.919l-4.487 2.566q1.163.825 2.564.824m.902-8.617v-3.202l-2.683-1.507-2.707 1.507v3.202l2.707 1.507zm-6.933-7.51q0-.612.522-.918l4.488-2.567a4.34 4.34 0 0 0-2.564-.824q-1.26 0-2.28.565a4.25 4.25 0 0 0-1.614 1.554q-.57.99-.57 2.213v5.062q0 .283.237.447l1.781 1.036zm12.061 11.253a4.13 4.13 0 0 0 1.876-1.6 4.2 4.2 0 0 0 .712-2.355q0-1.154-.593-2.213-.594-1.06-1.544-1.6l-4.44-2.543q-.142-.095-.26-.071a.46.46 0 0 0-.238.07l-1.78.99 5.745 3.319q.26.141.38.377a.9.9 0 0 1 .142.518zm-4.772-11.96q.522-.33 1.045 0l4.51 2.614v-.424q0-1.13-.57-2.142a4.1 4.1 0 0 0-1.59-1.648q-1.02-.613-2.374-.613-1.187 0-2.066.495L9.545 6.292a.52.52 0 0 0-.238.448v2.025z', + }, + // Pi's own logo, by way of Simple Icons (source: pi.dev). + pi: si(siPi), + // DeepSeek Harness's own icon: apps/web/public/favicon.svg in + // deepseek-ai/deepseek-harness (MIT), at commit 39163dd. + dsh: { + viewBox: '0 0 50 50', + path: 'M48.8354 10.0479C48.3232 9.79199 48.1025 10.2798 47.8032 10.5278C47.7007 10.6079 47.6143 10.7119 47.5273 10.8076C46.7793 11.624 45.9048 12.1597 44.7622 12.0957C43.0923 12 41.666 12.5356 40.4058 13.8398C40.1377 12.2319 39.2476 11.272 37.8926 10.6558C37.1836 10.3359 36.4668 10.0156 35.9702 9.31982C35.6235 8.82373 35.5293 8.27197 35.356 7.72754C35.2456 7.3999 35.1353 7.06396 34.7651 7.00781C34.3633 6.94385 34.2056 7.2876 34.0479 7.57568C33.418 8.75195 33.1733 10.0479 33.1973 11.3599C33.2524 14.312 34.4736 16.6641 36.8999 18.3359C37.1758 18.5278 37.2466 18.7197 37.1597 19C36.9946 19.5757 36.7974 20.1357 36.624 20.7119C36.5137 21.0801 36.3486 21.1597 35.9624 21C34.6309 20.4321 33.481 19.5918 32.4644 18.5757C30.7393 16.8721 29.1792 14.9917 27.2334 13.52C26.7764 13.1758 26.3193 12.856 25.8467 12.5518C23.8618 10.584 26.1069 8.96777 26.627 8.77588C27.1704 8.57568 26.8159 7.8877 25.0591 7.896C23.3022 7.90381 21.6953 8.50391 19.647 9.30371C19.3477 9.42383 19.0322 9.51172 18.7095 9.58398C16.8501 9.22363 14.9199 9.14355 12.9033 9.37598C9.10596 9.80762 6.07275 11.6396 3.84326 14.7681C1.16455 18.5278 0.53418 22.7998 1.30664 27.2559C2.11768 31.9521 4.46582 35.8398 8.07373 38.8799C11.8159 42.0322 16.1255 43.5762 21.041 43.2803C24.0269 43.104 27.3516 42.6963 31.1016 39.4561C32.0469 39.936 33.0396 40.1279 34.686 40.272C35.9546 40.3921 37.1758 40.208 38.1211 40.0078C39.6021 39.688 39.4995 38.2881 38.9639 38.0322C34.623 35.9678 35.5762 36.8081 34.71 36.1279C36.9155 33.4639 40.2402 30.6958 41.54 21.728C41.6426 21.0161 41.5557 20.5679 41.54 19.9917C41.5322 19.6396 41.6108 19.5039 42.0049 19.4639C43.0923 19.3359 44.1479 19.0317 45.1167 18.4878C47.9292 16.9199 49.064 14.3438 49.3315 11.2559C49.3711 10.7837 49.3237 10.2959 48.8354 10.0479ZM24.3262 37.8398C20.1196 34.4639 18.0791 33.3521 17.2358 33.3999C16.4482 33.4482 16.5898 34.3682 16.7632 34.9678C16.9443 35.5601 17.1812 35.9683 17.5117 36.4878C17.7402 36.832 17.8979 37.3442 17.2832 37.728C15.9282 38.584 13.5728 37.4399 13.4624 37.3838C10.7207 35.7358 8.42822 33.5601 6.81348 30.584C5.25342 27.7197 4.34766 24.6479 4.19775 21.3677C4.1582 20.5757 4.38672 20.2959 5.15869 20.1519C6.17529 19.96 7.22314 19.9199 8.23926 20.0718C12.5327 20.7119 16.1885 22.6719 19.2529 25.7759C21.002 27.5439 22.3252 29.6558 23.6885 31.7202C25.1377 33.9121 26.6978 36 28.6831 37.7119C29.3843 38.312 29.9434 38.7681 30.479 39.104C28.8643 39.2881 26.1699 39.3281 24.3262 37.8398ZM26.3433 24.6001C26.3433 24.248 26.6191 23.9678 26.9658 23.9678C27.0444 23.9678 27.1152 23.9839 27.1782 24.0078C27.2651 24.04 27.3438 24.0879 27.4067 24.1602C27.5171 24.272 27.5801 24.4321 27.5801 24.6001C27.5801 24.9521 27.3042 25.2319 26.9575 25.2319C26.6108 25.2319 26.3433 24.9521 26.3433 24.6001ZM32.6064 27.8799C32.2046 28.0479 31.8027 28.1919 31.4165 28.208C30.8179 28.2397 30.1641 27.9922 29.8096 27.688C29.2583 27.2158 28.8643 26.9521 28.6987 26.1279C28.6279 25.7759 28.6675 25.2319 28.7305 24.9199C28.8721 24.248 28.7144 23.8159 28.2495 23.4238C27.8716 23.104 27.3911 23.0161 26.8633 23.0161C26.666 23.0161 26.4849 22.9277 26.3511 22.856C26.1304 22.7441 25.9492 22.4639 26.1226 22.1201C26.1777 22.0078 26.4458 21.7358 26.5088 21.688C27.2256 21.272 28.0527 21.4077 28.8169 21.7197C29.5259 22.0161 30.0615 22.5601 30.834 23.3281C31.6216 24.2559 31.7632 24.5117 32.2124 25.208C32.5669 25.752 32.8901 26.312 33.1104 26.9521C33.2446 27.3521 33.0713 27.6802 32.6064 27.8799Z', + }, +} diff --git a/site/src/content/copy-en.ts b/site/src/content/copy-en.ts new file mode 100644 index 00000000..5073ddec --- /dev/null +++ b/site/src/content/copy-en.ts @@ -0,0 +1,204 @@ +/** + * The landing page in English. Facts checked 2026-11-14: Chromium deletes + * history older than 90 days (`kExpireDaysThreshold`); Apple says Safari can + * keep it "for as long as a year"; Firefox Sync uploads 30 days and keeps + * 60; Claude Code's `cleanupPeriodDays` defaults to 30. Codex has no + * automatic cleanup, so it is not on the retention list. Privacy wording + * follows the README's Privacy section. + */ + +import type { Copy } from './copy' + +export const en: Copy = { + htmlLang: 'en', + description: + 'Chrome deletes your history after 90 days. Claude Code deletes your conversations after 30. PathKeep keeps all of it on your own computer, and helps you find your way back.', + skip: 'Skip to content', + nav: { + label: 'Sections', + why: 'Why', + keeps: 'What it keeps', + privacy: 'Privacy', + faq: 'Questions', + github: 'GitHub', + download: 'Download', + }, + hero: { + title: 'Keep the path |you’ve walked.', + lede: '{chrome:Chrome} deletes your history after 90 days. {claudecode:Claude Code} deletes your conversations after 30. PathKeep keeps all of it on your own computer, and helps you find your way back.', + primary: 'Download for macOS', + secondary: 'Windows', + demo: 'Try it in your browser →', + note: 'Version 0.6 · free and open source · macOS and Windows', + }, + shot: { + tablist: 'Spaces', + tabs: { browsing: 'Browsing history', agent: 'Agent conversations' }, + caption: 'A picture of the app. The working demo is further down.', + }, + why: { + title: 'Your history has an expiry date |you never agreed to.', + body: 'Browsers and coding agents keep a short window and clean up the rest on their own. Sync doesn’t keep it either: it moves recent history between your devices, nothing more.', + axis: ['90 days', 'A year', 'Forever'], + rows: [ + { source: 'Chrome, Edge, Brave, Arc', keeps: '90 days', days: 90 }, + { source: 'Safari', keeps: 'up to a year', days: 365 }, + { source: 'Firefox Sync', keeps: 'sends 30 days, keeps 60', days: 60 }, + { source: 'Claude Code', keeps: '30 days', days: 30 }, + { source: 'PathKeep', keeps: 'as long as you want', days: null }, + ], + source: + 'From each browser’s source code and documentation, and Claude Code’s settings reference.', + closing: + 'If you use Chrome and have never backed up your history, everything older than three months is most likely gone already.', + }, + keeps: { + title: 'Two kinds of memory, |one archive.', + body: 'PathKeep copies each kind into one archive on your disk, a little at a time, for as long as you want to keep it. In the app, each kind has a space of its own.', + spaces: [ + { + id: 'browsing', + name: 'Browsing history', + covers: + 'Every browser and profile on your computer: {chrome:Chrome}, {edge:Edge}, {firefox:Firefox}, {safari:Safari}, {arc:Arc}, {brave:Brave} and more. Older history comes back from Google Takeout.', + pages: 'Home · History · Insights · Backup', + }, + { + id: 'agent', + name: 'Agent conversations', + covers: + 'Sessions from {claudecode:Claude Code}, {codex:Codex}, {pi:Pi} and {dsh:DeepSeek Harness}, with their projects, subagents, tokens and the hours your agents worked.', + pages: 'Insights · History · Projects · Backup', + }, + ], + more: 'More things that quietly expire will follow, each in a space of its own.', + }, + find: { + title: 'Keeping it is |half the job.', + body: 'PathKeep stays fast with millions of visits in it, so the page you read two years ago is still a few keystrokes away.', + items: [ + { + id: 'search', + title: 'Search', + text: 'Titles, addresses and page text, or a regular expression. Filter by date, browser and site.', + }, + { + id: 'history', + title: 'History', + text: 'Every visit by day and by session, in a list that stays smooth however long it gets.', + }, + { + id: 'insights', + title: 'Insights', + text: 'Worked out on your computer: your top sites, when you browse, what you search for, the pages you keep going back to.', + }, + { + id: 'agent', + title: 'Agent insights', + text: 'The hours your agents worked and the hours you were there, tokens and cost at list price, by project and by tool.', + }, + { + id: 'ask', + title: 'Ask, if you want', + text: 'Ask about your history in plain words, with a model on your computer or a service you set up. It shows the pages it used.', + }, + { + id: 'notes', + title: 'Notes and export', + text: 'Star pages, write notes you can search later, and export everything as HTML, Markdown, plain text or JSON Lines.', + }, + ], + }, + privacy: { + title: 'Your history stays |on your computer.', + body: 'There’s no account and no server. PathKeep reads your browsers’ and tools’ files, writes to its own archive, and never changes theirs.', + points: [ + 'AI is off until you turn it on. A model on your computer keeps everything on it.', + 'The archive can be encrypted with a password.', + 'Every backup and import leaves a record you can read, and every import can be undone.', + 'Free software under the GPL-3.0. Every line is on GitHub.', + ], + network: + 'Two features contact websites: link previews and page summaries. Settings shows both, and either can be off.', + }, + demo: { + title: 'Try PathKeep |in your browser.', + body: 'A full copy of the app runs here on made-up history, nobody’s real browsing. Click anything; nothing you do leaves this page.', + newTab: 'Open the demo in its own tab', + narrow: + 'The demo needs a computer’s screen. Open this page on one to try it.', + frame: 'PathKeep demo', + start: 'Click to try it', + }, + faq: { + title: 'Questions', + items: [ + { + title: 'Does my history leave my computer?', + text: 'No. PathKeep has no server and no account. Link previews and page summaries fetch from the websites directly, and both can be turned off. AI stays off until you choose a model.', + }, + { + title: 'Which browsers does it support?', + text: 'Tested: Chrome, Edge, Firefox, and on macOS Safari, ChatGPT Atlas and Perplexity Comet. Brave, Vivaldi, Arc, Opera, Chromium, LibreWolf, Floorp and Waterfox are backed up too, but not yet tested for release.', + }, + { + title: 'Does it change my browser’s own history?', + text: 'No. PathKeep only reads. Your browser works as before, and PathKeep keeps its own copy.', + }, + { + title: 'Can I get back history that’s already gone?', + text: 'Some of it. Google Takeout holds your Google account’s Chrome history, often about 18 months of it, and PathKeep can import it. So can history files from other browsers or computers. Every import can be undone.', + }, + { + title: 'Do I need AI?', + text: 'No. Backup, history, search and insights work without it. Ask and semantic search are there for those who want them.', + }, + { + title: 'Does it cost anything?', + text: 'No. PathKeep is free software under the GPL-3.0, and all the source is on GitHub.', + }, + { + title: 'What is it built with?', + text: 'A desktop app written in Rust with Tauri 2, not Electron, with an interface in React and TypeScript. The archive is a Turso database, SQLite-compatible and written in Rust, and full-text search runs on Tantivy.', + }, + ], + }, + download: { + title: 'Start keeping |the path today.', + body: 'Download it and go: no account. It finds your browsers and agent tools, and asks before it keeps anything.', + platforms: [ + { + name: 'macOS', + detail: 'Disk image (.dmg)', + action: 'Download for macOS', + }, + { + name: 'Windows', + detail: 'Installer (.msi or .exe)', + action: 'Download for Windows', + }, + { + name: 'Linux', + detail: 'Coming later', + action: 'Follow on GitHub →', + soon: true, + }, + ], + note: 'The installers aren’t signed yet; the README says how to open them the first time.', + source: 'Source on GitHub', + }, + footer: { + license: 'PathKeep is free software under the GPL-3.0.', + links: { + label: 'Project', + github: 'GitHub', + releases: 'Releases', + readme: 'README', + }, + }, + notFound: { + title: 'Nothing here.', + body: "This page doesn't exist, or it has moved.", + home: 'Back to PathKeep', + }, +} diff --git a/site/src/content/copy-zh-cn.ts b/site/src/content/copy-zh-cn.ts new file mode 100644 index 00000000..88914ec1 --- /dev/null +++ b/site/src/content/copy-zh-cn.ts @@ -0,0 +1,194 @@ +/** + * The landing page in Simplified Chinese. Same facts as `copy-en.ts`; + * product nouns (浏览记录, Agent 对话, 首页, 记录, 洞察, 助理, 备份, 项目) + * are the app's own. + */ + +import type { Copy } from './copy' + +export const zhCN: Copy = { + htmlLang: 'zh-Hans-CN', + description: + 'Chrome 会删掉 90 天前的浏览记录,Claude Code 会删掉 30 天前的对话。PathKeep 把这些全部留在你自己的电脑上,也帮你找回来。', + skip: '跳到正文', + nav: { + label: '章节', + why: '为什么', + keeps: '保存什么', + privacy: '隐私', + faq: '常见问题', + github: 'GitHub', + download: '下载', + }, + hero: { + title: '留住你|走过的路。', + lede: '{chrome:Chrome} 会删掉 90 天前的浏览记录,|{claudecode:Claude Code} 会删掉 30 天前的对话。|PathKeep 把这些全部留在|你自己的电脑上,|也帮你找回来。', + primary: '下载 macOS 版', + secondary: 'Windows 版', + demo: '在浏览器里试用 →', + note: '0.6 版 · 免费、开源 · macOS 与 Windows', + }, + shot: { + tablist: '空间', + tabs: { browsing: '浏览记录', agent: 'Agent 对话' }, + caption: 'app 的画面。可以操作的 demo 在下面。', + }, + why: { + title: '你的记录有保存期限,|而你从没同意过。', + body: '浏览器和 coding agent 只留最近一小段,其余的自己清掉。同步也不会替你保存:它只是把最近的记录搬到你别的设备上。', + axis: ['90 天', '一年', '永远'], + rows: [ + { source: 'Chrome、Edge、Brave、Arc', keeps: '90 天', days: 90 }, + { source: 'Safari', keeps: '最多一年', days: 365 }, + { source: 'Firefox 同步', keeps: '只发送 30 天,保留 60 天', days: 60 }, + { source: 'Claude Code', keeps: '30 天', days: 30 }, + { source: 'PathKeep', keeps: '想留多久就留多久', days: null }, + ], + source: '数字来自各浏览器的源代码与文档,以及 Claude Code 的设置说明。', + closing: '如果你用 Chrome、从没备份过,|三个月前的记录|多半已经不在了。', + }, + keeps: { + title: '两种记忆,|一个存档。', + body: 'PathKeep 把每一种数据一点一点备份进你硬盘上的同一个存档,想留多久就留多久。在 app 里,每一种都有自己的空间。', + spaces: [ + { + id: 'browsing', + name: '浏览记录', + covers: + '电脑上每个浏览器、每个 profile:{chrome:Chrome}、{edge:Edge}、{firefox:Firefox}、{safari:Safari}、{arc:Arc}、{brave:Brave} 等等。更早的记录可以从 Google Takeout 找回来。', + pages: '首页 · 记录 · 洞察 · 备份', + }, + { + id: 'agent', + name: 'Agent 对话', + covers: + '{claudecode:Claude Code}、{codex:Codex}、{pi:Pi}、{dsh:DeepSeek Harness} 的对话,连同项目、subagent、token 用量,以及 Agent 工作了多少小时。', + pages: '洞察 · 记录 · 项目 · 备份', + }, + ], + more: '之后还会加入更多会被悄悄删掉的东西,每一种都有自己的空间。', + }, + find: { + title: '留下来,|只是一半。', + body: '记录有几百万条,PathKeep 照样很快。两年前看过的那一页,敲几个字就找得到。', + items: [ + { + id: 'search', + title: '搜索', + text: '搜标题、网址和页面内容,也能用正则表达式。按日期、浏览器、网站筛选。', + }, + { + id: 'history', + title: '记录', + text: '每一次访问都按日期、按同一段浏览排好,列表再长也滑得顺。', + }, + { + id: 'insights', + title: '洞察', + text: '在你的电脑上算出来:最常去的网站、什么时候上网、搜索了什么、一再回去的页面。', + }, + { + id: 'agent', + title: 'Agent 洞察', + text: 'Agent 工作了多久、你在场多久、用了多少 token、按标价算花了多少,按项目、按工具看。', + }, + { + id: 'ask', + title: '助理(可选)', + text: '用平常的话问你的记录,用你电脑上的模型或你自己配置的服务。它会列出用到的页面。', + }, + { + id: 'notes', + title: '笔记与导出', + text: '给页面加星标、写之后搜得到的笔记,全部导出成 HTML、Markdown、纯文本或 JSON Lines。', + }, + ], + }, + privacy: { + title: '你的记录|只留在你的电脑上。', + body: '没有账号,也没有服务器。PathKeep 读取浏览器和工具的文件,写进自己的存档,从不改动它们的文件。', + points: [ + 'AI 默认关闭,要你自己打开。用电脑上的模型,数据就不会离开这台电脑。', + '存档可以用密码加密。', + '每次备份和导入都留下看得懂的记录,每次导入都能撤销。', + '以 GPL-3.0 授权的自由软件,每一行都在 GitHub 上。', + ], + network: + '只有两个功能会连到网站:链接预览和页面摘要。设置里看得到这两项,都可以关掉。', + }, + demo: { + title: '在浏览器里|试用 PathKeep。', + body: '这里跑的是完整的 app,里面是编出来的记录,不是任何人真实的浏览记录。随便点,你做的事都不会离开这一页。', + newTab: '在新标签页打开 demo', + narrow: 'demo 需要电脑的屏幕,用电脑打开这一页就能试。', + frame: 'PathKeep demo', + start: '点一下开始试用', + }, + faq: { + title: '常见问题', + items: [ + { + title: '我的记录会离开我的电脑吗?', + text: '不会。PathKeep 没有服务器,也没有账号。链接预览和页面摘要会直接连到那些网站,两项都可以关掉。AI 在你选好模型之前都是关着的。', + }, + { + title: '支持哪些浏览器?', + text: '已测试:Chrome、Edge、Firefox,以及 macOS 上的 Safari、ChatGPT Atlas、Perplexity Comet。Brave、Vivaldi、Arc、Opera、Chromium、LibreWolf、Floorp、Waterfox 也会备份,只是还没为正式版测试过。', + }, + { + title: '它会改动浏览器自己的记录吗?', + text: '不会。PathKeep 只读不写。浏览器照常运行,PathKeep 另外留一份。', + }, + { + title: '已经被删掉的记录,还找得回来吗?', + text: '能找回一部分。Google Takeout 里有你 Google 账号的 Chrome 记录,常常有 18 个月左右,PathKeep 可以导入。别的浏览器或别的电脑的记录文件也行。每次导入都能撤销。', + }, + { + title: '一定要用 AI 吗?', + text: '不用。备份、记录、搜索、洞察都不需要 AI。助理和语义搜索是给想用的人用的。', + }, + { + title: '要钱吗?', + text: '不要。PathKeep 是以 GPL-3.0 授权的自由软件,源代码都在 GitHub 上。', + }, + { + title: '它是用什么做的?', + text: '用 Rust 和 Tauri 2 写的桌面 app,不是 Electron;界面用 React 和 TypeScript。存档用 Turso,一个用 Rust 写、兼容 SQLite 的数据库;全文搜索用 Tantivy。', + }, + ], + }, + download: { + title: '从今天起,|留住走过的路。', + body: '下载就能用,不用账号。它会找出你的浏览器和 Agent 工具,保存任何东西之前都先问你。', + platforms: [ + { name: 'macOS', detail: '磁盘映像(.dmg)', action: '下载 macOS 版' }, + { + name: 'Windows', + detail: '安装程序(.msi 或 .exe)', + action: '下载 Windows 版', + }, + { + name: 'Linux', + detail: '准备中', + action: '在 GitHub 上关注 →', + soon: true, + }, + ], + note: '安装包还没有签名,第一次打开的方法写在 README。', + source: '源代码在 GitHub', + }, + footer: { + license: 'PathKeep 是以 GPL-3.0 授权的自由软件。', + links: { + label: '项目', + github: 'GitHub', + releases: '下载页', + readme: 'README', + }, + }, + notFound: { + title: '这里什么都没有。', + body: '这一页不存在,或者已经搬走了。', + home: '回到 PathKeep', + }, +} diff --git a/site/src/content/copy-zh-tw.ts b/site/src/content/copy-zh-tw.ts new file mode 100644 index 00000000..6d19829e --- /dev/null +++ b/site/src/content/copy-zh-tw.ts @@ -0,0 +1,194 @@ +/** + * The landing page in Traditional Chinese. Same facts as `copy-en.ts`; + * product nouns (瀏覽紀錄, Agent 對話, 首頁, 紀錄, 洞察, 助理, 備份, 專案) + * are the app's own. + */ + +import type { Copy } from './copy' + +export const zhTW: Copy = { + htmlLang: 'zh-Hant-TW', + description: + 'Chrome 會刪掉 90 天前的瀏覽紀錄,Claude Code 會刪掉 30 天前的對話。PathKeep 把這些全部留在你自己的電腦上,也幫你找回來。', + skip: '跳到內容', + nav: { + label: '章節', + why: '為什麼', + keeps: '保存什麼', + privacy: '隱私', + faq: '常見問題', + github: 'GitHub', + download: '下載', + }, + hero: { + title: '留住你|走過的路。', + lede: '{chrome:Chrome} 會刪掉 90 天前的瀏覽紀錄,|{claudecode:Claude Code} 會刪掉 30 天前的對話。|PathKeep 把這些全部留在|你自己的電腦上,|也幫你找回來。', + primary: '下載 macOS 版', + secondary: 'Windows 版', + demo: '在瀏覽器裡試用 →', + note: '0.6 版 · 免費、開源 · macOS 與 Windows', + }, + shot: { + tablist: '空間', + tabs: { browsing: '瀏覽紀錄', agent: 'Agent 對話' }, + caption: 'app 的畫面。可以操作的 demo 在下面。', + }, + why: { + title: '你的紀錄有保存期限,|而你從沒同意過。', + body: '瀏覽器和 coding agent 只留最近一小段,其餘的自己清掉。同步也不會替你保存:它只是把最近的紀錄搬到你別的裝置上。', + axis: ['90 天', '一年', '永遠'], + rows: [ + { source: 'Chrome、Edge、Brave、Arc', keeps: '90 天', days: 90 }, + { source: 'Safari', keeps: '最多一年', days: 365 }, + { source: 'Firefox 同步', keeps: '只送 30 天,保留 60 天', days: 60 }, + { source: 'Claude Code', keeps: '30 天', days: 30 }, + { source: 'PathKeep', keeps: '想留多久就留多久', days: null }, + ], + source: '數字來自各瀏覽器的原始碼與文件,以及 Claude Code 的設定說明。', + closing: '如果你用 Chrome、從沒備份過,|三個月前的紀錄|多半已經不在了。', + }, + keeps: { + title: '兩種記憶,|一個存檔。', + body: 'PathKeep 把每一種資料一點一點備份進你硬碟上的同一個存檔,想留多久就留多久。在 app 裡,每一種都有自己的空間。', + spaces: [ + { + id: 'browsing', + name: '瀏覽紀錄', + covers: + '電腦上每個瀏覽器、每個 profile:{chrome:Chrome}、{edge:Edge}、{firefox:Firefox}、{safari:Safari}、{arc:Arc}、{brave:Brave} 等等。更早的紀錄可以從 Google Takeout 找回來。', + pages: '首頁 · 紀錄 · 洞察 · 備份', + }, + { + id: 'agent', + name: 'Agent 對話', + covers: + '{claudecode:Claude Code}、{codex:Codex}、{pi:Pi}、{dsh:DeepSeek Harness} 的對話,連同專案、subagent、token 用量,和 Agent 工作了多少小時。', + pages: '洞察 · 紀錄 · 專案 · 備份', + }, + ], + more: '之後還會加入更多會被悄悄刪掉的東西,每一種都有自己的空間。', + }, + find: { + title: '留下來,|只是一半。', + body: '紀錄有幾百萬筆,PathKeep 照樣很快。兩年前看過的那一頁,敲幾個字就找得到。', + items: [ + { + id: 'search', + title: '搜尋', + text: '搜標題、網址和頁面內容,也能用正規表示式。依日期、瀏覽器、網站篩選。', + }, + { + id: 'history', + title: '紀錄', + text: '每一次造訪都依日期、依同一段瀏覽排好,清單再長也滑得順。', + }, + { + id: 'insights', + title: '洞察', + text: '在你的電腦上算出來:最常去的網站、什麼時候上網、搜尋了什麼、一再回去的頁面。', + }, + { + id: 'agent', + title: 'Agent 洞察', + text: 'Agent 工作了多久、你在場多久、用了多少 token、按牌價算花了多少,依專案、依工具看。', + }, + { + id: 'ask', + title: '助理(選用)', + text: '用平常的話問你的紀錄,用你電腦上的模型或你自己設定的服務。它會列出用到的頁面。', + }, + { + id: 'notes', + title: '筆記與匯出', + text: '幫頁面加星號、寫之後搜得到的筆記,全部匯出成 HTML、Markdown、純文字或 JSON Lines。', + }, + ], + }, + privacy: { + title: '你的紀錄|只留在你的電腦上。', + body: '沒有帳號,也沒有伺服器。PathKeep 讀瀏覽器和工具的檔案,寫進自己的存檔,從不改動它們的檔案。', + points: [ + 'AI 預設關閉,要你自己打開。用電腦上的模型,資料就不會離開這台電腦。', + '存檔可以用密碼加密。', + '每次備份和匯入都留下看得懂的紀錄,每次匯入都能復原。', + '以 GPL-3.0 授權的自由軟體,每一行都在 GitHub 上。', + ], + network: + '只有兩個功能會連到網站:連結預覽和頁面摘要。設定裡看得到這兩項,都可以關掉。', + }, + demo: { + title: '在瀏覽器裡|試用 PathKeep。', + body: '這裡跑的是完整的 app,裡面是編出來的紀錄,不是任何人真的瀏覽紀錄。隨便點,你做的事都不會離開這一頁。', + newTab: '在新分頁打開 demo', + narrow: 'demo 需要電腦的螢幕,用電腦打開這一頁就能試。', + frame: 'PathKeep demo', + start: '點一下開始試用', + }, + faq: { + title: '常見問題', + items: [ + { + title: '我的紀錄會離開我的電腦嗎?', + text: '不會。PathKeep 沒有伺服器,也沒有帳號。連結預覽和頁面摘要會直接連到那些網站,兩項都可以關掉。AI 在你選好模型之前都是關著的。', + }, + { + title: '支援哪些瀏覽器?', + text: '已測試:Chrome、Edge、Firefox,以及 macOS 上的 Safari、ChatGPT Atlas、Perplexity Comet。Brave、Vivaldi、Arc、Opera、Chromium、LibreWolf、Floorp、Waterfox 也會備份,只是還沒為正式版測過。', + }, + { + title: '它會改動瀏覽器自己的紀錄嗎?', + text: '不會。PathKeep 只讀不寫。瀏覽器照常運作,PathKeep 另外留一份。', + }, + { + title: '已經被刪掉的紀錄,還找得回來嗎?', + text: '找得回一部分。Google Takeout 裡有你 Google 帳號的 Chrome 紀錄,常常有 18 個月左右,PathKeep 可以匯入。別的瀏覽器或別台電腦的紀錄檔也行。每次匯入都能復原。', + }, + { + title: '一定要用 AI 嗎?', + text: '不用。備份、紀錄、搜尋、洞察都不需要 AI。助理和語意搜尋是給想用的人用的。', + }, + { + title: '要錢嗎?', + text: '不用。PathKeep 是以 GPL-3.0 授權的自由軟體,原始碼都在 GitHub 上。', + }, + { + title: '它是用什麼做的?', + text: '用 Rust 和 Tauri 2 寫的桌面 app,不是 Electron;介面用 React 和 TypeScript。存檔用 Turso,一個用 Rust 寫、相容 SQLite 的資料庫;全文搜尋用 Tantivy。', + }, + ], + }, + download: { + title: '從今天起,|留住走過的路。', + body: '下載就能用,不用帳號。它會找出你的瀏覽器和 Agent 工具,保存任何東西之前都先問你。', + platforms: [ + { name: 'macOS', detail: '磁碟映像檔(.dmg)', action: '下載 macOS 版' }, + { + name: 'Windows', + detail: '安裝程式(.msi 或 .exe)', + action: '下載 Windows 版', + }, + { + name: 'Linux', + detail: '準備中', + action: '在 GitHub 上關注 →', + soon: true, + }, + ], + note: '安裝檔還沒有簽章,第一次開啟的方法寫在 README。', + source: '原始碼在 GitHub', + }, + footer: { + license: 'PathKeep 是以 GPL-3.0 授權的自由軟體。', + links: { + label: '專案', + github: 'GitHub', + releases: '下載頁', + readme: 'README', + }, + }, + notFound: { + title: '這裡什麼都沒有。', + body: '這一頁不存在,或已經搬走了。', + home: '回到 PathKeep', + }, +} diff --git a/site/src/content/copy.ts b/site/src/content/copy.ts new file mode 100644 index 00000000..16b96ea8 --- /dev/null +++ b/site/src/content/copy.ts @@ -0,0 +1,134 @@ +/** + * The shape of the landing page's words, and the languages they ship in. + * + * Responsibilities: what each section says, as types every language must + * fill, and where each language lives. The words themselves are in + * `copy-en.ts`, `copy-zh-tw.ts` and `copy-zh-cn.ts`. `|` in a string marks + * where it may wrap (see `Phrases.astro`); strip it for plain-text uses + * such as ``. + * Not responsible for: layout. + */ + +import { en } from './copy-en' +import { zhCN } from './copy-zh-cn' +import { zhTW } from './copy-zh-tw' + +export type Lang = 'en' | 'zh-TW' | 'zh-CN' + +export interface RetentionRow { + source: string + keeps: string + /** Days kept; null for "as long as you want". */ + days: number | null +} + +export interface Space { + id: 'browsing' | 'agent' + name: string + covers: string + pages: string +} + +/** Something PathKeep does with what it keeps; `Features.astro` pictures some. */ +export interface Feature extends Item { + id: 'search' | 'history' | 'insights' | 'agent' | 'ask' | 'notes' +} + +export interface Item { + title: string + text: string +} + +export interface Platform { + name: string + detail: string + action: string + /** Not released yet: the action follows the project instead of downloading. */ + soon?: boolean +} + +export interface Copy { + htmlLang: string + description: string + skip: string + nav: { + label: string + why: string + keeps: string + privacy: string + faq: string + github: string + download: string + } + hero: { + title: string + lede: string + primary: string + secondary: string + demo: string + note: string + } + shot: { tablist: string; tabs: Record<Space['id'], string>; caption: string } + why: { + title: string + body: string + /** The axis: 90 days, a year, and its far end past the break. */ + axis: [string, string, string] + rows: RetentionRow[] + source: string + closing: string + } + keeps: { title: string; body: string; spaces: Space[]; more: string } + find: { title: string; body: string; items: Feature[] } + privacy: { title: string; body: string; points: string[]; network: string } + demo: { + title: string + body: string + /** The link that opens the demo full-size in a tab of its own. */ + newTab: string + /** Said instead of the demo on screens too small for the app. */ + narrow: string + /** The demo frame's name, for screen readers. */ + frame: string + /** Over the loaded demo until it is clicked, so scrolling passes it by. */ + start: string + } + faq: { title: string; items: Item[] } + download: { + title: string + body: string + platforms: Platform[] + note: string + source: string + } + footer: { + license: string + links: { label: string; github: string; releases: string; readme: string } + } + /** The page for an address that leads nowhere. */ + notFound: { title: string; body: string; home: string } +} + +export const copy: Record<Lang, Copy> = { en, 'zh-TW': zhTW, 'zh-CN': zhCN } + +/** + * Where each language lives, how its link reads in the other two, and the + * name its files go by (the share picture, `public/social/<slug>.jpg`). + */ +export const langs: { + lang: Lang + path: string + label: string + slug: string +}[] = [ + { lang: 'en', path: '/', label: 'EN', slug: 'en' }, + { lang: 'zh-TW', path: '/zh-tw/', label: '繁中', slug: 'zh-tw' }, + { lang: 'zh-CN', path: '/zh-cn/', label: '简中', slug: 'zh-cn' }, +] + +/** A product named with its mark, `{key:Name}` (see `brands.ts`). */ +export const markToken = /\{(\w+):([^}]+)\}/g + +/** Copy as plain text: no phrase breaks, products by name alone. */ +export const plain = (text: string) => + text.replaceAll('|', '').replace(markToken, '$2') diff --git a/site/src/content/demo.ts b/site/src/content/demo.ts new file mode 100644 index 00000000..f64ec21b --- /dev/null +++ b/site/src/content/demo.ts @@ -0,0 +1,19 @@ +/** + * Which version of PathKeep the demo in `public/app/` was recorded from, as + * its About screen says. The demo stays at that version until it is + * recorded again (README, The demo), so the page names it beside the window. + * Read at build time, from the folder the site is built in. + */ +import { readFileSync } from 'node:fs' +import path from 'node:path' + +const file = path.resolve('public/app/recording/index.json') +const recording = JSON.parse(readFileSync(file, 'utf8')) as { + calls: { command: string; response: unknown }[] +} +const info = recording.calls.find((call) => call.command === 'app_build_info') + ?.response as { version?: string } | undefined +if (!info?.version) + throw new Error(`${file} has no app_build_info answer to name the demo by.`) + +export const demoVersion = info.version diff --git a/site/src/content/paintings.ts b/site/src/content/paintings.ts new file mode 100644 index 00000000..2b3a8002 --- /dev/null +++ b/site/src/content/paintings.ts @@ -0,0 +1,48 @@ +/** + * The paintings the page sets its content on, as `hero-lab/export-panels.ts` + * writes them to `public/paintings/<name>-<width>.webp`. + * Not responsible for: where each sits, which is the stylesheet's. + */ + +export interface Painting { + name: string + /** File widths, smallest first. */ + widths: number[] + /** Height of the widest file, so the browser can reserve the space. */ + height: number +} + +export const paintings = { + /** The opening card, hero and app window on one tall painting. */ + intro: { name: 'intro', widths: [1920, 2560, 3310], height: 3800 }, + /** A phone's opening card: taller, with more of the light band behind the words. */ + heroPhone: { name: 'hero-phone', widths: [720], height: 1440 }, + browsing: { name: 'browsing', widths: [680, 1320], height: 1127 }, + agent: { name: 'agent', widths: [680, 1320], height: 1127 }, + privacy: { name: 'privacy', widths: [1376, 2064, 2752], height: 1600 }, + demo: { name: 'demo', widths: [1376, 2064, 2752], height: 1560 }, + download: { name: 'download', widths: [1376, 2064, 2752], height: 1279 }, +} satisfies Record<string, Painting> + +/** The strip of paint the retention chart draws PathKeep's row with. */ +export const pathStrip = { + src: '/paintings/path-1920.webp', + width: 1920, + height: 24, +} + +/** The wall beside the page's column, as `--wall-width` in site.css. */ +const wall = 'clamp(clamp(12px, 2.2vw, 32px), 9vw - 66px, 64px)' + +/** + * A panel spans the page's column (`--content` beside `--wall-width` in + * site.css): the window less the walls, held at 1376px from 1504px wide, + * then growing with the screen to 1680px. + */ +export const panelSizes = `(min-width: 2546px) 1680px, (min-width: 2085px) 66vw, (min-width: 1504px) 1376px, calc(100vw - 2 * ${wall})` + +/** Two panels side by side, 18px apart; one per row up to 1100px wide. */ +export const halfPanelSizes = `(min-width: 2546px) 831px, (min-width: 2085px) calc(33vw - 9px), (min-width: 1504px) 679px, (max-width: 1100px) calc(100vw - 2 * ${wall}), calc(50vw - ${wall} - 9px)` + +/** The opening card's painting is set taller than the card (see site.css). */ +export const introSizes = 'max(100vw, 1920px)' diff --git a/site/src/content/screens.ts b/site/src/content/screens.ts new file mode 100644 index 00000000..e267c1ff --- /dev/null +++ b/site/src/content/screens.ts @@ -0,0 +1,109 @@ +/** + * The app pictures shown inside the floating windows until the live demo + * replaces them, one set per language, each in the language of its page + * (`hero-lab/capture-screens.ts` takes them). + */ + +import { langs, type Feature, type Lang } from './copy' + +export interface Screen { + id: 'browsing' | 'agent' | 'home' + /** The picture's name inside each language's folder under `/screens/`. */ + file: string + alt: Record<Lang, string> +} + +/** Where a screen's picture for a language lives. */ +export const screenSrc = (screen: { file: string }, lang: Lang) => + `/screens/${langs.find((l) => l.lang === lang)!.slug}/${screen.file}` + +/** + * The opening card shows what people keep PathKeep for, each space's + * records; the demo's window opens on the home page, as the app does. + */ +export const screens: Record<Screen['id'], Screen> = { + browsing: { + id: 'browsing', + file: 'browsing-history.webp', + alt: { + en: 'PathKeep’s browsing history: every visit, by day', + 'zh-TW': 'PathKeep 的瀏覽紀錄:每一次造訪依日期排好', + 'zh-CN': 'PathKeep 的浏览记录:每一次访问按日期排好', + }, + }, + agent: { + id: 'agent', + file: 'agent-chats.webp', + alt: { + en: 'The list of agent conversations', + 'zh-TW': 'Agent 對話的紀錄清單', + 'zh-CN': 'Agent 对话的记录列表', + }, + }, + home: { + id: 'home', + file: 'browsing-home.webp', + alt: { + en: 'PathKeep’s browsing history home page', + 'zh-TW': 'PathKeep 瀏覽紀錄的首頁', + 'zh-CN': 'PathKeep 浏览记录的首页', + }, + }, +} + +/** Part of a screen, cut around one feature. */ +export interface FeatureShot { + file: string + /** The file's size in pixels (twice the screen's). */ + width: number + height: number + alt: Record<Lang, string> +} + +/** + * The pictures on the feature wall (`Features.astro`), one per language: + * `hero-lab/capture-features.ts` cuts the browsing ones from the demo, so + * their words are the app's own, and the Agent one from the screens above. + */ +export const featureShots: Partial<Record<Feature['id'], FeatureShot>> = { + search: { + file: 'feature-search.webp', + width: 2480, + height: 900, + alt: { + en: 'Searching the history with the pattern /tokio|smol/', + 'zh-TW': '用正規表示式 /tokio|smol/ 搜尋紀錄', + 'zh-CN': '用正则表达式 /tokio|smol/ 搜索记录', + }, + }, + history: { + file: 'feature-history.webp', + width: 1520, + height: 1100, + alt: { + en: 'Visits by day, grouped by each stretch of browsing', + 'zh-TW': '造訪依日期、依同一段瀏覽排好', + 'zh-CN': '访问按日期、按同一段浏览排好', + }, + }, + insights: { + file: 'feature-insights.webp', + width: 2040, + height: 1100, + alt: { + en: 'Insights: the most visited sites and the months they fill', + 'zh-TW': '洞察:最常去的網站,以及每個月瀏覽了多少', + 'zh-CN': '洞察:最常去的网站,以及每个月浏览了多少', + }, + }, + agent: { + file: 'feature-agent.webp', + width: 2440, + height: 1070, + alt: { + en: 'Agent insights: hours worked, tokens, cost and every day of the year', + 'zh-TW': 'Agent 洞察:工作時間、token、費用,和一年裡的每一天', + 'zh-CN': 'Agent 洞察:工作时间、token、费用,和一年里的每一天', + }, + }, +} diff --git a/site/src/layouts/Page.astro b/site/src/layouts/Page.astro new file mode 100644 index 00000000..1419ced6 --- /dev/null +++ b/site/src/layouts/Page.astro @@ -0,0 +1,207 @@ +--- +/** + * The document around the landing page: head, the language alternates, + * and the page's behaviours: the opening card framing itself as its first + * screen scrolls away, the window's tabs, section heads and panels rising + * into view, the retention chart drawing itself, and the demo loading into + * its window. The motion runs on Motion (motion.dev); site.css holds every + * resting state. + */ +import { copy as all, langs, plain, type Copy, type Lang } from '../content/copy' +import '../styles/fonts.css' +import '../styles/site.css' + +interface Props { + copy: Copy + lang: Lang +} + +const { copy, lang } = Astro.props +const title = `PathKeep — ${plain(copy.hero.title)}` +const here = langs.find((l) => l.lang === lang)! +const site = Astro.site +--- + +<!doctype html> +<html lang={copy.htmlLang}> + <head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <title>{title} + + + + + + + { + site && ( + <> + + {langs.map((l) => ( + + ))} + + {/* Share cards need absolute addresses, so they wait for the domain too. */} + + + + + + + + ) + } + + + + + + + + diff --git a/site/src/pages/404.astro b/site/src/pages/404.astro new file mode 100644 index 00000000..84eed23e --- /dev/null +++ b/site/src/pages/404.astro @@ -0,0 +1,41 @@ +--- +/** + * The page for an address that leads nowhere; the host serves it with + * status 404. It cannot tell which language the visitor reads, so it says + * so in all three, each pointing home to its own page. PathKeep's strip of + * paint from the retention chart runs out beside the words. + */ +import { copy, langs } from '../content/copy' +import { pathStrip } from '../content/paintings' +import '../styles/fonts.css' +import '../styles/site.css' +--- + + + + + + + + PathKeep — {copy.en.notFound.title} + + + + +
    + PathKeep + +

    404

    + { + langs.map((l, i) => ( +
    + {i === 0 ?

    {copy[l.lang].notFound.title}

    :

    {copy[l.lang].notFound.title}

    } +

    + {copy[l.lang].notFound.body} {copy[l.lang].notFound.home} +

    +
    + )) + } +
    + + diff --git a/site/src/pages/[...lang].astro b/site/src/pages/[...lang].astro new file mode 100644 index 00000000..88cf273a --- /dev/null +++ b/site/src/pages/[...lang].astro @@ -0,0 +1,46 @@ +--- +/** + * The landing page, once per language: English at /, Traditional Chinese + * at /zh-tw/, Simplified Chinese at /zh-cn/. + */ +import Demo from '../components/Demo.astro' +import Download from '../components/Download.astro' +import Faq from '../components/Faq.astro' +import Features from '../components/Features.astro' +import Footer from '../components/Footer.astro' +import Hero from '../components/Hero.astro' +import Privacy from '../components/Privacy.astro' +import Retention from '../components/Retention.astro' +import Spaces from '../components/Spaces.astro' +import { copy, type Lang } from '../content/copy' +import Page from '../layouts/Page.astro' + +export function getStaticPaths() { + return [ + { params: { lang: undefined }, props: { lang: 'en' as Lang } }, + { params: { lang: 'zh-tw' }, props: { lang: 'zh-TW' as Lang } }, + { params: { lang: 'zh-cn' }, props: { lang: 'zh-CN' as Lang } }, + ] +} + +interface Props { + lang: Lang +} + +const { lang } = Astro.props +const c = copy[lang] +--- + + + +
    + + + + + + + +
    +