From e29bab0423765980ddd88fa1d87447623f06461d Mon Sep 17 00:00:00 2001 From: kirank55 Date: Tue, 17 Nov 2026 16:35:03 +0000 Subject: [PATCH 1/6] Add React desktop interface hosted in WebView2 - Make the React + TypeScript + Vite UI in src/ZipXP.UI the default desktop interface, hosted by a WebView2 window in ZipXP.App - Add a typed desktop bridge that exposes explicit commands; mutating actions take paths from engine records only - Keep the WPF interface as a fallback via --native-ui, and offer it from the React error screen - Add browser interaction, accessibility and screenshot tests, plus scripts/ui-check.ps1 for Windows UI Automation checks in both interfaces - Build the React bundle during Windows builds and in dev.sh, with ignores for node_modules, dist and test output - Update README and development docs for Node.js 22.12+ and the WebView2 Runtime requirement --- .gitignore | 6 + README.md | 7 +- docs/development.md | 35 +- scripts/check.ps1 | 64 +- scripts/dev.sh | 29 +- scripts/ui-check.ps1 | 73 + src/ZipXP.App/App.xaml.cs | 5 +- src/ZipXP.App/Web/DesktopBridge.cs | 160 ++ src/ZipXP.App/Web/ReactWindow.cs | 117 ++ src/ZipXP.App/ZipXP.App.csproj | 25 + src/ZipXP.UI/e2e/desktop.ts | 168 ++ src/ZipXP.UI/e2e/fixtures.ts | 88 + src/ZipXP.UI/e2e/interactions.spec.ts | 686 +++++++ src/ZipXP.UI/e2e/ui.spec.ts | 157 ++ src/ZipXP.UI/index.html | 16 + src/ZipXP.UI/package-lock.json | 2473 +++++++++++++++++++++++++ src/ZipXP.UI/package.json | 29 + src/ZipXP.UI/playwright.config.ts | 13 + src/ZipXP.UI/src/App.test.tsx | 217 +++ src/ZipXP.UI/src/App.tsx | 2470 ++++++++++++++++++++++++ src/ZipXP.UI/src/bridge.test.ts | 72 + src/ZipXP.UI/src/bridge.ts | 67 + src/ZipXP.UI/src/main.tsx | 10 + src/ZipXP.UI/src/styles.css | 2001 ++++++++++++++++++++ src/ZipXP.UI/src/types.ts | 108 ++ src/ZipXP.UI/tsconfig.json | 17 + 26 files changed, 9054 insertions(+), 59 deletions(-) create mode 100644 scripts/ui-check.ps1 create mode 100644 src/ZipXP.App/Web/DesktopBridge.cs create mode 100644 src/ZipXP.App/Web/ReactWindow.cs create mode 100644 src/ZipXP.UI/e2e/desktop.ts create mode 100644 src/ZipXP.UI/e2e/fixtures.ts create mode 100644 src/ZipXP.UI/e2e/interactions.spec.ts create mode 100644 src/ZipXP.UI/e2e/ui.spec.ts create mode 100644 src/ZipXP.UI/index.html create mode 100644 src/ZipXP.UI/package-lock.json create mode 100644 src/ZipXP.UI/package.json create mode 100644 src/ZipXP.UI/playwright.config.ts create mode 100644 src/ZipXP.UI/src/App.test.tsx create mode 100644 src/ZipXP.UI/src/App.tsx create mode 100644 src/ZipXP.UI/src/bridge.test.ts create mode 100644 src/ZipXP.UI/src/bridge.ts create mode 100644 src/ZipXP.UI/src/main.tsx create mode 100644 src/ZipXP.UI/src/styles.css create mode 100644 src/ZipXP.UI/src/types.ts create mode 100644 src/ZipXP.UI/tsconfig.json diff --git a/.gitignore b/.gitignore index d10f9c0..6306c40 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,9 @@ .vs/ *.user artifacts/ +**/node_modules/ +**/dist/ +*.tsbuildinfo + +**/test-results/ +**/playwright-report/ diff --git a/README.md b/README.md index 86dc3c0..e1f8511 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ ## Get started -ZipXP needs Windows 11 and a local NTFS drive. There is no installer download yet, so for now build it from source with the [.NET 10 SDK](https://dotnet.microsoft.com/download): +ZipXP needs Windows 11 and a local NTFS drive. There is no installer download yet, so for now build it from source with the [.NET 10 SDK](https://dotnet.microsoft.com/download) and Node.js 22.12+ installed. The React desktop interface also requires the [Microsoft Edge WebView2 Runtime](https://developer.microsoft.com/microsoft-edge/webview2/): ```powershell git clone https://github.com/kiranscript/zipxp.git @@ -42,6 +42,8 @@ cd zipxp dotnet run --project src/ZipXP.App/ZipXP.App.csproj ``` +If WebView2 is unavailable, pass `-- --native-ui` to the run command for the original WPF interface. + Then choose **Managed folders → Add folder…**, pick a test folder that holds copies of some documents, and read the estimate. To build a package you can install, see [Install and uninstall](docs/install.md). Storage insights shows which folders take the room and what was saved in each: @@ -67,7 +69,8 @@ Compression savings depend entirely on what is in the folder. One known accounti ```text src/ZipXP.Core/ compression engine, queue, SQLite store -src/ZipXP.App/ WPF dashboard and tray app +src/ZipXP.App/ WebView2 desktop host, WPF fallback and tray app +src/ZipXP.UI/ React + TypeScript interface (Vite) tests/ real-filesystem checks scripts/ dev launcher, check, publish, install docs/ documentation diff --git a/docs/development.md b/docs/development.md index 8f1d7e8..fd325d4 100644 --- a/docs/development.md +++ b/docs/development.md @@ -1,5 +1,31 @@ # Development +## React desktop interface + +The default interface uses React + TypeScript + Vite in `src/ZipXP.UI`, hosted locally by WebView2 in the WPF shell. The C# engine, SQLite data, tray icon, single-instance handling and sign-in registration stay in `ZipXP.App` and `ZipXP.Core`. Closing the window keeps the tray worker running. + +The React interface uses soft black, white and neutral grays. Status is conveyed with explicit labels, icons and outlines; color is never the only signal. Compact desktop tables move metadata below filenames so failure details and recovery controls remain visible. Browser checks enforce the neutral palette and cover settings/list scroll cues. They also run the label-in-name accessibility rule explicitly and verify that failed-file counts are announced in navigation and attention controls, with correct singular and plural wording. + +Install Node.js 22.12+ (or a supported newer LTS), the .NET 10 Windows SDK, and the Microsoft Edge WebView2 Evergreen Runtime. Windows builds and `scripts/publish.ps1` build and copy the React bundle into the app's `UI` folder automatically; packaged users need WebView2 but do not need Node.js or npm. The runtime is not bundled by the publisher yet. + +Frontend work: + +```bash +cd src/ZipXP.UI +npm ci +npm run dev # browser layout development; no desktop file access +npm test # bridge and interaction checks +npm run build # TypeScript check + production bundle +npx playwright install chromium # once, for browser checks +npm run test:ui # interaction tests, accessibility audits, rendered screenshots +``` + +Browser checks route the compiled bundle into an isolated headless browser and provide fixture data through a mock desktop bridge; they never access managed folders. Screenshots and accessibility reports are saved under `artifacts/ui-review`. Set `ZIPXP_REVIEW_ROUND` to choose a report subfolder, or `ZIPXP_CHROMIUM` to use an existing Chromium executable. The Windows UI Automation checks in `scripts/ui-check.ps1` additionally verify real engine data and navigation in both desktop interfaces. + +Browser development shows the connection state; real data and actions require the Windows app. Rebuild/relaunch the desktop app to pick up frontend changes. It serves the bundled files without a local HTTP server and accepts only explicit, typed commands from its own `https://zipxp.internal/index.html` document. External navigation, frames, popups and host objects are blocked. Folder pickers and previews for compression/restore use native dialogs. + +Launch with `--native-ui` to use the original WPF screens, including if WebView2 is unavailable. If the React host fails, its error screen also offers **Open native interface**. Saved folder policies and history are shared between both interfaces. + ## Run from WSL From the repository root: @@ -8,7 +34,7 @@ From the repository root: ./scripts/dev.sh ``` -This launches the native Windows desktop app using Windows `dotnet.exe`. It looks on PATH, in `C:\Program Files\dotnet`, and in the local `C:\Temp\zipxp-dotnet` SDK used for development. Set `WINDOWS_DOTNET_EXE` to another executable's WSL path if needed. A Linux SDK cannot run WPF. +Install Node.js in WSL first. The launcher checks PATH and NVM installations for Linux Node.js 22.12+ and uses npm from the same installation. Set `ZIPXP_NODE_EXE` to an explicit Linux Node executable if needed. The launcher builds React with Linux npm and then launches the Windows desktop app using Windows `dotnet.exe`. It looks on PATH, in `C:\Program Files\dotnet`, and in the local `C:\Temp\zipxp-dotnet` SDK used for development. Set `WINDOWS_DOTNET_EXE` to another executable's WSL path if needed. A Linux SDK cannot run WPF. From Windows PowerShell at the repository root: @@ -46,7 +72,9 @@ Press Ctrl+C in the terminal to stop a dev run: the launcher asks the app to qui .\scripts\check.ps1 -Dotnet C:\Temp\zipxp-dotnet\dotnet.exe ``` -The check harness references the actual core library. It creates a unique disposable NTFS run directory in the user's temp folder and retains its files. It uses real compression, hashes, locks, hard links, directory defaults, replacements, and the persistent automatic worker; injected battery/CPU/free-space signals exercise waiting policies without filling a disk. A separate isolated database seeds the actual WPF window for native UI Automation navigation tests. The launch-check instance exits normally on its own and does not register startup. +The check script runs frontend tests, builds the bundle and desktop app, then runs the core harness and both desktop navigation checks. From WSL, run `npm test` and `npm run build` in `src/ZipXP.UI` first, then call the Windows check script with `-SkipReactBuild` to avoid mixing Windows and Linux npm dependencies. + +The check harness references the actual core library. It creates a unique disposable NTFS run directory in the user's temp folder and retains its files. It uses real compression, hashes, locks, hard links, directory defaults, replacements, and the persistent automatic worker; injected battery/CPU/free-space signals exercise waiting policies without filling a disk. A separate isolated database seeds the React/WebView2 window and the original WPF window for Windows UI Automation navigation tests. The launch-check instance exits normally on its own and does not register startup. Validation on the development Windows host is recorded in [validation.md](validation.md). Wider compatibility/performance testing, signing with a release certificate, sign-in lifecycle checks, and a private user pilot remain release acceptance work. This is an unsigned development build until published with a real signing certificate; it is not presented as a completed private beta. @@ -54,7 +82,8 @@ Validation on the development Windows host is recorded in [validation.md](valida ```text src/ZipXP.Core/ Models, native handles/identities, SQLite store, analysis, rules, worker -src/ZipXP.App/ WPF dashboard (Views/), controls, tray/single-instance/startup (Shell/), plain-language text (Text/) +src/ZipXP.UI/ React screens, styles, typed bridge, interaction tests +src/ZipXP.App/ WebView2 host and desktop bridge (Web/), WPF fallback (Views/), controls, tray/single-instance/startup (Shell/), plain-language text (Text/) tests/ZipXP.Checks/ Real-service policy, native, persistence and automation checks tests/ZipXP.FolderTest/ Helper used by scripts/test-existing-folder.ps1 scripts/ dev.sh (WSL launcher), check, publish, install, uninstall diff --git a/scripts/check.ps1 b/scripts/check.ps1 index 4977fe7..6a4fcd7 100644 --- a/scripts/check.ps1 +++ b/scripts/check.ps1 @@ -1,58 +1,20 @@ [CmdletBinding()] -param([string]$Dotnet = 'dotnet') +param([string]$Dotnet = 'dotnet', [switch]$SkipReactBuild) $ErrorActionPreference = 'Stop' $root = Split-Path -Parent $PSScriptRoot -& $Dotnet build (Join-Path $root 'src/ZipXP.App/ZipXP.App.csproj') --nologo +if (-not $SkipReactBuild) { + Push-Location (Join-Path $root 'src/ZipXP.UI') + try { + & npm.cmd ci --no-fund --no-audit + if ($LASTEXITCODE -ne 0) { throw 'React dependency installation failed.' } + & npm.cmd test + if ($LASTEXITCODE -ne 0) { throw 'React interaction checks failed.' } + } finally { Pop-Location } +} +$buildReact = (-not $SkipReactBuild).ToString().ToLowerInvariant() +& $Dotnet build (Join-Path $root 'src/ZipXP.App/ZipXP.App.csproj') "-p:BuildReact=$buildReact" --nologo if ($LASTEXITCODE -ne 0) { throw 'WPF build failed.' } & $Dotnet run --project (Join-Path $root 'tests/ZipXP.Checks/ZipXP.Checks.csproj') if ($LASTEXITCODE -ne 0) { throw 'Service/integration checks failed.' } -$state = Join-Path $env:TEMP ('ZipXP-window-check-' + [Guid]::NewGuid().ToString('N')) -& $Dotnet run --project (Join-Path $root 'tests/ZipXP.Checks/ZipXP.Checks.csproj') -- --seed-ui $state -if ($LASTEXITCODE -ne 0) { throw 'UI fixture setup failed.' } -$dll = Join-Path $root 'src/ZipXP.App/bin/Debug/net10.0-windows/ZipXP.StorageManager.dll' -$start = [Diagnostics.ProcessStartInfo]::new() -$start.FileName = (Get-Command $Dotnet).Source -$start.UseShellExecute = $false -$start.CreateNoWindow = $true -$start.Arguments = '"' + $dll + '" --data-dir "' + $state + '" --launch-check' -$app = [Diagnostics.Process]::Start($start) -try { - # dotnet.exe is a console host, so WaitForInputIdle is not valid even with a WPF child window. - $deadline = [DateTime]::UtcNow.AddSeconds(15) - do { - $app.Refresh() - if ($app.HasExited -or $app.MainWindowHandle -ne 0) { break } - Start-Sleep -Milliseconds 100 - } while ([DateTime]::UtcNow -lt $deadline) - if ($app.HasExited -or $app.MainWindowHandle -eq 0 -or $app.MainWindowTitle -notlike 'ZipXP*') { throw 'ZipXP window was not found.' } - Write-Host "PASS: actual WPF dashboard launched: $($app.MainWindowTitle)" - Add-Type -AssemblyName UIAutomationClient - Add-Type -AssemblyName UIAutomationTypes - $window = [Windows.Automation.AutomationElement]::FromHandle($app.MainWindowHandle) - function Invoke-Button([string]$pattern) { - $deadline = [DateTime]::UtcNow.AddSeconds(5) - do { - $buttons = $window.FindAll([Windows.Automation.TreeScope]::Descendants, [Windows.Automation.PropertyCondition]::new([Windows.Automation.AutomationElement]::ControlTypeProperty, [Windows.Automation.ControlType]::Button)) - foreach ($button in $buttons) { - if ($button.Current.Name -like $pattern -and -not $button.Current.IsOffscreen) { - $invoke = $button.GetCurrentPattern([Windows.Automation.InvokePattern]::Pattern) - $invoke.Invoke() - return - } - } - Start-Sleep -Milliseconds 100 - } while ([DateTime]::UtcNow -lt $deadline) - throw "UI button not found: $pattern" - } - foreach ($page in @('Managed folders', 'Storage insights', 'Activity', 'Overview')) { - Invoke-Button $page - Write-Host "PASS: native dashboard navigation: $page" - } - $checkFile = Join-Path $state 'demo-fixture/analyze-only.txt' - if (([IO.File]::GetAttributes($checkFile) -band [IO.FileAttributes]::Compressed) -ne 0) { throw 'Analysis-only UI fixture was unexpectedly compressed.' } - Write-Host 'PASS: actual dashboard analysis does not compress files without an enabled policy.' - if (-not $app.WaitForExit(20000)) { throw 'Smoke-check app did not exit gracefully.' } - if ($app.ExitCode -ne 0) { throw "App exited with $($app.ExitCode)." } - Write-Host 'PASS: graceful worker/tray shutdown; isolated settings database retained.' -} finally { $app.Dispose() } +& (Join-Path $PSScriptRoot 'ui-check.ps1') -Dotnet $Dotnet diff --git a/scripts/dev.sh b/scripts/dev.sh index f193ce0..fde13b1 100755 --- a/scripts/dev.sh +++ b/scripts/dev.sh @@ -30,6 +30,33 @@ for arg in "$@"; do done if (( fresh && reset )); then echo 'Use either --fresh or --reset, not both.' >&2; exit 2; fi +# Noninteractive shells may not load NVM, and Windows npm can appear on WSL's PATH. +# Find a supported Linux Node and always pair it with npm from the same installation. +node_exe="" +node_candidates=() +if [[ -n "${ZIPXP_NODE_EXE:-}" ]]; then + node_candidates+=("$ZIPXP_NODE_EXE") +else + node_candidates+=("$(command -v node || true)") + while IFS= read -r candidate; do node_candidates+=("$candidate"); done < <( + printf '%s\n' "${NVM_DIR:-$HOME/.nvm}"/versions/node/*/bin/node | sort -Vr + ) +fi +for candidate in "${node_candidates[@]}"; do + [[ -x "$candidate" ]] || continue + if resolved_node="$("$candidate" -e 'const [major, minor] = process.versions.node.split(".").map(Number); if (process.platform !== "linux" || major < 22 || (major === 22 && minor < 12)) process.exit(1); process.stdout.write(process.execPath);' 2>/dev/null)"; then + if [[ -f "$(dirname -- "$resolved_node")/npm" ]]; then node_exe="$resolved_node"; break; fi + fi +done +if [[ -z "$node_exe" ]]; then + echo 'Could not find Linux Node.js 22.12+ with npm. Install it in WSL, or set ZIPXP_NODE_EXE to its node executable.' >&2 + exit 1 +fi +node_bin="$(dirname -- "$node_exe")" +export PATH="$node_bin:$PATH" +echo "Building React with Node $("$node_exe" --version) ($node_exe)" +(cd "$repo_root/src/ZipXP.UI" && "$node_exe" "$node_bin/npm" ci --no-fund --no-audit && "$node_exe" "$node_bin/npm" run build) + win_path() { powershell.exe -NoProfile -Command "$1" { timer.Stop(); await ExitAsync(); }; timer.Start(); } @@ -111,6 +111,7 @@ public async Task ExitAsync() if (Exiting) return; Exiting = true; if (MainWindow is MainWindow window) window.ShowClosingStatus(); + if (MainWindow is ReactWindow reactWindow) reactWindow.ShowClosingStatus(); if (Engine != null) await Engine.DisposeAsync(); tray?.Dispose(); tray = null; Shutdown(); diff --git a/src/ZipXP.App/Web/DesktopBridge.cs b/src/ZipXP.App/Web/DesktopBridge.cs new file mode 100644 index 0000000..92a017b --- /dev/null +++ b/src/ZipXP.App/Web/DesktopBridge.cs @@ -0,0 +1,160 @@ +using System.Diagnostics; +using System.Text.Json; +using System.Windows; +using Microsoft.Win32; +using ZipXP.Core; +using ZipXP.Core.Services; + +namespace ZipXP.App; + +/// Explicit desktop commands. Paths to mutate always come from the engine's managed records. +internal sealed class DesktopBridge(Window owner) +{ + internal static readonly JsonSerializerOptions Json = new(JsonSerializerDefaults.Web); + private Engine Engine => App.Instance.Engine; + private ManagedFolder Root(JsonElement args) => Engine.Store.Roots().FirstOrDefault(r => r.Id == Text(args, "rootId")) + ?? throw new ArgumentException("This folder is no longer managed. Refresh and select another folder."); + private static string Text(JsonElement args, string key) => args.TryGetProperty(key, out var value) && value.ValueKind == JsonValueKind.String + ? value.GetString()! : throw new ArgumentException($"Missing {key}."); + private static bool Flag(JsonElement args, string key) => args.GetProperty(key).GetBoolean(); + private bool Confirm(string text, string title) => !App.Instance.Exiting && MessageBox.Show(owner, text, title, MessageBoxButton.YesNo, title.Contains("Restore", StringComparison.Ordinal) || title.Contains("Stop managing", StringComparison.Ordinal) ? MessageBoxImage.Warning : MessageBoxImage.Information) == MessageBoxResult.Yes; + + public async Task ExecuteAsync(string command, JsonElement args) + { + switch (command) + { + case "snapshot": return await Task.Run(Snapshot); + case "insights": return await Task.Run(() => Insights(args)); + case "addFolder": + var picker = new OpenFolderDialog { Title = "Choose a folder for ZipXP to look after" }; + return picker.ShowDialog(owner) == true ? (await Engine.AddAsync(picker.FolderName)).Id : null; + case "scan": Engine.RequestScan(Root(args).Id); return "Scan requested. Scanning never changes your files."; + case "pause": await Engine.SetPausedAsync(Flag(args, "paused")); return Engine.Paused ? "Paused. The current file will finish first." : "Background work resumed."; + case "pauseFolder": await Engine.SetFolderPausedAsync(Root(args).Id, Flag(args, "paused")); return "Folder pause setting updated."; + case "startup": StartupRegistration.Enabled = Flag(args, "enabled"); return "Sign-in preference saved."; + case "savePolicy": + var policy = args.GetProperty("policy").Deserialize(Json) ?? throw new ArgumentException("Missing folder settings."); + // Pause is a separate action and cannot be accidentally overwritten by an open settings form. + var root = Root(args); + await Engine.SavePolicyAsync(root, policy with { Paused = root.Policy.Paused }); + return "Settings saved. Files already compressed stay compressed until you restore them."; + case "queue": return await QueueAsync(args); + case "restoreSelected": + var selectedRoot = Root(args); + var paths = args.GetProperty("paths").Deserialize(Json) ?? []; + var wanted = paths.ToHashSet(StringComparer.OrdinalIgnoreCase); + var selected = Engine.Store.Observations(selectedRoot.Id).Where(o => wanted.Contains(o.Path) && o.File is { Directory: false, Compressed: true }).ToArray(); + if (selected.Length == 0) return "No compressed files selected."; + var headroom = checked(selectedRoot.Policy.ReserveBytes + selected.Max(o => o.File!.Logical)); + if (!Confirm($"Restore the original size of {selected.Length} selected files?\n\nNeeds at least {Display.Bytes(headroom)} free on the drive. Automatic compression for this folder will be turned off. No files are deleted.", "Restore selected files")) return "No changes made."; + return Queued(await Engine.QueueSelectedAsync(selectedRoot.Id, selected)); + case "remove": + var removing = Root(args); + if (!Confirm($"Stop managing {removing.Path}?\n\nFiles stay exactly as they are, including any existing compression. To uncompress them first, cancel and choose Restore original size.", "Stop managing folder")) return "No changes made."; + await Engine.RemoveAsync(removing.Id); return "Folder removed from ZipXP. Its files stay as they are."; + case "retry": + var retry = Engine.Store.Jobs().FirstOrDefault(j => j.Id == Text(args, "jobId")) ?? throw new ArgumentException("Activity item no longer exists."); + return Queued(await Engine.RetryAsync([retry])); + case "showFile": + var job = Engine.Store.Jobs().FirstOrDefault(j => j.Id == Text(args, "jobId")) ?? throw new ArgumentException("Activity item no longer exists."); + if (!File.Exists(job.Path) && !Directory.Exists(Path.GetDirectoryName(job.Path))) throw new IOException("That item is no longer there."); + Process.Start(new ProcessStartInfo("explorer.exe") { Arguments = File.Exists(job.Path) ? $"/select,\"{job.Path}\"" : $"\"{Path.GetDirectoryName(job.Path)}\"", UseShellExecute = true }); + return "Opened in File Explorer."; + case "quit": + // Reply before disposing WebView2 and closing the dispatcher. + _ = owner.Dispatcher.BeginInvoke(async () => await App.Instance.ExitAsync()); + return "Finishing the current file, then quitting."; + default: throw new ArgumentException("Unknown desktop command."); + } + } + + private object Snapshot() + { + var roots = Engine.Store.Roots(); + var scans = Engine.Store.Scans(); + var entries = roots.SelectMany(r => Engine.Store.Observations(r.Id)).ToArray(); + var files = entries.Where(o => o.File is { Directory: false }).Select(o => o.File!).DistinctBy(f => f.Identity).ToArray(); + var measured = files.Where(f => f.Allocated != null).ToArray(); + var volumes = new List(); + foreach (var name in roots.Select(r => Path.GetPathRoot(r.Path)!).Distinct(StringComparer.OrdinalIgnoreCase)) + { + try { var drive = new DriveInfo(name); volumes.Add(new { Name = string.IsNullOrWhiteSpace(drive.VolumeLabel) ? $"Local Disk ({name.TrimEnd('\\')})" : $"{drive.VolumeLabel} ({name.TrimEnd('\\')})", Total = drive.TotalSize, Free = drive.AvailableFreeSpace }); } + catch (Exception ex) when (Scope.FileError(ex)) { } + } + return new + { + Folders = roots.Select(r => new { r.Id, r.Name, r.Path, r.Policy, Scan = scans.FirstOrDefault(s => s.RootId == r.Id), Status = Plain.Message(Engine.FolderStatus(r.Id)) }), + Jobs = Engine.Store.Jobs().Select(j => new { j.Id, j.RootId, j.Path, FileName = Path.GetFileName(j.Path), j.State, StateText = Plain.JobState(j.State).Text, Action = Plain.Action(j.Operation), Message = Plain.Message(j.Message), j.Delta, Utc = j.FinishedUtc ?? j.CreatedUtc, j.Pending }), + Engine.Paused, Startup = StartupRegistration.Enabled, Status = Plain.Message(Engine.Status), Engine.CurrentFile, + Original = measured.Sum(f => f.Logical), Allocated = measured.Sum(f => f.Allocated ?? 0), Unknown = entries.Count(e => e.File == null || (e.File.Directory == false && e.File.Allocated == null)), Volumes = volumes + }; + } + + private object Insights(JsonElement args) + { + var root = Root(args); + var path = Text(args, "path"); + if (string.IsNullOrEmpty(path)) path = root.Path; + if (!Scope.Within(path, root.Path)) throw new ArgumentException("Choose a folder inside the managed root."); + var largest = Flag(args, "largest"); + var search = Text(args, "search"); + var entries = Engine.Store.Observations(root.Id); + var totals = new Dictionary(StringComparer.OrdinalIgnoreCase); + var links = new Dictionary>(StringComparer.OrdinalIgnoreCase); + foreach (var entry in entries.Where(e => e.File?.Directory != true)) + { + for (var parent = Path.GetDirectoryName(entry.Path); parent != null && Scope.Within(parent, root.Path); parent = Path.GetDirectoryName(parent)) + { + if (entry.File is { Links: > 1 } linked) + { + if (!links.TryGetValue(parent, out var identities)) links[parent] = identities = []; + if (!identities.Add(linked.Identity)) continue; + } + var old = totals.GetValueOrDefault(parent); + totals[parent] = (old.Logical + (entry.File?.Logical ?? 0), old.Allocated + (entry.File?.Allocated ?? 0), old.Unknown + (entry.File?.Allocated == null ? 1 : 0)); + } + } + var rows = entries.Where(e => largest ? e.File?.Directory == false : string.Equals(Path.GetDirectoryName(e.Path), path, StringComparison.OrdinalIgnoreCase)) + .Where(e => search.Length == 0 || (e.Path + " " + Plain.Message(e.Reason)).Contains(search, StringComparison.OrdinalIgnoreCase)) + .Select(e => + { + var directory = e.File?.Directory == true; + var total = totals.GetValueOrDefault(e.Path); + return new { e.Path, e.Name, Directory = directory, Logical = directory ? total.Logical : e.File?.Logical, + Allocated = directory ? total.Unknown == 0 ? (long?)total.Allocated : null : e.File?.Allocated, + Compressed = e.File?.Compressed == true, + Notes = Plain.Message(e.Reason) + (directory && total.Unknown > 0 ? $" · {total.Unknown} items inside couldn't be measured" : "") }; + }).OrderByDescending(e => e.Allocated ?? e.Logical ?? -1).ToArray(); + return new { Path = path, Parent = string.Equals(path, root.Path, StringComparison.OrdinalIgnoreCase) ? null : Path.GetDirectoryName(path), Rows = rows.Take(500), TotalRows = rows.Length }; + } + + private string Queued(int count) => $"{count} items queued." + (Engine.Paused ? " Choose Resume all to start." : " See Activity for progress."); + + private async Task QueueAsync(JsonElement args) + { + var operation = Text(args, "operation"); + if (operation is not ("Compress" or "Decompress" or "ClearDefault")) throw new ArgumentException("Unknown operation."); + var roots = args.TryGetProperty("rootId", out var id) && id.ValueKind == JsonValueKind.String + ? new[] { Root(args) } + : Engine.Store.Roots().Where(r => operation != "Compress" || !r.Policy.Paused).ToArray(); + if (roots.Length == 0) return "Add a folder first."; + var previews = new List<(ManagedFolder Root, JobPreview Preview)>(); + foreach (var root in roots) previews.Add((root, await Engine.PreviewAsync(root, operation))); + // A restore with zero eligible files still disables automatic compression, matching the native UI. + var count = previews.Sum(p => p.Preview.Files); + var headroom = previews.Max(p => p.Preview.RequiredHeadroom); + var explanation = operation switch + { + "Decompress" => "Files will take their original space again. Automatic compression will be turned off for these folders. No files are deleted. Windows folder compression, if enabled, can still compress new files independently.", + "ClearDefault" => "Windows will stop compressing new files in these folders by itself. Existing compressed files stay compressed.", + _ => "Files will be compressed once in the background. Automatic compression will not be enabled. You can restore their original size later." + }; + var title = operation switch { "Decompress" => "Restore original size", "ClearDefault" => "Turn off Windows compression", _ => "Compress preview" }; + var coverage = previews.All(p => p.Preview.Coverage == "Complete primary-stream scan") ? "Everything in these folders was checked." : "Partial scan: items that couldn't be read are left out."; + var scope = roots.Length == 1 ? roots[0].Path : $"{roots.Length} managed folders"; + if (!Confirm($"{scope}\n\n{count} eligible items · {Display.Bytes(previews.Sum(p => p.Preview.LogicalBytes))} in total\nNeeds at least {Display.Bytes(headroom)} free on each affected drive while it works.\n{coverage}\n\n{explanation}\n\nGo ahead?", title)) return "No changes made."; + var queued = 0; + foreach (var (root, _) in previews) queued += await Engine.QueueScopeAsync(root.Id, operation); + return Queued(queued); + } +} diff --git a/src/ZipXP.App/Web/ReactWindow.cs b/src/ZipXP.App/Web/ReactWindow.cs new file mode 100644 index 0000000..38c147c --- /dev/null +++ b/src/ZipXP.App/Web/ReactWindow.cs @@ -0,0 +1,117 @@ +using System.ComponentModel; +using System.Text.Json; +using System.Windows; +using System.Windows.Controls; +using Microsoft.Web.WebView2.Core; +using Microsoft.Web.WebView2.Wpf; + +namespace ZipXP.App; + +internal sealed class ReactWindow : Window +{ + private const string Origin = "https://zipxp.internal"; + private readonly WebView2 web = new(); + private readonly DesktopBridge bridge; + private bool commandBusy; + private bool closing; + private bool initialized; + + public ReactWindow() + { + Title = "ZipXP"; Width = 1280; Height = Math.Min(940, SystemParameters.WorkArea.Height * .95); + MinWidth = 900; MinHeight = 640; WindowStartupLocation = WindowStartupLocation.CenterScreen; + Icon = System.Windows.Media.Imaging.BitmapFrame.Create(new Uri("pack://application:,,,/Assets/zipxp.ico")); + Content = new TextBlock { Text = "Starting ZipXP…", Margin = new Thickness(32) }; + bridge = new(this); + Loaded += async (_, _) => { if (!initialized) { initialized = true; await InitializeAsync(); } }; + Closing += OnClosing; + Closed += (_, _) => web.Dispose(); + } + + private static bool Trusted(string source) => Uri.TryCreate(source, UriKind.Absolute, out var uri) + && uri.Scheme == "https" && uri.Host == "zipxp.internal" && uri.IsDefaultPort + && uri.AbsolutePath == "/index.html" && string.IsNullOrEmpty(uri.Query); + + private async Task InitializeAsync() + { + try + { + var ui = Path.Combine(AppContext.BaseDirectory, "UI"); + if (!File.Exists(Path.Combine(ui, "index.html"))) throw new IOException("The React interface is missing. Rebuild ZipXP with Node.js installed, or launch with --native-ui."); + // Never put the Chromium profile beside the executable (which may be in Program Files). + var profile = Path.Combine(Path.GetDirectoryName(App.Instance.Engine.Store.DatabasePath)!, "WebView2"); + var environment = await CoreWebView2Environment.CreateAsync(userDataFolder: profile); + Content = web; + await web.EnsureCoreWebView2Async(environment); + web.CoreWebView2.SetVirtualHostNameToFolderMapping("zipxp.internal", ui, CoreWebView2HostResourceAccessKind.DenyCors); + web.CoreWebView2.Settings.AreHostObjectsAllowed = false; + web.CoreWebView2.Settings.AreDefaultScriptDialogsEnabled = false; + web.CoreWebView2.Settings.IsStatusBarEnabled = false; + web.CoreWebView2.Settings.AreDefaultContextMenusEnabled = false; + web.CoreWebView2.NavigationStarting += (_, e) => e.Cancel = !Trusted(e.Uri); + web.CoreWebView2.FrameNavigationStarting += (_, e) => e.Cancel = true; + web.CoreWebView2.NewWindowRequested += (_, e) => e.Handled = true; + web.CoreWebView2.PermissionRequested += (_, e) => e.State = CoreWebView2PermissionState.Deny; + web.CoreWebView2.WebMessageReceived += OnMessage; + web.CoreWebView2.NavigationCompleted += (_, e) => + { + if (!e.IsSuccess) ShowError("The interface couldn't load: " + e.WebErrorStatus); + }; + web.Source = new Uri(Origin + "/index.html"); + } + catch (Exception ex) + { + if (Environment.GetCommandLineArgs().Contains("--launch-check")) { Console.Error.WriteLine(ex); await App.Instance.ExitAsync(); Environment.ExitCode = 1; } + else ShowError("Couldn't start the React interface. Install the Microsoft Edge WebView2 Runtime, or launch ZipXP with --native-ui.\n\n" + ex.Message); + } + } + + private void ShowError(string message) + { + var panel = new StackPanel { Margin = new Thickness(32) }; + panel.Children.Add(new TextBlock { Text = message, TextWrapping = TextWrapping.Wrap, Margin = new Thickness(0, 0, 0, 20) }); + var fallback = new Button { Content = "Open native interface", HorizontalAlignment = HorizontalAlignment.Left, Padding = new Thickness(16, 8, 16, 8) }; + fallback.Click += (_, _) => + { + var native = new MainWindow(); App.Instance.MainWindow = native; native.Show(); closing = true; Close(); + }; + panel.Children.Add(fallback); Content = panel; + } + + private async void OnMessage(object? sender, CoreWebView2WebMessageReceivedEventArgs e) + { + if (closing || App.Instance.Exiting || !Trusted(e.Source) || !Trusted(web.CoreWebView2.Source)) return; + string? id = null; + bool acquired = false; + object response; + try + { + if (e.WebMessageAsJson.Length > 65536) throw new ArgumentException("Desktop message is too large."); + using var document = JsonDocument.Parse(e.WebMessageAsJson); + var message = document.RootElement; + id = message.GetProperty("id").GetString(); + if (string.IsNullOrEmpty(id) || id.Length > 64) throw new ArgumentException("Invalid request identifier."); + var command = message.GetProperty("command").GetString() ?? ""; + // App lifecycle and shell settings must stay available during engine work. + var requiresEngineLock = command is not ("snapshot" or "insights" or "showFile" or "quit" or "startup"); + if (requiresEngineLock) + { + if (commandBusy) throw new InvalidOperationException("Another action is still in progress."); + acquired = commandBusy = true; + } + var result = await bridge.ExecuteAsync(command, message.GetProperty("args")); + response = new { id, result }; + } + catch (Exception ex) { response = new { id, error = Plain.Message(ex.Message) }; } + finally { if (acquired) commandBusy = false; } + if (!closing && !App.Instance.Exiting && Trusted(web.CoreWebView2.Source)) + web.CoreWebView2.PostWebMessageAsJson(JsonSerializer.Serialize(response, DesktopBridge.Json)); + } + + public void ShowClosingStatus() { closing = true; web.IsEnabled = false; Title = "ZipXP — finishing the current file…"; } + private void OnClosing(object? sender, CancelEventArgs e) + { + if (closing || App.Instance.Exiting) return; + e.Cancel = true; Hide(); App.Instance.ExplainTray(); + } +} diff --git a/src/ZipXP.App/ZipXP.App.csproj b/src/ZipXP.App/ZipXP.App.csproj index 3605c6c..a043de5 100644 --- a/src/ZipXP.App/ZipXP.App.csproj +++ b/src/ZipXP.App/ZipXP.App.csproj @@ -10,4 +10,29 @@ + + + + + + true + npm.cmd + npm + + + + + + + + + + + UI/%(ReactAsset.RecursiveDir)%(ReactAsset.Filename)%(ReactAsset.Extension) + PreserveNewest + PreserveNewest + + + diff --git a/src/ZipXP.UI/e2e/desktop.ts b/src/ZipXP.UI/e2e/desktop.ts new file mode 100644 index 0000000..6ca3d9b --- /dev/null +++ b/src/ZipXP.UI/e2e/desktop.ts @@ -0,0 +1,168 @@ +import type { Page } from "@playwright/test"; +import { readFile } from "node:fs/promises"; +import { resolve } from "node:path"; +import { snapshot, insights } from "./fixtures"; +export interface Scenario { + folderCount?: number; + pendingJobs?: boolean; + empty?: boolean; + snapshotError?: string; + errors?: Record; + delay?: Record; + browserOnly?: boolean; +} +export async function openApp(page: Page, scenario: Scenario = {}) { + await page.route("https://zipxp.internal/**", async (route) => { + const path = new URL(route.request().url()).pathname; + const file = resolve("dist", "." + path); + if (!file.startsWith(resolve("dist") + "/")) return route.abort(); + await route.fulfill({ + body: await readFile(file), + contentType: path.endsWith(".html") + ? "text/html" + : path.endsWith(".js") + ? "application/javascript" + : "text/css", + }); + }); + await page.addInitScript( + ({ snapshot, insights, scenario }) => { + if (scenario.browserOnly) return; + if (scenario.empty) { + snapshot.folders = []; + snapshot.jobs = []; + snapshot.volumes = []; + snapshot.original = 0; + snapshot.allocated = 0; + } + if (scenario.folderCount) { + const first = snapshot.folders[0]; + snapshot.folders = Array.from( + { length: scenario.folderCount }, + (_, i) => + i < 3 + ? snapshot.folders[i] + : { + ...first, + id: String(i), + name: `Archive ${i + 1}`, + path: `C:\\Users\\Kiran\\Archive ${i + 1}`, + }, + ); + } + if (scenario.pendingJobs) { + snapshot.jobs = [ + ["Queued", "Waiting", "queued.txt"], + ["Running", "Working", "running.txt"], + ["Retry", "Will retry", "retry.txt"], + ].map(([state, stateText, fileName], i) => ({ + ...snapshot.jobs[0], + id: `pending-${i}`, + fileName, + path: `C:\\Work\\${fileName}`, + state, + stateText, + message: "", + delta: null, + pending: true, + })); + snapshot.currentFile = snapshot.jobs[1].path; + snapshot.status = "Working"; + } + const listeners = new Set<(e: { data: unknown }) => void>(); + const commands: unknown[] = []; + Object.assign(window, { + __zipxpRequests: commands, + chrome: { + webview: { + addEventListener: ( + _: string, + fn: (e: { data: unknown }) => void, + ) => listeners.add(fn), + removeEventListener: ( + _: string, + fn: (e: { data: unknown }) => void, + ) => listeners.delete(fn), + postMessage: (m: { + id: string; + command: string; + args: Record; + }) => { + commands.push(m); + const error = + m.command === "snapshot" + ? scenario.snapshotError + : scenario.errors?.[m.command]; + setTimeout(() => { + let result: unknown = "Done"; + if (!error) { + if (m.command === "snapshot") + result = snapshot; + if (m.command === "insights") { + const path = String( + m.args.path || insights.path, + ); + const source = + path === insights.path + ? insights.rows + : insights.rows + .filter( + (r) => !r.directory, + ) + .slice(0, 1) + .map((r) => ({ + ...r, + path: + path + + "\\" + + r.name, + })); + const rows = source.filter( + (r) => + (!m.args.largest || + !r.directory) && + r.name + .toLowerCase() + .includes( + String( + m.args.search || "", + ).toLowerCase(), + ), + ); + result = { + path, + parent: + path === insights.path + ? null + : insights.path, + rows, + totalRows: rows.length, + }; + } + if (m.command === "pause") + snapshot.paused = Boolean( + m.args.paused, + ); + if (m.command === "startup") + snapshot.startup = Boolean( + m.args.enabled, + ); + if (m.command === "savePolicy") + snapshot.folders.find( + (f) => f.id === m.args.rootId, + )!.policy = m.args + .policy as (typeof snapshot.folders)[0]["policy"]; + } + listeners.forEach((fn) => + fn({ data: { id: m.id, result, error } }), + ); + }, scenario.delay?.[m.command] ?? 5); + }, + }, + }, + }); + }, + { snapshot, insights, scenario }, + ); + await page.goto("https://zipxp.internal/index.html"); +} diff --git a/src/ZipXP.UI/e2e/fixtures.ts b/src/ZipXP.UI/e2e/fixtures.ts new file mode 100644 index 0000000..1032d84 --- /dev/null +++ b/src/ZipXP.UI/e2e/fixtures.ts @@ -0,0 +1,88 @@ +import type { Snapshot, Insights } from "../src/types"; +const gb = 1024 ** 3; +const policy = { + enabled: false, + paused: false, + recursive: true, + runOnBattery: false, + minimumBytes: 65536, + maximumBytes: 268435456, + minimumSavingBytes: 16384, + reserveBytes: 268435456, + quietSeconds: 60, + cooldownSeconds: 3600, + startHour: 0, + endHour: 0, + exclusions: "*.zip;*.jpg;*.mp4;node_modules/*;.git/*", +}; +export const snapshot: Snapshot = { + folders: ["Work projects", "Documents", "Downloads"].map((name, i) => ({ + id: String(i), + name, + path: `C:\\Users\\Kiran\\${name}`, + policy: { ...policy, enabled: i === 0, paused: i === 2 }, + status: i === 2 ? "Paused" : "Watching for changes", + scan: { + utc: new Date().toISOString(), + logical: (10 - i * 2) * gb, + allocated: (6 - i) * gb, + candidates: gb, + estimatedSaving: 0.4 * gb, + files: 2400 - i * 700, + unknown: 0, + errors: 0, + complete: true, + nativeDefaults: i === 1 ? 2 : 0, + }, + })), + jobs: [ + "quarterly-report.csv", + "application.log", + "design-notes.md", + "customer-export.json", + "project-brief.docx", + ].map((name, i) => ({ + id: String(i), + rootId: "0", + path: `C:\\Users\\Kiran\\Work projects\\${name}`, + fileName: name, + state: i === 1 ? "Failed" : "Succeeded", + stateText: i === 1 ? "Failed" : "Done", + action: i === 4 ? "Restore original size" : "Compress", + message: + i === 1 + ? "This file is open in another app. Close it and try again." + : "", + delta: i === 1 ? null : i === 4 ? -1478656 : 1478656, + utc: new Date(Date.now() - i * 600000).toISOString(), + pending: false, + })), + paused: false, + startup: false, + status: "Watching for changes", + currentFile: null, + original: 24 * gb, + allocated: 15 * gb, + unknown: 0, + volumes: [{ name: "Local Disk (C:)", total: 512 * gb, free: 124.8 * gb }], +}; +export const insights: Insights = { + path: snapshot.folders[0].path, + parent: null, + totalRows: 5, + rows: [ + "Client projects", + "Research", + "annual-report.csv", + "application.log", + "notes.md", + ].map((name, i) => ({ + path: `${snapshot.folders[0].path}\\${name}`, + name, + directory: i < 2, + logical: (2 - i * 0.35) * gb, + allocated: (1.4 - i * 0.25) * gb, + compressed: i >= 2, + notes: i >= 2 ? "Compressed" : "", + })), +}; diff --git a/src/ZipXP.UI/e2e/interactions.spec.ts b/src/ZipXP.UI/e2e/interactions.spec.ts new file mode 100644 index 0000000..1f75854 --- /dev/null +++ b/src/ZipXP.UI/e2e/interactions.spec.ts @@ -0,0 +1,686 @@ +import { test, expect } from "@playwright/test"; +import { resolve } from "node:path"; +import AxeBuilder from "@axe-core/playwright"; +import { openApp } from "./desktop"; +const artifacts = resolve( + "../../artifacts/ui-review", + process.env.ZIPXP_REVIEW_ROUND || "current", +); +const nav = (page: import("@playwright/test").Page, name: string) => + page + .getByRole("navigation", { name: "Main navigation" }) + .getByRole("button", { name, exact: name !== "Activity" }); + +test("settings keep actions visible, validate blanks, and restore keyboard focus", async ({ + page, +}) => { + await page.setViewportSize({ width: 1000, height: 720 }); + await openApp(page); + await nav(page, "Managed folders").click(); + const opener = page.getByRole("button", { + name: "Settings for Work projects", + }); + await opener.click(); + await page.getByText("Advanced settings", { exact: true }).click(); + await expect( + page.getByRole("button", { name: "Save settings", exact: true }), + ).toBeInViewport(); + const minimum = page.getByRole("spinbutton", { + name: "Minimum file size (KB)", + exact: true, + }); + await minimum.fill(""); + await page + .getByRole("button", { name: "Save settings", exact: true }) + .click(); + await expect(minimum).toHaveAttribute("aria-invalid", "true"); + await expect(minimum).toBeFocused(); + await expect( + page.getByText("Enter a number.", { exact: true }), + ).toBeVisible(); + const explanation = page.getByText("Enter a number.", { exact: true }); + await expect(explanation).toBeInViewport(); + const body = await page.locator(".dialog-body").boundingBox(); + const message = await explanation.boundingBox(); + expect(message!.y).toBeGreaterThanOrEqual(body!.y); + expect(message!.y + message!.height).toBeLessThanOrEqual( + body!.y + body!.height, + ); + await page.screenshot({ + path: `${artifacts}/settings-validation.png`, + fullPage: true, + }); + await page.keyboard.press("Tab"); + await expect(minimum).not.toBeFocused(); + await expect(page.locator(".field-error svg")).toBeVisible(); + await page.screenshot({ + path: `${artifacts}/settings-validation-unfocused.png`, + fullPage: true, + }); + await page.locator(".dialog-body").evaluate((el) => { + el.scrollTop = el.scrollHeight; + }); + await expect( + page.getByText("1 setting needs attention", { exact: true }), + ).toBeInViewport(); + await minimum.fill("64"); + await page.getByLabel("Only between", { exact: true }).check(); + await page.getByLabel("Start time", { exact: true }).selectOption("22"); + await page.getByLabel("End time", { exact: true }).selectOption("6"); + await page + .getByRole("button", { name: "Save settings", exact: true }) + .click(); + await expect(page.getByRole("dialog")).not.toBeVisible(); + await expect(opener).toBeFocused(); + const sent = await page.evaluate(() => + ( + window as unknown as { + __zipxpRequests: { + command: string; + args: { policy?: { startHour: number; endHour: number } }; + }[]; + } + ).__zipxpRequests.filter((m) => m.command === "savePolicy"), + ); + expect(sent).toHaveLength(1); + expect(sent[0].args.policy).toMatchObject({ startHour: 22, endHour: 6 }); +}); + +test("busy operations preserve focus and allow navigation and search", async ({ + page, +}) => { + await openApp(page, { delay: { queue: 1800 } }); + const compress = page.getByRole("button", { + name: "Compress all eligible", + exact: true, + }); + await compress.click(); + await expect(compress).toBeFocused(); + await expect(compress).toHaveAttribute("aria-busy", "true"); + await expect(compress.locator("svg:visible")).toHaveCount(1); + await page.screenshot({ path: `${artifacts}/busy.png`, fullPage: true }); + await nav(page, "Activity").click(); + await page + .getByRole("textbox", { name: "Search activity" }) + .fill("application"); + await expect( + page.getByText("application.log", { exact: true }), + ).toBeVisible(); + await expect( + page.getByText("quarterly-report.csv", { exact: true }), + ).not.toBeVisible(); + await expect( + page.getByRole("status").filter({ hasText: "Done" }), + ).toBeVisible(); +}); + +test("action failures are dismissible and do not offer connection recovery", async ({ + page, +}) => { + await openApp(page, { + errors: { + queue: "Not enough free space. Restore needs more room on the drive.", + }, + }); + await page.getByRole("button", { name: "Compress all eligible" }).click(); + await expect(page.getByRole("alert")).toContainText( + "Not enough free space", + ); + await expect( + page.getByRole("button", { name: "Retry connection" }), + ).not.toBeVisible(); + await page.screenshot({ + path: `${artifacts}/action-error.png`, + fullPage: true, + }); + expect( + ( + await new AxeBuilder({ page }) + .withTags(["wcag2a", "wcag2aa", "wcag21aa"]) + .analyze() + ).violations, + ).toEqual([]); + await page.getByRole("button", { name: "Dismiss error" }).click(); + await expect(page.getByRole("alert")).not.toBeVisible(); +}); + +test("insights show loading, support selection, and browse real breadcrumbs", async ({ + page, +}) => { + await openApp(page, { delay: { insights: 400 } }); + await nav(page, "Storage insights").click(); + await expect(page.getByRole("status")).toContainText("Loading files"); + await page.getByRole("button", { name: "Client projects" }).click(); + await expect( + page.getByRole("navigation", { name: "Folder path" }), + ).toContainText("Client projects"); + await page.getByRole("button", { name: "Go to parent folder" }).click(); + await page + .getByRole("checkbox", { name: "Select all restorable files" }) + .check(); + await expect( + page.getByRole("button", { name: "Restore selected (3)" }), + ).toBeEnabled(); + await page + .getByRole("button", { name: "Largest files", exact: true }) + .click(); + await expect( + page.getByRole("button", { name: "Largest files", exact: true }), + ).toHaveAttribute("aria-pressed", "true"); + await expect( + page.getByRole("button", { name: "Client projects" }), + ).not.toBeVisible(); +}); + +test("insights failures replace loading with a retry control", async ({ + page, +}) => { + await openApp(page, { + errors: { insights: "Could not read this folder." }, + }); + await nav(page, "Storage insights").click(); + await expect(page.getByRole("alert")).toContainText( + "Could not read this folder", + ); + await expect(page.getByRole("status")).not.toContainText("Loading"); + await expect(page.getByRole("button", { name: "Try again" })).toBeVisible(); +}); + +test("global pause is visible and attention links filter failed activity", async ({ + page, +}) => { + await openApp(page); + await page + .getByRole("button", { name: "Pause all folders", exact: true }) + .click(); + await expect( + page.getByText("All background work is paused", { exact: true }), + ).toBeVisible(); + await expect( + page.getByRole("button", { name: "Resume all folders", exact: true }), + ).toHaveCount(1); + await expect(page.getByRole("status")).toHaveCount(0); + await page.screenshot({ path: `${artifacts}/paused.png`, fullPage: true }); + await nav(page, "Managed folders").click(); + await expect( + page.getByText("Paused globally", { exact: true }), + ).toBeVisible(); + await nav(page, "Overview").click(); + await page.getByRole("button", { name: "Review activity" }).click(); + await expect( + page.getByRole("combobox", { name: "Filter activity" }), + ).toHaveValue("Failed"); + await expect( + page.getByText("application.log", { exact: true }), + ).toBeVisible(); + await expect( + page.getByText("quarterly-report.csv", { exact: true }), + ).not.toBeVisible(); +}); + +test("empty and disconnected states explain the next step", async ({ + page, +}) => { + await openApp(page, { empty: true }); + await expect( + page.getByRole("button", { name: "Choose your first folder" }), + ).toBeVisible(); + await page.screenshot({ path: `${artifacts}/empty.png`, fullPage: true }); +}); + +test("connection failure has retry and no misleading loading indicator", async ({ + page, +}) => { + await openApp(page, { + snapshotError: "The engine connection was interrupted.", + }); + await expect(page.getByRole("alert")).toContainText( + "The engine connection was interrupted", + ); + await expect( + page.getByRole("button", { name: "Retry connection" }), + ).toBeVisible(); + await page.screenshot({ + path: `${artifacts}/connection-error.png`, + fullPage: true, + }); +}); + +test("minimum desktop size keeps settings actions reachable, including high contrast", async ({ + page, +}) => { + await page.setViewportSize({ width: 900, height: 640 }); + await openApp(page); + await nav(page, "Managed folders").click(); + await page + .getByRole("button", { name: "Settings for Work projects" }) + .click(); + await page.getByText("Advanced settings", { exact: true }).click(); + await expect( + page.getByRole("button", { name: "Save settings", exact: true }), + ).toBeInViewport(); + expect( + await page.evaluate( + () => document.documentElement.scrollWidth > innerWidth, + ), + ).toBe(false); + await page.screenshot({ + path: `${artifacts}/minimum-settings.png`, + fullPage: true, + }); + await page.emulateMedia({ forcedColors: "active" }); + await expect( + page.getByRole("button", { name: "Save settings", exact: true }), + ).toBeInViewport(); + await page.screenshot({ + path: `${artifacts}/high-contrast.png`, + fullPage: true, + }); +}); + +test("repeated storage navigation preserves the current results", async ({ + page, +}) => { + await openApp(page); + await nav(page, "Storage insights").click(); + const folder = page.getByRole("button", { name: "Client projects" }); + await expect(folder).toBeVisible(); + await page.getByRole("button", { name: "By folder", exact: true }).click(); + await expect(folder).toBeVisible(); + await page + .getByRole("navigation", { name: "Folder path" }) + .getByRole("button", { name: "Work projects", exact: true }) + .click(); + await expect(folder).toBeVisible(); + await folder.click(); + const current = page + .getByRole("navigation", { name: "Folder path" }) + .getByRole("button", { name: "Client projects", exact: true }); + await expect(current).toHaveAttribute("aria-current", "location"); + await current.click(); + await expect( + page.getByText("annual-report.csv", { exact: true }), + ).toBeVisible(); + await page.getByRole("button", { name: "By folder", exact: true }).click(); + await expect( + page.getByText("annual-report.csv", { exact: true }), + ).toBeVisible(); + await page + .getByRole("button", { name: "Largest files", exact: true }) + .click(); + await expect(page.getByText("notes.md", { exact: true })).toBeVisible(); + await page + .getByRole("button", { name: "Largest files", exact: true }) + .click(); + await expect(page.getByText("notes.md", { exact: true })).toBeVisible(); +}); + +test("opening File Explorer does not lock actions or announce a file operation", async ({ + page, +}) => { + await openApp(page, { delay: { showFile: 500 } }); + await nav(page, "Activity").click(); + await page + .getByRole("button", { + name: "Show application.log in folder", + exact: true, + }) + .click(); + await expect(page.getByRole("status")).toHaveCount(0); + await expect( + page.getByRole("button", { name: "Try again", exact: true }), + ).not.toHaveAttribute("aria-disabled", "true"); + await page + .getByRole("textbox", { name: "Search activity" }) + .fill("application"); + await expect( + page.getByText("application.log", { exact: true }), + ).toBeVisible(); +}); + +test("many folders keep the selected folder actions nearby", async ({ + page, +}) => { + await page.setViewportSize({ width: 1000, height: 720 }); + await openApp(page, { folderCount: 20 }); + await nav(page, "Managed folders").click(); + await page + .locator(".folder-main") + .filter({ hasText: "Archive 20" }) + .click(); + await expect( + page.getByRole("heading", { name: "Archive 20", exact: true }), + ).toBeInViewport(); + await expect( + page.getByRole("button", { name: "Compress now", exact: true }), + ).toBeInViewport(); + const dimensions = await page.evaluate(() => ({ + doc: document.documentElement.scrollHeight, + body: document.body.scrollHeight, + viewport: innerHeight, + })); + expect(dimensions.doc).toBeLessThanOrEqual(dimensions.body + 1); + expect(dimensions.doc).toBeLessThan(dimensions.viewport + 150); + await page.screenshot({ + path: `${artifacts}/many-folders.png`, + fullPage: true, + }); +}); + +test("compact activity keeps retry visible and usable without horizontal scrolling", async ({ + page, +}) => { + for (const width of [1000, 900]) { + await page.setViewportSize({ width, height: 720 }); + await openApp(page); + await nav(page, "Activity").click(); + const retry = page.getByRole("button", { + name: "Try again", + exact: true, + }); + await expect(retry).toBeInViewport({ ratio: 0.99 }); + await retry.click(); + await expect( + page.getByRole("status").filter({ hasText: "Done" }), + ).toBeVisible(); + const requested = await page.evaluate(() => + ( + window as unknown as { __zipxpRequests: { command: string }[] } + ).__zipxpRequests.some((message) => message.command === "retry"), + ); + expect(requested).toBe(true); + } +}); + +test("Quit remains available when the engine connection fails", async ({ + page, +}) => { + await openApp(page, { snapshotError: "The engine stopped responding." }); + await expect(page.getByRole("alert")).toBeVisible(); + const quit = page.getByRole("button", { name: "Quit ZipXP", exact: true }); + await expect(quit).toBeEnabled(); + await quit.click(); + await expect(page.getByRole("status")).toContainText("Quitting ZipXP"); + const requested = await page.evaluate(() => + ( + window as unknown as { __zipxpRequests: { command: string }[] } + ).__zipxpRequests.some((message) => message.command === "quit"), + ); + expect(requested).toBe(true); + await expect( + page.getByText("The engine isn’t responding", { exact: true }), + ).not.toBeVisible(); + await expect( + page.getByText("Retry the connection to load your folders.", { + exact: true, + }), + ).not.toBeVisible(); + await expect( + page.getByRole("button", { name: "Retry connection", exact: true }), + ).not.toBeVisible(); + await page.screenshot({ + path: `${artifacts}/quit-disconnected.png`, + fullPage: true, + }); +}); + +test("Quit and startup remain independent of a pending engine action", async ({ + page, +}) => { + await openApp(page, { delay: { queue: 1800 } }); + await page + .getByRole("button", { name: "Compress all eligible", exact: true }) + .click(); + const startup = page.getByRole("checkbox", { + name: "Start when I sign in", + exact: true, + }); + await expect(startup).toBeEnabled(); + await startup.check(); + await expect(startup).toBeChecked(); + await page.getByRole("button", { name: "Quit ZipXP", exact: true }).click(); + await expect(page.getByRole("status")).toContainText("Quitting ZipXP"); + const commands = await page.evaluate(() => + ( + window as unknown as { __zipxpRequests: { command: string }[] } + ).__zipxpRequests.map((message) => message.command), + ); + expect(commands).toContain("queue"); + expect(commands).toContain("startup"); + expect(commands).toContain("quit"); + await expect(page.locator("svg.spin:visible")).toHaveCount(1); + await page.screenshot({ + path: `${artifacts}/quit-busy.png`, + fullPage: true, + }); +}); + +test("menu actions announce concise labels and return keyboard focus to their trigger", async ({ + page, +}) => { + await openApp(page, { delay: { queue: 650, remove: 650 } }); + await nav(page, "Managed folders").click(); + const trigger = page.locator(".more-actions > summary"); + for (const label of [ + "Restore original size", + "Stop managing this folder", + "Turn off Windows compression", + ]) { + if (label === "Turn off Windows compression") + await page + .locator(".folder-main") + .filter({ hasText: "Documents" }) + .click(); + await trigger.click(); + await page.getByRole("button", { name: label, exact: false }).focus(); + await page.keyboard.press("Enter"); + await expect(trigger).toBeFocused(); + await expect(page.locator(".more-actions")).not.toHaveAttribute("open"); + await expect(page.locator(".progress-strip strong")).toHaveText( + `${label}…`, + ); + await expect( + page.getByRole("status").filter({ hasText: "Done" }), + ).toBeVisible(); + } +}); + +test("compact tables keep failure details, file metadata and recovery visible together", async ({ + page, +}) => { + await page.setViewportSize({ width: 900, height: 720 }); + await openApp(page); + await nav(page, "Activity").click(); + await expect( + page.locator(".compact-activity-detail").first(), + ).toBeInViewport(); + await expect( + page.getByRole("button", { name: "Try again", exact: true }), + ).toBeInViewport({ ratio: 0.99 }); + const activity = page.getByRole("region", { name: "Activity table" }); + expect( + await activity.evaluate((el) => el.scrollWidth <= el.clientWidth + 1), + ).toBe(true); + await nav(page, "Storage insights").click(); + await expect( + page.getByRole("button", { name: "Client projects" }), + ).toBeVisible(); + await expect( + page.locator(".compact-insight-meta").first(), + ).toBeInViewport(); + const storage = page.getByRole("region", { name: "Storage items table" }); + expect( + await storage.evaluate((el) => el.scrollWidth <= el.clientWidth + 1), + ).toBe(true); +}); + +test("advanced settings expose a working scroll cue and persistent save controls", async ({ + page, +}) => { + await page.setViewportSize({ width: 900, height: 640 }); + await openApp(page); + await nav(page, "Managed folders").click(); + await page + .getByRole("button", { name: "Settings for Work projects" }) + .click(); + await page.getByText("Advanced settings", { exact: true }).click(); + const cue = page.getByRole("button", { + name: "More settings below", + exact: true, + }); + await expect(cue).toBeInViewport(); + await cue.click(); + expect( + await page.locator(".dialog-body").evaluate((el) => el.scrollTop), + ).toBeGreaterThan(0); + await expect( + page.getByRole("button", { name: "Save settings", exact: true }), + ).toBeInViewport(); +}); + +test("the requested monochrome theme uses neutral text, surfaces, borders and focus colors", async ({ + page, +}) => { + await openApp(page); + await expect( + page.getByRole("button", { name: "Compress all eligible" }), + ).toBeVisible(); + const offPalette = await page.evaluate(() => { + const found = new Set(); + for (const element of document.querySelectorAll("body *")) { + if (!element.getBoundingClientRect().width) continue; + const style = getComputedStyle(element); + for (const name of [ + "color", + "background-color", + "border-top-color", + "outline-color", + ]) { + const color = style.getPropertyValue(name); + const channels = color + .match(/\d+(\.\d+)?/g) + ?.slice(0, 3) + .map(Number); + if ( + channels?.length === 3 && + Math.max(...channels) - Math.min(...channels) > 1 + ) + found.add(color); + } + } + return [...found]; + }); + expect(offPalette).toEqual([]); +}); + +test("waiting, running and retry jobs describe their actual state instead of claiming success", async ({ + page, +}) => { + await openApp(page, { pendingJobs: true }); + await nav(page, "Activity").click(); + await expect( + page.getByRole("row").filter({ hasText: "queued.txt" }), + ).toContainText("Waiting to start."); + await expect( + page.getByRole("row").filter({ hasText: "running.txt" }), + ).toContainText("Processing this file."); + await expect( + page.getByRole("row").filter({ hasText: "retry.txt" }), + ).toContainText("Waiting to try again."); + await expect( + page.getByText("Completed successfully.", { exact: true }), + ).toHaveCount(0); + await page.screenshot({ + path: `${artifacts}/pending-activity.png`, + fullPage: true, + }); + await page.setViewportSize({ width: 900, height: 720 }); + await expect( + page + .locator(".compact-activity-detail") + .filter({ hasText: "Waiting to start." }), + ).toBeInViewport(); + await expect( + page + .locator(".compact-activity-detail") + .filter({ hasText: "Processing this file." }), + ).toBeInViewport(); + await expect( + page + .locator(".compact-activity-detail") + .filter({ hasText: "Waiting to try again." }), + ).toBeInViewport(); + await page.screenshot({ + path: `${artifacts}/compact-pending-activity.png`, + fullPage: true, + }); +}); + +test("monochrome error, attention and operational feedback retain separate hierarchies", async ({ + page, +}) => { + await openApp(page, { + delay: { queue: 700 }, + errors: { queue: "The folder could not be processed." }, + }); + await page + .getByRole("button", { name: "Compress all eligible", exact: true }) + .click(); + await expect(page.locator(".progress-strip")).toBeVisible(); + await expect(page.locator(".attention-card")).toHaveCount(0); + await expect( + page.getByRole("button", { + name: "1 file needs attention, Review activity", + exact: true, + }), + ).toBeVisible(); + await expect(page.getByRole("alert")).toContainText( + "The folder could not be processed.", + ); + await expect(page.locator(".message.error")).toHaveCSS( + "border-left-width", + "4px", + ); + await expect(page.locator(".attention-card")).toHaveCount(0); + await page.screenshot({ + path: `${artifacts}/error-hierarchy.png`, + fullPage: true, + }); +}); + +test("failure counts remain in accessible names when another banner is showing", async ({ + page, +}) => { + await openApp(page); + await expect( + page + .getByRole("navigation", { name: "Main navigation" }) + .getByRole("button", { + name: "Activity 1 failed file", + exact: true, + }), + ).toBeVisible(); + await page + .getByRole("button", { name: "Pause all folders", exact: true }) + .click(); + const attention = page.getByRole("button", { + name: "1 file needs attention, Review activity", + exact: true, + }); + await expect(attention).toBeVisible(); + await expect(attention).toContainText("1 file needs attention"); + const report = await new AxeBuilder({ page }) + .withRules(["label-content-name-mismatch"]) + .analyze(); + expect(report.violations).toEqual([]); + expect( + report.passes.some((rule) => rule.id === "label-content-name-mismatch"), + ).toBe(true); + await attention.click(); + await expect( + page.getByRole("combobox", { name: "Filter activity" }), + ).toHaveValue("Failed"); + await expect( + page.getByText("application.log", { exact: true }), + ).toBeVisible(); +}); diff --git a/src/ZipXP.UI/e2e/ui.spec.ts b/src/ZipXP.UI/e2e/ui.spec.ts new file mode 100644 index 0000000..a8bfa8b --- /dev/null +++ b/src/ZipXP.UI/e2e/ui.spec.ts @@ -0,0 +1,157 @@ +import { test, expect } from "@playwright/test"; +import { writeFile } from "node:fs/promises"; +import AxeBuilder from "@axe-core/playwright"; +import { resolve } from "node:path"; +import { openApp } from "./desktop"; +const artifacts = resolve( + "../../artifacts/ui-review", + process.env.ZIPXP_REVIEW_ROUND || "current", +); +test("review all screens with realistic desktop data", async ({ page }) => { + await openApp(page); + await expect( + page.getByRole("button", { + name: "Compress all eligible", + exact: true, + }), + ).toBeVisible(); + await page.screenshot({ + path: `${artifacts}/overview.png`, + fullPage: true, + }); + const audit = async (name: string) => { + const report = await new AxeBuilder({ page }) + .withTags(["wcag2a", "wcag2aa", "wcag21aa"]) + .analyze(); + await writeFile( + `${artifacts}/${name}-accessibility.json`, + JSON.stringify(report.violations, null, 2), + ); + expect(report.violations).toEqual([]); + const labels = await new AxeBuilder({ page }) + .withRules(["label-content-name-mismatch"]) + .analyze(); + await writeFile( + `${artifacts}/${name}-label-accessibility.json`, + JSON.stringify(labels.violations, null, 2), + ); + expect(labels.violations).toEqual([]); + }; + await audit("overview"); + for (const [name, file] of [ + ["Managed folders", "folders"], + ["Storage insights", "insights"], + ["Activity", "activity"], + ]) { + await page + .getByRole("navigation") + .getByRole("button", { name, exact: name !== "Activity" }) + .click(); + await expect( + page.getByRole("heading", { name, exact: true }), + ).toBeVisible(); + if (file === "insights") + await expect( + page.getByRole("button", { name: "Client projects" }), + ).toBeVisible(); + await expect.poll(() => page.evaluate(() => window.scrollY)).toBe(0); + await page.screenshot({ + path: `${artifacts}/${file}.png`, + fullPage: true, + }); + await audit(file); + } + await page + .getByRole("navigation") + .getByRole("button", { name: "Managed folders" }) + .click(); + await page.getByText("More actions", { exact: true }).click(); + await audit("more-actions"); + await page.screenshot({ + path: `${artifacts}/more-actions.png`, + fullPage: true, + }); + await page.keyboard.press("Escape"); + await page + .getByRole("button", { name: "Settings for Work projects" }) + .click(); + await page.getByText("Advanced settings", { exact: true }).click(); + await expect( + page.getByRole("button", { name: "Save settings", exact: true }), + ).toBeInViewport(); + await page.screenshot({ + path: `${artifacts}/settings.png`, + fullPage: true, + }); + await audit("settings"); + await page.getByRole("button", { name: "Cancel", exact: true }).click(); + await page.setViewportSize({ width: 1000, height: 720 }); + await page.screenshot({ path: `${artifacts}/compact.png`, fullPage: true }); + for (const [name, file] of [ + ["Storage insights", "compact-insights"], + ["Activity", "compact-activity"], + ]) { + await page + .getByRole("navigation", { name: "Main navigation" }) + .getByRole("button", { name, exact: name !== "Activity" }) + .click(); + if (name === "Storage insights") + await expect( + page.getByRole("button", { name: "Client projects" }), + ).toBeVisible(); + await expect.poll(() => page.evaluate(() => window.scrollY)).toBe(0); + await page.screenshot({ + path: `${artifacts}/${file}.png`, + fullPage: true, + }); + const table = page.getByRole("region", { + name: + name === "Activity" ? "Activity table" : "Storage items table", + }); + await table.focus(); + await expect(table).toBeFocused(); + await table.evaluate((element) => { + element.scrollLeft = element.scrollWidth; + }); + await page.screenshot({ + path: `${artifacts}/${file}-scrolled.png`, + fullPage: true, + }); + } + await page.setViewportSize({ width: 900, height: 640 }); + for (const [name, file] of [ + ["Overview", "minimum-overview"], + ["Managed folders", "minimum-folders"], + ["Storage insights", "minimum-insights"], + ["Activity", "minimum-activity"], + ]) { + await page + .getByRole("navigation", { name: "Main navigation" }) + .getByRole("button", { name, exact: name !== "Activity" }) + .click(); + await expect( + page.getByRole("heading", { name, exact: true }), + ).toBeInViewport(); + if (name === "Storage insights") + await expect( + page.getByRole("button", { name: "Client projects" }), + ).toBeVisible(); + if (name === "Activity") + await expect( + page.getByRole("button", { name: "Try again", exact: true }), + ).toBeInViewport({ ratio: 0.99 }); + await page.screenshot({ + path: `${artifacts}/${file}.png`, + fullPage: true, + }); + expect( + await page.evaluate( + () => document.documentElement.scrollWidth > innerWidth, + ), + ).toBe(false); + } + const overflow = await page.evaluate( + () => document.documentElement.scrollWidth > window.innerWidth, + ); + expect(overflow).toBe(false); +}); diff --git a/src/ZipXP.UI/index.html b/src/ZipXP.UI/index.html new file mode 100644 index 0000000..3dfb68b --- /dev/null +++ b/src/ZipXP.UI/index.html @@ -0,0 +1,16 @@ + + + + + + + ZipXP + + +
+ + + diff --git a/src/ZipXP.UI/package-lock.json b/src/ZipXP.UI/package-lock.json new file mode 100644 index 0000000..6e448cc --- /dev/null +++ b/src/ZipXP.UI/package-lock.json @@ -0,0 +1,2473 @@ +{ + "name": "zipxp-ui", + "version": "0.2.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "zipxp-ui", + "version": "0.2.0", + "dependencies": { + "lucide-react": "^0.468.0", + "react": "^19.2.0", + "react-dom": "^19.2.0" + }, + "devDependencies": { + "@axe-core/playwright": "^4.14.0", + "@playwright/test": "^1.65.1", + "@testing-library/react": "^16.3.0", + "@testing-library/user-event": "^14.6.1", + "@types/react": "^19.2.0", + "@types/react-dom": "^19.2.0", + "jsdom": "^26.1.0", + "typescript": "~5.9.3", + "vite": "^7.3.0", + "vitest": "^3.2.4" + } + }, + "node_modules/@asamuzakjp/css-color": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-3.2.0.tgz", + "integrity": "sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@csstools/css-calc": "^2.1.3", + "@csstools/css-color-parser": "^3.0.9", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "lru-cache": "^10.4.3" + } + }, + "node_modules/@axe-core/playwright": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@axe-core/playwright/-/playwright-4.14.0.tgz", + "integrity": "sha512-SGUhG5PIHd2eMdpgBF2PyQLOhX+qyDR2PT4cmoS4Qk2ak+jX/rrSvst9l0PGv5WTHolKpUMvVmoHpr4cZgf1RQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "axe-core": "~4.14.0" + }, + "engines": { + "node": ">=22.12.0" + }, + "peerDependencies": { + "playwright-core": ">= 1.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.14.tgz", + "integrity": "sha512-Y5tqevQaUAZhhj82BpYMNC1ssvLQTVAfwKdm8iy8qwmhvC2/CpcAu8OC+QEtjM7pMk7knx83u1Qj8gzkicyelw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@csstools/color-helpers": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.1.0.tgz", + "integrity": "sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@csstools/css-calc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.4.tgz", + "integrity": "sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/css-color-parser": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.1.0.tgz", + "integrity": "sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "dependencies": { + "@csstools/color-helpers": "^5.1.0", + "@csstools/css-calc": "^2.1.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/css-parser-algorithms": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.5.tgz", + "integrity": "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/css-tokenizer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.4.tgz", + "integrity": "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@playwright/test": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.65.1.tgz", + "integrity": "sha512-y+NCIRm2LvY4slUVWvGh1nujJ8RF/hEisIsq2mtUPgdQC4L701bq5hZGMhrpeXjACvwvO9tj5dJqhvM6TP9lbw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright": "1.65.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.68.5.tgz", + "integrity": "sha512-4iPGohjhOlA8ovAwOrHcbsLFw2X0lG49y2iWSlyLrRLJMO47D+XNM930CcGVQKPUpCsDfCdK3BV0y1ki6OBdhw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.68.5.tgz", + "integrity": "sha512-mBK6NsYThYGRkGy8uX7fODOIT0YHz9UyvtYv/fhqdfEZw8Sg2kPiuUsQ8OmzRfq5ve0nHqZVDz2zLOy1xVaVzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-x64": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-x64/-/rollup-android-x64-4.68.5.tgz", + "integrity": "sha512-8D/A3B5bsLlBcVGsUN+IWcA0wreB+Fvmvs3PLBHyEq3itxGefdPsubG/tPHvezUKPTDAh05YoutzsVFDxkcrJQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.68.5.tgz", + "integrity": "sha512-xJVTzKZnwwQsQ5WA9cV4Q8l1SVYF9UyVa/3ECoCFfgtow4MUt7HcI3AB8Hwa/4790fimHPXzYfsuyMp67ErQ8w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.68.5.tgz", + "integrity": "sha512-0Ft351J6xgaXhBtsRtV1qC1iFRSGzOoEpqbfIw5kPA1/R2ldOON8IVHx15XK6X46OI1QvxkETmWT+BIQxfHiOQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.68.5.tgz", + "integrity": "sha512-crcRf4EJ792/UuuPf8QduPogDOS9t6E7Mlkvgk8KSBQ/r+ZYyL4VKLEg4GmNmz4AUjq/Mr+4fHJ/RqtCFXq47w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.68.5.tgz", + "integrity": "sha512-6SrbCoHnaFiipnX4TsDnQ74Zd8puOFQma6WdXDvnh0/Oy5Ash2RbNbeOdfbQNQOyNZe65eAg/G/U+EOoaR284w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.68.5.tgz", + "integrity": "sha512-Du8EftwTEY5i9H/VmLrvHrv8W4WpnLSvlT4/th5zQR10baXOQM/8Vn+q4MkNZrWwwulUuhuAUItevugalTNCLA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.68.5.tgz", + "integrity": "sha512-eT4t5h+qexha98N75YpiKMY1XDfimwkVL4TCHgQXr3JRFEqRacd38ldXB7dAAi5G62Mkuxlvw7VBHe5UXY2UHw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.68.5.tgz", + "integrity": "sha512-jUsTbXqgd+cJlwgKePc56J8Yie+JZRWl7xiViSR2eQuloZ26PzWCS7ZJrCEZRmY7vrqhnvnbj6fP1ikinE0dfQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.68.5.tgz", + "integrity": "sha512-HHjSkN3VAI8ZD45xEO4WcV5+yUB04vpR0r5g0ayLX8YfafV61hAIWoh8Qa22HujnxEtOXYDstF4qKbWGicI2RA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.68.5.tgz", + "integrity": "sha512-Y//CvF+v/RiwP6ZscB23xFU+x8BtSbRpwEnVb6140X1TBqSjrZwQwdH/hRCG2FKBaUF2sWsOVjdeZ5UmsF5Cqg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.68.5.tgz", + "integrity": "sha512-O3fyuDSEV+sXQNTfVfZFPCdc5QymYVxS4PT7YXxsouO/LZhmYy8y6xNZJx9tBQCiR96c2sBfRNLRztkhnvahcg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.68.5.tgz", + "integrity": "sha512-xIzFIoRROEVGJZBc/ljGteOcF/sA6Hjuz+x3zHNdcFc24xlVenPm3RPTOJfNvNVF0MZTyfGq1YYIhG4Tj/nYiA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.68.5.tgz", + "integrity": "sha512-srRfsMFnBDxlmpXwlStiwUSQ/4jCbR4u4i52pZg+bV+Anni0V5EmDeHGZ4YbmTIvM+XhcvEecFcjHmZWFWzVpA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.68.5.tgz", + "integrity": "sha512-hkrVfI5WMnWaZg0vaM8DlJCRlIUhaRa3Z2BT99AuFl739uIcOnnvpYr7kVhUiPuCvHvWEPgExtXtgNRpBDuxbw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.68.5.tgz", + "integrity": "sha512-ZWDUe13obQhNg0qD1pkft3aWBZgDD26TO3ADvuJ2T9SN/T3h632VRVc+GDCjgRzEnd8a8yCOkl9opkkTPxhF0Q==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.68.5.tgz", + "integrity": "sha512-9TsAn9NJQv5NsyGS4yOmJZGlM2ASrzQXC6pc6hrjduk5QwtoapONtooLiDSJlPq6+IAwhS2AdJ9+B8tidcdh5w==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.68.5.tgz", + "integrity": "sha512-JK5S9YhArjVwuetZ9nf6/GdpiXLl7DAVTdRUpF40wVMQNq28hkBrQI1+xy9sqjqtPvW08xagGPfBCBj5wLerZA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.68.5.tgz", + "integrity": "sha512-pF0UxfDULcfZhdp5azfIvTW5c++AYjYs0Q8iTCzVCVzVH9+9e0Ah0vIZS3MIZbO7GoyPjTuPjAcUgQQvYbM81A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.68.5.tgz", + "integrity": "sha512-5bkgrD3xTj4pVAaKZ/D+GBWfWaJtorYRdj8i7nHcCsalDaIgiGVmCb/KucTO8P80UXCcPnqMJGcCS4xM94qsbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.68.5.tgz", + "integrity": "sha512-Fu+Jd8JWALOrVQdXTBfqUgkDXqWYqWAfjrpvSuvqYOVaSfwwi2wc9TORUEbbyd/8dsAmHLi04K9FnIwnjvWoJQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.68.5.tgz", + "integrity": "sha512-WX+jUzphTWxca8eKMPtNSTW58aW6TxScbKQ3Tc0Nagjwrysy1Bu0Wl7BUt5STCPB+WM0EisGFFAyjfZ952f/JA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.68.5.tgz", + "integrity": "sha512-z7EKzmD+jJQ3/ISVQSBkLptuUhtYcPf9Vamg8Ovf2jnZMN/Zvf5xCxHPh+TWPoUx9knc1al4EIOi6c9XayVXyQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.68.5.tgz", + "integrity": "sha512-VnHYErHaF8wRwdvq0A92NHmE1/u0sbuSgyTgGyOrH1vO14GWhu9aXERntg9SPnZoyK/LM+X4YawBE4g1FNkLBA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.68.5.tgz", + "integrity": "sha512-gVfBrzSqeYl0/QRJegeK9njmGxojS3oiU9cAHNY0wU22AjS44dGzt4WnnuYsTCNO8P40H4Ulykg8cxq2zWWo9Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@testing-library/dom": { + "version": "10.4.2", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.2.tgz", + "integrity": "sha512-yzr2S9HyAIdhz2/6qHgbs665Q7PKVcDF05vsOlHPxG1mo36gKVesdYVeDLnXgfjJ03CrKRk08knc6+E/9m8v2Q==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "picocolors": "1.1.1", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@testing-library/react": { + "version": "16.3.3", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.3.3.tgz", + "integrity": "sha512-Uo193NgQbPMz6lrrhtRQQFcMC6Re/ELLFbbuVL30WDlZxlpZf9/lMHTAVxPRLw1q1iu9OJmR1c2BLiENRstdBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@testing-library/dom": "^10.0.0", + "@types/react": "^18.0.0 || ^19.0.0", + "@types/react-dom": "^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@testing-library/user-event": { + "version": "14.6.12", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.6.12.tgz", + "integrity": "sha512-8yQV8v+eToBhsUO4oYrZY7fzhpTEMZx4IDx0/iuER/x0Xuy0NdqQOhsaaUNlvXE03N7vQ+4RCXUieKC0NJty9w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "peerDependencies": { + "@testing-library/dom": ">=7.21.4" + } + }, + "node_modules/@types/aria-query": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", + "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz", + "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", + "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz", + "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.3.0" + } + }, + "node_modules/@vitest/expect": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.7.tgz", + "integrity": "sha512-E8eBXaKibuvH2pSZErOjdVb5vF4PbKYcrnluBTYxEk1l/VhhwZg1kZQsdtjq+CsF5CFydf2Rdkz7jDHKSisi3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.7", + "@vitest/utils": "3.2.7", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.7.tgz", + "integrity": "sha512-Trr0hYO9CM3Wj6ksWHRhK9IZpIY6wTMO5u/MqXurMxT57sWBaOPEtP3Oq60ihZuh5JsiagKfz95OcxdEP6dBrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.2.7", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.7.tgz", + "integrity": "sha512-KUHlwqVu0sRlhCdyPdQ/wBoTfRahjUky1MubOmYw9fWfIZy1gNoHpuaaQBPAaMaVYdQYHJLurzj8ECCj5OwTqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.7.tgz", + "integrity": "sha512-sB9y4ovltoQP+WaUPwmSxO9WIg9Ig694Di5PalVPsYHklAdE027mehpWF2SQSVq+k6sFgaivbTjTJwZLSHbedA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "3.2.7", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.7.tgz", + "integrity": "sha512-7C+MwShwtBSI5Buwoyg3s/iY1eHL9PKAf+O1wVh/TdnjXUtkoL/9YQtre90i4MtNXM6edP1wJ2zOBpfCyhIS7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.7", + "magic-string": "^0.30.17", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.7.tgz", + "integrity": "sha512-Q2eQGI6d2L/hBtZ0qNuKcAGid68XK6cv1xsoaIma6PaJhHPoqcEJhYpXZ/5myCMqkNgtP6UKuBhbc0nHKnrkuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^4.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.7.tgz", + "integrity": "sha512-x6BDOd7dyo3PFLY3I9/HJ25X/6OurhGXk2/B9gOZNPF7XDVjeBK4k01lQE5uvDpbuheErh91qYuE1E2OEjK3Rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.7", + "loupe": "^3.1.4", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "dequal": "^2.0.3" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/axe-core": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.14.1.tgz", + "integrity": "sha512-FHfa+lmNjQZfJz1q8wKqIDwC6DExcHt/pkjNQb09a3NPjCKg2rhu5qb2S4r76ASyFNNtuFooJpZe37OgudVGtQ==", + "dev": true, + "license": "MPL-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/chai": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz", + "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/check-error": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.3.tgz", + "integrity": "sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + } + }, + "node_modules/cssstyle": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.6.0.tgz", + "integrity": "sha512-2z+rWdzbbSZv6/rhtvzvqeZQHrBaqgogqt85sqFNbabZOuFbCVFb8kPeEtZjiKkbrm395irpNKiYeFeLiQnFPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@asamuzakjp/css-color": "^3.2.0", + "rrweb-cssom": "^0.8.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/csstype": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.4.tgz", + "integrity": "sha512-PoKaoPzQapnEoqUSnHx1u6W6ku8CVEgKsnpmmzU3m1nwkidpPBQ8V/Zq2+bWNrsOKoKLwTGdbx6xF7BXP1zLVQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/data-urls": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decimal.js": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", + "dev": true, + "license": "MIT" + }, + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/dom-accessibility-api": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", + "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/html-encoding-sniffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-encoding": "^3.1.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/jsdom": { + "version": "26.1.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-26.1.0.tgz", + "integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssstyle": "^4.2.1", + "data-urls": "^5.0.0", + "decimal.js": "^10.5.0", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.6", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.16", + "parse5": "^7.2.1", + "rrweb-cssom": "^0.8.0", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^5.1.1", + "w3c-xmlserializer": "^5.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.1.1", + "ws": "^8.18.0", + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "canvas": "^3.0.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "node_modules/loupe": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz", + "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/lucide-react": { + "version": "0.468.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.468.0.tgz", + "integrity": "sha512-6koYRhnM2N0GGZIdXzSeiNwguv1gt/FAjZOiPl76roBi3xKEXa4WmfpxgQwTTL4KipXjefrnf3oV4IsYhi4JFA==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc" + } + }, + "node_modules/lz-string": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "lz-string": "bin/bin.js" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/nwsapi": { + "version": "2.2.28", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.28.tgz", + "integrity": "sha512-IlVB7OS7qrOsVYlpnFIkETjMwT9jwvmocJmmM+GZU/PAB3uGi9Ezd7vcWhWBUnSc0ya4ppmQITOyP1ez9gg8cg==", + "dev": true, + "license": "MIT" + }, + "node_modules/parse5": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "entities": "^6.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathval": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", + "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/playwright": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.65.1.tgz", + "integrity": "sha512-vJ1FuoOrNwOKHUIVEvSt3jT1L+wjjDpwhwIstKtfvTh8XIG4FG4bIFuvNdMxi81LGfAhUgUZleVFaOLY4RIUUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.65.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/playwright-core": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.65.1.tgz", + "integrity": "sha512-hqPpz7blSMPxWVdoeE1yiBSzXsKiVOd2k+kjCvmUywD2GPO2Dd9HfcWnq9NN0GHbNZDFgZ9JfBFr+X5/BLo0qw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/postcss": { + "version": "8.5.33", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.33.tgz", + "integrity": "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/react": { + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-19.3.1.tgz", + "integrity": "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.1.tgz", + "integrity": "sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.28.0" + }, + "peerDependencies": { + "react": "^19.3.1" + } + }, + "node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/rollup": { + "version": "4.68.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.68.5.tgz", + "integrity": "sha512-m6toRYCueVCY+5aEIriX7Dc36g3EHzn3Wk7xCW5aGgCQtTo4uXLZiZPNhDFMmPfVSvC92y3wEwIP2DCUp/ukXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.10" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.68.5", + "@rollup/rollup-android-arm64": "4.68.5", + "@rollup/rollup-android-x64": "4.68.5", + "@rollup/rollup-darwin-arm64": "4.68.5", + "@rollup/rollup-darwin-x64": "4.68.5", + "@rollup/rollup-freebsd-arm64": "4.68.5", + "@rollup/rollup-freebsd-x64": "4.68.5", + "@rollup/rollup-linux-arm-gnueabihf": "4.68.5", + "@rollup/rollup-linux-arm-musleabihf": "4.68.5", + "@rollup/rollup-linux-arm64-gnu": "4.68.5", + "@rollup/rollup-linux-arm64-musl": "4.68.5", + "@rollup/rollup-linux-loong64-gnu": "4.68.5", + "@rollup/rollup-linux-loong64-musl": "4.68.5", + "@rollup/rollup-linux-ppc64-gnu": "4.68.5", + "@rollup/rollup-linux-ppc64-musl": "4.68.5", + "@rollup/rollup-linux-riscv64-gnu": "4.68.5", + "@rollup/rollup-linux-riscv64-musl": "4.68.5", + "@rollup/rollup-linux-s390x-gnu": "4.68.5", + "@rollup/rollup-linux-x64-gnu": "4.68.5", + "@rollup/rollup-linux-x64-musl": "4.68.5", + "@rollup/rollup-openbsd-x64": "4.68.5", + "@rollup/rollup-openharmony-arm64": "4.68.5", + "@rollup/rollup-win32-arm64-msvc": "4.68.5", + "@rollup/rollup-win32-ia32-msvc": "4.68.5", + "@rollup/rollup-win32-x64-gnu": "4.68.5", + "@rollup/rollup-win32-x64-msvc": "4.68.5", + "fsevents": "~2.3.2" + } + }, + "node_modules/rrweb-cssom": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.8.0.tgz", + "integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==", + "dev": true, + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/saxes": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "dev": true, + "license": "ISC", + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=v12.22.7" + } + }, + "node_modules/scheduler": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz", + "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==", + "license": "MIT" + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, + "node_modules/source-map-js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", + "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", + "dev": true, + "license": "MIT" + }, + "node_modules/strip-literal": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.1.0.tgz", + "integrity": "sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/strip-literal/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinypool": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.6.tgz", + "integrity": "sha512-u8KszXvGfU68hVcZpRHKG28T0krMuv2G5nDhiHaMLen/gIuFEgIJhaJuO69qjnXg5paSrbPMFfx3brNuN8eVSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tldts": { + "version": "6.1.86", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz", + "integrity": "sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tldts-core": "^6.1.86" + }, + "bin": { + "tldts": "bin/cli.js" + } + }, + "node_modules/tldts-core": { + "version": "6.1.86", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.86.tgz", + "integrity": "sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tough-cookie": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz", + "integrity": "sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tldts": "^6.1.32" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/tr46": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz", + "integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/vite": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.8.tgz", + "integrity": "sha512-3tTi78MAKhVk9h+YZVXMQ8POmneJuE97QUPAWtJghHzhH7BAyiqQOC2KZh1DWOsu/USB2cRXhznPByaabvYXfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.27.0 || ^0.28.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.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" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", + "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.4.1", + "es-module-lexer": "^1.7.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.7.tgz", + "integrity": "sha512-KrxIJ62Fd89gfysR4WotlgZABiz2dqFPgqGzX7s+CwsqLFomRH7777ZcrOD6+WVAh7khPQP41A+BKbpcJFrdEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.7", + "@vitest/mocker": "3.2.7", + "@vitest/pretty-format": "^3.2.7", + "@vitest/runner": "3.2.7", + "@vitest/snapshot": "3.2.7", + "@vitest/spy": "3.2.7", + "@vitest/utils": "3.2.7", + "chai": "^5.2.0", + "debug": "^4.4.1", + "expect-type": "^1.2.1", + "magic-string": "^0.30.17", + "pathe": "^2.0.3", + "picomatch": "^4.0.2", + "std-env": "^3.9.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.1", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.4", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.2.7", + "@vitest/ui": "3.2.7", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/debug": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/w3c-xmlserializer": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "deprecated": "Use @exodus/bytes instead for a more spec-conformant and faster implementation", + "dev": true, + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-url": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz", + "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tr46": "^5.1.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ws": { + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.23.0.tgz", + "integrity": "sha512-wCkmX8QMOrKjgO8HW2WyDbTSGeqkocxgDzS9iR79rEAexty6/2qzilx3Ag8Tqf9ykop3irLKle0MtVn5qjVnoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xml-name-validator": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/src/ZipXP.UI/package.json b/src/ZipXP.UI/package.json new file mode 100644 index 0000000..c9fa3eb --- /dev/null +++ b/src/ZipXP.UI/package.json @@ -0,0 +1,29 @@ +{ + "name": "zipxp-ui", + "private": true, + "version": "0.2.0", + "type": "module", + "scripts": { + "dev": "vite --host 127.0.0.1", + "build": "tsc -b && vite build", + "test": "vitest run src", + "test:ui": "playwright test" + }, + "dependencies": { + "lucide-react": "^0.468.0", + "react": "^19.2.0", + "react-dom": "^19.2.0" + }, + "devDependencies": { + "@axe-core/playwright": "^4.14.0", + "@playwright/test": "^1.65.1", + "@testing-library/react": "^16.3.0", + "@testing-library/user-event": "^14.6.1", + "@types/react": "^19.2.0", + "@types/react-dom": "^19.2.0", + "jsdom": "^26.1.0", + "typescript": "~5.9.3", + "vite": "^7.3.0", + "vitest": "^3.2.4" + } +} diff --git a/src/ZipXP.UI/playwright.config.ts b/src/ZipXP.UI/playwright.config.ts new file mode 100644 index 0000000..ee7cf14 --- /dev/null +++ b/src/ZipXP.UI/playwright.config.ts @@ -0,0 +1,13 @@ +import { defineConfig } from "@playwright/test"; +export default defineConfig({ + testDir: "./e2e", + workers: 1, + reporter: "list", + use: { + reducedMotion: "reduce", + viewport: { width: 1280, height: 900 }, + launchOptions: process.env.ZIPXP_CHROMIUM + ? { executablePath: process.env.ZIPXP_CHROMIUM } + : {}, + }, +}); diff --git a/src/ZipXP.UI/src/App.test.tsx b/src/ZipXP.UI/src/App.test.tsx new file mode 100644 index 0000000..eb57940 --- /dev/null +++ b/src/ZipXP.UI/src/App.test.tsx @@ -0,0 +1,217 @@ +// @vitest-environment jsdom +import { afterEach, beforeEach, expect, it, vi } from "vitest"; +import { + cleanup, + render, + screen, + waitFor, + within, +} from "@testing-library/react"; +import userEvent from "@testing-library/user-event"; +import App from "./App"; +import type { Snapshot } from "./types"; +import { request } from "./bridge"; +vi.mock("./bridge", () => ({ connected: true, request: vi.fn() })); +const fixture: Snapshot = { + folders: [ + { + id: "work", + name: "Work", + path: "C:\\Work", + status: "Watching", + scan: { + utc: "2026-01-01T12:00:00Z", + logical: 1048576, + allocated: 524288, + candidates: 262144, + estimatedSaving: 131072, + files: 4, + unknown: 0, + errors: 0, + complete: true, + nativeDefaults: 0, + }, + policy: { + enabled: false, + paused: false, + recursive: true, + runOnBattery: false, + minimumBytes: 65536, + maximumBytes: 268435456, + minimumSavingBytes: 16384, + reserveBytes: 268435456, + quietSeconds: 60, + cooldownSeconds: 3600, + startHour: 0, + endHour: 0, + exclusions: "*.zip", + }, + }, + ], + jobs: [ + { + id: "failed", + rootId: "work", + path: "C:\\Work\\locked.txt", + fileName: "locked.txt", + state: "Failed", + stateText: "Failed", + action: "Compress", + message: "File is locked", + delta: null, + utc: "2026-01-01T12:00:00Z", + pending: false, + }, + ], + paused: false, + startup: false, + status: "Ready", + currentFile: null, + original: 1048576, + allocated: 524288, + unknown: 0, + volumes: [], +}; +beforeEach(() => { + vi.mocked(request).mockImplementation(async (command) => { + if (command === "snapshot") return structuredClone(fixture) as never; + return "Done" as never; + }); + HTMLDialogElement.prototype.close = function () { + this.removeAttribute("open"); + }; + HTMLDialogElement.prototype.showModal = function () { + this.setAttribute("open", ""); + }; +}); +afterEach(() => { + cleanup(); + vi.resetAllMocks(); +}); +it("keeps adding a folder separate from enabling compression", async () => { + vi.mocked(request).mockImplementation(async (command) => + command === "snapshot" + ? ({ ...fixture, folders: [], jobs: [] } as never) + : ("new-folder" as never), + ); + render(); + await userEvent.click( + await screen.findByRole("button", { name: "Choose your first folder" }), + ); + expect(request).toHaveBeenCalledWith("addFolder", {}); + expect( + vi + .mocked(request) + .mock.calls.some(([command]) => + ["queue", "savePolicy"].includes(command), + ), + ).toBe(false); +}); +it("saves an explicitly enabled folder policy", async () => { + render(); + await screen.findByRole("button", { name: "Compress all eligible" }); + await userEvent.click( + screen.getByRole("button", { name: "Managed folders" }), + ); + await userEvent.click( + screen.getByRole("button", { name: "Settings for Work" }), + ); + const dialog = screen.getByRole("dialog"); + await userEvent.click( + within(dialog).getByLabelText("Automatically compress files"), + ); + await userEvent.click( + within(dialog).getByRole("button", { name: "Save settings" }), + ); + await waitFor(() => + expect(request).toHaveBeenCalledWith("savePolicy", { + rootId: "work", + policy: { ...fixture.folders[0].policy, enabled: true }, + }), + ); +}); +it("keeps a rejected operation visible to the user", async () => { + vi.mocked(request).mockImplementation(async (command) => { + if (command === "queue") throw new Error("Not enough free space"); + return structuredClone(fixture) as never; + }); + render(); + await userEvent.click( + await screen.findByRole("button", { name: "Compress all eligible" }), + ); + await waitFor(() => + expect(screen.getByRole("alert").textContent).toContain( + "Not enough free space", + ), + ); + await waitFor(() => expect(request).toHaveBeenCalledWith("snapshot", {})); + expect(screen.getByRole("alert").textContent).toContain( + "Not enough free space", + ); +}); +it("filters activity and retries the selected failed item", async () => { + render(); + await screen.findByRole("button", { name: "Compress all eligible" }); + await userEvent.click(screen.getByRole("button", { name: /Activity/ })); + await userEvent.type( + screen.getByRole("textbox", { name: "Search activity" }), + "missing", + ); + expect(screen.getByText("No matching activity")).toBeTruthy(); + await userEvent.clear( + screen.getByRole("textbox", { name: "Search activity" }), + ); + await userEvent.click(screen.getByRole("button", { name: "Try again" })); + expect(request).toHaveBeenCalledWith("retry", { jobId: "failed" }); +}); + +it("updates the sign-in checkbox immediately and restores it if Windows rejects the change", async () => { + let rejectStartup!: (reason: Error) => void; + vi.mocked(request).mockImplementation(async (command) => { + if (command === "startup") + return new Promise((_resolve, reject) => { + rejectStartup = reject; + }) as never; + return structuredClone(fixture) as never; + }); + render(); + await screen.findByRole("button", { name: "Compress all eligible" }); + const checkbox = screen.getByRole("checkbox", { + name: "Start when I sign in", + }) as HTMLInputElement; + await userEvent.click(checkbox); + expect(checkbox.checked).toBe(true); + rejectStartup(new Error("Windows could not save the sign-in preference.")); + await waitFor(() => expect(checkbox.checked).toBe(false)); + expect(screen.getByRole("alert").textContent).toContain( + "Windows could not save", + ); +}); + +it("announces plural failure counts in both navigation and consolidated attention", async () => { + vi.mocked(request).mockImplementation(async (command) => + command === "snapshot" + ? ({ + ...fixture, + paused: true, + jobs: [ + fixture.jobs[0], + { + ...fixture.jobs[0], + id: "second", + fileName: "second.txt", + }, + ], + } as never) + : ("Done" as never), + ); + render(); + await screen.findByRole("button", { + name: "Activity 2 failed files", + }); + expect( + screen.getByRole("button", { + name: "2 files need attention, Review activity", + }).textContent, + ).toContain("2 files need attention"); +}); diff --git a/src/ZipXP.UI/src/App.tsx b/src/ZipXP.UI/src/App.tsx new file mode 100644 index 0000000..912c5ac --- /dev/null +++ b/src/ZipXP.UI/src/App.tsx @@ -0,0 +1,2470 @@ +import { + Children, + createContext, + useCallback, + useContext, + useEffect, + useId, + useRef, + useState, +} from "react"; +import type { ButtonHTMLAttributes, ReactNode } from "react"; +import { + Activity, + AlertCircle, + ArrowDownToLine, + ArrowLeft, + ArrowUpRight, + Check, + ChevronDown, + ChevronRight, + Clock3, + FileText, + Eye, + Folder, + FolderPlus, + HardDrive, + LayoutDashboard, + LoaderCircle, + MoreHorizontal, + Pause, + Play, + Power, + RefreshCw, + Search, + Settings2, + ShieldCheck, + Sparkles, + Unplug, + X, +} from "lucide-react"; +import { connected, request } from "./bridge"; +import type { + Folder as ManagedFolder, + Insights, + Policy, + Snapshot, + Job, +} from "./types"; + +type Page = "Overview" | "Managed folders" | "Storage insights" | "Activity"; +type Act = (action: () => Promise) => Promise; +const pages = [ + { name: "Overview", icon: LayoutDashboard }, + { name: "Managed folders", icon: Folder }, + { name: "Storage insights", icon: HardDrive }, + { name: "Activity", icon: Activity }, +] as const; +const hints: Record = { + Overview: "Your storage, savings, and background activity.", + "Managed folders": + "Choose which folders to watch and how to compress them.", + "Storage insights": "Find the files and folders using the most space.", + Activity: "Track work and resolve files that need attention.", +}; +const ActionState = createContext({ busy: false, active: "" }); +function ActionButton({ + children, + actionLabel, + onClick, + disabled, + ...props +}: ButtonHTMLAttributes & { actionLabel?: string }) { + const { busy, active } = useContext(ActionState); + const id = useId(); + const label = + actionLabel ?? + props["aria-label"] ?? + Children.toArray(children) + .filter( + (child) => + typeof child === "string" || typeof child === "number", + ) + .join(" ") + .replace(/\s+/g, " ") + .trim(); + return ( + + ); +} +export function bytes(value: number | null | undefined): string { + if (value == null) return "—"; + const units = ["bytes", "KB", "MB", "GB", "TB"]; + let size = value, + unit = 0; + while (Math.abs(size) >= 1024 && unit < units.length - 1) { + size /= 1024; + unit++; + } + return `${new Intl.NumberFormat(undefined, { maximumFractionDigits: unit ? 1 : 0 }).format(size)} ${units[unit]}`; +} +function when(value: string): string { + const date = new Date(value); + return date.toLocaleDateString() === new Date().toLocaleDateString() + ? `Today, ${date.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })}` + : date.toLocaleDateString([], { month: "short", day: "numeric" }); +} +function Meter({ value, label }: { value: number; label: string }) { + const percent = Math.round(Math.max(0, Math.min(1, value)) * 100); + return ( +
+ +
+ ); +} +function Empty({ + title, + children, + icon = "folder", +}: { + title: string; + children: ReactNode; + icon?: "folder" | "activity" | "search" | "connection"; +}) { + const Icon = + icon === "connection" + ? Unplug + : icon === "activity" + ? Activity + : icon === "search" + ? Search + : FolderPlus; + return ( +
+
+ +
+

{title}

+ {children} +
+ ); +} + +function useScrollEdges(contentKey?: string | number) { + const ref = useRef(null); + const [edges, setEdges] = useState({ above: false, below: false }); + useEffect(() => { + const element = ref.current; + if (!element) return; + const measure = () => { + const above = element.scrollTop > 2; + const below = + element.scrollHeight - + element.clientHeight - + element.scrollTop > + 2; + setEdges((current) => + current.above === above && current.below === below + ? current + : { above, below }, + ); + }; + measure(); + const observer = + typeof ResizeObserver === "undefined" + ? undefined + : new ResizeObserver(measure); + observer?.observe(element); + Array.from(element.children).forEach((child) => + observer?.observe(child), + ); + element.addEventListener("scroll", measure, { passive: true }); + return () => { + observer?.disconnect(); + element.removeEventListener("scroll", measure); + }; + }, [contentKey]); + return { ref, ...edges }; +} + +export default function App() { + const [page, setPage] = useState("Overview"); + const [data, setData] = useState(null); + const [actionError, setError] = useState(""); + const [connectionError, setConnectionError] = useState(""); + const [notice, setNotice] = useState(""); + const [busy, setBusy] = useState(false); + const [quitting, setQuitting] = useState(false); + const [startupBusy, setStartupBusy] = useState(false); + const exitRequested = useRef(false); + const startupRevision = useRef(0); + const [active, setActive] = useState(""); + const [actionLabel, setActionLabel] = useState(""); + const [selectedId, setSelectedId] = useState(""); + const [editing, setEditing] = useState(null); + const [activityFilter, setActivityFilter] = useState("All"); + const loading = useRef(false), + command = useRef(false); + const refresh = useCallback(async () => { + if (loading.current) return; + loading.current = true; + const revision = startupRevision.current; + try { + const snapshot = await request("snapshot", {}); + setData((current) => + revision === startupRevision.current || !current + ? snapshot + : { ...snapshot, startup: current.startup }, + ); + setConnectionError(""); + } catch (e) { + setConnectionError((e as Error).message); + } finally { + loading.current = false; + } + }, []); + useEffect(() => { + void refresh(); + const timer = setInterval(() => { + if (connected && !document.hidden && !command.current) + void refresh(); + }, 3000); + return () => clearInterval(timer); + }, [refresh]); + useEffect(() => { + document.scrollingElement?.scrollTo?.({ top: 0, left: 0 }); + }, [page]); + const folders = data?.folders ?? []; + const selected = folders.find((f) => f.id === selectedId) ?? folders[0]; + async function act(action: () => Promise, announce = true) { + if (command.current || connectionError || exitRequested.current) return; + command.current = true; + const button = document.activeElement as HTMLElement | null; + setActive(button?.dataset.actionId ?? ""); + setActionLabel(button?.dataset.actionLabel || "Updating your folders"); + setBusy(true); + setError(""); + setNotice(""); + try { + const result = await action(); + if ( + announce && + typeof result === "string" && + result !== "No changes made." + ) + setNotice(result); + } catch (e) { + setError((e as Error).message); + } finally { + command.current = false; + setBusy(false); + setActive(""); + void refresh(); + } + } + const add = () => + act(async () => { + const id = await request("addFolder", {}); + if (id) { + setSelectedId(id); + setPage("Managed folders"); + return "Folder added. The first scan only reads your files. Open Settings to turn on automatic compression."; + } + }); + const queue = ( + operation: "Compress" | "Decompress" | "ClearDefault", + rootId?: string, + ) => act(() => request("queue", { rootId, operation })); + const quit = async () => { + if (!connected || exitRequested.current) return; + exitRequested.current = true; + setQuitting(true); + setNotice(""); + try { + await request("quit", {}); + } catch (error) { + exitRequested.current = false; + setQuitting(false); + setError((error as Error).message); + } + }; + const updateStartup = async (enabled: boolean) => { + const previous = data?.startup ?? false; + startupRevision.current++; + setStartupBusy(true); + setData((current) => + current ? { ...current, startup: enabled } : current, + ); + try { + await request("startup", { enabled }); + } catch (error) { + startupRevision.current++; + setData((current) => + current ? { ...current, startup: previous } : current, + ); + setError((error as Error).message); + } finally { + setStartupBusy(false); + } + }; + const reveal = async (jobId: string) => { + try { + await request("showFile", { jobId }); + } catch (error) { + setError((error as Error).message); + } + }; + const edit = (folder: ManagedFolder) => { + setError(""); + setEditing(folder); + }; + const failed = data?.jobs.filter((j) => j.state === "Failed").length ?? 0; + const openFailures = () => { + setActivityFilter("Failed"); + setPage("Activity"); + }; + const footerStatus = quitting + ? { Icon: Power, text: "Quitting ZipXP…" } + : busy + ? { Icon: Activity, text: "Working on your request…" } + : connectionError + ? { Icon: Unplug, text: "Engine connection unavailable" } + : data?.paused + ? { Icon: Pause, text: "Background work paused" } + : data?.currentFile + ? { Icon: Activity, text: `Working on ${data.currentFile}` } + : { + Icon: data ? Eye : Unplug, + text: data?.status ?? "Not connected", + }; + return ( + +
+ + Skip to content + + +
+
+
+

{page}

+

{hints[page]}

+
+
+ {folders.length > 0 && !data?.paused && ( + + void act( + () => + request("pause", { + paused: true, + }), + false, + ) + } + > + + Pause all folders + + )} + {((page !== "Overview" && + page !== "Managed folders") || + folders.length > 0) && ( + void add()} + > + + Add folder + + )} +
+
+ {connectionError && !quitting && ( +
+ +
+ + {connected + ? "Engine connection unavailable" + : "Desktop app unavailable"} + +

{connectionError}

+
+ +
+ )} + {actionError && !editing && !quitting && ( +
+ +
+ That action couldn’t finish +

{actionError}

+
+ +
+ )} + {notice && !quitting && ( +
+ + {notice} + +
+ )} + {(busy || quitting) && ( +
+ +
+ + {quitting + ? "Quitting ZipXP…" + : `${actionLabel}…`} + + + {quitting + ? "Stopping background work. Pending work stays queued for next time." + : "Working on your request. Check the confirmation dialog if prompted."} + +
+
+ )} + {!quitting && data?.paused && ( +
+ +
+ All background work is paused +

+ The current file will finish. New work waits + until you resume. +

+
+ + void act( + () => + request("pause", { paused: false }), + false, + ) + } + > + + Resume all folders + +
+ )} + {!quitting && + (!data ? ( +
+ +

+ {connected + ? connectionError + ? "Retry the connection to load your folders." + : "Waiting for the local compression engine." + : "Use the Windows desktop app to manage folders and compress files."} +

+ {!connectionError && ( + + )} +
+
+ ) : ( +
+ {page === "Overview" && ( + + setPage("Managed folders") + } + openFailures={openFailures} + /> + )} + {page === "Managed folders" && ( + + )} + {page === "Storage insights" && ( + + )} + {page === "Activity" && ( + + )} +
+ ))} +
+ + + {footerStatus.text} + + + + Local NTFS compression + +
+
+ {editing && ( + { + setEditing(null); + setError(""); + }} + save={(policy) => + void act(async () => { + const result = await request("savePolicy", { + rootId: editing.id, + policy, + }); + setEditing(null); + return result; + }) + } + /> + )} +
+
+ ); +} + +function Overview({ + hasBanner, + data, + add, + queue, + manage, + openFailures, +}: { + hasBanner: boolean; + data: Snapshot; + add: () => Promise; + queue: (op: "Compress" | "Decompress", id?: string) => Promise; + manage: () => void; + openFailures: () => void; +}) { + const { folders } = data; + if (!folders.length) + return ( +
+ +

+ Add a folder to estimate its compression savings. +
+ Your files keep the same names and locations. +

+ void add()} + > + + Choose your first folder + +
+ + Adding a folder only scans it. Nothing changes. +
+
+
+ ); + const saved = Math.max(0, data.original - data.allocated); + const measured = folders.some((f) => f.scan); + const eligible = folders.filter((f) => !f.policy.paused); + const estimate = folders.reduce( + (sum, f) => sum + (f.scan?.estimatedSaving ?? 0), + 0, + ); + const available = eligible.reduce( + (sum, f) => sum + (f.scan?.estimatedSaving ?? 0), + 0, + ); + const pending = data.jobs.filter((j) => j.pending).length; + const failed = data.jobs.filter((j) => j.state === "Failed").length; + return ( + <> + {failed > 0 && !hasBanner && ( +
+ + + +
+ + {failed}{" "} + {failed === 1 ? "file needs" : "files need"}{" "} + attention + +

+ Some files couldn’t be processed. Review the details + and retry when ready. +

+
+ +
+ )} +
+
+
SPACE SAVED
+

+ {measured ? bytes(saved) : "—"} + saved +

+

+ {saved > 0 && data.original > 0 + ? `Your managed files use ${Math.round((saved / data.original) * 100)}% less disk space.` + : "Run compression once or turn on automatic compression in folder settings."} +

+
+ void queue("Compress")} + > + + Compress all eligible + + +
+

+ {data.paused + ? "Resume all folders before starting a new compression job." + : `One-time compression across ${eligible.length} unpaused ${eligible.length === 1 ? "folder" : "folders"}. You’ll see a preview first.`} +

+
+
+ + {measured && data.original > 0 + ? `${Math.round((saved / data.original) * 100)}%` + : "—"} + + less space used +
+
+
+ + Used now{" "} + + {measured ? bytes(data.allocated) : "—"} + + + + Original size{" "} + + {measured ? bytes(data.original) : "—"} + + +
+ +
+ + + Used on disk + + + + Space saved + +
+
+
+
+
+ + + +
POTENTIAL SAVINGS
+ {measured ? bytes(estimate) : "—"} +

+ Estimate across all folders. Actual savings may differ. +

+
+
+ + + +
MANAGED FOLDERS
+ + {folders.length} + folders + + +
+
+ + + +
BACKGROUND QUEUE
+ + {pending} + active or waiting + + {failed > 0 && hasBanner ? ( + + ) : ( +

+ {data.paused + ? "Paused until you resume." + : data.currentFile + ? "Processing a file in the background." + : pending + ? "Queued files will run when conditions allow." + : "Up to date. Watching for file changes."} +

+ )} +
+
+
+
+

Your drives

+ Current disk usage +
+
+ {data.volumes.map((v) => ( +
+ +
+
+ {v.name} + + {bytes(v.free)} free of {bytes(v.total)} + +
+ +
+
+ ))} + {!data.volumes.length && ( +

Drive information is currently unavailable.

+ )} +
+
+ {data.unknown > 0 && ( +
+ + + {data.unknown} items couldn’t be measured. Storage + totals include measured files only. + +
+ )} +
+ + + Nothing deleted. Restore the original size from Managed + folders. + +
+ + ); +} + +function MoreActions({ children }: { children: ReactNode }) { + const ref = useRef(null); + useEffect(() => { + const outside = (e: PointerEvent) => { + if (!ref.current?.contains(e.target as Node)) + ref.current?.removeAttribute("open"); + }; + const escape = (e: KeyboardEvent) => { + if (e.key === "Escape" && ref.current?.open) { + ref.current.open = false; + ref.current.querySelector("summary")?.focus(); + } + }; + document.addEventListener("pointerdown", outside); + document.addEventListener("keydown", escape); + return () => { + document.removeEventListener("pointerdown", outside); + document.removeEventListener("keydown", escape); + }; + }, []); + return ( +
+ + + More actions + + +
{ + const button = (e.target as HTMLElement).closest("button"); + if ( + button && + !button.disabled && + button.getAttribute("aria-disabled") !== "true" + ) { + ref.current?.removeAttribute("open"); + ref.current?.querySelector("summary")?.focus(); + } + }} + > + {children} +
+
+ ); +} +function FolderPanel({ + globallyPaused, + folders, + selected, + select, + add, + edit, + queue, + act, +}: { + globallyPaused: boolean; + folders: ManagedFolder[]; + selected?: ManagedFolder; + select: (id: string) => void; + add: () => Promise; + edit: (f: ManagedFolder) => void; + queue: ( + op: "Compress" | "Decompress" | "ClearDefault", + id: string, + ) => Promise; + act: Act; +}) { + const scroll = useScrollEdges(folders.length); + return ( +
+ {!folders.length ? ( + +

+ Start with a scan. Compression stays off until you + choose to enable it. +

+ void add()} + > + Add folder + +
+ ) : ( + <> +
+

+ Your folders{" "} + {folders.length} +

+ + {scroll.above || scroll.below + ? "Scroll to browse folders" + : "Select a folder for actions"} + +
+
+ {folders.map((f) => ( +
+ +
+ + {bytes(f.scan?.allocated)} + + {" "} + used on disk + + + + {f.scan + ? `${bytes(Math.max(0, f.scan.logical - f.scan.allocated))} saved` + : "Waiting for scan"} + +
+ + {globallyPaused && f.policy.enabled + ? "Paused globally" + : f.policy.paused + ? "Paused" + : f.policy.enabled + ? "Auto-compress on" + : "Analysis only"} + + +
+ ))} +
+ {selected && ( +
+
+
+

{selected.name}

+

+ {selected.policy.paused || + globallyPaused ? ( + + ) : ( + + )} + {globallyPaused + ? "Background work paused globally" + : selected.status} +

+
+ +
+
+ + void queue("Compress", selected.id) + } + > + + Compress now + + + void act(() => + request("scan", { + rootId: selected.id, + }), + ) + } + > + + Scan again + + + void act(() => + request("pauseFolder", { + rootId: selected.id, + paused: !selected.policy.paused, + }), + ) + } + > + {selected.policy.paused ? ( + + ) : ( + + )} + {selected.policy.paused + ? "Resume folder" + : "Pause folder"} + + + + void queue( + "Decompress", + selected.id, + ) + } + > +
+ + Restore original size + + + Uncompress files and turn off + automatic compression. + +
+
+ + void queue( + "ClearDefault", + selected.id, + ) + } + > +
+ + Turn off Windows compression + + + {selected.scan?.nativeDefaults + ? "Change Windows’ own folder setting. ZipXP auto-compress is separate." + : "Windows’ folder setting is already off. ZipXP auto-compress is separate."} + +
+
+ + void act(() => + request("remove", { + rootId: selected.id, + }), + ) + } + > +
+ + Stop managing this folder + + + Remove it from ZipXP. Leave its + files as they are. + +
+
+
+
+
+ + {selected.scan + ? `Last scanned ${when(selected.scan.utc)} · ${selected.scan.files.toLocaleString()} files` + : "Waiting for the first scan"} +
+ {selected.scan && + (!selected.scan.complete || + selected.scan.unknown > 0 || + selected.scan.errors > 0) && ( +
+ + + Partial scan ·{" "} + {selected.scan.unknown} unknown ·{" "} + {selected.scan.errors} errors. + Unreadable items are left out. + +
+ )} +
+ )} + + )} +
+ + New folders are analysis only. Settings controls automatic + compression; More actions includes restore. +
+
+ ); +} + +function InsightsPage({ + folders, + selected, + select, + act, +}: { + folders: ManagedFolder[]; + selected?: ManagedFolder; + select: (id: string) => void; + act: Act; +}) { + const [path, setPath] = useState(""), + [largest, setLargest] = useState(false), + [search, setSearch] = useState(""); + const [result, setResult] = useState(null), + [error, setError] = useState(""), + [loading, setLoading] = useState(true); + const [checked, setChecked] = useState([]), + [retry, setRetry] = useState(0); + const [sort, setSort] = useState<"allocated" | "logical" | "name">( + "allocated", + ); + // Scan changes refresh the view; unrelated snapshot/job polls do not interrupt a search. + const scanUtc = selected?.scan?.utc; + useEffect(() => { + if (!selected) return; + let active = true; + setLoading(true); + setError(""); + setChecked([]); + const timer = setTimeout(() => { + request("insights", { rootId: selected.id, path, largest, search }) + .then((value) => { + if (active) { + setResult(value); + setLoading(false); + } + }) + .catch((e) => { + if (active) { + setError(e.message); + setLoading(false); + } + }); + }, 180); + return () => { + active = false; + clearTimeout(timer); + }; + }, [selected?.id, scanUtc, path, largest, search, retry]); + const rows = [...(result?.rows ?? [])].sort((a, b) => + sort === "name" + ? a.name.localeCompare(b.name) + : (b[sort] ?? -1) - (a[sort] ?? -1), + ); + const total = rows.reduce( + (sum, r) => sum + (r.allocated ?? r.logical ?? 0), + 0, + ); + const selectable = rows + .filter((r) => !r.directory && r.compressed) + .map((r) => r.path); + const crumbs = + selected && result + ? result.path + .slice(selected.path.length) + .split("\\") + .filter(Boolean) + : []; + const navigate = (next: string) => { + const destination = next === selected?.path ? "" : next; + if (destination === path) return; + setPath(destination); + setResult(null); + setChecked([]); + }; + const switchView = (next: boolean) => { + if (next === largest) return; + setLargest(next); + setPath(""); + setResult(null); + setChecked([]); + }; + return ( +
+ {!selected ? ( + +

Add a managed folder to browse the files inside it.

+
+ ) : ( + <> +
+ +
+ + +
+ +
+
+ + + + void act(async () => { + const message = await request( + "restoreSelected", + { rootId: selected.id, paths: checked }, + ); + setChecked([]); + return message; + }) + } + > + Restore selected + {checked.length > 0 ? ` (${checked.length})` : ""} + +
+
+ + {loading ? ( + <> + + {result + ? "Updating results…" + : "Loading files…"} + + ) : error ? ( + "Couldn’t update files" + ) : ( + `${result?.totalRows.toLocaleString() ?? 0} matching items` + )} + + +
+ {error && ( +
+ + {error} + +
+ )} +

+ Scroll horizontally for more columns. File names stay + visible. +

+
+ + + + + + + + + + + + + + {rows.map((r) => ( + + + + + + + + + + ))} + +
+ {selectable.length > 0 ? ( + 0 && + selectable.every((p) => + checked.includes(p), + ) + } + onChange={(e) => + setChecked( + e.target.checked + ? selectable + : [], + ) + } + /> + ) : ( + + Selection + + )} + NameShare + Original size + + Used now + + Saved + Status
+ {!r.directory && r.compressed && ( + + setChecked((old) => + e.target.checked + ? [ + ...old, + r.path, + ] + : old.filter( + (p) => + p !== + r.path, + ), + ) + } + /> + )} + + {r.directory ? ( + + ) : ( + + + {r.name} + + )} + + Original {bytes(r.logical)} ·{" "} + {r.notes || + (r.directory + ? "Folder" + : "Not compressed")} + + +
+ + + {Math.round( + total + ? ((r.allocated ?? + r.logical ?? + 0) / + total) * + 100 + : 0, + )} + % + +
+
+ {bytes(r.logical)} + + {bytes(r.allocated)} + + {r.logical != null && + r.allocated != null + ? bytes( + Math.max( + 0, + r.logical - + r.allocated, + ), + ) + : "—"} + + {r.notes || + (r.directory + ? "Folder" + : "Not compressed")} +
+
+ {!rows.length && !loading && !error && ( + +

+ {search + ? "Try a different file name or clear the search." + : "The folder may still be scanning. You can request a new scan from Managed folders."} +

+ {search && ( + + )} +
+ )} +
+ {result && result.totalRows > rows.length + ? `Showing the largest ${rows.length} of ${result.totalRows} matching items.` + : "Open a folder to browse. Select compressed files to restore their original size."} +
+ + )} +
+ ); +} + +function jobDetail(job: Job): string { + if (job.message.trim()) return job.message; + switch (job.state) { + case "Succeeded": + return "Completed successfully."; + case "Queued": + return "Waiting to start."; + case "Running": + return "Processing this file."; + case "Retry": + return "Waiting to try again."; + case "Failed": + return "Couldn’t process this file. Review it before trying again."; + case "Skipped": + return "This file was skipped."; + case "Unchanged": + return "No change was needed."; + default: + return "Status unavailable."; + } +} + +function ActivityPage({ + data, + state, + setState, + act, + reveal, +}: { + data: Snapshot; + state: string; + setState: (state: string) => void; + act: Act; + reveal: (jobId: string) => Promise; +}) { + const [search, setSearch] = useState(""); + const jobs = data.jobs.filter( + (j) => + (state === "All" || + (state === "Pending" ? j.pending : j.state === state)) && + `${j.path} ${jobDetail(j)} ${j.action} ${j.stateText}` + .toLowerCase() + .includes(search.toLowerCase()), + ); + return ( +
+
+

+ Recent activity {jobs.length} +

+
+ + +
+
+

+ Scroll horizontally for more columns. Retry actions stay + visible. +

+
+ + + + + + + + + + + + + {jobs.slice(0, 500).map((j) => ( + + + + + + + + + ))} + +
WhenAction / resultFile + Space change + DetailsActions
+ + + + {j.state === "Failed" ? ( + + ) : j.state === "Succeeded" ? ( + + ) : null} + {j.stateText} + + {j.action} + + + {j.fileName} +
+ + + {j.delta == null + ? "" + : j.delta < 0 + ? `${bytes(-j.delta)} added` + : `${bytes(j.delta)} saved`} + +
+ {(j.state !== "Succeeded" || + Boolean(j.message.trim())) && ( +

+ {jobDetail(j)} +

+ )} +
+ {j.delta == null + ? "—" + : j.delta < 0 + ? `${bytes(-j.delta)} added` + : `${bytes(j.delta)} saved`} + {jobDetail(j)} +
+ + {["Failed", "Skipped"].includes( + j.state, + ) && ( + + void act(() => + request("retry", { + jobId: j.id, + }), + ) + } + > + + Try again + + )} +
+
+
+ {!jobs.length && ( + +

+ {data.jobs.length + ? "Try another filter or search." + : "Files you compress or restore will appear here."} +

+ {data.jobs.length > 0 && ( + + )} +
+ )} + {jobs.length > 500 && ( +
+ Showing the most recent 500 matching items. +
+ )} +
+ ); +} + +type NumberKey = + | "minimumBytes" + | "maximumBytes" + | "minimumSavingBytes" + | "reserveBytes" + | "quietSeconds" + | "cooldownSeconds"; +const numberFields: { + key: NumberKey; + label: string; + unit: number; + min: number; + max?: number; + hint: string; +}[] = [ + { + key: "minimumBytes", + label: "Minimum file size (KB)", + unit: 1024, + min: 64, + hint: "At least 64 KB. Small files rarely benefit.", + }, + { + key: "maximumBytes", + label: "Maximum file size (MB)", + unit: 1048576, + min: 1, + max: 256, + hint: "Up to 256 MB per file.", + }, + { + key: "minimumSavingBytes", + label: "Minimum worthwhile saving (KB)", + unit: 1024, + min: 0, + hint: "Keep compression only when it saves this much.", + }, + { + key: "reserveBytes", + label: "Keep drive space free (MB)", + unit: 1048576, + min: 256, + hint: "At least 256 MB is reserved for Windows.", + }, + { + key: "quietSeconds", + label: "Wait after a file changes (seconds)", + unit: 1, + min: 0, + max: 2147483647, + hint: "Avoid working on files still being edited.", + }, + { + key: "cooldownSeconds", + label: "Recheck unchanged files after (minutes)", + unit: 60, + min: 0, + max: 35791394, + hint: "60 minutes is one hour.", + }, +]; +function PolicyDialog({ + folder, + busy, + error, + close, + save, +}: { + folder: ManagedFolder; + busy: boolean; + error: string; + close: () => void; + save: (policy: Policy) => void; +}) { + const dialog = useRef(null), + errorRef = useRef(null); + const [policy, setPolicy] = useState(folder.policy); + const [numbers, setNumbers] = useState( + () => + Object.fromEntries( + numberFields.map((f) => [ + f.key, + String(folder.policy[f.key] / f.unit), + ]), + ) as Record, + ); + const [limited, setLimited] = useState( + folder.policy.startHour !== folder.policy.endHour, + ); + const [touched, setTouched] = useState>({}), + [submitted, setSubmitted] = useState(false), + [advanced, setAdvanced] = useState(false); + useEffect(() => { + const previous = document.activeElement as HTMLElement | null; + const element = dialog.current!; + element.showModal(); + return () => { + element.close(); + previous?.focus(); + }; + }, []); + useEffect(() => { + if (error) errorRef.current?.focus(); + }, [error]); + const scroll = useScrollEdges(`${advanced}:${error}:${submitted}`); + const set = (key: K, value: Policy[K]) => + setPolicy((p) => ({ ...p, [key]: value })); + const errors: Record = {}; + for (const f of numberFields) { + const value = Number(numbers[f.key]); + if (!numbers[f.key].trim() || !Number.isFinite(value)) + errors[f.key] = "Enter a number."; + else if (!Number.isSafeInteger(value * f.unit)) + errors[f.key] = + "Use a value that represents a whole number of bytes or seconds."; + else if (value < f.min || (f.max != null && value > f.max)) + errors[f.key] = + `Use ${f.min}${f.max != null ? ` to ${f.max}` : " or more"}.`; + } + if ( + !errors.minimumBytes && + !errors.maximumBytes && + Number(numbers.minimumBytes) * 1024 > + Number(numbers.maximumBytes) * 1048576 + ) + errors.minimumBytes = + "Minimum file size must not exceed maximum file size."; + if (limited && policy.startHour === policy.endHour) + errors.schedule = + "Choose different start and end times, or select Any time."; + const issueCount = Object.keys(errors).filter( + (key) => submitted || touched[key], + ).length; + function field(key: NumberKey) { + const f = numberFields.find((f) => f.key === key)!; + const invalid = Boolean(errors[key] && (submitted || touched[key])); + return ( + + ); + } + return ( + { + if (busy) e.preventDefault(); + else close(); + }} + > +
{ + e.preventDefault(); + setSubmitted(true); + if (Object.keys(errors).length) { + setAdvanced(true); + setTimeout(() => { + const invalid = + dialog.current?.querySelector( + '[aria-invalid="true"]', + ); + invalid?.focus({ preventScroll: true }); + // Reveal the explanation as well as the input inside the scrolling body. + ( + invalid?.closest(".number-field") ?? + invalid?.closest(".settings-group") + )?.scrollIntoView({ block: "center" }); + }, 0); + return; + } + const numeric = Object.fromEntries( + numberFields.map((f) => [ + f.key, + Number(numbers[f.key]) * f.unit, + ]), + ); + save({ + ...policy, + ...numeric, + startHour: limited ? policy.startHour : 0, + endHour: limited ? policy.endHour : 0, + exclusions: policy.exclusions + .split(/[;\n]/) + .map((p) => p.trim()) + .filter(Boolean) + .join(";"), + }); + }} + > +
+
+
FOLDER SETTINGS
+

{folder.name}

+

{folder.path}

+
+ +
+
+ {error && ( +
+ + {error} +
+ )} + {submitted && Object.keys(errors).length > 0 && ( +
+ Review the highlighted settings before saving. +
+ )} +
+
+ +
+

+ Works while ZipXP is running. Turning this off + leaves existing files compressed. +

+ + + {(folder.scan?.nativeDefaults ?? 0) > 0 && ( +
+ + + Windows compression is on in{" "} + {folder.scan?.nativeDefaults} folders. + Windows may compress new files + independently. Use More actions to turn it + off. + +
+ )} +
setAdvanced(e.currentTarget.open)} + > + Advanced settings +
+

Which files to compress

+
+ {field("minimumBytes")} + {field("maximumBytes")} + {field("minimumSavingBytes")} +
+
+
+

Space and timing

+
+ {field("reserveBytes")} + {field("quietSeconds")} + {field("cooldownSeconds")} +
+
+
+

Work schedule

+
+ + +
+ {limited && ( +
+ {( + ["startHour", "endHour"] as const + ).map((key, i) => ( + + ))} +
+ )} +

+ Uses your PC’s local time. Overnight + schedules are supported. +

+ {errors.schedule && submitted && ( + + + {errors.schedule} + + )} +
+
+

Files and folders to skip

+